1
This commit is contained in:
0
.env.example
Normal file
0
.env.example
Normal file
10
.gitignore
vendored
Executable file
10
.gitignore
vendored
Executable file
@ -0,0 +1,10 @@
|
||||
composer.lock
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
/phpunit.xml
|
||||
/.idea
|
||||
/.vscode
|
||||
runtime
|
||||
thinkphp
|
||||
vendor
|
||||
.env
|
||||
140
application/akszadmin/controller/Article.php
Executable file
140
application/akszadmin/controller/Article.php
Executable file
@ -0,0 +1,140 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 文章管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Article extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcArticle';
|
||||
|
||||
/**
|
||||
* 文章列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '文章列表';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,t.name');
|
||||
$query->join('lc_article_type t','i.type=t.id')->equal('i.type#i_type')->like('i.title#i_title')->dateBetween('i.time#i_time')->order('i.sort asc,i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->mlist = Db::name('LcArticleType')->select();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文章
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加文章';
|
||||
$this->assign('langss', [
|
||||
['name' => '中文', 'value' => 'zh-cn'],
|
||||
['name' => '英文', 'value' => 'en'],
|
||||
['name' => '法文', 'value' => 'fr'],
|
||||
['name' => '德文', 'value' => 'de'],
|
||||
['name' => '西班牙文', 'value' => 'es'],
|
||||
['name' => '意大利文', 'value' => 'it'],
|
||||
['name' => '葡萄牙文', 'value' => 'pt'],
|
||||
['name' => '俄文', 'value' => 'ru'],
|
||||
['name' => '阿拉伯文', 'value' => 'ar'],
|
||||
]);
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑文章
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑文章';
|
||||
$this->assign('langss', [
|
||||
['name' => '中文', 'value' => 'zh-cn'],
|
||||
['name' => '英文', 'value' => 'en'],
|
||||
['name' => '法文', 'value' => 'fr'],
|
||||
['name' => '德文', 'value' => 'de'],
|
||||
['name' => '西班牙文', 'value' => 'es'],
|
||||
['name' => '意大利文', 'value' => 'it'],
|
||||
['name' => '葡萄牙文', 'value' => 'pt'],
|
||||
['name' => '俄文', 'value' => 'ru'],
|
||||
['name' => '阿拉伯文', 'value' => 'ar'],
|
||||
]);
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isGet()) {
|
||||
$this->class = Db::name("LcArticleType")->order('id asc')->select();
|
||||
if(!isset($vo['show'])) $vo['show'] = '1';
|
||||
}
|
||||
if (empty($vo['time'])) $vo['time'] = date("Y-m-d H:i:s");
|
||||
}
|
||||
|
||||
}
|
||||
113
application/akszadmin/controller/ArticleType.php
Executable file
113
application/akszadmin/controller/ArticleType.php
Executable file
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )s
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 文章分类管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class ArticleType extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcArticleType';
|
||||
|
||||
/**
|
||||
* 文章分类管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '文章分类管理';
|
||||
$query = $this->_query($this->table)->like('name');
|
||||
$query->order('sort asc,id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文章分类
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加文章分类';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑文章分类
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑文章分类';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章分类
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isPost()&&empty($vo['add_time'])) $vo['add_time'] = date("Y-m-d H:i:s");
|
||||
}
|
||||
|
||||
}
|
||||
180
application/akszadmin/controller/Auth.php
Executable file
180
application/akszadmin/controller/Auth.php
Executable file
@ -0,0 +1,180 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use library\service\AdminService;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 系统权限管理
|
||||
* Class Auth
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Auth extends Controller
|
||||
{
|
||||
/**
|
||||
* 默认数据模型
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'SystemAuth';
|
||||
|
||||
/**
|
||||
* 系统权限管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统权限管理';
|
||||
$query = $this->_query($this->table)->dateBetween('create_at');
|
||||
$query->like('title,desc')->equal('status')->order('sort desc,id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 权限配置节点
|
||||
* @auth true
|
||||
* @throws \ReflectionException
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
$map = ['auth' => input('id', '0')];
|
||||
$action = strtolower(input('action', ''));
|
||||
if ($action === 'get') {
|
||||
$checkeds = Db::name('SystemAuthNode')->where($map)->column('node');
|
||||
$this->success('获取权限节点成功!', AdminService::instance()->getTree($checkeds));
|
||||
} elseif ($action === 'save') {
|
||||
list($post, $data) = [$this->request->post(), []];
|
||||
foreach (isset($post['nodes']) ? $post['nodes'] : [] as $node) {
|
||||
$data[] = ['auth' => $map['auth'], 'node' => $node];
|
||||
}
|
||||
Db::name('SystemAuthNode')->where($map)->delete();
|
||||
Db::name('SystemAuthNode')->insertAll($data);
|
||||
AdminService::instance()->apply(true);
|
||||
$this->success('权限授权更新成功!', 'javascript:history.back()');
|
||||
} else {
|
||||
$this->title = '权限配置节点';
|
||||
$this->_form($this->table, 'apply');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加系统权限
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑系统权限
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新系统权限
|
||||
* @auth true
|
||||
*/
|
||||
public function refresh()
|
||||
{
|
||||
try {
|
||||
AdminService::instance()->apply(true);
|
||||
$this->success('刷新系统授权成功!');
|
||||
} catch (\think\exception\HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $e) {
|
||||
$this->error("刷新系统授权失败<br>{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用系统权限
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function forbid()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '0']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用系统权限
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function resume()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '1']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统权限
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除结果处理
|
||||
* @param boolean $result
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
protected function _remove_delete_result($result)
|
||||
{
|
||||
if ($result) {
|
||||
$map = ['auth' => $this->request->post('id')];
|
||||
Db::name('SystemAuthNode')->where($map)->delete();
|
||||
$this->success("权限删除成功!", '');
|
||||
} else {
|
||||
$this->error("权限删除失败,请稍候再试!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
100
application/akszadmin/controller/Bank.php
Executable file
100
application/akszadmin/controller/Bank.php
Executable file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 银行卡管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Bank extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcBank';
|
||||
|
||||
/**
|
||||
* 银行卡列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '银行卡列表';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name as u_name');
|
||||
$query->join('lc_user u','i.uid=u.id')->like('i.account#i_account,u.phone#u_phone,u.name#u_name')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑银行卡
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑银行卡';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if($this->request->isGet()){
|
||||
$vo['phone'] = Db::name("LcUser")->where(['id'=>$vo['uid']])->value('phone');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除银行卡
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
131
application/akszadmin/controller/Cash.php
Executable file
131
application/akszadmin/controller/Cash.php
Executable file
@ -0,0 +1,131 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 提现管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Cash extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcCash';
|
||||
|
||||
/**
|
||||
* 提现记录
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '提现记录';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone');
|
||||
$query->join('lc_user u','i.uid=u.id')
|
||||
->equal('i.status#i_status')
|
||||
->like('u.phone#u_phone,u.name#u_name')
|
||||
->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
|
||||
}
|
||||
public function edit()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
if($this->request->isPost()) {
|
||||
$id = $this->request->param('id');
|
||||
$reaolae = $this->request->param('reaolae');
|
||||
$cash = Db::name($this->table)->find($id);
|
||||
if(!$cash){
|
||||
$this->error('提现订单不存在');
|
||||
}
|
||||
if($cash['status'] != 0){
|
||||
$this->error('提现订单已处理');
|
||||
}
|
||||
addFinance($cash['uid'], $cash['money'],1, '提现失败,返还金额' . $cash['money'] . '元');
|
||||
setNumber('LcUser', 'money', $cash['money'], 1, "id = {$cash['uid']}");
|
||||
$this->_save($this->table, ['reaolae'=>$reaolae,'status' => '2', 'time2' => date('Y-m-d H:i:s')]);
|
||||
}else{
|
||||
$this->title = '拒绝提现';
|
||||
$id = $this->request->param('id');
|
||||
$recharge = Db::name($this->table)->find($id);
|
||||
|
||||
if($recharge){
|
||||
$recharge['username'] = Db::name("LcUser")->where(['id'=>$recharge['uid']])->value('phone');
|
||||
}
|
||||
$this->_form($this->table, 'edit');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 同意提现
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function agree()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '1', 'time2' => date('Y-m-d H:i:s')]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拒绝提现
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function refuse()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$id = $this->request->param('id');
|
||||
$cash = Db::name($this->table)->find($id);
|
||||
addFinance($cash['uid'], $cash['money'],1, '提现失败,返还金额' . $cash['money'] . '元');
|
||||
setNumber('LcUser', 'money', $cash['money'], 1, "id = {$cash['uid']}");
|
||||
$this->_save($this->table, ['status' => '2', 'time2' => date('Y-m-d H:i:s')]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
130
application/akszadmin/controller/Config.php
Executable file
130
application/akszadmin/controller/Config.php
Executable file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\exception\HttpResponseException;
|
||||
use think\facade\Request;
|
||||
|
||||
/**
|
||||
* 系统参数配置
|
||||
* Class Config
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Config extends Controller
|
||||
{
|
||||
/**
|
||||
* 默认数据模型
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'SystemConfig';
|
||||
|
||||
/**
|
||||
* 阿里云OSS上传点
|
||||
* @var array
|
||||
*/
|
||||
protected $ossPoints = [
|
||||
'oss-cn-hangzhou.aliyuncs.com' => '华东 1 杭州',
|
||||
'oss-cn-shanghai.aliyuncs.com' => '华东 2 上海',
|
||||
'oss-cn-qingdao.aliyuncs.com' => '华北 1 青岛',
|
||||
'oss-cn-beijing.aliyuncs.com' => '华北 2 北京',
|
||||
'oss-cn-zhangjiakou.aliyuncs.com' => '华北 3 张家口',
|
||||
'oss-cn-huhehaote.aliyuncs.com' => '华北 5 呼和浩特',
|
||||
'oss-cn-shenzhen.aliyuncs.com' => '华南 1 深圳',
|
||||
'oss-cn-hongkong.aliyuncs.com' => '香港 1',
|
||||
'oss-us-west-1.aliyuncs.com' => '美国西部 1 硅谷',
|
||||
'oss-us-east-1.aliyuncs.com' => '美国东部 1 弗吉尼亚',
|
||||
'oss-ap-southeast-1.aliyuncs.com' => '亚太东南 1 新加坡',
|
||||
'oss-ap-southeast-2.aliyuncs.com' => '亚太东南 2 悉尼',
|
||||
'oss-ap-southeast-3.aliyuncs.com' => '亚太东南 3 吉隆坡',
|
||||
'oss-ap-southeast-5.aliyuncs.com' => '亚太东南 5 雅加达',
|
||||
'oss-ap-northeast-1.aliyuncs.com' => '亚太东北 1 日本',
|
||||
'oss-ap-south-1.aliyuncs.com' => '亚太南部 1 孟买',
|
||||
'oss-eu-central-1.aliyuncs.com' => '欧洲中部 1 法兰克福',
|
||||
'oss-eu-west-1.aliyuncs.com' => '英国 1 伦敦',
|
||||
'oss-me-east-1.aliyuncs.com' => '中东东部 1 迪拜',
|
||||
];
|
||||
|
||||
/**
|
||||
* 系统参数配置
|
||||
* @auth true
|
||||
* @menu true
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
$this->title = '系统参数配置';
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统能数配置
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function config()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
if (Request::isGet()) {
|
||||
$this->fetch('system-config');
|
||||
}
|
||||
foreach (Request::post() as $key => $value) {
|
||||
sysconf($key, $value);
|
||||
}
|
||||
$this->success('系统参数配置成功!');
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件存储引擎
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function file()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
if (Request::isGet()) {
|
||||
$this->type = input('type', 'local');
|
||||
$this->fetch("storage-{$this->type}");
|
||||
}
|
||||
$post = Request::post();
|
||||
if (isset($post['storage_type']) && isset($post['storage_local_exts'])) {
|
||||
$exts = array_unique(explode(',', strtolower($post['storage_local_exts'])));
|
||||
sort($exts);
|
||||
if (in_array('php', $exts)) $this->error('禁止上传可执行文件到本地服务器!');
|
||||
$post['storage_local_exts'] = join(',', $exts);
|
||||
}
|
||||
foreach ($post as $key => $value) sysconf($key, $value);
|
||||
if (isset($post['storage_type']) && $post['storage_type'] === 'oss') {
|
||||
try {
|
||||
$local = sysconf('storage_oss_domain');
|
||||
$bucket = $this->request->post('storage_oss_bucket');
|
||||
$domain = \library\File::instance('oss')->setBucket($bucket);
|
||||
if (empty($local) || stripos($local, '.aliyuncs.com') !== false) {
|
||||
sysconf('storage_oss_domain', $domain);
|
||||
}
|
||||
$this->success('阿里云OSS存储配置成功!');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $e) {
|
||||
$this->error("阿里云OSS存储配置失效,{$e->getMessage()}");
|
||||
}
|
||||
} else {
|
||||
$this->success('文件存储配置成功!');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
63
application/akszadmin/controller/Finance.php
Executable file
63
application/akszadmin/controller/Finance.php
Executable file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 流水记录
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Finance extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcFinance';
|
||||
|
||||
/**
|
||||
* 流水记录
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '流水记录';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.type#i_type')->like('i.reason#i_reason,u.phone#u_phone,u.name#u_name')->dateBetween('i.time#i_time')->valueBetween('i.money')->order('i.id desc')->page();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
171
application/akszadmin/controller/Goods.php
Executable file
171
application/akszadmin/controller/Goods.php
Executable file
@ -0,0 +1,171 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 产品管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Goods extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcProduct';
|
||||
protected $risk_table = 'LcRisk';
|
||||
|
||||
/**
|
||||
* 产品列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '产品列表';
|
||||
$query = $this->_query($this->table)->like('title');
|
||||
$query->order('sort asc,id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加产品
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加产品';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑产品
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑产品';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
/**
|
||||
* 状态 开启或者关闭
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function iskqopen()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$id = $this->request->param('id');
|
||||
$iskq = $this->request->param('iskq');
|
||||
$this->_save($this->table, ['iskq' => $iskq]);
|
||||
}
|
||||
|
||||
public function showps(){
|
||||
$this->applyCsrfToken();
|
||||
$id = $this->request->param('id');
|
||||
$iskq = $this->request->param('do');
|
||||
$this->_save($this->table, ['showps' => $iskq]);
|
||||
}
|
||||
public function showps2(){
|
||||
$this->applyCsrfToken();
|
||||
$id = $this->request->param('id');
|
||||
$iskq = $this->request->param('do');
|
||||
$this->_save($this->table, ['showps2' => $iskq]);
|
||||
}
|
||||
/**
|
||||
* 状态
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function proisopen()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$id = $this->request->param('id');
|
||||
$isopen = $this->request->param('isopen');
|
||||
|
||||
$this->_save($this->table, ['isopen' => $isopen]);
|
||||
}
|
||||
/**
|
||||
* 删除产品
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isGet()) {
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 风控管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function risk()
|
||||
{
|
||||
$this->title = '风控管理';
|
||||
$this->_form($this->risk_table, 'risk');
|
||||
}
|
||||
|
||||
}
|
||||
311
application/akszadmin/controller/Index.php
Executable file
311
application/akszadmin/controller/Index.php
Executable file
@ -0,0 +1,311 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use library\service\AdminService;
|
||||
use library\service\MenuService;
|
||||
use library\tools\Data;
|
||||
use think\Console;
|
||||
use think\Db;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
/**
|
||||
* 系统公共操作
|
||||
* Class Index
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Index extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* 获取在线人数
|
||||
*/
|
||||
public function online_user()
|
||||
{
|
||||
$now = time() - 300;
|
||||
$online_user = Db::name('LcUser')->where("access_time > $now")->count();
|
||||
return json(['code' => 200, 'data' => $online_user]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示后台首页
|
||||
* @throws \ReflectionException
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统管理后台';
|
||||
$auth = AdminService::instance()->apply(true);
|
||||
if (!$auth->isLogin()) {
|
||||
$this->redirect('@' . ADMIN_MODULE . '/login');
|
||||
}
|
||||
$this->menus = MenuService::instance()->getTree();
|
||||
if (empty($this->menus) && !$auth->isLogin()) {
|
||||
$this->redirect('@' . ADMIN_MODULE . '/login');
|
||||
} else {
|
||||
$this->fetch();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Describe:查询充值提现记录
|
||||
* DateTime: 2020/5/15 0:54
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
$auth = AdminService::instance()->apply(true);
|
||||
if ($auth->isLogin()) {
|
||||
$cash_count = Db::name("LcCash")->where(['status' => 0, 'warn' => 0])->count();
|
||||
$firstDate = time();
|
||||
$lastDate = time() + 300;
|
||||
$Order_count = Db::name("LcOrder")->where("ostaus = 0 AND warn = 0 and kong_type = 0")->count();
|
||||
|
||||
$recharge_count = Db::name("LcRecharge")->where(['status' => 0, 'warn' => 0])->count();
|
||||
if ($Order_count > 0) {
|
||||
$this->success("您有{$Order_count}条新的订单记录,<a href='/" . ADMIN_MODULE . ".html#/" . ADMIN_MODULE . "/order/index.html?spm=m-109-111-116' style='color:#fc5531'>请查看</a>",
|
||||
["url" => "/static/mp3/order.mp3_{$recharge_count}@{$cash_count}&{$Order_count}"]);
|
||||
}
|
||||
if ($cash_count > 0 && $recharge_count > 0) {
|
||||
$this->success("您有{$cash_count}条新的提现记录和{$recharge_count}条新的充值记录,<a href='/" . ADMIN_MODULE . ".html#/" . ADMIN_MODULE . "/cash/index.html?spm=m-69-105-108' style='color:#50a14f'>请查看</a>",
|
||||
["url" => "/static/mp3/cztx.mp3_{$recharge_count}@{$cash_count}&{$Order_count}"]);
|
||||
}
|
||||
if ($cash_count > 0 && $recharge_count == 0) {
|
||||
$this->success("您有{$cash_count}条新的提现记录,<a href='/" . ADMIN_MODULE . ".html#/" . ADMIN_MODULE . "/cash/index.html?spm=m-69-105-108' style='color:#090 '>请查看</a>",
|
||||
["url" => "/static/mp3/tx.mp3_{$recharge_count}@{$cash_count}&{$Order_count}"]);
|
||||
}
|
||||
if ($cash_count == 0 && 0 < $recharge_count) {
|
||||
$this->success("您有{$recharge_count}条新的充值记录,<a href='/" . ADMIN_MODULE . ".html#/" . ADMIN_MODULE . "/recharge/index.html?spm=m-69-105-107' style='color:#ec494e'>请查看</a>",
|
||||
["url" => "/static/mp3/cz.mp3_{$recharge_count}@{$cash_count}&{$Order_count}"]);
|
||||
}
|
||||
$this->error("暂无记录");
|
||||
}
|
||||
$this->error("请先登录");
|
||||
}
|
||||
|
||||
/**
|
||||
* Describe:忽略提醒
|
||||
* DateTime: 2020/5/15 0:56
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function system_ignore()
|
||||
{
|
||||
$auth = AdminService::instance()->apply(true);
|
||||
if ($auth->isLogin()) {
|
||||
Db::name("LcCash")->where(['warn' => 0])->update(['warn' => 1]);
|
||||
Db::name("LcRecharge")->where(['warn' => 0])->update(['warn' => 1]);
|
||||
Db::name("LcOrder")->where(['warn' => 0])->update(['warn' => 1]);
|
||||
$this->success("操作成功");
|
||||
}
|
||||
$this->error("请先登录");
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台环境信息
|
||||
*/
|
||||
public function main()
|
||||
{
|
||||
/*$this->think_ver = \think\App::VERSION;
|
||||
$this->mysql_ver = Db::query('select version() as ver')[0]['ver'];*/
|
||||
$this->invest_count = Db::name('LcOrder')->sum('ploss');
|
||||
$this->user_count = Db::name('LcUser')->count();
|
||||
$this->recharge_sum = Db::name('LcRecharge')->where("status = 1")->sum('money');
|
||||
$this->cash_sum = Db::name('LcCash')->where("status = 1")->sum('money');
|
||||
$table = $this->finance_report();
|
||||
$this->month = $table['month'];
|
||||
$this->last_month = $table['last_month'];
|
||||
$this->day = $table['day'];
|
||||
$this->today_key = array_search(date('Y-m-d'), array_column($this->day, 'date'));
|
||||
$now = time() - 300;
|
||||
$this->online_user = Db::name('LcUser')->where("logintime > $now")->count();
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
private function finance_report()
|
||||
{
|
||||
$firstDate = strtotime(date('Y-m-01 00:00:00', strtotime(date("Y-m-d"))));
|
||||
$lastDate = strtotime(date('Y-m-01 23:59:59', strtotime(date("Y-m-d"))) . " +1 month -1 day");
|
||||
$month['recharge'] = Db::name('LcRecharge')->where("UNIX_TIMESTAMP(time) BETWEEN $firstDate AND $lastDate AND status = 1")->sum('money');
|
||||
$month['cash'] = Db::name('LcCash')->where("UNIX_TIMESTAMP(time) BETWEEN $firstDate AND $lastDate AND status = 1")->sum('money');
|
||||
$month['invest_list'] = Db::name('LcRecharge')->where("UNIX_TIMESTAMP(time) BETWEEN $firstDate AND $lastDate AND status = 1")->group('uid')->count();
|
||||
$month['invest'] = Db::name('LcInvest')->where("UNIX_TIMESTAMP(time) BETWEEN $firstDate AND $lastDate")->count();
|
||||
$month['invest_sum'] = Db::name('LcOrder')->where(" buytime BETWEEN $firstDate AND $lastDate")->sum('ploss');
|
||||
|
||||
$lastMonthFirstDate = strtotime(date('Y-m-01 00:00:00', strtotime(date("Y-m-d"))) . " -1 month");
|
||||
$lastMonthLastDate = strtotime(date('Y-m-01 23:59:59', strtotime(date("Y-m-d"))) . " -1 day");
|
||||
$lastMonth['recharge'] = Db::name('LcRecharge')->where("UNIX_TIMESTAMP(time) BETWEEN $lastMonthFirstDate AND $lastMonthLastDate AND status = 1")->sum('money');
|
||||
$lastMonth['cash'] = Db::name('LcCash')->where("UNIX_TIMESTAMP(time) BETWEEN $lastMonthFirstDate AND $lastMonthLastDate AND status = 1")->sum('money');
|
||||
$lastMonth['invest_list'] = Db::name('LcRecharge')->where("UNIX_TIMESTAMP(time) BETWEEN $lastMonthFirstDate AND $lastMonthLastDate AND status = 1")->group('uid')->count();
|
||||
$lastMonth['invest'] = Db::name('LcInvest')->where("UNIX_TIMESTAMP(time) BETWEEN $lastMonthFirstDate AND $lastMonthLastDate")->count();
|
||||
$lastMonth['invest_sum'] = Db::name('LcOrder')->where(" buytime BETWEEN $lastMonthFirstDate AND $lastMonthLastDate")->sum('ploss');
|
||||
|
||||
$monthDays = $this->getMonthDays();
|
||||
foreach ($monthDays as $k => $v) {
|
||||
$first = strtotime($v);
|
||||
$last = $first + 86400 - 1;
|
||||
$day[$k]['date'] = $v;
|
||||
$day[$k]['recharge'] = Db::name('LcRecharge')->where("UNIX_TIMESTAMP(time) BETWEEN $first AND $last AND status = 1")->sum('money');
|
||||
$day[$k]['cash'] = Db::name('LcCash')->where("UNIX_TIMESTAMP(time) BETWEEN $first AND $last AND status = 1")->sum('money');
|
||||
$day[$k]['invest_list'] = Db::name('LcRecharge')->where("UNIX_TIMESTAMP(time) BETWEEN $first AND $last AND status = 1")->group('uid')->count();
|
||||
$day[$k]['new_user'] = Db::name('LcUser')->where("UNIX_TIMESTAMP(time) BETWEEN $first AND $last")->count();
|
||||
$day[$k]['invest'] = Db::name('LcInvest')->where("UNIX_TIMESTAMP(time) BETWEEN $first AND $last")->count();
|
||||
$day[$k]['invest_sum'] = Db::name('LcInvest')->where("UNIX_TIMESTAMP(time) BETWEEN $first AND $last")->sum('money');
|
||||
$day[$k]['expire'] = Db::name('LcOrder')->where(" buytime BETWEEN $first AND $last")->sum('ploss');
|
||||
$day[$k]['ordernumer'] = Db::name('LcOrder')->where(" buytime BETWEEN $first AND $last ")->count();
|
||||
$day[$k]['interest'] = Db::name('LcOrder')->where(" buytime BETWEEN $first AND $last")->sum('fee');
|
||||
}
|
||||
return array('day' => $day, 'month' => $month, 'last_month' => $lastMonth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前月已过日期
|
||||
* @return array
|
||||
*/
|
||||
private function getMonthDays()
|
||||
{
|
||||
$monthDays = [];
|
||||
$firstDay = date('Y-m-01', time());
|
||||
$i = 0;
|
||||
$now_day = date('d');
|
||||
$lastDay = date('Y-m-d', strtotime("$firstDay +1 month -1 day"));
|
||||
while (date('Y-m-d', strtotime("$firstDay +$i days")) <= $lastDay) {
|
||||
// if($i>=$now_day) break;
|
||||
$monthDays[] = date('Y-m-d', strtotime("$firstDay +$i days"));
|
||||
$i++;
|
||||
}
|
||||
return $monthDays;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* @login true
|
||||
* @param integer $id
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function pass($id)
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
if (intval($id) !== intval(session('user.id'))) {
|
||||
$this->error('只能修改当前用户的密码!');
|
||||
}
|
||||
if (!AdminService::instance()->isLogin()) {
|
||||
$this->error('需要登录才能操作哦!');
|
||||
}
|
||||
if ($this->request->isGet()) {
|
||||
$this->verify = true;
|
||||
$this->_form('SystemUser', 'admin@user/pass', 'id', [], ['id' => $id]);
|
||||
} else {
|
||||
$data = $this->_input([
|
||||
'password' => $this->request->post('password'),
|
||||
'repassword' => $this->request->post('repassword'),
|
||||
'oldpassword' => $this->request->post('oldpassword'),
|
||||
], [
|
||||
'oldpassword' => 'require',
|
||||
'password' => 'require|min:4',
|
||||
'repassword' => 'require|confirm:password',
|
||||
], [
|
||||
'oldpassword.require' => '旧密码不能为空!',
|
||||
'password.require' => '登录密码不能为空!',
|
||||
'password.min' => '登录密码长度不能少于4位有效字符!',
|
||||
'repassword.require' => '重复密码不能为空!',
|
||||
'repassword.confirm' => '重复密码与登录密码不匹配,请重新输入!',
|
||||
]);
|
||||
$user = Db::name('SystemUser')->where(['id' => $id])->find();
|
||||
if (md5($data['oldpassword']) !== $user['password']) {
|
||||
$this->error('旧密码验证失败,请重新输入!');
|
||||
}
|
||||
if (Data::save('SystemUser', ['id' => $user['id'], 'password' => md5($data['password'])])) {
|
||||
$this->success('密码修改成功,下次请使用新密码登录!', '');
|
||||
} else {
|
||||
$this->error('密码修改失败,请稍候再试!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户资料
|
||||
* @login true
|
||||
* @param integer $id 会员ID
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function info($id = 0)
|
||||
{
|
||||
|
||||
if (!AdminService::instance()->isLogin()) {
|
||||
$this->error('需要登录才能操作哦!');
|
||||
}
|
||||
$this->applyCsrfToken();
|
||||
if (intval($id) === intval(session('user.id'))) {
|
||||
$this->_form('SystemUser', 'akszadmin@user/form', 'id', [], ['id' => $id]);
|
||||
} else {
|
||||
$this->error('只能修改登录用户的资料!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理运行缓存
|
||||
* @auth true
|
||||
*/
|
||||
public function clearRuntime()
|
||||
{
|
||||
try {
|
||||
Console::call('clear');
|
||||
Console::call('xclean:session');
|
||||
$this->success('清理运行缓存成功!');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $e) {
|
||||
$this->error("清理运行缓存失败,{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 压缩发布系统
|
||||
* @auth true
|
||||
*/
|
||||
public function buildOptimize()
|
||||
{
|
||||
try {
|
||||
Console::call('optimize:route');
|
||||
Console::call('optimize:schema');
|
||||
Console::call('optimize:autoload');
|
||||
Console::call('optimize:config');
|
||||
$this->success('压缩发布成功!');
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $e) {
|
||||
$this->error("压缩发布失败,{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
109
application/akszadmin/controller/Info.php
Executable file
109
application/akszadmin/controller/Info.php
Executable file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 网站配置
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Info extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcInfo';
|
||||
protected $reward_table = 'LcReward';
|
||||
|
||||
/**
|
||||
* 网站设置
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function set()
|
||||
{
|
||||
$this->title = '网站设置';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isPost()&&isset($vo['ban_ip'])&&!empty($vo['ban_ip'])){
|
||||
$vo['ban_ip'] = trim(str_replace(',',',',$vo['ban_ip']));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 奖励设置
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function reward()
|
||||
{
|
||||
$this->title = '奖励设置';
|
||||
$this->_form($this->reward_table, 'reward');
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付设置
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function pay()
|
||||
{
|
||||
$this->title = '支付设置';
|
||||
$this->_form($this->table, 'pay');
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片设置
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function img()
|
||||
{
|
||||
$this->title = '支付设置';
|
||||
$this->_form($this->table, 'img');
|
||||
}
|
||||
}
|
||||
64
application/akszadmin/controller/Invest.php
Executable file
64
application/akszadmin/controller/Invest.php
Executable file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 已投项目管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Invest extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcInvest';
|
||||
|
||||
/**
|
||||
* 已投项目管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '已投项目管理';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.type1#i_type1')->like('i.title#i_title,u.phone#u_phone')->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->tlist = Db::name('LcItemType')->select();
|
||||
$this->profit = sprintf("%.2f",Db::name('LcInvestList')->where("status = 1 AND pay1 > 0")->sum('pay1'));
|
||||
$this->un_profit = sprintf("%.2f",Db::name('LcInvestList')->where("status = 0 AND pay1 > 0")->sum('pay1'));
|
||||
}
|
||||
}
|
||||
65
application/akszadmin/controller/InvestList.php
Executable file
65
application/akszadmin/controller/InvestList.php
Executable file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 还款详情
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class InvestList extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcInvestList';
|
||||
|
||||
/**
|
||||
* 还款详情
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '已投项目管理';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.iid#i_iid')->like('i.title#i_title,u.phone#u_phone')->dateBetween('i.time1#i_time1')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->refund = sprintf("%.2f",Db::name('LcInvestList')->where("status = 1 AND pay1 > 0")->sum('pay1'));
|
||||
foreach($data as &$vo){
|
||||
if($vo['status'] == '0') $vo['time2'] = '未返款';
|
||||
}
|
||||
}
|
||||
}
|
||||
132
application/akszadmin/controller/Item.php
Executable file
132
application/akszadmin/controller/Item.php
Executable file
@ -0,0 +1,132 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 项目管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Item extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcItem';
|
||||
|
||||
/**
|
||||
* 项目管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '项目管理';
|
||||
$query = $this->_query($this->table)->equal('type,class')->like('title');
|
||||
$query->order('sort asc,id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->mlist = Db::name('LcItemClass')->select();
|
||||
$this->tlist = Db::name('LcItemType')->select();
|
||||
foreach ($data as &$vo) {
|
||||
list($vo['pay_type'], $vo['item_class']) = [[], []];
|
||||
foreach ($this->tlist as $type) if ($type['id'] == $vo['type']) $vo['pay_type'] = $type;
|
||||
foreach ($this->mlist as $class) if ($class['id'] == $vo['class']) $vo['item_class'] = $class;
|
||||
$vo['percent'] = model('akszadmin/item')->getProjectPercent($vo['id']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加项目
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加项目';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑项目
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑项目';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isGet()) {
|
||||
$vo['prize'] = isset($vo['prize'])?$vo['prize']:0;
|
||||
$vo['integral'] = isset($vo['integral'])?$vo['integral']:0;
|
||||
if (empty($vo['class']) && $this->request->get('class', '0')) $vo['class'] = $this->request->get('class', '0');
|
||||
if (empty($vo['type']) && $this->request->get('type', '0')) $vo['type'] = $this->request->get('type', '0');
|
||||
$this->class = Db::name("LcItemClass")->order('id asc')->select();
|
||||
$this->type = Db::name("LcItemType")->order('id asc')->select();
|
||||
}
|
||||
if ($this->request->isPost()) {
|
||||
if($vo['type']==2&&$vo['day']<7) $this->error("每周返息期限需大于等于7天");
|
||||
if($vo['type']==3&&$vo['day']<30) $this->error("每月返息期限需大于等于30天");
|
||||
}
|
||||
if (empty($vo['add_time'])) $vo['add_time'] = date("Y-m-d H:i:s");
|
||||
}
|
||||
|
||||
}
|
||||
121
application/akszadmin/controller/ItemClass.php
Executable file
121
application/akszadmin/controller/ItemClass.php
Executable file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 项目分类管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class ItemClass extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcItemClass';
|
||||
|
||||
/**
|
||||
* 项目分类管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '项目分类管理';
|
||||
$query = $this->_query($this->table)->like('name');
|
||||
$query->order('sort asc,id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->mlist = Db::name('LcUserMember')->select();
|
||||
foreach ($data as &$vo) {
|
||||
list($vo['member']) = [[]];
|
||||
foreach ($this->mlist as $member) if ($member['id'] == $vo['member_id']) $vo['member'] = $member;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加项目分类
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加项目分类';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑项目分类
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑项目分类';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目分类
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isGet()) {
|
||||
if (empty($vo['member_id']) && $this->request->get('member_id', '0')) $vo['member_id'] = $this->request->get('member_id', '0');
|
||||
$this->member = Db::name("LcUserMember")->order('id desc')->select();
|
||||
}
|
||||
if (empty($vo['add_time'])) $vo['add_time'] = date("Y-m-d H:i:s");
|
||||
}
|
||||
|
||||
}
|
||||
119
application/akszadmin/controller/Login.php
Executable file
119
application/akszadmin/controller/Login.php
Executable file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use library\service\AdminService;
|
||||
use library\service\CaptchaService;
|
||||
use library\service\SystemService;
|
||||
use library\tools\Data;
|
||||
use think\Db;
|
||||
use think\facade\Request;
|
||||
|
||||
/**
|
||||
* 用户登录管理
|
||||
* Class Login
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Login extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* 后台登录入口
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (Request::isGet()) {
|
||||
if (AdminService::instance()->isLogin()) {
|
||||
$this->redirect('@' . ADMIN_MODULE);
|
||||
} else {
|
||||
$this->title = '系统登录';
|
||||
$this->captcha_type = 'login_captcha';
|
||||
$this->captcha_token = Data::uniqidDateCode(18);
|
||||
$this->app->session->set($this->captcha_type, $this->captcha_token);
|
||||
$this->devmode = SystemService::instance()->checkRunMode('dev');
|
||||
$this->fetch();
|
||||
}
|
||||
} else {
|
||||
|
||||
$data = $this->_vali([
|
||||
'username.require' => '登录账号不能为空!',
|
||||
'username.min:4' => '登录账号长度不能少于4位有效字符!',
|
||||
'password.require' => '登录密码不能为空!',
|
||||
'password.min:4' => '登录密码长度不能少于4位有效字符!',
|
||||
'verify.require' => '图形验证码不能为空!',
|
||||
'uniqid.require' => '图形验证标识不能为空!',
|
||||
]);
|
||||
if (!CaptchaService::instance()->check($data['verify'], $data['uniqid'])) {
|
||||
$this->error('图形验证码验证失败,请重新输入!');
|
||||
}
|
||||
// 用户信息验证
|
||||
$map = ['is_deleted' => '0', 'username' => $data['username']];
|
||||
$user = Db::name('SystemUser')->where($map)->order('id desc')->find();
|
||||
if (empty($user)) {
|
||||
$this->error('登录账号或密码错误,请重新输入1!');
|
||||
}
|
||||
if (md5("{$user['password']}{$data['uniqid']}") !== $data['password']) {
|
||||
$this->error('登录账号或密码错误,请重新输入2!');
|
||||
}
|
||||
if (empty($user['status'])) {
|
||||
$this->error('账号已经被禁用,请联系管理员!');
|
||||
}
|
||||
Db::name('SystemUser')->where(['id' => $user['id']])->update([
|
||||
'login_ip' => Request::ip(),
|
||||
'login_at' => Db::raw('now()'),
|
||||
'login_num' => Db::raw('login_num+1'),
|
||||
]);
|
||||
$this->app->session->set('user', $user);
|
||||
AdminService::instance()->apply(true);
|
||||
sysoplog('系统管理', '用户登录系统后台成功');
|
||||
$this->success('登录成功', url('@' . ADMIN_MODULE));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成验证码
|
||||
* 需要指定类型及令牌
|
||||
*/
|
||||
public function captcha()
|
||||
{
|
||||
$image = CaptchaService::instance();
|
||||
$this->type = input('type', 'captcha-type');
|
||||
$this->token = input('token', 'captcha-token');
|
||||
$captcha = ['image' => $image->getData(), 'uniqid' => $image->getUniqid()];
|
||||
if ($this->app->session->get($this->type) === $this->token) {
|
||||
$captcha['code'] = $image->getCode();
|
||||
$this->app->session->delete($this->type);
|
||||
}
|
||||
$this->success('生成验证码成功', $captcha);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*/
|
||||
public function out()
|
||||
{
|
||||
$this->app->session->clear();
|
||||
$this->app->session->destroy();
|
||||
$this->success('退出登录成功!', url('@' . ADMIN_MODULE . '/login'));
|
||||
}
|
||||
|
||||
}
|
||||
116
application/akszadmin/controller/Mall.php
Executable file
116
application/akszadmin/controller/Mall.php
Executable file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 矿机管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Mall extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcMall';
|
||||
|
||||
/**
|
||||
* 矿机管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '矿机管理';
|
||||
$query = $this->_query($this->table)->like('title');
|
||||
$query->order('sort asc,id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加矿机
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加矿机';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑矿机
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑矿机';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除矿机
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isPost()) {
|
||||
if($vo['total']<$vo['stock']) $this->error("矿机总量需大于剩余库存");
|
||||
if($vo['day_income']<$vo['cost']) $this->error("日总产出需大于日运维费");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
61
application/akszadmin/controller/MallInvest.php
Executable file
61
application/akszadmin/controller/MallInvest.php
Executable file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 已投矿机管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class MallInvest extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcMallInvest';
|
||||
|
||||
/**
|
||||
* 已投项目管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '已投项目管理';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.type1#i_type1')->like('i.title#i_title,u.phone#u_phone')->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
}
|
||||
}
|
||||
65
application/akszadmin/controller/MallInvestList.php
Executable file
65
application/akszadmin/controller/MallInvestList.php
Executable file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 还款详情
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class MallInvestList extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcMallInvestList';
|
||||
|
||||
/**
|
||||
* 还款详情
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '已租矿机管理';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.iid#i_iid')->like('i.title#i_title,u.phone#u_phone')->dateBetween('i.time1#i_time1')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->refund = sprintf("%.2f",Db::name('LcInvestList')->where("status = 1 AND pay1 > 0")->sum('pay1'));
|
||||
foreach($data as &$vo){
|
||||
if($vo['status'] == '0') $vo['time2'] = '挖矿中';
|
||||
}
|
||||
}
|
||||
}
|
||||
93
application/akszadmin/controller/Member.php
Executable file
93
application/akszadmin/controller/Member.php
Executable file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 会员等级管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Member extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcUserMember';
|
||||
|
||||
/**
|
||||
* 会员等级管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '会员等级管理';
|
||||
$query = $this->_query($this->table)->like('name');
|
||||
$query->order('id asc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加会员组
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加会员组';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑会员组
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑会员组';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员组
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
}
|
||||
160
application/akszadmin/controller/Menu.php
Executable file
160
application/akszadmin/controller/Menu.php
Executable file
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use library\service\MenuService;
|
||||
use library\tools\Data;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 系统菜单管理
|
||||
* Class Menu
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Menu extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* 当前操作数据库
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'SystemMenu';
|
||||
|
||||
/**
|
||||
* 系统菜单管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统菜单管理';
|
||||
$this->_page($this->table, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表数据处理
|
||||
* @param array $data
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
foreach ($data as &$vo) {
|
||||
if ($vo['url'] !== '#') {
|
||||
$vo['url'] = trim(url($vo['url']) . (empty($vo['params']) ? '' : "?{$vo['params']}"), '/\\');
|
||||
}
|
||||
$vo['ids'] = join(',', Data::getArrSubIds($data, $vo['id']));
|
||||
}
|
||||
$data = Data::arr2table($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加系统菜单
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑系统菜单
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _form_filter(&$vo)
|
||||
{
|
||||
if ($this->request->isGet()) {
|
||||
// 读取系统功能节点
|
||||
$this->nodes = MenuService::instance()->getList();
|
||||
// 选择自己的上级菜单
|
||||
if (empty($vo['pid']) && $this->request->get('pid', '0')) $vo['pid'] = $this->request->get('pid', '0');
|
||||
// 列出可选上级菜单
|
||||
$menus = Db::name($this->table)->where(['status' => '1'])->order('sort desc,id asc')->column('id,pid,url,title');
|
||||
$this->menus = Data::arr2table(array_merge($menus, [['id' => '0', 'pid' => '-1', 'url' => '#', 'title' => '顶部菜单']]));
|
||||
if (isset($vo['id'])) foreach ($this->menus as $key => $menu) if ($menu['id'] === $vo['id']) $vo = $menu;
|
||||
foreach ($this->menus as $key => &$menu) {
|
||||
if ($menu['spt'] >= 3 || $menu['url'] !== '#') unset($this->menus[$key]);
|
||||
if (isset($vo['spt']) && $vo['spt'] <= $menu['spt']) unset($this->menus[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用系统菜单
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function resume()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '1']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用系统菜单
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function forbid()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '0']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统菜单
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
}
|
||||
121
application/akszadmin/controller/Msg.php
Executable file
121
application/akszadmin/controller/Msg.php
Executable file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 站内信管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Msg extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcMsg';
|
||||
|
||||
/**
|
||||
* 站内信列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '站内信列表';
|
||||
$query = $this->_query($this->table)->like('phone');
|
||||
$query->dateBetween('add_time')->order('sort asc,id dasc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
foreach($data as &$vo){
|
||||
if(empty($vo['phone'])) $vo['phone'] = "所有人";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加站内信
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加站内信';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑站内信
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑站内信';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站内信
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isGet()) {
|
||||
if(!isset($vo['top'])) $vo['top'] = '0';
|
||||
}
|
||||
if($this->request->isPost()) {
|
||||
if($vo['phone']) $vo['uid'] = Db::name('LcUser')->where("phone = '{$vo['phone']}'")->value('id');
|
||||
}
|
||||
if (empty($vo['add_time'])) $vo['add_time'] = date("Y-m-d H:i:s");
|
||||
}
|
||||
}
|
||||
94
application/akszadmin/controller/Oplog.php
Executable file
94
application/akszadmin/controller/Oplog.php
Executable file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 系统日志管理
|
||||
* Class Oplog
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Oplog extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* 指定当前数据表
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'SystemLog';
|
||||
|
||||
/**
|
||||
* 系统操作日志
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统操作日志';
|
||||
$query = $this->_query($this->table)->like('action,node,content,username,geoip');
|
||||
$query->dateBetween('create_at')->order('id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表数据处理
|
||||
* @auth true
|
||||
* @param array $data
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$ip = new \Ip2Region();
|
||||
foreach ($data as &$vo) {
|
||||
$result = $ip->btreeSearch($vo['geoip']);
|
||||
$vo['isp'] = isset($result['region']) ? $result['region'] : '';
|
||||
$vo['isp'] = str_replace(['内网IP', '0', '|'], '', $vo['isp']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理系统日志
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
if (Db::name($this->table)->whereRaw('1=1')->delete() !== false) {
|
||||
$this->success('日志清理成功!');
|
||||
} else {
|
||||
$this->error('日志清理失败,请稍候再试!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统日志
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
}
|
||||
130
application/akszadmin/controller/Order.php
Executable file
130
application/akszadmin/controller/Order.php
Executable file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )s
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 持仓管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Order extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcOrder';
|
||||
|
||||
/**
|
||||
* 持仓列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '持仓列表';
|
||||
$this->type = $this->request->param('type');
|
||||
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name as u_name');
|
||||
$query->leftjoin('lc_user u','i.uid=u.id')->like('u.phone#u_phone,u.name#u_name')->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑持仓
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '查看';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
public function edits()
|
||||
{
|
||||
if(\think\facade\Request::isPost()){
|
||||
$param = \think\facade\Request::param();
|
||||
$id=$param['id'];
|
||||
if($param['pid']){
|
||||
$title=Db::name('LcProduct')->where(['id'=>$param['pid']])->value('title');
|
||||
};
|
||||
|
||||
$datac['uid']=$param['uid'];
|
||||
$datac['pid']=$param['pid'];
|
||||
$datac['ptitle']=$title;
|
||||
$datac['ostyle']=$param['ostyle'];
|
||||
$datac['buyprice']=$param['buyprice'];
|
||||
$datac['sellprice']=$param['sellprice'];
|
||||
$datac['ploss']=$param['ploss'];
|
||||
$datac['buytime']=strtotime($param['buytime']);
|
||||
$datac['selltime']=strtotime($param['selltime']);
|
||||
$this->_save($this->table, $datac);
|
||||
}
|
||||
$this->title = '编辑订单信息';
|
||||
$this->goods = Db::name('LcProduct')->field("id,title")->order("sort asc,id desc")->select();
|
||||
$this->_form($this->table, 'edits');
|
||||
}
|
||||
|
||||
/**
|
||||
* 改平仓
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function gaipingcang()
|
||||
{
|
||||
// $this->applyCsrfToken();
|
||||
$id = $this->request->param('id');
|
||||
$sellprice = $this->request->param('sellprice');
|
||||
|
||||
$this->_save($this->table, ['sellprice' => $sellprice]);
|
||||
}
|
||||
|
||||
/*单控操作*/
|
||||
public function dankong(){
|
||||
$id = $this->request->param('oid');
|
||||
$kong_type = $this->request->param('kong_type');
|
||||
if($kong_type==3 ){
|
||||
$risk = Db::name('LcRisk')->find();
|
||||
$this->_save($this->table, ['kong_type' => $kong_type,'endloss'=>$risk['qybl']]);
|
||||
}else if($kong_type==4){
|
||||
$risk = Db::name('LcRisk')->find();
|
||||
$this->_save($this->table, ['kong_type' => $kong_type,'lossrate'=>$risk['qkbl']]);
|
||||
}else{
|
||||
$this->_save($this->table, ['kong_type' => $kong_type]);
|
||||
}
|
||||
}
|
||||
|
||||
public function remove()
|
||||
{
|
||||
if (in_array('10000', explode(',', $this->request->post('id')))) {
|
||||
$this->error('系统超级账号禁止删除!');
|
||||
}
|
||||
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
50
application/akszadmin/controller/OrderLog.php
Executable file
50
application/akszadmin/controller/OrderLog.php
Executable file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 平仓日志管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class OrderLog extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcOrderLog';
|
||||
|
||||
/**
|
||||
* 平仓日志列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '平仓日志列表';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name as u_name');
|
||||
$query->leftjoin('lc_user u','i.uid=u.id')->like('u.phone#u_phone,u.name#u_name')->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
}
|
||||
49
application/akszadmin/controller/Prize.php
Executable file
49
application/akszadmin/controller/Prize.php
Executable file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 抽奖管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Prize extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcPrize';
|
||||
|
||||
/**
|
||||
* 抽奖设置
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function set()
|
||||
{
|
||||
$this->title = '抽奖设置';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
}
|
||||
89
application/akszadmin/controller/PrizeList.php
Executable file
89
application/akszadmin/controller/PrizeList.php
Executable file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 抽奖记录
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class PrizeList extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcPrizeList';
|
||||
|
||||
/**
|
||||
* 抽奖记录
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '抽奖记录';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name as u_name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.type#i_type')->like('u.phone#u_phone,u.name#u_name')->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 增减余额
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add(){
|
||||
$this->title = '添加抽奖记录';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if($this->request->isPost()){
|
||||
if(!$vo['phone']) $this->error("用户账号必填");
|
||||
if(!$vo['name']) $this->error("奖品名称必填");
|
||||
$uid = Db::name("LcUser")->where(['phone'=>$vo['phone']])->value('id');
|
||||
if(!$uid) $this->error("暂无该用户");
|
||||
$vo['uid'] = $uid;
|
||||
$vo['time'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除抽奖记录
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
144
application/akszadmin/controller/Queue.php
Executable file
144
application/akszadmin/controller/Queue.php
Executable file
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use library\service\ProcessService;
|
||||
use think\Console;
|
||||
use think\Db;
|
||||
use think\exception\HttpResponseException;
|
||||
|
||||
/**
|
||||
* 系统系统任务
|
||||
* Class Queue
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Queue extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'SystemQueue';
|
||||
|
||||
/**
|
||||
* 系统系统任务
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (session('user.username') === 'admin') try {
|
||||
$this->message = Console::call('xtask:state')->fetch();
|
||||
$this->command = ProcessService::instance()->think('xtask:start');
|
||||
$this->listen = preg_match('/process.*?\d+.*?running/', $this->message, $attr);
|
||||
} catch (\Exception $exception) {
|
||||
$this->listen = false;
|
||||
$this->message = $exception->getMessage();
|
||||
}
|
||||
$this->title = '系统任务管理';
|
||||
$this->iswin = ProcessService::instance()->iswin();
|
||||
$query = $this->_query($this->table)->dateBetween('create_at,start_at,end_at');
|
||||
$query->like('title,preload')->equal('status')->order('id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重启系统任务
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function redo()
|
||||
{
|
||||
$this->_save($this->table, ['status' => '1']);
|
||||
}
|
||||
|
||||
/**
|
||||
* WIN开始监听任务
|
||||
* @auth true
|
||||
*/
|
||||
public function start()
|
||||
{
|
||||
try {
|
||||
$message = nl2br(Console::call('xtask:start')->fetch());
|
||||
if (preg_match('/process.*?\d+/', $message, $attr)) {
|
||||
$this->success('任务监听主进程启动成功!');
|
||||
} else {
|
||||
$this->error($message);
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $e) {
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WIN停止监听任务
|
||||
* @auth true
|
||||
*/
|
||||
public function stop()
|
||||
{
|
||||
try {
|
||||
$message = nl2br(Console::call('xtask:stop')->fetch());
|
||||
if (stripos($message, 'succeeded')) {
|
||||
$this->success('停止任务监听主进程成功!');
|
||||
} elseif (stripos($message, 'finish')) {
|
||||
$this->success('没有找到需要停止的进程!');
|
||||
} else {
|
||||
$this->error($message);
|
||||
}
|
||||
} catch (HttpResponseException $exception) {
|
||||
throw $exception;
|
||||
} catch (\Exception $e) {
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理3天前的记录
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$map = [['time', '<', strtotime('-3days')]];
|
||||
$result = Db::name($this->table)->where($map)->delete();
|
||||
if ($result !== false) {
|
||||
$this->success('成功清理3天前的任务记录!');
|
||||
} else {
|
||||
$this->error('清理3天前的任务记录失败!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统任务
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
}
|
||||
175
application/akszadmin/controller/Recharge.php
Executable file
175
application/akszadmin/controller/Recharge.php
Executable file
@ -0,0 +1,175 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 充值管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Recharge extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcRecharge';
|
||||
|
||||
/**
|
||||
* 充值记录
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '充值记录';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.status#i_status')->like('i.orderid#i_orderid,i.type#i_type,u.phone#u_phone,u.name#u_name')->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->type = Db::name($this->table)->field('type')->group('type')->select();
|
||||
$this->rejected = sprintf("%.2f",Db::name($this->table)->where("status = 2")->sum('money'));
|
||||
$this->finished = sprintf("%.2f",Db::name($this->table)->where("status = 1")->sum('money'));
|
||||
$this->reviewed = sprintf("%.2f",Db::name($this->table)->where("status = 0")->sum('money'));
|
||||
}
|
||||
public function edit()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
if($this->request->isPost()) {
|
||||
$id = $this->request->param('id');
|
||||
$reaolae = $this->request->param('reaolae');
|
||||
$this->_save($this->table, ['reaolae'=>$reaolae,'status' => '2','time2' => date('Y-m-d H:i:s')]);
|
||||
}else{
|
||||
$this->title = '拒绝充值';
|
||||
$id = $this->request->param('id');
|
||||
$recharge = Db::name($this->table)->find($id);
|
||||
if($recharge){
|
||||
$recharge['username'] = Db::name("LcUser")->where(['id'=>$recharge['uid']])->value('phone');
|
||||
}
|
||||
$this->_form($this->table, 'edit');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 同意充值
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function agree()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$id = $this->request->param('id');
|
||||
$recharge = Db::name($this->table)->find($id);
|
||||
if($recharge&&$recharge['status'] == 0){
|
||||
$money = $recharge['money'];
|
||||
$uid = $recharge['uid'];
|
||||
$type = $recharge['type'];
|
||||
addFinance($uid, $money,1, $type . '入款' . $money . '元');
|
||||
setNumber('LcUser', 'money', $money, 1, "id = $uid");
|
||||
$rechargeMoney = Db::name('LcFinance')->where('uid = '.$uid.' and reason like "%入款%"')->sum('money');
|
||||
$level = Db::name('LcUserMember')->where('value <='.$rechargeMoney.' ')->order('level desc')->find();
|
||||
if (!empty($level)){
|
||||
Db::name('LcUser')->where('id', $uid)->update([
|
||||
'level' => $level['level'],
|
||||
'member' => $level['id'],
|
||||
]);
|
||||
}
|
||||
// if($tid) setRechargeRebate($tid, $money);
|
||||
if(getInfo('pay_bank_give') > 0 && $recharge['type'] == '银行入款'){
|
||||
$money = $money * getInfo('pay_bank_give') /100;
|
||||
addFinance($uid, $money, 1, '通过'.$type . '奖励' . $money . '元');
|
||||
setNumber('LcUser', 'money', $money, 1, "id = $uid");
|
||||
}
|
||||
if(getInfo('gz_bankz') > 0 && $recharge['type'] == '公账入款'){
|
||||
$money = $money * getInfo('gz_bankz') /100;
|
||||
addFinance($uid, $money, 1, '通过'.$type . '奖励' . $money . '元');
|
||||
setNumber('LcUser', 'money', $money, 1, "id = $uid");
|
||||
}
|
||||
if(getInfo('wx_bank_give') > 0 && $recharge['type'] == '微信转银行卡'){
|
||||
$money = $money * getInfo('wx_bank_give') /100;
|
||||
addFinance($uid, $money, 1, '通过'.$type . '奖励' . $money . '元');
|
||||
setNumber('LcUser', 'money', $money, 1, "id = $uid");
|
||||
}
|
||||
if(getInfo('alipay_bank_give') > 0 && $recharge['type'] == '支付宝转银行卡'){
|
||||
$money = $money * getInfo('alipay_bank_give') /100;
|
||||
addFinance($uid, $money, 1, '通过'.$type . '奖励' . $money . '元');
|
||||
setNumber('LcUser', 'money', $money, 1, "id = $uid");
|
||||
}
|
||||
$this->_save($this->table, ['status' => '1','time2' => date('Y-m-d H:i:s')]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增减余额
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function change(){
|
||||
if(\think\facade\Request::isPost()){
|
||||
$data = $this->request->param();
|
||||
if(!$data['name']) $this->error("用户账号必填");
|
||||
if(!$data['money']) $this->error("增减金额必填");
|
||||
$uid = Db::name("LcUser")->where(['phone'=>$data['name']])->value('id');
|
||||
if(!$uid) $this->error("暂无该用户");
|
||||
addFinance($uid, $data['money'], $data['type'], $data['reason']);
|
||||
setNumber('LcUser', 'money', $data['money'], $data['type'], "id = $uid");
|
||||
$this->success("操作成功");
|
||||
}
|
||||
$this->fetch('form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 拒绝充值
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function refuse()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '2','time2' => date('Y-m-d H:i:s')]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除充值记录
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
116
application/akszadmin/controller/Shop.php
Executable file
116
application/akszadmin/controller/Shop.php
Executable file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 积分商城
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Shop extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcShop';
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '商品列表';
|
||||
$query = $this->_query($this->table)->like('title');
|
||||
$query->order('sort asc,id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->mlist = Db::name('LcArticleType')->select();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加商品
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加商品';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑商品
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑商品';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isGet()) {
|
||||
if(!isset($vo['type'])) $vo['type'] = '1';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
62
application/akszadmin/controller/ShopOrder.php
Executable file
62
application/akszadmin/controller/ShopOrder.php
Executable file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 兑换管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class ShopOrder extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcShopOrder';
|
||||
|
||||
/**
|
||||
* 兑换列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '兑换列表';
|
||||
$query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name as u_name');
|
||||
$query->join('lc_user u','i.uid=u.id')->equal('i.type#i_type')->like('u.phone#u_phone,u.name#u_name')->dateBetween('i.time#i_time')->order('i.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除兑换
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
103
application/akszadmin/controller/Slide.php
Executable file
103
application/akszadmin/controller/Slide.php
Executable file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 轮播图管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Slide extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcSlide';
|
||||
|
||||
/**
|
||||
* 轮播图列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '轮播图列表';
|
||||
$query = $this->_query($this->table);
|
||||
$query->order('sort asc,id asc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $vo
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function _form_filter(&$vo){
|
||||
if ($this->request->isGet()) {
|
||||
if(!isset($vo['show'])) $vo['show'] = '1';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加轮播图
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->title = '添加轮播图';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑轮播图
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑轮播图';
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除轮播图
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
90
application/akszadmin/controller/Sms.php
Executable file
90
application/akszadmin/controller/Sms.php
Executable file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 文章分类管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Sms extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcSms';
|
||||
|
||||
/**
|
||||
* 短信模板管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '短信模板管理';
|
||||
$query = $this->_query($this->table)->like('type');
|
||||
$query->order('id asc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑短信
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用短信
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function resume()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '1']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭短信
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function forbid()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '0']);
|
||||
}
|
||||
|
||||
}
|
||||
202
application/akszadmin/controller/User.php
Executable file
202
application/akszadmin/controller/User.php
Executable file
@ -0,0 +1,202 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use library\tools\Data;
|
||||
use think\Db;
|
||||
use library\service\AdminService;
|
||||
use library\service\MenuService;
|
||||
/**
|
||||
* 系统用户管理
|
||||
* Class User
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class User extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* 指定当前数据表
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'SystemUser';
|
||||
|
||||
/**
|
||||
* 系统用户管理
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '系统用户管理';
|
||||
$query = $this->_query($this->table)->like('username,phone,mail')->equal('status');
|
||||
$query->dateBetween('login_at,create_at')->where(['is_deleted' => '0'])->order('id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加系统用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑系统用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户密码
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function pass()
|
||||
{
|
||||
|
||||
$this->applyCsrfToken();
|
||||
if ($this->request->isGet()) {
|
||||
$this->verify = false;
|
||||
$this->_form($this->table, 'pass');
|
||||
} else {
|
||||
$post = $this->request->post();
|
||||
if ($post['password'] !== $post['repassword']) {
|
||||
$this->error('两次输入的密码不一致!');
|
||||
}
|
||||
if (Data::save($this->table, ['id' => $_SESSION['fw']['user']['id'], 'password' => md5($post['password'])], 'id')) {
|
||||
$this->success('密码修改成功,下次请使用新密码登录!', '');
|
||||
} else {
|
||||
$this->error('密码修改失败,请稍候再试!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台加密
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function suffix() {
|
||||
$this->applyCsrfToken();
|
||||
$adminModuleFile = env('root_path') . '/admin_module.php';
|
||||
if ($this->request->isGet()) {
|
||||
if (file_exists($adminModuleFile)) {
|
||||
$this->adminModule = include $adminModuleFile;
|
||||
}
|
||||
return $this->fetch();
|
||||
} else {
|
||||
$suffix = $this->request->post('suffix');
|
||||
if (!preg_match('/^([0-9a-zA-Z]+)$/', $suffix)) {
|
||||
$this->error('后台加密后缀只能包含数字/大小写英文!');
|
||||
}
|
||||
if (file_put_contents($adminModuleFile, "<?php return '$suffix';")) {
|
||||
$this->success('后台加密后缀修改成功!', url("@$suffix"));
|
||||
} else {
|
||||
$this->error('后台加密后缀修改失败,请稍候再试!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function _form_filter(&$data)
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
// 用户权限处理
|
||||
$data['authorize'] = (isset($data['authorize']) && is_array($data['authorize'])) ? join(',', $data['authorize']) : '';
|
||||
// 用户账号重复检查
|
||||
if (isset($data['id'])) unset($data['username']);
|
||||
elseif (Db::name($this->table)->where(['username' => $data['username'], 'is_deleted' => '0'])->count() > 0) {
|
||||
$this->error("账号{$data['username']}已经存在,请使用其它账号!");
|
||||
}
|
||||
} else {
|
||||
$data['authorize'] = explode(',', isset($data['authorize']) ? $data['authorize'] : '');
|
||||
$this->authorizes = Db::name('SystemAuth')->where(['status' => '1'])->order('sort desc,id desc')->select();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用系统用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function forbid()
|
||||
{
|
||||
if (in_array('10000', explode(',', $this->request->post('id')))) {
|
||||
$this->error('系统超级账号禁止操作!');
|
||||
}
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '0']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用系统用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function resume()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['status' => '1']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
if (in_array('10000', explode(',', $this->request->post('id')))) {
|
||||
$this->error('系统超级账号禁止删除!');
|
||||
}
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
|
||||
}
|
||||
281
application/akszadmin/controller/Users.php
Executable file
281
application/akszadmin/controller/Users.php
Executable file
@ -0,0 +1,281 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 会员管理
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Users extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'LcUser';
|
||||
|
||||
/**
|
||||
* 会员列表
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->title = '会员列表';
|
||||
$query = $this->_query($this->table)->alias('u')->field('u.*,m.name as m_name');
|
||||
if (input('get.online_user/d') === 1) {
|
||||
$query->order('u.access_time', 'desc');
|
||||
}
|
||||
$query->join('lc_user_member m',
|
||||
'u.member=m.id')->equal('u.auth#u_auth,u.clock#u_clock,u.member#u_member')
|
||||
->like('u.ip#i_orderid,u.phone#u_phone,u.name#u_name,u.ip#u_ip')
|
||||
->dateBetween('u.time#u_time')
|
||||
->order('u.id desc')->page();
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态 开启或者关闭
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function iskqopen()
|
||||
{
|
||||
|
||||
$id = $this->request->param('id');
|
||||
$iskq = $this->request->param('iskq');
|
||||
$this->_save($this->table, ['isjy' => $iskq]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
protected function _index_page_filter(&$data)
|
||||
{
|
||||
$this->member = Db::name("lc_user_member")->field('id,name')->select();
|
||||
$ip = new \Ip2Region();
|
||||
foreach ($data as &$vo) {
|
||||
$vo['online'] = $vo['access_time'] > (time() - 300) ? 1 : 0;
|
||||
$vo['top'] = Db::name("lc_user")->where("id = {$vo['top']}")->value('phone');
|
||||
$vo['cash_sum'] = Db::name("lc_cash")->where("uid = {$vo['id']} AND status = '1'")->sum('money');
|
||||
$vo['recharge_sum'] = Db::name("lc_recharge")->where("uid = {$vo['id']} AND status = '1'")->sum('money');
|
||||
$vo['invest_sum'] = Db::name('lc_invest')->where("uid = {$vo['id']}")->sum('money');
|
||||
$vo['wait_invest'] = Db::name('lc_invest_list')->where("uid = {$vo['id']} AND pay1 > 0 AND status = 0")->sum('money1');
|
||||
$vo['wait_money'] = Db::name('lc_invest_list')->where("uid = {$vo['id']} AND money2 > 0 AND status = 0")->sum('money2');
|
||||
$result = $ip->btreeSearch($vo['ip']);
|
||||
$vo['isp'] = isset($result['region']) ? $result['region'] : '';
|
||||
$vo['isp'] = str_replace(['内网IP', '0', '|'], '', $vo['isp']);
|
||||
$result2 = $ip->btreeSearch($vo['loginip']);
|
||||
$vo['isp2'] = isset($result2['region']) ? $result2['region'] : '';
|
||||
$vo['isp2'] = str_replace(['内网IP', '0', '|'], '', $vo['isp2']);
|
||||
}
|
||||
}
|
||||
|
||||
public function user_relation()
|
||||
{
|
||||
$this->title = '会员关系网';
|
||||
if ($this->request->isGet()) {
|
||||
$list = [];
|
||||
$phone = $this->request->param('phone');
|
||||
$type = $this->request->param('type');
|
||||
if ($type == 1) {
|
||||
$top = Db::name('LcUser')->where(['phone' => $phone])->value('top');
|
||||
if ($top) {
|
||||
$list = Db::name('LcUser')->where(['id' => $top])->select();
|
||||
}
|
||||
} else {
|
||||
$uid = Db::name('LcUser')->where(['phone' => $phone])->value('id');
|
||||
if ($uid) {
|
||||
$list = Db::name('LcUser')->where(['top' => $uid])->select();
|
||||
}
|
||||
}
|
||||
if ($list) {
|
||||
foreach ($list as &$v) {
|
||||
$vo['top_phone'] = '';
|
||||
if ($v['top']) {
|
||||
$vo['top_phone'] = Db::name('LcUser')->where(['id' => $v['top']])->value('phone');
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->assign('list', $list);
|
||||
}
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据处理
|
||||
* @param array $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function _form_filter(&$vo)
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
|
||||
if ($vo['mwpassword']) {
|
||||
$vo['password'] = md5($vo['mwpassword']);
|
||||
}
|
||||
if ($vo['mwpassword2']) {
|
||||
$vo['password2'] = md5($vo['mwpassword2']);
|
||||
}
|
||||
if (isset($vo['id'])) {
|
||||
$money = Db::name($this->table)->where("id = {$vo['id']}")->value('money');
|
||||
if ($money && $money != $vo['money']) {
|
||||
$handle_money = $money - $vo['money'];
|
||||
$type = $handle_money > 0 ? 2 : 1;
|
||||
model('akszadmin/Users')->addFinance($vo['id'], abs($handle_money), $type, '系统操作');
|
||||
}
|
||||
if (!empty($vo['bank'])) {
|
||||
Db::name("LcBank")->where('uid', $vo['id'])->update([
|
||||
'bank' => $vo['bank'],
|
||||
'area' => $vo['area'],
|
||||
'account' => $vo['account']
|
||||
]);
|
||||
}
|
||||
|
||||
} else {
|
||||
$vo['time'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
} else {
|
||||
if (!isset($vo['auth'])) {
|
||||
$vo['auth'] = '0';
|
||||
}
|
||||
$this->member = Db::name("LcUserMember")->order('id desc')->select();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
|
||||
$uid = $this->request->param('id');
|
||||
|
||||
$this->bankinfo = Db::name("LcBank")->where("uid = {$uid}")->order('id desc')->find();
|
||||
|
||||
$this->_form($this->table, 'form');
|
||||
}
|
||||
/**
|
||||
* 实名认证审核
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function review()
|
||||
{
|
||||
$this->title = '实名认证审核';
|
||||
$this->id = input('id');
|
||||
if ($this->request->isGet()) {
|
||||
$user = Db::name("LcUser")->where("id = {$this->id}")->find();
|
||||
$this->assign('user', $user);
|
||||
$this->fetch();
|
||||
}else{
|
||||
$id = input('id');
|
||||
$rz_status = input('rz_status');
|
||||
$name = input('name');
|
||||
$idcard = input('idcard');
|
||||
$res = Db::name("LcUser")->where("id = {$id}")->update(['name'=>$name,'idcard'=>$idcard,'rz_status'=>$rz_status]);
|
||||
if($res){
|
||||
$this->success('审核成功');
|
||||
}else{
|
||||
$this->error('审核失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function forbid()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['clock' => '0']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function resume()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['clock' => '1']);
|
||||
}
|
||||
|
||||
public function setrobot()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_save($this->table, ['robot' => $_POST['clock']]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
$this->applyCsrfToken();
|
||||
$this->_delete($this->table);
|
||||
}
|
||||
}
|
||||
220
application/akszadmin/controller/Yuebao.php
Executable file
220
application/akszadmin/controller/Yuebao.php
Executable file
@ -0,0 +1,220 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller;
|
||||
|
||||
use library\Controller;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 流水记录
|
||||
* Class Item
|
||||
* @package app\akszadmin\controller
|
||||
*/
|
||||
class Yuebao extends Controller
|
||||
{
|
||||
/**
|
||||
* 绑定数据表
|
||||
* @var string
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 流水记录
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//$list=Db::name('lc_yuebao')->where('id',">",0)->select();
|
||||
$query = $this->_query('lc_yuebao')->where("id > 0 and status < 5");
|
||||
$query->order('id desc')->page();
|
||||
//$this->assign('list',$list);
|
||||
$this->fetch();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除记录
|
||||
* @auth true
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$list=Db::name('lc_yuebao_lists')->where("status < 5")->order('id desc')->select();
|
||||
$lists=array();
|
||||
foreach($list as $x=>$v){
|
||||
$v['start_time']=date('Y-m-d H:i:s',$v['start_time']);
|
||||
$v['end_time']=date('Y-m-d H:i:s',$v['end_time']);
|
||||
$lists[$x]=$v;
|
||||
}
|
||||
$counttotal=count($list);
|
||||
$counttotalmoney=Db::name('lc_yuebao_lists')->where("status = 1")->sum('money');
|
||||
$countdoing=Db::name('lc_yuebao_lists')->where("status = 1")->count();
|
||||
$countnosend=Db::name('lc_yuebao_lists')->where("status = 1")->sum('nowprofit');
|
||||
$countsended=Db::name('lc_yuebao_log')->where("status = 2")->sum('nowprofit');
|
||||
//$list=$lists;
|
||||
$this->assign('list',$lists);
|
||||
$this->assign('counttotal',$counttotal);
|
||||
$this->assign('counttotalmoney',round($counttotalmoney,4));
|
||||
$this->assign('countdoing',$countdoing);
|
||||
$this->assign('countnosend',round($countnosend,4));
|
||||
$this->assign('countsended',round($countsended,4));
|
||||
$query = $this->_query('lc_yuebao_lists')->where("status < 5");
|
||||
$query->order('id desc')->page();
|
||||
//var_dump($list);die;
|
||||
|
||||
|
||||
$this->fetch();
|
||||
//$this->fetch();
|
||||
}
|
||||
public function yebdel(){
|
||||
if($_SESSION['fw']['user']['username']=="admin"){
|
||||
Db::name('lc_yuebao')->where("id = ".$_GET['id'])->update(['status'=>9]);
|
||||
return "OK";
|
||||
}else{
|
||||
return "false";
|
||||
}
|
||||
|
||||
}
|
||||
public function yebstop(){
|
||||
if($_SESSION['fw']['user']['username']=="admin"){
|
||||
$getstatus=Db::name('lc_yuebao')->where("id = ".$_GET['id'])->find();
|
||||
if($getstatus['status']==0) Db::name('lc_yuebao')->where("id = ".$_GET['id'])->update(['status'=>1]);
|
||||
if($getstatus['status']==1) Db::name('lc_yuebao')->where("id = ".$_GET['id'])->update(['status'=>0]);
|
||||
//Db::name('lc_yuebao')->where("id = ".$_GET['id'])->update(['status'=>0]);
|
||||
return "OK";
|
||||
}else{
|
||||
return "false";
|
||||
}
|
||||
|
||||
}
|
||||
public function yebadd(){
|
||||
if($_SESSION['fw']['user']['username']!="admin"){return "非法访问";exit;die;}
|
||||
if(empty($_POST)){return "数据错误!";exit;die;}
|
||||
$adddata=array(
|
||||
'title'=>$_POST['title'],
|
||||
'lily'=>$_POST['lily'],
|
||||
'days'=>$_POST['days'],
|
||||
'advise'=>0,
|
||||
'lowmoney'=>$_POST['lowmoney'],
|
||||
'stars'=>$_POST['stars'],
|
||||
'addtime'=>time(),
|
||||
'status'=>$_POST['status'],
|
||||
);
|
||||
$ok=Db::name('lc_yuebao')->insert($adddata);
|
||||
return $ok==1?"OK":"false";die;
|
||||
}
|
||||
public function yebedit(){
|
||||
if($_SESSION['fw']['user']['username']!="admin"){return "非法访问";exit;die;}
|
||||
if(empty($_POST)){return "数据错误!";exit;die;}
|
||||
$adddata=array(
|
||||
'title'=>$_POST['title'],
|
||||
'lily'=>$_POST['lily'],
|
||||
'days'=>$_POST['days'],
|
||||
'advise'=>0,
|
||||
'lowmoney'=>$_POST['lowmoney'],
|
||||
'stars'=>$_POST['stars'],
|
||||
'addtime'=>time(),
|
||||
'status'=>$_POST['status'],
|
||||
);
|
||||
$ok=Db::name('lc_yuebao')->where('id = '.$_POST['yebid'])->update($adddata);
|
||||
return $ok==1?"OK":"false";die;
|
||||
}
|
||||
public function yebgetbyid(){
|
||||
$res=Db::name('lc_yuebao')->where('id = '.$_GET['id'])->find();
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function listclear(){
|
||||
if($_SESSION['fw']['user']['username']!="admin"){return "非法访问";exit;die;}
|
||||
if(empty($_POST)){return "数据错误!";exit;die;}
|
||||
|
||||
$getlistinfo=Db::table('lc_yuebao_lists')->where('id='.$_POST['id'])->find();
|
||||
if($getlistinfo['status']!=1 or empty($getlistinfo)){return "操作失败:订单无法操作!";die;}
|
||||
|
||||
$getuserinfo=Db::table('lc_user')->where('id='.$getlistinfo['uid'])->find();
|
||||
if(!empty($getuserinfo)){
|
||||
Db::table('lc_yuebao_lists')->where('id='.$_POST['id'])->update(['status'=>2,'end_time'=>time()]);
|
||||
//记录日志!
|
||||
unset($getlistinfo['id']);
|
||||
$getlistinfo['status']=2;
|
||||
$getlistinfo['end_time']=time();
|
||||
$getlistinfo['balance']=$getuserinfo['money'];
|
||||
$getlistinfo['closetime']=time();
|
||||
$getlistinfo['remarks']="管理员".$_SESSION['fw']['user']['username']."人工结算";
|
||||
Db::table('lc_yuebao_log')->insert($getlistinfo);
|
||||
//更新用户余额
|
||||
$newbalance=$getuserinfo['money']+$getlistinfo['nowprofit']+$getlistinfo['money'];
|
||||
Db::table('lc_user')->where('id='.$getlistinfo['uid'])->update(['money'=>$newbalance]);
|
||||
|
||||
//更新UC
|
||||
$where['uid']=$getlistinfo['uid'];
|
||||
$yebucinfo=Db::table('lc_yuebao_uc')->where($where)->find();
|
||||
$newbalance=$yebucinfo['balance']-$getlistinfo['money'];
|
||||
Db::table('lc_yuebao_uc')->where($where)->update(['balance'=>$newbalance]);
|
||||
|
||||
//再做UCLOG
|
||||
$yebuclog=array(
|
||||
'uid'=>$getlistinfo['uid'],
|
||||
'balance'=>$yebucinfo['balance'],
|
||||
'money'=>$getlistinfo['money'],
|
||||
'addtime'=>time(),
|
||||
'remarks'=>"用户购买理财方案:".$getlistinfo['yebtitle']
|
||||
);
|
||||
Db::table('lc_yuebao_uclog')->insert($yebuclog);
|
||||
|
||||
return "ok";
|
||||
|
||||
}else{
|
||||
return "操作失败:订单无法操作!";
|
||||
}
|
||||
die;
|
||||
|
||||
|
||||
//更新参保状态。
|
||||
|
||||
}
|
||||
|
||||
public function listkeep(){
|
||||
if($_SESSION['fw']['user']['username']!="admin"){return "非法访问";exit;die;}
|
||||
if(empty($_POST)){return "数据错误!";exit;die;}
|
||||
$getlistinfo=Db::table('lc_yuebao_lists')->where('id='.$_POST['id'])->find();
|
||||
if($getlistinfo['status']==2){
|
||||
$getlistinfo['start_time']=time();
|
||||
$getlistinfo['end_time']=time()+$getlistinfo['days']*86400;
|
||||
$getlistinfo['status']=1;
|
||||
$getlistinfo['nowprofit']=0;
|
||||
}elseif($getlistinfo['status']==1){
|
||||
$getlistinfo['end_time']=$getlistinfo['end_time']+$getlistinfo['days']*86400;
|
||||
}
|
||||
unset($getlistinfo['id']);
|
||||
Db::table('lc_yuebao_lists')->where('id='.$_POST['id'])->update($getlistinfo);
|
||||
return "操作成功";die;
|
||||
}
|
||||
public function listdel(){
|
||||
if($_SESSION['fw']['user']['username']!="admin"){return "非法访问";exit;die;}
|
||||
if(empty($_POST)){return "数据错误!";exit;die;}
|
||||
Db::name('lc_yuebao')->where("id = ".$_GET['id'])->update(['status'=>9]);
|
||||
return "OK";die;
|
||||
|
||||
}
|
||||
}
|
||||
150
application/akszadmin/controller/api/Plugs.php
Executable file
150
application/akszadmin/controller/api/Plugs.php
Executable file
@ -0,0 +1,150 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller\api;
|
||||
|
||||
use GdImageClass;
|
||||
use Kaadon\Helper\GdImageHelper;
|
||||
use library\Controller;
|
||||
use library\File;
|
||||
|
||||
/**
|
||||
* 后台插件管理
|
||||
* Class Plugs
|
||||
* @package app\akszadmin\controller\api
|
||||
*/
|
||||
class Plugs extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* 系统图标选择器
|
||||
*/
|
||||
public function icon()
|
||||
{
|
||||
$this->title = '图标选择器';
|
||||
$this->field = input('field', 'icon');
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件上传参数
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
$diff1 = explode(',', strtolower(input('exts', '')));
|
||||
$diff2 = explode(',', strtolower(sysconf('storage_local_exts')));
|
||||
$exts = array_intersect($diff1, $diff2);
|
||||
$this->success('获取文件上传参数', [
|
||||
'exts' => join('|', $exts),
|
||||
'mime' => File::mine($exts),
|
||||
'type' => $this->getUploadType(),
|
||||
'data' => $this->getUploadData(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台通用文件上传
|
||||
* @login true
|
||||
* @return \think\response\Json
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
public function upload()
|
||||
{
|
||||
if (!($file = $this->getUploadFile()) || empty($file)) {
|
||||
return json(['uploaded' => false, 'error' => ['message' => '文件上传异常,文件可能过大或未上传']]);
|
||||
}
|
||||
if (!$file->checkExt(strtolower(sysconf('storage_local_exts')))) {
|
||||
return json(['uploaded' => false, 'error' => ['message' => '文件上传类型受限,请在后台配置']]);
|
||||
}
|
||||
if ($file->checkExt('php,sh')) {
|
||||
return json(['uploaded' => false, 'error' => ['message' => '可执行文件禁止上传到本地服务器']]);
|
||||
}
|
||||
$this->safe = boolval(input('safe'));
|
||||
$this->uptype = $this->getUploadType();
|
||||
$this->extend = pathinfo($file->getInfo('name'), PATHINFO_EXTENSION);
|
||||
if ($this->uptype === 'local' && GdImageClass::isSupportSuffix($this->extend)) {
|
||||
try {
|
||||
(new GdImageClass($file->getRealPath(),$this->extend))->convertTo($file->getRealPath(), 'webp');
|
||||
$file= new \think\File($file->getRealPath());
|
||||
$this->extend = 'webp';
|
||||
} catch (\Exception $exception) {
|
||||
return json(['uploaded' => false, 'error' => ['message' => '文件处理失败: ' . $exception->getMessage()]]);
|
||||
}
|
||||
}
|
||||
/** @noinspection DuplicatedCode */
|
||||
$name = File::name($file->getPathname(), $this->extend, '', 'md5_file');
|
||||
$info = File::instance($this->uptype)->save($name, file_get_contents($file->getRealPath()), $this->safe);
|
||||
if (is_array($info) && isset($info['url'])) {
|
||||
return json(['uploaded' => true, 'filename' => $name, 'url' => $this->safe ? $name : $info['url']]);
|
||||
} else {
|
||||
return json(['uploaded' => false, 'error' => ['message' => '文件处理失败,请稍候再试!']]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成文件上传参数
|
||||
* @return array
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
private function getUploadData()
|
||||
{
|
||||
if ($this->getUploadType() === 'qiniu') {
|
||||
$file = File::instance('qiniu');
|
||||
return [
|
||||
'url' => $file->upload(true),
|
||||
'token' => $file->buildUploadToken(),
|
||||
'uptype' => $this->getUploadType()
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
'url' => '?s=' . ADMIN_MODULE . '/api.plugs/upload',
|
||||
'token' => uniqid('local_upload_'),
|
||||
'uptype' => $this->getUploadType()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件上传方式
|
||||
* @return string
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
private function getUploadType()
|
||||
{
|
||||
$this->uptype = input('uptype');
|
||||
if (!in_array($this->uptype, ['local', 'oss', 'qiniu'])) {
|
||||
$this->uptype = sysconf('storage_type');
|
||||
}
|
||||
return $this->uptype;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本地文件对象
|
||||
* @return \think\File
|
||||
*/
|
||||
private function getUploadFile()
|
||||
{
|
||||
try {
|
||||
return $this->request->file('file');
|
||||
} catch (\Exception $e) {
|
||||
$this->error(lang($e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
60
application/akszadmin/controller/api/Update.php
Executable file
60
application/akszadmin/controller/api/Update.php
Executable file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\akszadmin\controller\api;
|
||||
|
||||
use library\command\Sync;
|
||||
use library\Controller;
|
||||
|
||||
/**
|
||||
* 系统更新接口
|
||||
* Class Update
|
||||
* @package app\akszadmin\controller\api
|
||||
*/
|
||||
class Update extends Controller
|
||||
{
|
||||
/**
|
||||
* 基础URL地址
|
||||
* @var string
|
||||
*/
|
||||
protected $baseUri = 'https://demo.thinkadmin.top';
|
||||
|
||||
/**
|
||||
* 获取文件列表
|
||||
*/
|
||||
public function tree()
|
||||
{
|
||||
$sync = new Sync('Update');
|
||||
$this->success('获取当前文件列表成功!', $sync->build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取线上文件数据
|
||||
* @param string $encode
|
||||
*/
|
||||
public function read($encode)
|
||||
{
|
||||
$this->file = env('root_path') . decode($encode);
|
||||
if (file_exists($this->file)) {
|
||||
$this->success('读取文件成功!', [
|
||||
'format' => 'base64',
|
||||
'content' => base64_encode(file_get_contents($this->file)),
|
||||
]);
|
||||
} else {
|
||||
$this->error('获取文件内容失败!');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
53
application/akszadmin/model/Item.php
Executable file
53
application/akszadmin/model/Item.php
Executable file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace app\akszadmin\model;
|
||||
|
||||
use think\Model;
|
||||
use think\Db;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
protected $item_table = 'LcItem';
|
||||
protected $invest_table = 'LcInvest';
|
||||
|
||||
/**
|
||||
* @description:获取项目进度
|
||||
* @date: 2020/5/12 0012
|
||||
* @param $id
|
||||
* @return float|int|mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function getProjectPercent($id){
|
||||
$item = Db::name($this->item_table)->find($id);
|
||||
if($item['auto']>0){
|
||||
$xc=$this->diffBetweenTwoDays($item['time'],date('Y-m-d H:i:s'));
|
||||
if($xc>$item['auto']){
|
||||
$total=100;
|
||||
}else{
|
||||
$total= round($xc/$item['auto']*100);
|
||||
}
|
||||
}else{
|
||||
$pid = $item['id'];
|
||||
$percent = $item['percent'];
|
||||
$investMoney = Db::name($this->invest_table)->where('pid', $pid)->sum('money');
|
||||
$actual = $investMoney / ($item['total'] * 10000) * 100;
|
||||
$total = $actual + $percent;
|
||||
}
|
||||
if (100 < $total) return 100;
|
||||
return $total;
|
||||
}
|
||||
|
||||
public function diffBetweenTwoDays ($day1, $day2)
|
||||
{
|
||||
$second1 = strtotime($day1);
|
||||
$second2 = strtotime($day2);
|
||||
if ($second1 < $second2) {
|
||||
$tmp = $second2;
|
||||
$second2 = $second1;
|
||||
$second1 = $tmp;
|
||||
}
|
||||
return ($second1 - $second2) / 86400;
|
||||
}
|
||||
}
|
||||
48
application/akszadmin/model/Users.php
Executable file
48
application/akszadmin/model/Users.php
Executable file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace app\akszadmin\model;
|
||||
|
||||
use think\Model;
|
||||
use think\Db;
|
||||
|
||||
class Users extends Model
|
||||
{
|
||||
protected $user_table = 'LcUser';
|
||||
protected $finance_table = 'LcFinance';
|
||||
|
||||
|
||||
/**
|
||||
* @description:添加流水
|
||||
* @date: 2020/5/12 0012
|
||||
* @param $uid
|
||||
* @param $money
|
||||
* @param $type
|
||||
* @param $reason
|
||||
* @return bool
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function addFinance($uid,$money,$type,$reason){
|
||||
$user = Db::name($this->user_table)->find($uid);
|
||||
if($user['money']<0) return false;
|
||||
if(!$user) return false;
|
||||
$data = array(
|
||||
'uid' => $uid,
|
||||
'money' => $money,
|
||||
'type' => $type,
|
||||
'reason' => $reason,
|
||||
'before' => $user['money'],
|
||||
'time' => date('Y-m-d H:i:s')
|
||||
);
|
||||
Db::startTrans();
|
||||
$re = Db::name($this->finance_table)->insert($data);
|
||||
if($re){
|
||||
Db::commit();
|
||||
return true;
|
||||
}else{
|
||||
Db::rollback();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
195
application/akszadmin/sys.php
Executable file
195
application/akszadmin/sys.php
Executable file
@ -0,0 +1,195 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkAdmins
|
||||
// +----------------------------------------------------------------------
|
||||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | 官方网站: http://demo.thinkadmin.top
|
||||
// +----------------------------------------------------------------------
|
||||
// | 开源协议 ( https://mit-license.org )
|
||||
// +----------------------------------------------------------------------
|
||||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
use library\File;
|
||||
use library\service\AdminService;
|
||||
use library\service\CaptchaService;
|
||||
use library\service\SystemService;
|
||||
use think\Db;
|
||||
use think\facade\Middleware;
|
||||
use think\facade\Route;
|
||||
use think\Request;
|
||||
|
||||
if (!function_exists('auth')) {
|
||||
/**
|
||||
* 节点访问权限检查
|
||||
* @param string $node 需要检查的节点
|
||||
* @return boolean
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
function auth($node)
|
||||
{
|
||||
return AdminService::instance()->check($node);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('sysdata')) {
|
||||
/**
|
||||
* JSON 数据读取与存储
|
||||
* @param string $name 数据名称
|
||||
* @param mixed $value 数据内容
|
||||
* @return mixed
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
function sysdata($name, $value = null)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
return SystemService::instance()->getData($name);
|
||||
} else {
|
||||
return SystemService::instance()->setData($name, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('sysoplog')) {
|
||||
/**
|
||||
* 写入系统日志
|
||||
* @param string $action 日志行为
|
||||
* @param string $content 日志内容
|
||||
* @return boolean
|
||||
*/
|
||||
function sysoplog($action, $content)
|
||||
{
|
||||
return SystemService::instance()->setOplog($action, $content);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('sysqueue')) {
|
||||
/**
|
||||
* 创建异步处理任务
|
||||
* @param string $title 任务名称
|
||||
* @param string $loade 执行内容
|
||||
* @param integer $later 延时执行时间
|
||||
* @param array $data 任务附加数据
|
||||
* @param integer $double 任务多开
|
||||
* @return boolean
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
function sysqueue($title, $loade, $later = 0, $data = [], $double = 1)
|
||||
{
|
||||
$map = [['title', 'eq', $title], ['status', 'in', [1, 2]]];
|
||||
if (empty($double) && Db::name('SystemQueue')->where($map)->count() > 0) {
|
||||
throw new \think\Exception('该任务已经创建,请耐心等待处理完成!');
|
||||
}
|
||||
$result = Db::name('SystemQueue')->insert([
|
||||
'title' => $title, 'preload' => $loade,
|
||||
'data' => json_encode($data, JSON_UNESCAPED_UNICODE),
|
||||
'time' => $later > 0 ? time() + $later : time(),
|
||||
'double' => intval($double), 'create_at' => date('Y-m-d H:i:s'),
|
||||
]);
|
||||
return $result !== false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('local_image')) {
|
||||
/**
|
||||
* 下载远程文件到本地
|
||||
* @param string $url 远程图片地址
|
||||
* @param boolean $force 是否强制重新下载
|
||||
* @param integer $expire 强制本地存储时间
|
||||
* @return string
|
||||
*/
|
||||
function local_image($url, $force = false, $expire = 0)
|
||||
{
|
||||
$result = File::down($url, $force, $expire);
|
||||
if (isset($result['url'])) {
|
||||
return $result['url'];
|
||||
} else {
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('base64_image')) {
|
||||
/**
|
||||
* base64 图片上传接口
|
||||
* @param string $content 图片base64内容
|
||||
* @param string $dirname 图片存储目录
|
||||
* @return string
|
||||
*/
|
||||
function base64_image($content, $dirname = 'base64/')
|
||||
{
|
||||
try {
|
||||
if (preg_match('|^data:image/(.*?);base64,|i', $content)) {
|
||||
list($ext, $base) = explode('|||', preg_replace('|^data:image/(.*?);base64,|i', '$1|||', $content));
|
||||
$info = File::save($dirname . md5($base) . '.' . (empty($ext) ? 'tmp' : $ext), base64_decode($base));
|
||||
return $info['url'];
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description:充值奖励
|
||||
* @date: 2020/5/14 0014
|
||||
* @param $tid
|
||||
* @param $money
|
||||
* @throws \think\Exception
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
function setRechargeRebate($tid, $money)
|
||||
{
|
||||
$reward = Db::name('LcReward')->where(['id'=>1])->value("recharge");
|
||||
$rebate = round($reward * $money / 100, 2);
|
||||
if (0 < $rebate) {
|
||||
addFinance($tid, $rebate, 1, '推荐会员充值' . $money . '元,获得佣金' . $rebate . '元');
|
||||
setNumber('LcUser', 'money', $rebate, 1, "id = $tid");
|
||||
setNumber('LcUser', 'income', $rebate, 1, "id = $tid");
|
||||
}
|
||||
}
|
||||
|
||||
// 访问权限检查中间键
|
||||
Middleware::add(function (Request $request, \Closure $next) {
|
||||
if (AdminService::instance()->check()) {
|
||||
return $next($request);
|
||||
} elseif (AdminService::instance()->isLogin()) {
|
||||
return json(['code' => 0, 'msg' => '抱歉,没有访问该操作的权限!']);
|
||||
} else {
|
||||
return json(['code' => 0, 'msg' => '抱歉,需要登录获取访问权限!', 'url' => url('@akszadmin/login')]);
|
||||
}
|
||||
});
|
||||
function curl2post($url,$data){
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url); //设置访问的url地址
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
$data && curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$tmpInfo = curl_exec($ch);
|
||||
if (curl_errno($ch)) {
|
||||
return curl_error($ch);
|
||||
}
|
||||
curl_close($ch);
|
||||
return $tmpInfo;
|
||||
}
|
||||
|
||||
// ThinkAdmin 图形验证码
|
||||
Route::get('/think/akszadmin/captcha', function () {
|
||||
$image = CaptchaService::instance();
|
||||
return json(['code' => '1', 'info' => '生成验证码', 'data' => [
|
||||
'uniqid' => $image->getUniqid(), 'image' => $image->getData()
|
||||
]]);
|
||||
});
|
||||
3659
application/akszadmin/view/api/plugs/icon.html
Executable file
3659
application/akszadmin/view/api/plugs/icon.html
Executable file
File diff suppressed because it is too large
Load Diff
92
application/akszadmin/view/article/form.html
Executable file
92
application/akszadmin/view/article/form.html
Executable file
@ -0,0 +1,92 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
|
||||
<div class="layui-card-body think-box-shadow padding-left-40">
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">文章分类</span>
|
||||
<select class="layui-select" required name="type" lay-search>
|
||||
{foreach $class as $cate}
|
||||
{if isset($vo.type) and $vo.type eq $cate.id}
|
||||
<option selected value="{$cate.id}">{$cate.name|default=''}</option>
|
||||
{else}
|
||||
<option value="{$cate.id}">{$cate.name|default=''}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">语言</span>
|
||||
<select class="layui-select" required name="lang" lay-search>
|
||||
{foreach $langss as $langs}
|
||||
{if isset($vo.lang) and $vo.lang eq $langs.value}
|
||||
<option selected value="{$langs.value}">{$langs.name|default=''}</option>
|
||||
{else}
|
||||
<option value="{$langs.value}">{$langs.name|default=''}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs9 relative">
|
||||
<span class="color-green">文章名称</span>
|
||||
<input name="title" required class="layui-input" placeholder="请输入文章名称" value="{$vo.title|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">是否显示</span>
|
||||
<select class="layui-select" name="show">
|
||||
{foreach ['1'=>'显示','0'=>'隐藏'] as $k=>$v}
|
||||
<!--{eq name='$vo.show' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs9 relative">
|
||||
<span class="color-green">关键词</span>
|
||||
<input name="keyword" class="layui-input" placeholder="请输入文章关键词" value="{$vo.keyword|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item block">
|
||||
<span class="label-required-prev color-green">文章内容</span>
|
||||
<textarea name="content">{$vo.content|default=''|raw}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn layui-btn-danger" ng-click="hsitoryBack()" type="button">取消编辑</button>
|
||||
<button class="layui-btn" type="submit">保存文章</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
require(['ckeditor', 'angular'], function () {
|
||||
window.createEditor('[name="content"]', {height: 500});
|
||||
var app = angular.module("GoodsForm", []).run(callback);
|
||||
angular.bootstrap(document.getElementById(app.name), [app.name]);
|
||||
|
||||
function callback($rootScope) {
|
||||
$rootScope.hsitoryBack = function () {
|
||||
$.msg.confirm('确定要取消编辑吗?', function (index) {
|
||||
history.back(), $.msg.close(index);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
88
application/akszadmin/view/article/index.html
Executable file
88
application/akszadmin/view/article/index.html
Executable file
@ -0,0 +1,88 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="button"}
|
||||
{if auth("akszadmin/article/add")}
|
||||
<button data-open='{:url(ADMIN_MODULE."/article/add")}' data-title="添加文章" class='layui-btn layui-btn-sm layui-btn-primary'>添加文章</button>
|
||||
{/if}
|
||||
{if auth("akszadmin/article/remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/article/remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" class='layui-btn layui-btn-sm layui-btn-primary'>删除文章</button>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='article/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
||||
</th>
|
||||
<th class='list-table-sort-td'>
|
||||
<button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
|
||||
</th>
|
||||
<th class='text-left nowrap' width="30%">文章标题</th>
|
||||
<th class='text-left nowrap' width="15%">文章类型</th>
|
||||
<th class='text-left nowrap' width="15%">语言</th>
|
||||
<th class='text-left nowrap' width="15%">文章状态</th>
|
||||
<th class='text-left nowrap' width="15%">发布时间</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr data-dbclick>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<input class="list-check-box" value='{$vo.id}' type='checkbox'>
|
||||
</td>
|
||||
<td class='list-table-sort-td'>
|
||||
<input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.title|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.name|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.lang|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{if $vo.show == 1}
|
||||
<span class="color-green">显示</span>
|
||||
{/if}
|
||||
{if $vo.show == 0}
|
||||
<span class="color-desc">不显示</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.time|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
|
||||
<div class="nowrap margin-bottom-5">
|
||||
{if auth("akszadmin/article/edit")}
|
||||
<a data-dbclick class="layui-btn layui-btn-sm" data-open='{:url(ADMIN_MODULE."/article/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{else}
|
||||
<a data-tips-text="您没有编辑文章的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">编 辑</a>
|
||||
{/if}
|
||||
{if auth("akszadmin/article/remove")}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/article/remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
|
||||
{else}
|
||||
<a data-tips-text="您没有删除文章的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删 除</a>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
33
application/akszadmin/view/article/index_search.html
Executable file
33
application/akszadmin/view/article/index_search.html
Executable file
@ -0,0 +1,33 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">文章名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="i_title" value="{$Think.get.i_title|default=''}" placeholder="请输入文章名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">文章分类</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="i_type" lay-search>
|
||||
<option value="">全部文章</option>
|
||||
{foreach $mlist as $v}
|
||||
<option selected value="{$v.id}">{$v.name}</option>
|
||||
<option value="{$v.id}">{$v.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">提交日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="i_time" value="{$Think.get.i_time|default=''}" placeholder="请选择提交时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
15
application/akszadmin/view/article_type/class_search.html
Executable file
15
application/akszadmin/view/article_type/class_search.html
Executable file
@ -0,0 +1,15 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">分类名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="title" value="{$Think.get.title|default=''}" placeholder="请输入分类名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
32
application/akszadmin/view/article_type/form.html
Executable file
32
application/akszadmin/view/article_type/form.html
Executable file
@ -0,0 +1,32 @@
|
||||
<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
|
||||
<div class="layui-card-body">
|
||||
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">分类名称</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="name" required value='{$vo.name|default=""}' placeholder="请输入分类名称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">分类排序</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="sort" value='{$vo.sort|default="0"}' placeholder="请输入分类排序" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||
<button class="layui-btn" type='submit'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
</form>
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
61
application/akszadmin/view/article_type/index.html
Executable file
61
application/akszadmin/view/article_type/index.html
Executable file
@ -0,0 +1,61 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="button"}
|
||||
{if auth("akszadmin/article_type/add")}
|
||||
<button data-modal='{:url(ADMIN_MODULE."/article_type/add")}' data-title="添加文章分类" class='layui-btn layui-btn-sm layui-btn-primary'>添加文章分类</button>
|
||||
{/if}
|
||||
{if auth("remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/article_type/remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些文章分类吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除文章分类</button>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='article_type/class_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
||||
</th>
|
||||
<th class='list-table-sort-td'>
|
||||
<button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
|
||||
</th>
|
||||
<th class='text-left nowrap'>分类名称</th>
|
||||
<th class="text-center">添加时间</th>
|
||||
<th class="text-center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<input class="list-check-box" value='{$vo.id}' type='checkbox'>
|
||||
</td>
|
||||
<td class='list-table-sort-td'>
|
||||
<input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.name|default=''}
|
||||
</td>
|
||||
<td class='text-center nowrap'>{$vo.add_time}</td>
|
||||
<td class='text-left nowrap'>
|
||||
|
||||
{if auth("akszadmin/article_type/edit")}
|
||||
<a data-title="编辑分类" class="layui-btn layui-btn-sm" data-modal='{:url(ADMIN_MODULE."article_type/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{/if}
|
||||
|
||||
{if auth("akszadmin/article_type/remove")}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/article_type/remove')}" data-value="id#{$vo.id}">删 除</a>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
116
application/akszadmin/view/auth/apply.html
Executable file
116
application/akszadmin/view/auth/apply.html
Executable file
@ -0,0 +1,116 @@
|
||||
{extend name='main'}
|
||||
|
||||
{block name="button"}
|
||||
|
||||
{if auth("akszadmin/auth/refresh")}
|
||||
<button data-load='{:url(ADMIN_MODULE."/auth/refresh")}' class='layui-btn layui-btn-sm layui-btn-primary'>刷新权限</button>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
<ul id="zTree" class="ztree notselect"></ul>
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="layui-form-item text-center">
|
||||
<button class="layui-btn" data-submit-role type='button'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">取消编辑</button>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script>
|
||||
window.RoleAction = new function () {
|
||||
this.data = {};
|
||||
this.ztree = null;
|
||||
this.setting = {
|
||||
view: {showLine: false, showIcon: false, dblClickExpand: false},
|
||||
check: {enable: true, nocheck: false, chkboxType: {"Y": "ps", "N": "ps"}},
|
||||
callback: {
|
||||
beforeClick: function (id, node) {
|
||||
node.children.length < 1 ? RoleAction.ztree.checkNode(node, !node.checked, null, true) : RoleAction.ztree.expandNode(node);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.renderChildren = function (list, level) {
|
||||
var childrens = [];
|
||||
for (var i in list) childrens.push({
|
||||
open: true, node: list[i].node, name: list[i].title || list[i].node,
|
||||
checked: list[i].checked || false, children: this.renderChildren(list[i]._sub_, level + 1)
|
||||
});
|
||||
return childrens;
|
||||
};
|
||||
this.getData = function (that) {
|
||||
var index = $.msg.loading();
|
||||
$.form.load('{:url()}', {id: '{$vo.id}', action: 'get'}, 'post', function (ret) {
|
||||
that.data = that.renderChildren(ret.data, 1);
|
||||
return $.msg.close(index), that.showTree(), false;
|
||||
});
|
||||
};
|
||||
this.showTree = function () {
|
||||
this.ztree = $.fn.zTree.init($("#zTree"), this.setting, this.data);
|
||||
while (true) {
|
||||
var nodes = this.ztree.getNodesByFilter(function (node) {
|
||||
return (!node.node && node.children.length < 1);
|
||||
});
|
||||
if (nodes.length < 1) break;
|
||||
for (var i in nodes) this.ztree.removeNode(nodes[i]);
|
||||
}
|
||||
};
|
||||
this.submit = function () {
|
||||
var nodes = [], data = this.ztree.getCheckedNodes(true);
|
||||
for (var i in data) if (data[i].node) nodes.push(data[i].node);
|
||||
$.form.load('{:url()}', {id: '{$vo.id}', action: 'save', nodes: nodes}, 'post');
|
||||
};
|
||||
// 刷新数据
|
||||
this.getData(this);
|
||||
// 提交表单
|
||||
$('[data-submit-role]').on('click', function () {
|
||||
RoleAction.submit();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
{block name="style"}
|
||||
<link href="__ROOT__/static/plugs/ztree/zTreeStyle/zTreeStyle.css" rel="stylesheet">
|
||||
<script src="__ROOT__/static/plugs/ztree/ztree.all.min.js"></script>
|
||||
<style>
|
||||
ul.ztree li {
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
ul.ztree li span.button.switch {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
ul.ztree ul ul li {
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
ul.ztree > li {
|
||||
padding: 15px 25px 15px 15px;
|
||||
}
|
||||
|
||||
ul.ztree > li > ul {
|
||||
margin-top: 12px;
|
||||
border-top: 1px solid rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
ul.ztree > li > ul > li {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
ul.ztree > li > a > span {
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
ul.ztree .level2 .button.level2 {
|
||||
background: 0 0;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
30
application/akszadmin/view/auth/form.html
Executable file
30
application/akszadmin/view/auth/form.html
Executable file
@ -0,0 +1,30 @@
|
||||
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
|
||||
|
||||
<div class="layui-card-body padding-left-40">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">权限名称</span>
|
||||
<span class="color-desc margin-left-5">Title</span>
|
||||
<input type="text" name="title" value='{$vo.title|default=""}' required placeholder="请输入权限名称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">权限描述</span>
|
||||
<span class="color-desc margin-left-5">Authorization</span>
|
||||
<textarea placeholder="请输入权限描述" required class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
<button class="layui-btn" type='submit'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
</form>
|
||||
80
application/akszadmin/view/auth/index.html
Executable file
80
application/akszadmin/view/auth/index.html
Executable file
@ -0,0 +1,80 @@
|
||||
{extend name='main'}
|
||||
|
||||
{block name="button"}
|
||||
|
||||
{if auth("akszadmin/auth/add")}
|
||||
<button data-modal='{:url(ADMIN_MODULE."/auth/add")}' data-title="添加权限" class='layui-btn layui-btn-sm layui-btn-primary'>添加权限</button>
|
||||
{/if}
|
||||
|
||||
{if auth("akszadmin/auth/remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/auth/remove")}' data-rule="id#{key}" data-csrf="{:systoken('akszadmin/auth/remove')}" data-confirm="确定要删除这些权限吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除权限</button>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<div class="think-box-shadow">
|
||||
{include file='auth/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th class='text-left nowrap'>权限信息</th>
|
||||
<th class='text-left nowrap'>创建时间</th>
|
||||
<th class="text-center nowrap">使用状态</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr data-dbclick>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
|
||||
</td>
|
||||
<td class='text-left'>
|
||||
权限名称:{$vo.title|default='-'}<br>
|
||||
<p class="color-desc">权限描述:{$vo.desc|default="没有写描述哦!"}</p>
|
||||
</td>
|
||||
<td class="text-left nowrap">
|
||||
日期:{$vo.create_at|format_datetime|str_replace=' ','<br><span class="color-desc">时间:',###|raw}</span>
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{eq name='vo.status' value='0'}<span class="color-red">已禁用</span>{else}<span class="color-green">使用中</span>{/eq}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
|
||||
{if auth("akszadmin/auth/edit")}
|
||||
<span class="text-explode">|</span>
|
||||
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑权限" data-modal='{:url(ADMIN_MODULE."/auth/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{/if}
|
||||
|
||||
{if auth("akszadmin/auth/apply")}
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm" data-open='{:url(ADMIN_MODULE."/auth/apply")}?id={$vo.id}'>授 权</a>
|
||||
{/if}
|
||||
|
||||
{if $vo.status eq 1 and auth("akszadmin/auth/forbid")}
|
||||
<a class="layui-btn layui-btn-warm layui-btn-sm" data-action="{:url(ADMIN_MODULE.'/auth/forbid')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('akszadmin/auth/forbid')}">禁 用</a>
|
||||
{elseif $vo.status eq 0 and auth("akszadmin/auth/resume")}
|
||||
<a class="layui-btn layui-btn-warm layui-btn-sm" data-action="{:url(ADMIN_MODULE.'/auth/resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('akszadmin/auth/resume')}">启 用</a>
|
||||
{/if}
|
||||
|
||||
{if auth("akszadmin/auth/remove")}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/auth/remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('akszadmin/auth/remove')}">删 除</a>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
42
application/akszadmin/view/auth/index_search.html
Executable file
42
application/akszadmin/view/auth/index_search.html
Executable file
@ -0,0 +1,42 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">权限名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="title" value="{$Think.get.title|default=''}" placeholder="请输入权限名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">权限描述</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="desc" value="{$Think.get.desc|default=''}" placeholder="请输入权限描述" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">使用状态</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="status">
|
||||
{foreach [''=>'-- 全部状态 --','0'=>'已禁用的权限','1'=>'使用中的权限'] as $k=>$v}
|
||||
{eq name='Think.get.status' value='$k.""'}
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
{else}
|
||||
<option value="{$k}">{$v}</option>
|
||||
{/eq}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">创建时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="create_at" value="{$Think.get.create_at|default=''}" placeholder="请选择创建时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<script>form.render()</script>
|
||||
24
application/akszadmin/view/bank/form.html
Executable file
24
application/akszadmin/view/bank/form.html
Executable file
@ -0,0 +1,24 @@
|
||||
<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">卡号</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="account" required value='{$vo.account|default="0"}' placeholder="卡号" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||
<button class="layui-btn" type='submit'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
</form>
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
69
application/akszadmin/view/bank/index.html
Executable file
69
application/akszadmin/view/bank/index.html
Executable file
@ -0,0 +1,69 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="button"}
|
||||
{if auth("remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/bank/remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除记录</button>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='bank/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th class='text-center nowrap'>编号</th>
|
||||
<th class='text-center nowrap'>会员ID</th>
|
||||
<th class="text-center nowrap">用户名</th>
|
||||
<th class="text-center nowrap">开户姓名</th>
|
||||
<th class="text-center nowrap">所属银行</th>
|
||||
<th class="text-center nowrap">支行名称</th>
|
||||
<th class="text-center nowrap">银行卡号</th>
|
||||
<th class="text-center nowrap">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.id|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.uid|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.phone|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.u_name|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.bank|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.area|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.account|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{if auth("akszadmin/article_type/edit")}
|
||||
<a data-title="编辑银行卡" class="layui-btn layui-btn-sm" data-modal='{:url(ADMIN_MODULE."/bank/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{/if}
|
||||
{if auth("remove")}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/bank/remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
27
application/akszadmin/view/bank/index_search.html
Executable file
27
application/akszadmin/view/bank/index_search.html
Executable file
@ -0,0 +1,27 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">用户名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_phone" value="{$Think.get.u_phone|default=''}" placeholder="请输入用户名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">开户姓名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_name" value="{$Think.get.u_name|default=''}" placeholder="请输入开户姓名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">银行卡号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="i_account" value="{$Think.get.i_account|default=''}" placeholder="请输入银行卡号(模糊搜索)" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
50
application/akszadmin/view/cash/edit.html
Executable file
50
application/akszadmin/view/cash/edit.html
Executable file
@ -0,0 +1,50 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="content"}
|
||||
<form onsubmit="return false;" action="{:request()->url()}" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-card-body think-box-shadow padding-left-40">
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">卡号</span>
|
||||
<input class="layui-input" value="{$vo.account|default=''}" style="border:none">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">提现金额</span>
|
||||
<input class="layui-input" value="{$vo.money|default=''}" style="border:none">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item block">
|
||||
<span class="color-green">拒绝理由</span>
|
||||
<input name="reaolae" class="layui-input" >
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn" type="submit">立即拒绝</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
require(['ckeditor', 'angular'], function() {
|
||||
window.createEditor('[name="content"]', { height: 500 });
|
||||
var app = angular.module("GoodsForm", []).run(callback);
|
||||
angular.bootstrap(document.getElementById(app.name), [app.name]);
|
||||
|
||||
function callback($rootScope) {
|
||||
$rootScope.hsitoryBack = function() {
|
||||
$.msg.confirm('确定要取消编辑吗?', function(index) {
|
||||
history.back(), $.msg.close(index);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
122
application/akszadmin/view/cash/index.html
Executable file
122
application/akszadmin/view/cash/index.html
Executable file
@ -0,0 +1,122 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="button"}
|
||||
{if auth("remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/cash/remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除记录</button>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='cash/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
|
||||
{notempty name='list'}
|
||||
<style>
|
||||
.text-center{
|
||||
padding: 0 !important;
|
||||
}
|
||||
.nowrap{
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th class='text-center nowrap'>编号</th>
|
||||
<th class='text-center nowrap'>账户</th>
|
||||
<th class="text-center nowrap">姓名</th>
|
||||
<th class="text-center nowrap">提现金额(元)</th>
|
||||
<th class="text-center nowrap">手续费</th>
|
||||
<th class="text-center nowrap">实际到账(元)</th>
|
||||
<th class=" nowrap">开户银行</th>
|
||||
<th class=" nowrap">拒绝原因</th>
|
||||
<th class="text-center nowrap">提交时间</th>
|
||||
<th class="text-center nowrap">处理进度</th>
|
||||
|
||||
<th class="text-center nowrap">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.id|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.phone|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.name|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.money|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.sxfbfb|default='--'}%
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.dzje|default='--'}
|
||||
</td>
|
||||
<td class=' nowrap'>
|
||||
账户名称:{$vo.name|default='--'}
|
||||
{if $vo.bid == 0}
|
||||
<br>{$vo.bank|default='--'}
|
||||
<br>支付宝账号:{$vo.account|default='--'}
|
||||
{else/}
|
||||
<br>开户银行:{$vo.bank|default='--'}
|
||||
<br>支行名称:{$vo.area|default='--'}
|
||||
<br>银行账号:{$vo.account|default='--'}
|
||||
{/if}
|
||||
</td>
|
||||
<td class=' nowrap'>
|
||||
|
||||
{$vo.reaolae|default='审核通过'}
|
||||
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.time|default='--'}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{if $vo.status == 0}
|
||||
<span class="color-red">待审核</span>
|
||||
{/if}
|
||||
{if $vo.status == 1}
|
||||
<span class="color-green">已完成</span>
|
||||
{/if}
|
||||
{if $vo.status == 2}
|
||||
<span class="color-desc" title="{$vo.reaolae|default='--'}">已拒绝</span>
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
|
||||
<td class='text-center nowrap'>
|
||||
{if auth("akszadmin/invest_list/detail")}
|
||||
<a data-title="查看详情" class="layui-btn layui-btn-xs" data-open='{:url(ADMIN_MODULE."/order/index")}?u_phone={$vo.phone}'>查看详情</a>
|
||||
{/if}
|
||||
{if $vo.status eq 0}
|
||||
{if auth("agree")}
|
||||
<a class="layui-btn layui-btn layui-btn-xs" data-confirm="确定要同意提现吗?" data-action="{:url(ADMIN_MODULE.'/cash/agree')}" data-value="id#{$vo.id}" data-csrf="{:systoken('agree')}">同 意</a>
|
||||
{/if}
|
||||
{if auth("refuse")}
|
||||
<a data-dbclick class="layui-btn layui-btn-danger layui-btn-xs" data-modal='{:url(ADMIN_MODULE."/cash/edit")}?id={$vo.id}'>拒 绝</a>
|
||||
|
||||
{/if}
|
||||
{else}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="确定要删除吗?" data-action="{:url(ADMIN_MODULE.'/cash/remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
|
||||
{/if}
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
41
application/akszadmin/view/cash/index_search.html
Executable file
41
application/akszadmin/view/cash/index_search.html
Executable file
@ -0,0 +1,41 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">操作账户</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_phone" value="{$Think.get.u_phone|default=''}" placeholder="请输入操作账户" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">真实姓名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_name" value="{$Think.get.u_name|default=''}" placeholder="请输入真实姓名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">提交日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="i_time" value="{$Think.get.i_time|default=''}" placeholder="请选择提交时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">处理进度</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="i_status">
|
||||
{foreach [''=>'- 全部进度 -','0'=>'待审核','1'=>'已完成','2'=>'已拒绝'] as $k=>$v}
|
||||
<!--{eq name='Think.get.i_status' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
88
application/akszadmin/view/config/info.html
Executable file
88
application/akszadmin/view/config/info.html
Executable file
@ -0,0 +1,88 @@
|
||||
{extend name="main"}
|
||||
|
||||
{block name="button"}
|
||||
|
||||
{if auth('config')}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url(ADMIN_MODULE.'/config/config')}">修改系统配置</a>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<div class="think-box-shadow margin-bottom-15">
|
||||
<span class="color-green font-w7 text-middle">文件存储引擎:</span>
|
||||
{foreach ['local'=>'本地服务器存储','qiniu'=>'七牛云对象存储','oss'=>'阿里云OSS存储'] as $k=>$v}
|
||||
{if sysconf('storage_type') eq $k}
|
||||
{if auth('file')}<a data-modal="{:url(ADMIN_MODULE.'/config/file')}?type={$k}" class="layui-btn layui-btn-sm">{$v}</a>{else}<a class="layui-btn layui-btn-sm">{$v}</a>{/if}
|
||||
{elseif auth('file')}<a data-modal="{:url(ADMIN_MODULE.'/config/file')}?type={$k}" class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<div class="think-box-shadow padding-40">
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">平台邀请码</span>
|
||||
<label class="relative block">
|
||||
<input readonly value="{:sysconf('inviter_code')}" class="layui-input layui-bg-gray">
|
||||
<a data-copy="{:sysconf('inviter_code')}" class="fa fa-copy right-btn"></a>
|
||||
</label>
|
||||
<p class="help-block">平台邀请码(可修改)</p>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">网站名称 Website</span>
|
||||
<label class="relative block">
|
||||
<input readonly value="{:sysconf('site_name')}" class="layui-input layui-bg-gray">
|
||||
<a data-copy="{:sysconf('site_name')}" class="fa fa-copy right-btn"></a>
|
||||
</label>
|
||||
<p class="help-block">网站名称及网站图标,将显示在浏览器的标签上</p>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">管理程序名称 Name</span>
|
||||
<label class="relative block">
|
||||
<input readonly placeholder="请输入程序名称" value="{:sysconf('app_name')}" class="layui-input layui-bg-gray">
|
||||
<a data-copy="{:sysconf('app_name')}" class="fa fa-copy right-btn"></a>
|
||||
</label>
|
||||
<p class="help-block">管理程序名称,将显示在后台左上角标题</p>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">管理程序版本 Version</span>
|
||||
<label class="relative block">
|
||||
<input readonly value="{:sysconf('app_version')}" class="layui-input layui-bg-gray">
|
||||
<a data-copy="{:sysconf('app_version')}" class="fa fa-copy right-btn"></a>
|
||||
</label>
|
||||
<p class="help-block">管理程序版本,将显示在后台左上角标题</p>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">网站备案号 Miitbeian</span>
|
||||
<label class="relative block">
|
||||
<input readonly value="{:sysconf('miitbeian')}" class="layui-input layui-bg-gray">
|
||||
<a data-copy="{:sysconf('miitbeian')}" class="fa fa-copy right-btn"></a>
|
||||
</label>
|
||||
<p class="help-block">网站备案号,可以在<a target="_blank" href="http://beian.miit.gov.cn">备案管理中心</a>查询获取,将显示在登录页面下面</p>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green font-w7">网站版权信息 Copyright</span>
|
||||
<label class="relative block">
|
||||
<input readonly value="{:sysconf('site_copy')}" class="layui-input layui-bg-gray">
|
||||
<a data-copy="{:sysconf('site_copy')}" class="fa fa-copy right-btn"></a>
|
||||
</label>
|
||||
<p class="help-block">网站版权信息,在后台登录页面显示版本信息并链接到备案到信息备案管理系统</p>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='style'}
|
||||
<style>
|
||||
.right-btn {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 38px;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
20
application/akszadmin/view/config/storage-local.html
Executable file
20
application/akszadmin/view/config/storage-local.html
Executable file
@ -0,0 +1,20 @@
|
||||
<form onsubmit="return false;" data-auto="true" action="{:url()}" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-card-body">
|
||||
<div class="color-text margin-left-40 margin-bottom-20 layui-code" style="border-left-width:1px;background:none">
|
||||
<p>文件将存储在本地服务器,需确保服务器的 public/upload 目录有写入权限,有足够的存储空间!</p>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">AllowExts<br><span class="nowrap color-desc">允许类型</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_local_exts" required value="{:sysconf('storage_local_exts')}" placeholder="请输入系统文件上传后缀" class="layui-input">
|
||||
<p class="help-block">设置系统允许上传文件的后缀,多个以英文逗号隔开。如:png,jpg,rar,doc</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed margin-left-40"></div>
|
||||
<div class="layui-form-item text-center padding-left-40">
|
||||
<input type="hidden" name="storage_type" value="local">
|
||||
<button class="layui-btn" type="submit">保存配置</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗?" data-close>取消修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
80
application/akszadmin/view/config/storage-oss.html
Executable file
80
application/akszadmin/view/config/storage-oss.html
Executable file
@ -0,0 +1,80 @@
|
||||
<form onsubmit="return false;" data-auto="true" action="{:url()}" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-card-body">
|
||||
<div class="color-text margin-left-40 margin-bottom-20 layui-code" style="border-left-width:1px;background:none">
|
||||
<p class="margin-bottom-5 font-w7">文件将上传到阿里云OSS空间,需要配置OSS公开访问及跨域策略!</p>
|
||||
目前已实现自动创建空间及配置访问策略!<a target="_blank" href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=08p1pddw">我要免费申请</a>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">AllowExts<br><span class="nowrap color-desc">允许类型</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_local_exts" required value="{:sysconf('storage_local_exts')}" placeholder="请输入系统文件上传后缀" class="layui-input">
|
||||
<p class="help-block">设置系统允许上传文件的后缀,多个以英文逗号隔开。如:png,jpg,rar,doc</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label>
|
||||
<div class="layui-input-block">
|
||||
{foreach ['http','https','auto'] as $pro}
|
||||
<label class="think-radio">
|
||||
{if sysconf('storage_oss_is_https') eq $pro}
|
||||
<input checked type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro}
|
||||
{else}
|
||||
<input type="radio" name="storage_oss_is_https" value="{$pro}" lay-ignore> {$pro}
|
||||
{/if}
|
||||
</label>
|
||||
{/foreach}
|
||||
<p class="help-block">阿里云对象存储访问协议(http、https、auto),其中 https 需要配置证书才能使用,auto 为相对协议自动根据域名切换http与https。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Bucket<br><span class="nowrap color-desc">空间名称</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_oss_bucket" required value="{:sysconf('storage_oss_bucket')}" placeholder="请输入OSS Bucket (空间名称)" class="layui-input">
|
||||
<p class="help-block">填写OSS存储空间名称,如:think-admin-oss(需要是全区唯一的值,不存在时会自动创建)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">EndPoint<br><span class="nowrap color-desc">数据中心</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select required name="storage_oss_endpoint" class="layui-select" lay-search>
|
||||
{foreach $ossPoints as $k=>$p}
|
||||
{if sysconf('storage_oss_endpoint') eq $k}
|
||||
<option selected value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option>
|
||||
{else}
|
||||
<option value="{$k}">{$p} <span class="font-s10 color-desc">({$k})</span></option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
<p class="help-block">请选择OSS数据中心访问节点,有效值如:oss-cn-shenzhen.aliyuncs.com</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">AccessKey<br><span class="nowrap color-desc">访问密钥</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_oss_keyid" required value="{:sysconf('storage_oss_keyid')}" maxlength="16" placeholder="请输入OSS AccessKey (访问密钥)" class="layui-input">
|
||||
<p class="help-block">可以在 [ 阿里云 > 个人中心 ] 设置并获取到访问密钥。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">SecretKey<br><span class="nowrap color-desc">安全密钥</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_oss_secret" required value="{:sysconf('storage_oss_secret')}" maxlength="30" placeholder="请输入OSS SecretKey (安全密钥)" class="layui-input">
|
||||
<p class="help-block">可以在 [ 阿里云 > 个人中心 ] 设置并获取到安全密钥。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Domain<br><span class="nowrap color-desc">访问域名</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_oss_domain" value="{:sysconf('storage_oss_domain')}" placeholder="请输入OSS存储 Domain (访问域名)" class="layui-input">
|
||||
<p class="help-block">填写OSS存储外部访问域名,如:think-admin-oss.oss-cn-shenzhen.aliyuncs.com(正常情况下是自动获取的)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed margin-left-40"></div>
|
||||
<div class="layui-form-item text-center padding-left-40">
|
||||
<input type="hidden" name="storage_type" value="oss">
|
||||
<button class="layui-btn" type="submit">保存配置</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗?" data-close>取消修改</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>form.render()</script>
|
||||
</form>
|
||||
80
application/akszadmin/view/config/storage-qiniu.html
Executable file
80
application/akszadmin/view/config/storage-qiniu.html
Executable file
@ -0,0 +1,80 @@
|
||||
<form onsubmit="return false" data-auto="true" action="{:url()}" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-card-body">
|
||||
<div class="color-text margin-left-40 margin-bottom-20 layui-code" style="border-left-width:1px;background:none">
|
||||
<p class="margin-bottom-5 font-w7">文件将上传到七牛云存储,对象存储需要配置为公开访问的Bucket空间!</p>
|
||||
完成实名认证后可获得10G免费存储空间哦!<a target="_blank" href="https://portal.qiniu.com/signup?code=3lhz6nmnwbple">我要免费申请</a>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">AllowExts<br><span class="nowrap color-desc">允许类型</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_local_exts" required value="{:sysconf('storage_local_exts')}" placeholder="请输入系统文件上传后缀" class="layui-input">
|
||||
<p class="help-block">设置系统允许上传文件的后缀,多个以英文逗号隔开。如:png,jpg,rar,doc</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" data-storage-type="qiniu">
|
||||
<label class="layui-form-label label-required">Protocol<br><span class="nowrap color-desc">访问协议</span></label>
|
||||
<div class="layui-input-block">
|
||||
{foreach ['http','https','auto'] as $pro}
|
||||
<label class="think-radio">
|
||||
{if sysconf('storage_qiniu_is_https') eq $pro}
|
||||
<input checked type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro}
|
||||
{else}
|
||||
<input type="radio" name="storage_qiniu_is_https" value="{$pro}" lay-ignore> {$pro}
|
||||
{/if}
|
||||
</label>
|
||||
{/foreach}
|
||||
<p class="help-block">七牛云存储访问协议,其中 https 需要配置证书才能使用,auto 为相对协议。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" data-storage-type="qiniu">
|
||||
<label class="layui-form-label">Region<br><span class="nowrap color-desc label-required">存储区域</span></label>
|
||||
<div class="layui-input-block">
|
||||
{foreach ['华东','华北','华南','北美'] as $area}
|
||||
<label class="think-radio">
|
||||
{if sysconf('storage_qiniu_region') eq $area}
|
||||
<input checked type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore>
|
||||
{else}
|
||||
<input type="radio" name="storage_qiniu_region" value="{$area}" lay-ignore>
|
||||
{/if}
|
||||
{$area}
|
||||
</label>
|
||||
{/foreach}
|
||||
<p class="help-block">七牛云存储空间所在区域,需要严格对应储存所在区域才能上传文件。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" data-storage-type="qiniu">
|
||||
<label class="layui-form-label">Bucket<br><span class="nowrap color-desc">空间名称</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_qiniu_bucket" required value="{:sysconf('storage_qiniu_bucket')}" placeholder="请输入七牛云存储 Bucket (空间名称)" class="layui-input">
|
||||
<p class="help-block">填写七牛云存储空间名称,如:static</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" data-storage-type="qiniu">
|
||||
<label class="layui-form-label">Domain<br><span class="nowrap color-desc">访问域名</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_qiniu_domain" required value="{:sysconf('storage_qiniu_domain')}" placeholder="请输入七牛云存储 Domain (访问域名)" class="layui-input">
|
||||
<p class="help-block">填写七牛云存储访问域名,如:static.ctolog.cc</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" data-storage-type="qiniu">
|
||||
<label class="layui-form-label">AccessKey<br><span class="nowrap color-desc">访问密钥</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_qiniu_access_key" required value="{:sysconf('storage_qiniu_access_key')}" placeholder="请输入七牛云 AccessKey (访问密钥)" class="layui-input">
|
||||
<p class="help-block">可以在 [ 七牛云 > 个人中心 ] 设置并获取到访问密钥。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" data-storage-type="qiniu">
|
||||
<label class="layui-form-label">SecretKey<br><span class="nowrap color-desc">安全密钥</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="storage_qiniu_secret_key" required value="{:sysconf('storage_qiniu_secret_key')}" maxlength="43" placeholder="请输入七牛云 SecretKey (安全密钥)" class="layui-input">
|
||||
<p class="help-block">可以在 [ 七牛云 > 个人中心 ] 设置并获取到安全密钥。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed margin-left-40"></div>
|
||||
<div class="layui-form-item text-center padding-left-40">
|
||||
<input type="hidden" name="storage_type" value="qiniu">
|
||||
<button class="layui-btn" type="submit">保存配置</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗?" data-close>取消修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
28
application/akszadmin/view/config/system-config.html
Executable file
28
application/akszadmin/view/config/system-config.html
Executable file
@ -0,0 +1,28 @@
|
||||
<form onsubmit="return false" data-auto="true" action="{:url(ADMIN_MODULE.'/config/config')}" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-card-body padding-left-40">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">平台邀请码</span>
|
||||
<input name="inviter_code" required placeholder="请输入平台邀请码" value="{:sysconf('inviter_code')}" class="layui-input">
|
||||
</label>
|
||||
<p class="help-block">平台邀请码</p>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="relative block">
|
||||
<span class="color-green font-w7">网站名称 Website</span>
|
||||
<input name="site_name" required placeholder="请输入网站名称" value="{:sysconf('site_name')}" class="layui-input">
|
||||
</label>
|
||||
<p class="help-block">网站名称,将在浏览器的标签上显示名称</p>
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
<button class="layui-btn" type="submit">保存配置</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消修改吗?" data-close>取消修改</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
65
application/akszadmin/view/finance/index.html
Executable file
65
application/akszadmin/view/finance/index.html
Executable file
@ -0,0 +1,65 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="button"}
|
||||
{if auth("remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/finance/remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除记录</button>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='finance/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
|
||||
</th>
|
||||
<th class='text-center nowrap'>流水编号</th>
|
||||
<th class='text-center nowrap'>交易对象</th>
|
||||
<th class='text-center nowrap'>真实姓名</th>
|
||||
<th class='text-center nowrap'>交易金额(元)</th>
|
||||
<th class="text-center nowrap">交易前余额(元)</th>
|
||||
<th class="text-center nowrap">详情</th>
|
||||
<th class="text-center nowrap">流水时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.phone}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.name}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{if $vo.type == 1}
|
||||
<span class="color-green">+{$vo.money}</span>
|
||||
{else}
|
||||
<span class="color-red">-{$vo.money}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.before}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.reason}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.time}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
47
application/akszadmin/view/finance/index_search.html
Executable file
47
application/akszadmin/view/finance/index_search.html
Executable file
@ -0,0 +1,47 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">操作账户</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_phone" value="{$Think.get.u_phone|default=''}" placeholder="请输入操作账户" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">真实姓名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_name" value="{$Think.get.u_name|default=''}" placeholder="请输入真实姓名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">详情</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="i_reason" value="{$Think.get.i_reason|default=''}" placeholder="请输入详情(模糊搜索)" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">流水时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="i_time" value="{$Think.get.i_time|default=''}" placeholder="请选择流水时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">账单类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="i_type">
|
||||
{foreach [''=>'- 全部类型 -','1'=>'收入','2'=>'支出'] as $k=>$v}
|
||||
<!--{eq name='Think.get.i_type' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
218
application/akszadmin/view/goods/form.html
Executable file
218
application/akszadmin/view/goods/form.html
Executable file
@ -0,0 +1,218 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="content"}
|
||||
<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-card-body think-box-shadow padding-left-40">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs9 relative">
|
||||
<span class="color-green">产品名称</span>
|
||||
<input name="title" required class="layui-input" placeholder="请输入产品名称" value="{$vo.title|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">产品代码</span>
|
||||
<input name="code" required class="layui-input" placeholder="请输入产品代码" value="{$vo.code|default=''}" disabled>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">产品门槛</span>
|
||||
<input name="min" required class="layui-input" placeholder="请输入产品门槛" value="{$vo.min|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">产品图标</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="90px" class="text-center"><input name="img" type="hidden" value="{$vo.img|default=''}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>注意: 客户订单在条件范围内时,会根据订单的涨或跌,自动减或加最小值与最大值之间的随机数,留空或者0则为不开启 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">风控波动最小值</span>
|
||||
<input name="point_low" required class="layui-input" placeholder="请输入风控波动最小值" value="{$vo.point_low|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">风控波动最大值</span>
|
||||
<input name="point_top" required class="layui-input" placeholder="请输入风控波动最大值" value="{$vo.point_top|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>注意: 产品获取接口值后,会加上+-此处的值。如5,则在接口获取的数据中加上-5~5之间的随机数。 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">随机波动范围</span>
|
||||
<input name="rands" required class="layui-input" placeholder="请输入随机波动范围" value="{$vo.rands|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>注意: 填0表示不显示 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【一】</span>
|
||||
<input name="protime_1" class="layui-input" placeholder="请输入时间玩法间隔分钟" value="{$vo.protime_1|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【二】</span>
|
||||
<input name="protime_2" class="layui-input" placeholder="请输入时间玩法间隔分钟" value="{$vo.protime_2|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【三】</span>
|
||||
<input name="protime_3" class="layui-input" placeholder="请输入时间玩法间隔分钟" value="{$vo.protime_3|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【四】</span>
|
||||
<input name="protime_4" class="layui-input" placeholder="请输入时间玩法间隔分钟" value="{$vo.protime_4|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>投资金额【以 | 符号隔开】 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【一】投资金额</span>
|
||||
<input name="order_amount_1" class="layui-input" placeholder="请输入投资金额" value="{$vo.order_amount_1|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【二】投资金额</span>
|
||||
<input name="order_amount_2" class="layui-input" placeholder="请输入投资金额" value="{$vo.order_amount_2|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【三】投资金额</span>
|
||||
<input name="order_amount_3" class="layui-input" placeholder="请输入投资金额" value="{$vo.order_amount_3|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">时间玩法间隔【四】投资金额</span>
|
||||
<input name="order_amount_4" class="layui-input" placeholder="请输入投资金额" value="{$vo.order_amount_4|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>注意: 填入比例区间,例如:2或者2.1-2.2 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">盈亏比例【一】</span>
|
||||
<input name="proscale_1" class="layui-input" placeholder="请输入盈亏比例" value="{$vo.proscale_1|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">盈亏比例【二】</span>
|
||||
<input name="proscale_2" class="layui-input" placeholder="请输入盈亏比例" value="{$vo.proscale_2|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">盈亏比例【三】</span>
|
||||
<input name="proscale_3" class="layui-input" placeholder="请输入盈亏比例" value="{$vo.proscale_3|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">盈亏比例【四】</span>
|
||||
<input name="proscale_4" class="layui-input" placeholder="请输入盈亏比例" value="{$vo.proscale_4|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>注意: 填入比例区间,例如:2或者2.1-2.2 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">亏损比例【一】</span>
|
||||
<input name="lossrate_1" class="layui-input" placeholder="请输入亏损比例" value="{$vo.lossrate_1|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">亏损比例【二】</span>
|
||||
<input name="lossrate_2" class="layui-input" placeholder="请输入亏损比例" value="{$vo.lossrate_2|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">亏损比例【三】</span>
|
||||
<input name="lossrate_3" class="layui-input" placeholder="请输入亏损比例" value="{$vo.lossrate_3|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">亏损比例【四】</span>
|
||||
<input name="lossrate_4" class="layui-input" placeholder="请输入亏损比例" value="{$vo.lossrate_4|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>注意: 填入比例区间,例如:0.01-0.10 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-red">盈利上浮动比例区间</span>
|
||||
<input name="upps" class="layui-input" placeholder="不设置,请留空" value="{$vo.upps|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-red">亏损下浮动比例区间</span>
|
||||
<input name="downps" class="layui-input" placeholder="不设置,请留空" value="{$vo.downps|default=''}">
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p style="color:red">注意:开市时间,精准到秒,如:<b style="color:green;">00:00:00~03:00:00|08:00:00~23:59:59 </b>不得出现中文符号,全天不开市请留空</p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开市时间【周一】</span>
|
||||
<input name="opentime_1" class="layui-input" placeholder="如:00:00:00~23:59:59" value="{$vo.opentime_1|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开市时间【周二】</span>
|
||||
<input name="opentime_2" class="layui-input" placeholder="如:00:00:00~23:59:59" value="{$vo.opentime_2|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开市时间【周三】</span>
|
||||
<input name="opentime_3" class="layui-input" placeholder="如:00:00:00~23:59:59" value="{$vo.opentime_3|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开市时间【周四】</span>
|
||||
<input name="opentime_4" class="layui-input" placeholder="如:00:00:00~23:59:59" value="{$vo.opentime_4|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开市时间【周五】</span>
|
||||
<input name="opentime_5" class="layui-input" placeholder="如:00:00:00~23:59:59" value="{$vo.opentime_5|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开市时间【周六】</span>
|
||||
<input name="opentime_6" class="layui-input" placeholder="如:00:00:00~23:59:59" value="{$vo.opentime_6|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开市时间【周日】</span>
|
||||
<input name="opentime_7" class="layui-input" placeholder="如:00:00:00~23:59:59" value="{$vo.opentime_7|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item block">
|
||||
<span class="color-green">产品备注</span>
|
||||
<textarea name="content">{$vo.content|default=''|raw}</textarea>
|
||||
</div>
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn" type="submit">保存产品</button>
|
||||
<button class="layui-btn layui-btn-danger" ng-click="hsitoryBack()" type="button">取消编辑</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
require(['ckeditor', 'angular'], function() {
|
||||
window.createEditor('[name="content"]', { height: 500 });
|
||||
var app = angular.module("GoodsForm", []).run(callback);
|
||||
angular.bootstrap(document.getElementById(app.name), [app.name]);
|
||||
|
||||
function callback($rootScope) {
|
||||
$rootScope.hsitoryBack = function() {
|
||||
$.msg.confirm('确定要取消编辑吗?', function(index) {
|
||||
history.back(), $.msg.close(index);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
97
application/akszadmin/view/goods/index.html
Executable file
97
application/akszadmin/view/goods/index.html
Executable file
@ -0,0 +1,97 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="button"}
|
||||
{if auth("akszadmin/goods/add")}
|
||||
<button data-open='{:url(ADMIN_MODULE."/goods/add")}' data-title="添加产品" class='layui-btn layui-btn-sm layui-btn-primary'>添加产品</button>
|
||||
{/if}
|
||||
{if auth("akszadmin/goods/remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/goods/remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" class='layui-btn layui-btn-sm layui-btn-primary'>删除产品</button>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='goods/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
||||
</th>
|
||||
<th class='list-table-sort-td'>
|
||||
<button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
|
||||
</th>
|
||||
<th class='text-left nowrap' width="20%">产品标题</th>
|
||||
<th class='text-left nowrap' width="15%">门槛</th>
|
||||
<th class='text-left nowrap' width="15%">产品代码</th>
|
||||
<th class='text-left nowrap' width="15%">状态</th>
|
||||
<th class='text-left nowrap' width="15%">随机值</th>
|
||||
<th class='text-left nowrap' width="15%">风控最小值</th>
|
||||
<th class='text-left nowrap' width="15%">风控最大值</th>
|
||||
<th class='text-left nowrap' width="15%">操作</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr data-dbclick>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<input class="list-check-box" value='{$vo.id}' type='checkbox'>
|
||||
</td>
|
||||
<td class='list-table-sort-td'>
|
||||
<input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.title|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.min|default='0'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.code|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{if $vo.isopen == 1} 开市 {else /} 休市 {/if}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.rands|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.point_low|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.point_top|default='--'}
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
<div class="nowrap margin-bottom-5">
|
||||
{if auth("akszadmin/goods/edit")}
|
||||
{if $vo.iskq == 1}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-success" data-confirm="确定要关闭吗?" data-action="{:url(ADMIN_MODULE.'/goods/iskqopen')}" data-value="id#{$vo.id};iskq#0" data-csrf="{:systoken('iskqopen')}">开启</a>
|
||||
{else /}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要开启吗?" data-action="{:url(ADMIN_MODULE.'/goods/iskqopen')}" data-value="id#{$vo.id};iskq#1" data-csrf="{:systoken('iskqopen')}">关闭</a>
|
||||
{/if}
|
||||
|
||||
{if $vo.isopen == 1}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要休市吗?" data-action="{:url(ADMIN_MODULE.'/goods/proisopen')}" data-value="id#{$vo.id};isopen#0" data-csrf="{:systoken('proisopen')}">点击休市</a>
|
||||
{else /}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-success" data-confirm="确定要开市吗?" data-action="{:url(ADMIN_MODULE.'/goods/proisopen')}" data-value="id#{$vo.id};isopen#1" data-csrf="{:systoken('proisopen')}">点击开市</a>
|
||||
{/if}
|
||||
<a data-dbclick class="layui-btn layui-btn-sm" data-open='{:url(ADMIN_MODULE."/goods/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{/if}
|
||||
{if auth("akszadmin/goods/remove")}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/goods/remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
|
||||
{/if}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-{$vo.showps==1?'warm':'black'}" data-confirm="确定要显示吗?" data-action="{:url(ADMIN_MODULE.'/goods/showps')}" data-value="id#{$vo.id};do#{$vo.showps==1?0:1}" data-csrf="{:systoken('showps')}">{$vo.showps==1?"隐盈":"显盈"}</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-{$vo.showps2==1?'warm':'black'}" data-confirm="确定要显示吗?" data-action="{:url(ADMIN_MODULE.'/goods/showps2')}" data-value="id#{$vo.id};do#{$vo.showps2==1?0:1}" data-csrf="{:systoken('showps2')}">{$vo.showps2==1?"隐亏":"显亏"}</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
15
application/akszadmin/view/goods/index_search.html
Executable file
15
application/akszadmin/view/goods/index_search.html
Executable file
@ -0,0 +1,15 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">产品名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="title" value="{$Think.get.title|default=''}" placeholder="请输入产品名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
86
application/akszadmin/view/goods/risk.html
Executable file
86
application/akszadmin/view/goods/risk.html
Executable file
@ -0,0 +1,86 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="content"}
|
||||
<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="think-box-shadow padding-40">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>说明:比如设置几点到几点稳赢,如:14:20-15:30 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">稳赢时间段</span>
|
||||
<input name="wenyin" class="layui-input" placeholder="请填写稳赢时间段" value="{$vo.wenyin|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>说明:比如设置几点到几点稳输,如:18:10-18:30 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">稳输时间段</span>
|
||||
<input name="wenshu" class="layui-input" placeholder="请填写稳输时间段" value="{$vo.wenshu|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">全赢比例</span>
|
||||
<input name="qybl" class="layui-input" placeholder="请填写全赢比例" value="{$vo.qybl|default=''}">%
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">全亏比例</span>
|
||||
<input name="qkbl" class="layui-input" placeholder="请填写全亏比例" value="{$vo.qkbl|default=''}">%
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>说明: 此处设置会员ID(如:8888),多个用户用|符号分开(如:8888|9999)设置之后该会员所有订单都会亏损,请谨慎操作。如停止该功能请在上面留空或者填0,并提交。 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">指定客户亏损</span>
|
||||
<input name="to_loss" class="layui-input" placeholder="请填写客户ID" value="{$vo.to_loss|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>说明: 此处设置会员ID(如:8888),多个用户用|符号分开(如:8888|9999)设置之后该会员所有订单都会赢利,请谨慎操作。如停止该功能请在上面留空或者填0,并提交。 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">指定客户赢利</span>
|
||||
<input name="to_win" class="layui-input" placeholder="请填写客户ID" value="{$vo.to_win|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>说明: 下单达到此金额,则会受到下面风控影响。 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">最小风控值</span>
|
||||
<input name="min_price" class="layui-input" placeholder="请输入最小风控值" value="{$vo.min_price|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<blockquote class="layui-elem-quote">
|
||||
<p>说明: 输入金额区间,在金额区间之内会根据此概率盈亏。不在此区间则不受风控影响</p>
|
||||
<p>格式: 区间开始-区间结束:客户赢利概率| 符号必须为英文符号,如0-100:50|100-200:30 </p>
|
||||
</blockquote>
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">风控概率</span>
|
||||
<input name="chance" class="layui-input" placeholder="请输入风控概率" value="{$vo.chance|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-left">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn" type="submit">保存设置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
242
application/akszadmin/view/index/index.html
Executable file
242
application/akszadmin/view/index/index.html
Executable file
@ -0,0 +1,242 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<title>{block name="title"}{$title|default=''}{if !empty($title)} · {/if}{:sysconf('site_name')}{/block}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=0.4">
|
||||
<link rel="shortcut icon" href="{:sysconf('site_icon')}">
|
||||
<link rel="stylesheet" href="__ROOT__/static/plugs/awesome/fonts.css?at={:date('md')}">
|
||||
<link rel="stylesheet" href="__ROOT__/static/plugs/layui/css/layui.css?at={:date('md')}">
|
||||
<link rel="stylesheet" href="__ROOT__/static/theme/css/console.css?at={:date('md')}">
|
||||
{block name="style"}{/block}
|
||||
<script>window.ROOT_URL = '__ROOT__';window.ADMIN_MODULE = '{:ADMIN_MODULE}';</script>
|
||||
<script src="__ROOT__/static/plugs/jquery/pace.min.js"></script>
|
||||
<style>
|
||||
.layui-nav .layui-badge, .layui-nav .layui-badge-dot {
|
||||
position: static;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
setInterval(function() {
|
||||
$.ajax({
|
||||
url: '/{:ADMIN_MODULE}/index/online_user',
|
||||
type: 'get',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
$('.online_user').html(res.data);
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="layui-layout-body">
|
||||
{block name='body'}
|
||||
<div class="ignore" style="display:block">
|
||||
<img id='noticeimg' src="/static/theme/img/notice.png" width="32">
|
||||
</div>
|
||||
<div class="layui-layout layui-layout-admin layui-layout-left-hide">
|
||||
|
||||
<!-- 顶部菜单 开始 -->
|
||||
<div class="layui-header notselect">
|
||||
<a href="javascript:void(0);" class="layui-logo layui-elip" style="pointer-events: none;">
|
||||
{:sysconf('app_name')} {if sysconf('app_version')}<sup class="padding-left-5">{:sysconf('app_version')}</sup>{/if}
|
||||
</a>
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item" lay-unselect>
|
||||
<a class="text-center" data-target-menu-type>
|
||||
<i class="layui-icon layui-icon-spread-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
{foreach $menus as $oneMenu}
|
||||
<li class="layui-nav-item">
|
||||
<a data-menu-node="m-{$oneMenu.id}" data-open="{$oneMenu.url}">
|
||||
{notempty name='oneMenu.icon'}<span class='{$oneMenu.icon} padding-right-5'></span>{/notempty}
|
||||
<span>{$oneMenu.title|default=''}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li lay-unselect class="layui-nav-item"><a href="/{:ADMIN_MODULE}.html#/{:ADMIN_MODULE}/users/index.html?online_user=1">
|
||||
在线人数
|
||||
<span class="layui-badge online_user">0</span>
|
||||
</a></li>
|
||||
<li lay-unselect class="layui-nav-item"><a href="/{:ADMIN_MODULE}.html#/{:ADMIN_MODULE}/recharge/index.html?spm=m-69-105-107" data-reload>
|
||||
充值
|
||||
<span class="layui-badge recharge_count">0</span>
|
||||
</a></li>
|
||||
<li lay-unselect class="layui-nav-item"><a href="/{:ADMIN_MODULE}.html#/{:ADMIN_MODULE}/cash/index.html?spm=m-69-105-108" data-reload>
|
||||
提现
|
||||
<span class="layui-badge cash_count">0</span>
|
||||
</a></li>
|
||||
<li lay-unselect class="layui-nav-item"><a href="/{:ADMIN_MODULE}.html#/{:ADMIN_MODULE}/order/index.html?spm=m-109-111-116" data-reload>
|
||||
订单
|
||||
<span class="layui-badge Order_count">0</span>
|
||||
</a></li>
|
||||
<li lay-unselect class="layui-nav-item"><a data-reload><i class="layui-icon layui-icon-refresh-3"></i></a></li>
|
||||
{notempty name='Think.session.user.username'}
|
||||
<li class="layui-nav-item">
|
||||
<dl class="layui-nav-child">
|
||||
<dd lay-unselect><a data-modal="{:url(ADMIN_MODULE.'/index/info',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-set-fill margin-right-5"></i>基本资料</a></dd>
|
||||
<dd lay-unselect><a data-modal="{:url(ADMIN_MODULE.'/user/pass',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component margin-right-5"></i>安全设置</a></dd>
|
||||
<dd lay-unselect><a data-modal="{:url(ADMIN_MODULE.'/user/suffix',['id'=>session('user.id')])}"><i class="layui-icon layui-icon-component margin-right-5"></i>后台加密</a></dd>
|
||||
{if auth('akszadmin/index/buildoptimize')}
|
||||
<dd lay-unselect><a data-modal="{:url(ADMIN_MODULE.'/index/buildOptimize')}"><i class="layui-icon layui-icon-template-1 margin-right-5"></i>压缩发布</a></dd>
|
||||
{/if}
|
||||
{if auth('akszadmin/index/clearruntime')}
|
||||
<dd lay-unselect><a data-modal="{:url(ADMIN_MODULE.'/index/clearRuntime')}"><i class="layui-icon layui-icon-fonts-clear margin-right-5"></i>清理缓存</a></dd>
|
||||
{/if}
|
||||
{notempty name='GLOBALS.AdminUserRightOption'}{foreach $GLOBALS.AdminUserRightOption as $option}{if auth($option.node)}
|
||||
<dd lay-unselect><a data-{$option.type}="{$option.action}"><i class="{$option.icon} margin-right-5"></i>{$option.title}</a></dd>
|
||||
{/if}{/foreach}{/notempty}
|
||||
<dd lay-unselect><a data-confirm="确定要退出登录吗?" data-load="{:url(ADMIN_MODULE.'/login/out')}"><i class="layui-icon layui-icon-release margin-right-5"></i>退出登录</a></dd>
|
||||
</dl>
|
||||
<a><span><i class="layui-icon layui-icon-username margin-right-5"></i> {:session('user.username')}</span></a>
|
||||
</li>
|
||||
{else}
|
||||
<li class="layui-nav-item">
|
||||
<a data-href="{:url('@'.ADMIN_MODULE.'/login')}"><i class="layui-icon layui-icon-username"></i> 立即登录</a>
|
||||
</li>
|
||||
{/notempty}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 顶部菜单 结束 -->
|
||||
|
||||
<!-- 左则菜单 开始 -->
|
||||
<div class="layui-side layui-bg-black notselect">
|
||||
<div class="layui-side-scroll">
|
||||
|
||||
{foreach $menus as $oneMenu}
|
||||
{notempty name='oneMenu.sub'}
|
||||
<ul class="layui-nav layui-nav-tree layui-hide" data-menu-layout="m-{$oneMenu.id}">
|
||||
{foreach $oneMenu.sub as $twoMenu}
|
||||
{empty name='twoMenu.sub'}
|
||||
<li class="layui-nav-item">
|
||||
<a data-target-tips="{$twoMenu.title}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}" data-open="{$twoMenu.url}">
|
||||
<span class='{$twoMenu.icon|default="layui-icon layui-icon-link"}'></span>
|
||||
<span class="nav-text padding-left-5">{$twoMenu.title}</span>
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li class="layui-nav-item" data-submenu-layout='m-{$oneMenu.id}-{$twoMenu.id}'>
|
||||
<a data-target-tips="{$twoMenu.title}" style="background:#393D49">
|
||||
<span class='nav-icon layui-hide {$twoMenu.icon|default="layui-icon layui-icon-triangle-d"}'></span>
|
||||
<span class="nav-text padding-left-5">{$twoMenu.title}</span>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
{foreach $twoMenu.sub as $thrMenu}
|
||||
<dd>
|
||||
<a data-target-tips="{$thrMenu.title}" data-open="{$thrMenu.url}" data-menu-node="m-{$oneMenu.id}-{$twoMenu.id}-{$thrMenu.id}">
|
||||
<span class='nav-icon padding-left-5 {$thrMenu.icon|default="layui-icon layui-icon-link"}'></span>
|
||||
<span class="nav-text padding-left-5">{$thrMenu.title}</span>
|
||||
</a>
|
||||
</dd>
|
||||
{/foreach}
|
||||
</dl>
|
||||
</li>
|
||||
{/empty}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/notempty}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 左则菜单 结束 -->
|
||||
|
||||
<!-- 主体内容 开始 -->
|
||||
<div class="layui-body layui-bg-gray">{block name='content'}{/block}</div>
|
||||
<!-- 主体内容 结束 -->
|
||||
|
||||
</div>
|
||||
<iframe style="top:100px;right:50px" src="" height="0" width="0" frameborder="0" id="ifr"></iframe>
|
||||
{/block}
|
||||
<script src="__ROOT__/static/plugs/layui/layui.all.js"></script>
|
||||
<script src="__ROOT__/static/plugs/require/require.js"></script>
|
||||
<script src="__ROOT__/static/admin.js"></script>
|
||||
<script>
|
||||
var noticeoff=0;
|
||||
var int;
|
||||
if(noticeoff==0){
|
||||
seeNum();
|
||||
int=setInterval(seeNum,15000);
|
||||
}
|
||||
|
||||
$('.ignore').click(function(){
|
||||
$.get("/{:ADMIN_MODULE}/index/system_ignore",function(data,status){
|
||||
layer.msg("所有提醒已忽略~");
|
||||
$('#noticeimg').attr('src','/static/theme/img/ignore.png');
|
||||
});
|
||||
// if(noticeoff==0){
|
||||
// $.get("/{:ADMIN_MODULE}/index/system_ignore",function(data,status){
|
||||
// layer.msg("所有提醒已忽略~");
|
||||
// // $('.ignore').hide();
|
||||
// });
|
||||
// $('#noticeimg').attr('src','/static/theme/img/ignore.png');
|
||||
// noticeoff=1;
|
||||
// window.clearInterval(int);
|
||||
// }else{
|
||||
// noticeoff=0;
|
||||
// int=setInterval(seeNum,15000);
|
||||
// $('#noticeimg').attr('src','/static/theme/img/notice.png');
|
||||
// }
|
||||
|
||||
});
|
||||
function seeNum(){
|
||||
var seeNumUrl = "/{:ADMIN_MODULE}/index/check";
|
||||
var rechargeState = 1;//充值声音开关,1开/0关
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : seeNumUrl,
|
||||
data: {rechargeState:rechargeState},
|
||||
dataType : "json",
|
||||
success : function(result){
|
||||
if(result['code']==1){
|
||||
var url = result['data']['url'].split('_')[0];
|
||||
var recharge_count = result['data']['url'].split('_')[1].split('@')[0];
|
||||
var cash_count = result['data']['url'].split('@')[1].split('&')[0];
|
||||
var Order_count = result['data']['url'].split('&')[1];
|
||||
$(".recharge_count").text(recharge_count);
|
||||
$(".cash_count").text(cash_count);
|
||||
$(".Order_count").text(Order_count);
|
||||
$("#ifr").attr("src",url);
|
||||
layer.msg(result['info'],{offset:'rb'});
|
||||
$('#noticeimg').attr('src','/static/theme/img/notice.png');
|
||||
|
||||
//$('.ignore').show();
|
||||
}else{
|
||||
$("#ifr").attr("src","");
|
||||
//$('.ignore').hide();
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.ignore{
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 15px;
|
||||
right: 25px;
|
||||
transition: all .3s ease-in-out;
|
||||
z-index: 99999;
|
||||
}
|
||||
.ignore img{
|
||||
background: #189f92;
|
||||
padding: 10px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
</style>
|
||||
{block name='script'}{/block}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
200
application/akszadmin/view/index/main.html
Executable file
200
application/akszadmin/view/index/main.html
Executable file
@ -0,0 +1,200 @@
|
||||
{extend name='main'}
|
||||
|
||||
{block name='content'}
|
||||
|
||||
<style>
|
||||
|
||||
.store-total-container {
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.store-total-container .store-total-icon {
|
||||
top: 45%;
|
||||
right: 8%;
|
||||
font-size: 65px;
|
||||
position: absolute;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.store-total-container .store-total-item {
|
||||
color: #fff;
|
||||
line-height: 4em;
|
||||
padding: 15px 25px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.store-total-container .store-total-item > div:nth-child(2) {
|
||||
font-size: 46px;
|
||||
line-height: 46px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="think-box-shadow store-total-container notselect">
|
||||
<div class="margin-bottom-15">数据统计</div>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="store-total-item nowrap" style="background:linear-gradient(-125deg,#57bdbf,#2f9de2)">
|
||||
<div>总盈亏</div>
|
||||
<div>{:number_format($invest_count)}</div>
|
||||
<div>当前盈亏总数</div>
|
||||
</div>
|
||||
<i class="store-total-icon layui-icon layui-icon-template-1"></i>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="store-total-item nowrap" style="background:linear-gradient(-125deg,#ff7d7d,#fb2c95)">
|
||||
<div>用户总量</div>
|
||||
<div>{:number_format($user_count)}</div>
|
||||
<div>当前用户总数量(人)</div>
|
||||
</div>
|
||||
<i class="store-total-icon layui-icon layui-icon-user"></i>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="store-total-item nowrap" style="background:linear-gradient(-113deg,#c543d8,#925cc3)">
|
||||
<div>充值总额</div>
|
||||
<div>{:number_format($recharge_sum)}</div>
|
||||
<div>已支付充值订单总金额(元)</div>
|
||||
</div>
|
||||
<i class="store-total-icon layui-icon layui-icon-read"></i>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="store-total-item nowrap" style="background:linear-gradient(-141deg,#ecca1b,#f39526)">
|
||||
<div>提现总额</div>
|
||||
<div>{:number_format($cash_sum)}</div>
|
||||
<div>已完成提现订单总金额(元)</div>
|
||||
</div>
|
||||
<i class="store-total-icon layui-icon layui-icon-survey"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="think-box-shadow store-total-container">
|
||||
<div class="margin-bottom-15">实时概况</div>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md6 margin-bottom-15">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3 text-center">
|
||||
<i class="layui-icon color-blue" style="font-size:60px;line-height:72px"></i>
|
||||
</div>
|
||||
<div class="layui-col-xs4">
|
||||
<div class="font-s14">今日充值</div>
|
||||
<div class="font-s16">{:number_format($day[$today_key]['recharge'],2)}</div>
|
||||
<div class="font-s12 color-desc">今日充值成功金额(元)</div>
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<div class="font-s14">今日提现</div>
|
||||
<div class="font-s16">{:number_format($day[$today_key]['cash'],2)}</div>
|
||||
<div class="font-s12 color-desc">今日提现成功金额(元)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 margin-bottom-15">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs3 text-center">
|
||||
<i class="layui-icon color-blue" style="font-size:60px;line-height:72px"></i>
|
||||
</div>
|
||||
<div class="layui-col-xs4">
|
||||
<div class="font-s14">今日新增</div>
|
||||
<div class="font-s16">{$day[$today_key]['new_user']}</div>
|
||||
<div class="font-s12 color-desc">今日新增会员数(人)</div>
|
||||
</div>
|
||||
<div class="layui-col-xs5">
|
||||
<div class="font-s14">在线人数</div>
|
||||
<div class="font-s16">{$online_user}</div>
|
||||
<div class="font-s12 color-desc">当前在线会员数(人)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md12">
|
||||
<div class="think-box-shadow">
|
||||
<table class="layui-table" lay-even>
|
||||
<caption class="text-left margin-bottom-15 font-s14">综合报表</caption>
|
||||
<colgroup>
|
||||
<col width="30%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>入款</td>
|
||||
<td>出款</td>
|
||||
<td>首冲人数</td>
|
||||
<td>活跃人数</td>
|
||||
<td>客户盈亏</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>上月</td>
|
||||
<td>¥{:number_format($last_month['recharge'],2)}元</td>
|
||||
<td>¥{:number_format($last_month['cash'],2)}元</td>
|
||||
<td>{:$last_month['invest_list']}人</td>
|
||||
<td>0人</td>
|
||||
<td>¥{:number_format($last_month['invest_sum'],2)}元</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>本月</td>
|
||||
<td>{:number_format($month['recharge'],2)}元</td>
|
||||
<td>{:number_format($month['cash'],2)}元</td>
|
||||
<td>{:$month['invest_list']}人</td>
|
||||
<td>0人</td>
|
||||
<td>{:number_format($month['invest_sum'],2)}元</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>总计</td>
|
||||
<td><?php echo number_format(Db::name('LcRecharge')->where('status = 1')->sum('money'),2);?>元</td>
|
||||
<td><?php echo number_format(Db::name('LcCash')->where('status = 1')->sum('money'),2);?>元</td>
|
||||
<td><?php echo ($last_month['invest_list']+$month['invest_list']);?>人</td>
|
||||
<td>0人</td>
|
||||
<td><?php echo number_format(($last_month['invest_sum']+$month['invest_sum']),2);?>元</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md12">
|
||||
<div class="think-box-shadow">
|
||||
<table class="layui-table" lay-even>
|
||||
<caption class="text-left margin-bottom-15 font-s14">本月明细</caption>
|
||||
<colgroup>
|
||||
<col width="30%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>日期</td>
|
||||
<td>新增用户</td>
|
||||
<td>入款</td>
|
||||
<td>出款</td>
|
||||
<td>首冲人数</td>
|
||||
<td>活跃人数</td>
|
||||
<td>订单数量</td>
|
||||
<td>客户盈亏</td>
|
||||
<td>流水</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="day" id="v"}
|
||||
<tr>
|
||||
<td>{$v['date']}</td>
|
||||
<td>{$v['new_user']}人</td>
|
||||
<td>¥{:number_format($v['recharge'],2)}元</td>
|
||||
<td>{:number_format($v['cash'],2)}元</td>
|
||||
<td>{:$v['invest_list']}人</td>
|
||||
<td>0人</td>
|
||||
<td>{:$v['ordernumer']}条</td>
|
||||
<td>¥{:number_format($v['expire'],2)}元</td>
|
||||
<td>¥{:number_format($v['interest'],2)}元</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
285
application/akszadmin/view/info/form.html
Executable file
285
application/akszadmin/view/info/form.html
Executable file
@ -0,0 +1,285 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="content"}
|
||||
<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="think-box-shadow padding-40">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">网站名称</span>
|
||||
<input name="webname" class="layui-input" placeholder="请输入网站名称" value="{$vo.webname|default=''}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">网站域名</span>
|
||||
<input name="domain" class="layui-input" placeholder="请输入网站域名" value="{$vo.domain|default=''}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">公司名称</span>
|
||||
<input name="company" class="layui-input" placeholder="请输入公司名称" value="{$vo.company|default=''}" required>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">公司电话</span>
|
||||
<input name="tel" class="layui-input" placeholder="请输入公司电话" value="{$vo.tel|default=''}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">公司地址</span>
|
||||
<input name="address" required class="layui-input" placeholder="请输入公司地址" value="{$vo.address|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">网站公告</span>
|
||||
<input name="notice" class="layui-input" placeholder="请输入网站公告" value="{$vo.notice|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<!--<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">登录公告</span>
|
||||
<input name="notice2" class="layui-input" placeholder="请输入登录公告" value="{$vo.notice2|default=''}">
|
||||
</label>
|
||||
</div>-->
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs6 relative">
|
||||
<span class="color-green">客服链接</span>
|
||||
<input name="service" class="layui-input" placeholder="请输入客服链接" value="{$vo.service|default=''}" required>
|
||||
</label>
|
||||
<!--<label class="layui-col-xs6 relative">-->
|
||||
<!-- <span class="color-green">APP下载连接</span>-->
|
||||
<!-- <input name="app" required class="layui-input" placeholder="请输入APP下载连接" value="{$vo.app|default=''}">-->
|
||||
<!--</label>-->
|
||||
<input name="app" type="hidden" required class="layui-input" placeholder="请输入APP下载连接" value="{$vo.app|default=''}">
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<!--<label class="layui-col-xs6 relative">-->
|
||||
<!-- <span class="color-green">APP下载说明</span>-->
|
||||
<!-- <input name="appname" class="layui-input" placeholder="请输入下载说明" value="{$vo.appname|default=''}">-->
|
||||
<!--</label>-->
|
||||
<input name="appname" type="hidden" class="layui-input" placeholder="请输入下载说明" value="{$vo.appname|default=''}">
|
||||
<label class="layui-col-xs6 relative">
|
||||
<span class="color-green">ICP备案号</span>
|
||||
<input name="icp" class="layui-input" placeholder="请输入ICP备案号" value="{$vo.icp|default=''}">
|
||||
</label>
|
||||
<!-- <label class="layui-col-xs6 relative">
|
||||
<span class="color-green">客服微信号</span>
|
||||
<input name="wechat" class="layui-input" placeholder="请输入客服微信号" value="{$vo.wechat|default=''}">
|
||||
</label>-->
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15" style="display: none;">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">实名开关</span>
|
||||
<select class="layui-select" name="cert" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.cert' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">实名认证APPCODE</span>
|
||||
<input name="linetoken" class="layui-input" placeholder="请输入实名认证APPCODE" value="{$vo.linetoken|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15" style="display: none;">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">银行卡认证开关</span>
|
||||
<select class="layui-select" name="bank" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.bank' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">银行卡认证APPCODE</span>
|
||||
<input name="banktoken" class="layui-input" placeholder="请输入银行卡认证APPCODE" value="{$vo.banktoken|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!--<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">签到显示理财</span>
|
||||
<select class="layui-select" name="qdlcopen" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!–{eq name='$vo.qdlcopen' value='$k.""'}–>
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!–{else}–>
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!–{/eq}–>
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">签到天数</span>
|
||||
<input name="qdnum" type="number" class="layui-input" placeholder="请输入签到天数" value="{$vo.qdnum|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">签到理财公告</span>
|
||||
<input name="qdnotice" class="layui-input" placeholder="请输入签到理财公告" value="{$vo.qdnotice|default=''}">
|
||||
</label>
|
||||
</div>-->
|
||||
|
||||
<!--<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs6 relative">
|
||||
<span class="color-green">抽奖开关</span>
|
||||
<select class="layui-select" name="prize" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!–{eq name='$vo.prize' value='$k.""'}–>
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!–{else}–>
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!–{/eq}–>
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs6 relative">
|
||||
<span class="color-green">积分商城开关</span>
|
||||
<select class="layui-select" name="jifendh" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!–{eq name='$vo.jifendh' value='$k.""'}–>
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!–{else}–>
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!–{/eq}–>
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
</div>-->
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<!-- <label class="layui-col-xs3 relative" style="display: none;">
|
||||
<span class="color-green">APP防封连接</span>
|
||||
<input name="appff" class="layui-input" placeholder="请输入APP防封连接" value="{$vo.appff|default=''}">
|
||||
</label> -->
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">是否开启提现</span>
|
||||
<select class="layui-select" name="open_cash">
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!–{eq name='$vo.open_cash' value='$k.""'}–>
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!–{else}–>
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!–{/eq}–>
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开始提现时间(例:8:59)</span>
|
||||
<input name="cash_start" class="layui-input" placeholder="请输入开始提现时间" value="{$vo.cash_start|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">结束提现时间(例:17:59)</span>
|
||||
<input name="cash_end" class="layui-input" placeholder="请输入结束提现时间" value="{$vo.cash_end|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">每笔提现手续费百分比</span>
|
||||
<input name="cash_charge" class="layui-input" placeholder="请输入每笔提现手续费" value="{$vo.cash_charge|default=''}">
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">最低提现金额</span>
|
||||
<input name="cash_min" class="layui-input" placeholder="请输入最低提现金额" value="{$vo.cash_min|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">单笔提现最大金额</span>
|
||||
<input name="cash_max" class="layui-input" placeholder="请输入单笔提现最大金额" value="{$vo.cash_max|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">当日累计最高提现金额</span>
|
||||
<input name="cash_day_max" class="layui-input" placeholder="请输入当日累计最高提现金额" value="{$vo.cash_day_max|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">每日最多提现次数</span>
|
||||
<input name="cash_max_num" class="layui-input" placeholder="请输入每日最多提现次数" value="{$vo.cash_max_num|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs6 relative">
|
||||
<span class="color-green">充值金额【以 | 符号隔开】</span>
|
||||
<input name="recharge_amount" class="layui-input" placeholder="请输入充值金额" value="{$vo.recharge_amount|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">单笔最小入金</span>
|
||||
<input name="recharge_min" class="layui-input" placeholder="请输入单笔最小入金" value="{$vo.recharge_min|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">单笔最大入金</span>
|
||||
<input name="recharge_max" class="layui-input" placeholder="请输入单笔最大入金" value="{$vo.recharge_max|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs6 relative">
|
||||
<span class="color-green">投资金额【以 | 符号隔开】</span>
|
||||
<input name="order_amount" class="layui-input" placeholder="请输入投资金额" value="{$vo.order_amount|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">每笔平台收取手续费百分比</span>
|
||||
<input name="order_charge" class="layui-input" placeholder="请输入每笔平台收取手续费" value="{$vo.order_charge|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">单笔最低下单金额</span>
|
||||
<input name="order_min" class="layui-input" placeholder="请输入单笔最低下单金额" value="{$vo.order_min|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">单笔最高下单金额</span>
|
||||
<input name="order_max" class="layui-input" placeholder="请输入单笔最高下单金额" value="{$vo.order_max|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">最大持仓金额</span>
|
||||
<input name="order_max_amount" class="layui-input" placeholder="请输入最大持仓金额" value="{$vo.order_max_amount|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">最大持仓单数</span>
|
||||
<input name="order_max_count" class="layui-input" placeholder="请输入最大持仓单数" value="{$vo.order_max_count|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">禁止IP<span class="color-red">(多个IP请用半角 , 号隔开)</span></span>
|
||||
<input name="ban_ip" class="layui-input" placeholder="请输入禁止IP(多个IP请用半角 , 号隔开)" value="{$vo.ban_ip|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- <div class="layui-form-item block" style="display: none;">
|
||||
<span class="label-required-prev color-green">合约合同设置</span>
|
||||
<textarea name="contract">{$vo.contract|default=''|raw}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item block" style="display: none;">
|
||||
<span class="label-required-prev color-green">矿机合同设置</span>
|
||||
<textarea name="contract_kj">{$vo.contract_kj|default=''|raw}</textarea>
|
||||
</div> -->
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn" type="submit">保存设置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
require(['ckeditor', 'angular'], function () {
|
||||
window.createEditor('[name="contract"]', {height: 500});
|
||||
window.createEditor('[name="contract_kj"]', {height: 500});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
202
application/akszadmin/view/info/img.html
Executable file
202
application/akszadmin/view/info/img.html
Executable file
@ -0,0 +1,202 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-tab layui-tab-card">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">系统图片</li>
|
||||
|
||||
<!--<li>新闻页弹窗</li>-->
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">网站首页LOGO</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">260x70像素</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center">
|
||||
<input name="logo_img" type="hidden" value="{$vo.logo_img|default=''}">
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="logo_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">APP图标</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">100x100像素</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center">
|
||||
<input name="app_img" type="hidden" value="{$vo.app_img|default=''}">
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="app_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">登录图标</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">100x100像素</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center">
|
||||
<input name="login_img" type="hidden" value="{$vo.login_img|default=''}">
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="login_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">新闻页面底部图标,png格式</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">100x100像素</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center">
|
||||
<input name="news_img" type="hidden" value="{$vo.news_img|default=''}">
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="news_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">公司章</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">500x500像素,png格式</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center">
|
||||
<input name="seal_img" type="hidden" value="{$vo.seal_img|default=''}">
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="seal_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">保险章</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">500x500像素,png格式</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center">
|
||||
<input name="safe_seal_img" type="hidden" value="{$vo.safe_seal_img|default=''}">
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="safe_seal_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">活动图片</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">活动图片地址</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center"><input name="activity_img" type="hidden" value="{$vo.activity_img|default=''}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="activity_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="activity_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.activity_status' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">活动链接</span>
|
||||
<input name="activity_url" class="layui-input" placeholder="请输入活动链接" value="{$vo.activity_url|default='#'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">活动图片</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">活动图片地址</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center"><input name="activity1_img" type="hidden" value="{$vo.activity1_img|default=''}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="activity1_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="activity1_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.activity1_status' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">活动链接</span>
|
||||
<input name="activity1_url" class="layui-input" placeholder="请输入活动链接" value="{$vo.activity1_url|default='#'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-left padding-20">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn" type="submit">保存设置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
329
application/akszadmin/view/info/pay.html
Executable file
329
application/akszadmin/view/info/pay.html
Executable file
@ -0,0 +1,329 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="layui-tab layui-tab-card">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">银行入款</li>
|
||||
<!--<li>支付宝扫码</li>
|
||||
<li>微信扫码</li>
|
||||
<li>公帐入款</li>
|
||||
<li>支付宝转银行卡</li>
|
||||
<li>微信转银行卡</li>-->
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款银行</span>
|
||||
<input name="pay_bank_type" class="layui-input" placeholder="请输入收款银行" value="{$vo.pay_bank_type|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款人</span>
|
||||
<input name="pay_bank_name" class="layui-input" placeholder="请输入收款人" value="{$vo.pay_bank_name|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款账号</span>
|
||||
<input name="pay_bank_account" class="layui-input" placeholder="请输入收款账号" value="{$vo.pay_bank_account|default='无'}" required>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="pay_bank_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.pay_bank_status' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">赠送比例(%)</span>
|
||||
<input name="pay_bank_give" class="layui-input" placeholder="请输入赠送比例(%)" value="{$vo.pay_bank_give|default='0'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">成长值达到标准显示</span>
|
||||
<input name="pay_bankbz" class="layui-input" placeholder="请输入成长值" value="{$vo.pay_bankbz|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">支付描述</span>
|
||||
<input name="pay_bank" class="layui-input" placeholder="请输入支付描述" value="{$vo.pay_bank|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="layui-tab-item">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">二维码</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">收款二维码</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center"><input name="qr_alipay_img" type="hidden" value="{$vo.qr_alipay_img|default=''}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="qr_alipay_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="qr_alipay_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.qr_alipay_status' value='$k.""'}- ->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}- ->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}- ->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">支付描述</span>
|
||||
<input name="qr_alipay" class="layui-input" placeholder="请输入支付描述" value="{$vo.qr_alipay|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启跳转</span>
|
||||
<select class="layui-select" name="qr_alipay_statustz" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.qr_alipay_statustz' value='$k.""'}- ->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}- ->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}- ->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">跳转链接</span>
|
||||
<input name="qr_alipaytzlj" class="layui-input" placeholder="请输入跳转链接" value="{$vo.qr_alipaytzlj|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">二维码</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">收款二维码</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150px" class="text-center"><input name="qr_wechat_img" type="hidden" value="{$vo.qr_wechat_img|default=''}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="qr_wechat_img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="qr_wechat_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.qr_wechat_status' value='$k.""'}- ->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}- ->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}- ->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">支付描述</span>
|
||||
<input name="qr_wechat" class="layui-input" placeholder="请输入支付描述" value="{$vo.qr_wechat|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启跳转</span>
|
||||
<select class="layui-select" name="qr_wechat_statustz" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.qr_wechat_statustz' value='$k.""'}- ->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}- ->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}- ->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">跳转链接</span>
|
||||
<input name="qr_wechattzlj" class="layui-input" placeholder="请输入跳转链接" value="{$vo.qr_wechattzlj|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款银行</span>
|
||||
<input name="gz_bank_type" class="layui-input" placeholder="请输入收款银行" value="{$vo.gz_bank_type|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款人</span>
|
||||
<input name="gz_bank_name" class="layui-input" placeholder="请输入收款人" value="{$vo.gz_bank_name|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款账号</span>
|
||||
<input name="gz_bank_account" class="layui-input" placeholder="请输入收款账号" value="{$vo.gz_bank_account|default='无'}" required>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="gz_bank_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.gz_bank_status' value='$k.""'}- ->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}- ->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}- ->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">赠送比例(%)</span>
|
||||
<input name="gz_bankz" class="layui-input" placeholder="请输入赠送比例(%)" value="{$vo.gz_bankz|default='0'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">成长值达到标准显示</span>
|
||||
<input name="gz_bankbz" class="layui-input" placeholder="请输入成长值" value="{$vo.gz_bankbz|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">支付描述</span>
|
||||
<input name="gz_bank" class="layui-input" placeholder="请输入支付描述" value="{$vo.gz_bank|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款银行</span>
|
||||
<input name="alipay_bank_type" class="layui-input" placeholder="请输入收款银行" value="{$vo.alipay_bank_type|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款人</span>
|
||||
<input name="alipay_bank_name" class="layui-input" placeholder="请输入收款人" value="{$vo.alipay_bank_name|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款账号</span>
|
||||
<input name="alipay_bank_account" class="layui-input" placeholder="请输入收款账号" value="{$vo.alipay_bank_account|default='无'}" required>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="alipay_bank_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.alipay_bank_status' value='$k.""'}- ->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}- ->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}- ->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">赠送比例(%)</span>
|
||||
<input name="alipay_bank_give" class="layui-input" placeholder="请输入赠送比例(%)" value="{$vo.alipay_bank_give|default='0'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">成长值达到标准显示</span>
|
||||
<input name="alipay_bankbz" class="layui-input" placeholder="请输入成长值" value="{$vo.alipay_bankbz|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">支付描述</span>
|
||||
<input name="alipay_bank" class="layui-input" placeholder="请输入支付描述" value="{$vo.alipay_bank|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-card-body padding-10 layui-col-md8">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款银行</span>
|
||||
<input name="wx_bank_type" class="layui-input" placeholder="请输入收款银行" value="{$vo.wx_bank_type|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款人</span>
|
||||
<input name="wx_bank_name" class="layui-input" placeholder="请输入收款人" value="{$vo.wx_bank_name|default='无'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收款账号</span>
|
||||
<input name="wx_bank_account" class="layui-input" placeholder="请输入收款账号" value="{$vo.wx_bank_account|default='无'}" required>
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">是否开启</span>
|
||||
<select class="layui-select" name="wx_bank_status" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.wx_bank_status' value='$k.""'}- ->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}- ->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}- ->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">赠送比例(%)</span>
|
||||
<input name="wx_bank_give" class="layui-input" placeholder="请输入赠送比例(%)" value="{$vo.wx_bank_give|default='0'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">成长值达到标准显示</span>
|
||||
<input name="wx_bankbz" class="layui-input" placeholder="请输入成长值" value="{$vo.wx_bankbz|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs12 relative">
|
||||
<span class="color-green">支付描述</span>
|
||||
<input name="wx_bank" class="layui-input" placeholder="请输入支付描述" value="{$vo.wx_bank|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn" type="submit">保存设置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
94
application/akszadmin/view/info/reward.html
Executable file
94
application/akszadmin/view/info/reward.html
Executable file
@ -0,0 +1,94 @@
|
||||
{extend name='akszadmin@main'}
|
||||
{block name="content"}
|
||||
<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
<div class="think-box-shadow padding-40">
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">用户注册(元)</span>
|
||||
<input name="register" class="layui-input" placeholder="请输入用户注册(元)" value="{$vo.register|default='0'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">注册赠送成长值</span>
|
||||
<input name="registerzzz" class="layui-input" placeholder="请输入注册赠送成长值" value="{$vo.registerzzz|default='0'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">实名赠送(元)</span>
|
||||
<input name="shimingsong" class="layui-input" placeholder="请输入实名赠送(元)" value="{$vo.shimingsong|default='0'}" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">邀请注册(元)</span>
|
||||
<input name="register2" class="layui-input" placeholder="请输入邀请注册(元)" value="{$vo.register2|default='0'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">邀请充值(%):</span>
|
||||
<input name="recharge" class="layui-input" placeholder="请输入邀请充值(%):" value="{$vo.recharge|default='0'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">每日签到奖励(元)</span>
|
||||
<input name="qiandao" class="layui-input" placeholder="请输入每日签到奖励(元)" value="{$vo.qiandao|default='0'}" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">邀请投资1级(%)</span>
|
||||
<input name="invest1" class="layui-input" placeholder="请输入邀请投资1级(%)" value="{$vo.invest1|default='0'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">邀请投资2级(%)</span>
|
||||
<input name="invest2" class="layui-input" placeholder="请输入邀请投资2级(%)" value="{$vo.invest2|default='0'}" required>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">邀请投资3级(%)</span>
|
||||
<input name="invest3" class="layui-input" placeholder="请输入邀请投资3级(%)" value="{$vo.invest3|default='0'}" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15" style="display: none;">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">新闻开关</span>
|
||||
<select class="layui-select" name="isobse" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.isobse' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs8 relative">
|
||||
<span class="color-green">观看新闻时间(秒)</span>
|
||||
<input name="seetime" type="number" class="layui-input" placeholder="请输入观看新闻时间(秒)" value="{$vo.seetime|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-form-item layui-row layui-col-space15" style="display: none;">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">新闻领取次数</span>
|
||||
<input name="getnum" class="layui-input" placeholder="请输入新闻领取次数" value="{$vo.getnum|default='0'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">新闻领取金额(开始)</span>
|
||||
<input name="newsmoney" class="layui-input" placeholder="请输入新闻领取金额(开始)" value="{$vo.newsmoney|default='0'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">新闻领取金额(结束)</span>
|
||||
<input name="newsmoneytwo" class="layui-input" placeholder="请输入新闻领取金额(结束)" value="{$vo.newsmoneytwo|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-left">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn" type="submit">保存设置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
51
application/akszadmin/view/invest/index.html
Executable file
51
application/akszadmin/view/invest/index.html
Executable file
@ -0,0 +1,51 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='invest/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='text-left nowrap' width="40%">投资信息</th>
|
||||
<th class='text-left nowrap' width="15%">投资人</th>
|
||||
<th class='text-left nowrap' width="15%">投资数据</th>
|
||||
<th class="text-left nowrap" width="15%">投资时间</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='text-left nowrap' style="max-width: 260px;overflow: hidden">
|
||||
项目名称:{$vo.title|default='--'}<br>
|
||||
合同编号:{$vo.number|default='--'}<br>
|
||||
还款类型:{$vo.type2|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
投资人ID:{$vo.uid|default='--'}<br>
|
||||
投资人姓名:{$vo.name|default='--'}<br>
|
||||
投资人电话:{$vo.phone|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
投资金额:{$vo.money|default='--'} 元<br>
|
||||
费率:{$vo.rate|default='--'} %<br>
|
||||
期限:{$vo.day|default='--'} 天<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
投资时间:{$vo.time|default='--'}<br>
|
||||
<!--结束时间:{$vo.time2|default='--'}<br>-->
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{if auth("akszadmin/invest_list/detail")}
|
||||
<a data-title="查看详情" class="layui-btn layui-btn-sm" data-open='{:url(ADMIN_MODULE."/invest_list/index")}?i_iid={$vo.id}'>查看详情</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
49
application/akszadmin/view/invest/index_search.html
Executable file
49
application/akszadmin/view/invest/index_search.html
Executable file
@ -0,0 +1,49 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">项目名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="i_title" value="{$Think.get.i_title|default=''}" placeholder="请输入项目名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">投资时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="i_time" value="{$Think.get.i_time|default=''}" placeholder="请选择投资时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员账号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_phone" value="{$Think.get.u_phone|default=''}" placeholder="请输入会员账号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">还款方式</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="i_type1" lay-search>
|
||||
<option value="">全部方式</option>
|
||||
{foreach $tlist as $v}
|
||||
<!--{eq name='Think.get.i_type1' value='$v.id.""'}-->
|
||||
<option selected value="{$v.id}">{$v.name}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$v.id}">{$v.name}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="layui-form-item layui-inline" style="margin-right: 20px">
|
||||
<span class="color-desc font-s14">已收益(总):<span class="color-red">{$profit}元</span></span>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline" style="margin-right: 20px">
|
||||
<span class="color-desc font-s14">未收益(总):<span class="color-red">{$un_profit}元</span></span>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
43
application/akszadmin/view/invest_list/index.html
Executable file
43
application/akszadmin/view/invest_list/index.html
Executable file
@ -0,0 +1,43 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='invest_list/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='text-left nowrap' width="40%">投资信息</th>
|
||||
<th class='text-left nowrap' width="15%">投资人</th>
|
||||
<th class='text-left nowrap' width="15%">投资数据</th>
|
||||
<th class="text-left nowrap" width="15%">投资时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='text-left nowrap' style="max-width: 260px;overflow: hidden">
|
||||
项目名称:{$vo.title|default='--'}<br>
|
||||
返款编号:{$vo.id|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
投资人ID:{$vo.uid|default='--'}<br>
|
||||
投资人姓名:{$vo.name|default='--'}<br>
|
||||
投资人电话:{$vo.phone|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
预计返款金额:{$vo.pay1|default='--'} 元<br>
|
||||
实际返款金额:{$vo.pay2|default='--'} 元<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
预计返款:{$vo.time1|default='--'}<br>
|
||||
实际返款:{$vo.time2|default='--'}<br>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
30
application/akszadmin/view/invest_list/index_search.html
Executable file
30
application/akszadmin/view/invest_list/index_search.html
Executable file
@ -0,0 +1,30 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">项目名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="i_title" value="{$Think.get.i_title|default=''}" placeholder="请输入项目名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">返款时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="i_time1" value="{$Think.get.i_time1|default=''}" placeholder="请选择返款时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员账号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_phone" value="{$Think.get.u_phone|default=''}" placeholder="请输入会员账号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
<!--<div class="layui-form-item layui-inline" style="margin-left: 20px">
|
||||
<span class="color-desc font-s14">合计返款:<span class="color-red">{$refund}元</span></span>
|
||||
</div>-->
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
236
application/akszadmin/view/item/form.html
Executable file
236
application/akszadmin/view/item/form.html
Executable file
@ -0,0 +1,236 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
|
||||
<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
|
||||
<div class="layui-card-body think-box-shadow padding-left-40">
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">项目分类</span>
|
||||
<select class="layui-select" required name="class" lay-search>
|
||||
{foreach $class as $cate}
|
||||
{if isset($vo.class) and $vo.class eq $cate.id}
|
||||
<option selected value="{$cate.id}">{$cate.name|default=''}</option>
|
||||
{else}
|
||||
<option value="{$cate.id}">{$cate.name|default=''}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs9 relative">
|
||||
<span class="color-green">项目名称</span>
|
||||
<input name="title" required class="layui-input" placeholder="请输入项目名称" value="{$vo.title|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">还款方式</span>
|
||||
<select class="layui-select" required name="type" lay-search>
|
||||
{foreach $type as $cate}
|
||||
{if isset($vo.type) and $vo.type eq $cate.id}
|
||||
<option selected value="{$cate.id}">{$cate.name|default=''}</option>
|
||||
{else}
|
||||
<option value="{$cate.id}">{$cate.name|default=''}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs9 relative">
|
||||
<span class="color-green">产品亮点</span>
|
||||
<input name="desc" required class="layui-input" placeholder="请输入产品亮点" value="{$vo.desc|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">开始时间</span>
|
||||
<input name="time" data-date-input="datetime" required class="layui-input" placeholder="请输入开始时间" value="{$vo.time|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs9 relative">
|
||||
<span class="color-green">担保公司</span>
|
||||
<input name="guarantee" required class="layui-input" placeholder="请输入担保公司" value="{$vo.guarantee|default='中国人民保险(香港)有限公司'}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">项目金额(万元)</span>
|
||||
<input name="total" required class="layui-input" placeholder="请输入项目金额(万元)" value="{$vo.total|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">收益率(%)</span>
|
||||
<input name="rate" required class="layui-input" placeholder="请输入收益率(%)" value="{$vo.rate|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">期限(天)</span>
|
||||
<input name="day" required class="layui-input" placeholder="请输入期限(天)" value="{$vo.day|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">起投金额(元)</span>
|
||||
<input name="min" required class="layui-input" placeholder="请输入起投金额(元)" value="{$vo.min|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">最大投资金额(元)</span>
|
||||
<input name="max" required class="layui-input" placeholder="请输入最大投资金额(元)" value="{$vo.max|default='1000000'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">最大投资次数</span>
|
||||
<input name="num" required class="layui-input" placeholder="请输入最大投资次数" value="{$vo.num|default='1000'}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">上级分润(%)</span>
|
||||
<input name="invest1" class="layui-input" placeholder="请输入上级分润(%)" value="{$vo.invest1|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">二级分润(%)</span>
|
||||
<input name="invest2" class="layui-input" placeholder="请输入二级分润(%)" value="{$vo.invest2|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">三级分润(%)</span>
|
||||
<input name="invest3" class="layui-input" placeholder="请输入三级分润(%)" value="{$vo.invest3|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">上级赠送红包</span>
|
||||
<input name="red1" class="layui-input" placeholder="请输入上级赠送红包" value="{$vo.red1|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">二级赠送红包</span>
|
||||
<input name="red2" class="layui-input" placeholder="请输入二级赠送红包" value="{$vo.red2|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">三级赠送红包</span>
|
||||
<input name="red3" class="layui-input" placeholder="请输入三级赠送红包" value="{$vo.red3|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<!--<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">开启抽奖</span>
|
||||
<select class="layui-select" name="prize" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
{eq name='$vo.prize' value='$k.""'}
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
{else}
|
||||
<option value="{$k}">{$v}</option>
|
||||
{/eq}
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>-->
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">合约算力</span>
|
||||
<input name="hysl" required class="layui-input" placeholder="请输入合约算力" value="{$vo.hysl|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">开启积分</span>
|
||||
<select class="layui-select" name="integral" required>
|
||||
{foreach ['0'=>'关闭','1'=>'开启'] as $k=>$v}
|
||||
<!--{eq name='$vo.integral' value='$k.""'}-->
|
||||
<option selected value="{$k}">{$v}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$k}">{$v}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">排序</span>
|
||||
<input name="sort" class="layui-input" placeholder="请输入排序" value="{$vo.sort|default='0'}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">积分比例<span class="help-block">(最终获得积分 = 投资金额*积分比例)</span></span>
|
||||
<input name="jfbl" class="layui-input" placeholder="请输入积分比例" value="{$vo.jfbl|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">起投成长值</span>
|
||||
<input name="value" class="layui-input" placeholder="请输入起投成长值" value="{$vo.value|default='0'}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">固定结算时间<span class="help-block">(仅限 当天投资,当天还款付息 有效)</span></span>
|
||||
<input data-date-input="datetime" name="fixedtime" class="layui-input" placeholder="请输入固定结算时间" value="{$vo.fixedtime|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">进度自动拉满天数</span>
|
||||
<input name="auto" class="layui-input" placeholder="请输入进度自动拉满天数" value="{$vo.auto|default=''}">
|
||||
<span class="help-block">0为不设置自动拉满天数</span>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">虚拟进度(%)</span>
|
||||
<input name="percent" class="layui-input" placeholder="请输入虚拟进度(%)" value="{$vo.percent|default=''}">
|
||||
<span class="help-block">当进度为100%时项目满投</span>
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">红包额度</span>
|
||||
<input name="red" class="layui-input" placeholder="请输入红包额度" value="{$vo.red|default=''}">
|
||||
<span class="help-block">0为不发,红包额度以起投金额成倍赠送到余额</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">项目封面图片</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">项目封面</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="90px" class="text-center"><input name="img" type="hidden" value="{$vo.img|default=''}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item block">
|
||||
<span class="label-required-prev color-green">产品详情</span>
|
||||
<textarea name="fixedcontent">{$vo.fixedcontent|default=''|raw}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn layui-btn-danger" ng-click="hsitoryBack()" type="button">取消编辑</button>
|
||||
<button class="layui-btn" type="submit">保存项目</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
require(['ckeditor', 'angular'], function () {
|
||||
window.createEditor('[name="fixedcontent"]', {height: 500});
|
||||
var app = angular.module("GoodsForm", []).run(callback);
|
||||
angular.bootstrap(document.getElementById(app.name), [app.name]);
|
||||
|
||||
function callback($rootScope) {
|
||||
$rootScope.hsitoryBack = function () {
|
||||
$.msg.confirm('确定要取消编辑吗?', function (index) {
|
||||
history.back(), $.msg.close(index);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
81
application/akszadmin/view/item/index.html
Executable file
81
application/akszadmin/view/item/index.html
Executable file
@ -0,0 +1,81 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="button"}
|
||||
{if auth("akszadmin/item/add")}
|
||||
<button data-open='{:url(ADMIN_MODULE."/item/add")}' data-title="添加项目" class='layui-btn layui-btn-sm layui-btn-primary'>添加项目</button>
|
||||
{/if}
|
||||
{if auth("akszadmin/item/remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/item/remove")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除项目</button>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='item/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
||||
</th>
|
||||
<th class='list-table-sort-td'>
|
||||
<button type="button" data-reload class="layui-btn layui-btn-xs">排序刷新</button>
|
||||
</th>
|
||||
<th class='text-left' width="30%">项目信息</th>
|
||||
<th class='text-left' width="15%">项目分类</th>
|
||||
<th class='text-left' width="15%">项目配置</th>
|
||||
<th class='text-left' width="15%">其他配置</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr data-dbclick>
|
||||
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
|
||||
<td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
|
||||
<td class='text-left'>
|
||||
<span style="width: 300px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: inline-block;">{$vo.title|default='--'}</span><br>
|
||||
开始时间:{$vo.time|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left'>
|
||||
所属分类:{$vo.item_class.name|default='--'}<br>
|
||||
还款方式:{$vo.pay_type.name|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left'>
|
||||
项目金额:{$vo.total|default='--'}万元<br>
|
||||
收益率:{$vo.rate|default='--'}%<br>
|
||||
项目期限:{$vo.day|default='--'}天<br>
|
||||
</td>
|
||||
<td class='text-left'>
|
||||
项目进度:{$vo.percent|default='--'}%<br>
|
||||
起投金额:{$vo.min|default='--'}元<br>
|
||||
投资次数:{$vo.num|default='--'}次<br>
|
||||
</td>
|
||||
<td class='text-left'>
|
||||
|
||||
<div class="nowrap margin-bottom-5">
|
||||
{if auth("akszadmin/item/edit")}
|
||||
<a data-dbclick class="layui-btn layui-btn-sm" data-open='{:url(ADMIN_MODULE."/item/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{else}
|
||||
<a data-tips-text="您没有编辑项目的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">编 辑</a>
|
||||
{/if}
|
||||
{if auth("akszadmin/item/remove")}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/item/remove')}" data-value="id#{$vo.id}">删 除</a>
|
||||
{else}
|
||||
<a data-tips-text="您没有删除项目的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删 除</a>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
45
application/akszadmin/view/item/index_search.html
Executable file
45
application/akszadmin/view/item/index_search.html
Executable file
@ -0,0 +1,45 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">项目名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="title" value="{$Think.get.title|default=''}" placeholder="请输入项目名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">项目分类</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="class" lay-search>
|
||||
<option value="">全部项目</option>
|
||||
{foreach $mlist as $v}
|
||||
<!--{eq name='Think.get.class' value='$v.id.""'}-->
|
||||
<option selected value="{$v.id}">{$v.name}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$v.id}">{$v.name}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">还款方式</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" name="type" lay-search>
|
||||
<option value="">全部方式</option>
|
||||
{foreach $tlist as $v}
|
||||
<!--{eq name='Think.get.type' value='$v.id.""'}-->
|
||||
<option selected value="{$v.id}">{$v.name}</option>
|
||||
<!--{else}-->
|
||||
<option value="{$v.id}">{$v.name}</option>
|
||||
<!--{/eq}-->
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
15
application/akszadmin/view/item_class/class_search.html
Executable file
15
application/akszadmin/view/item_class/class_search.html
Executable file
@ -0,0 +1,15 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">分类名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="title" value="{$Think.get.title|default=''}" placeholder="请输入分类名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
47
application/akszadmin/view/item_class/form.html
Executable file
47
application/akszadmin/view/item_class/form.html
Executable file
@ -0,0 +1,47 @@
|
||||
<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
|
||||
<div class="layui-card-body">
|
||||
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">会员等级</label>
|
||||
<label class="layui-col-xs10">
|
||||
<select name='member_id' required class='layui-select' lay-search>
|
||||
{foreach $member as $key=>$cate}
|
||||
{eq name='cate.id' value='$vo.member_id|default=0'}
|
||||
<option selected value='{$cate.id}'>{$cate.name}</option>
|
||||
{else}
|
||||
<option value='{$cate.id}'>{$cate.name}</option>
|
||||
{/eq}
|
||||
{/foreach}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">分类名称</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="name" required value='{$vo.name|default=""}' placeholder="请输入分类名称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">分类备注</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="note" value='{$vo.note|default=""}' placeholder="请输入分类备注" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||
<button class="layui-btn" type='submit'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
</form>
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
62
application/akszadmin/view/item_class/index.html
Executable file
62
application/akszadmin/view/item_class/index.html
Executable file
@ -0,0 +1,62 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="button"}
|
||||
{if auth("akszadmin/item_class/add")}
|
||||
<button data-modal='{:url(ADMIN_MODULE."/item_class/add")}' data-title="添加项目分类" class='layui-btn layui-btn-sm layui-btn-primary'>添加项目分类</button>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='item_class/class_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
||||
</th>
|
||||
<th class='list-table-sort-td'>
|
||||
<button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
|
||||
</th>
|
||||
<th class='text-left nowrap'>分类名称</th>
|
||||
<th class="text-center">会员分组</th>
|
||||
<th class="text-center">添加时间</th>
|
||||
<th class="text-center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='list-table-check-td think-checkbox'>
|
||||
<input class="list-check-box" value='{$vo.id}' type='checkbox'>
|
||||
</td>
|
||||
<td class='list-table-sort-td'>
|
||||
<input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{$vo.name|default=''}
|
||||
</td>
|
||||
<td class='text-center nowrap'>
|
||||
{$vo.member.name|default=''}
|
||||
</td>
|
||||
<td class='text-center nowrap'>{$vo.add_time|format_datetime}</td>
|
||||
<td class='text-left nowrap'>
|
||||
|
||||
{if auth("akszadmin/item_class/edit")}
|
||||
<a data-title="编辑商品分类" class="layui-btn layui-btn-sm" data-modal='{:url(ADMIN_MODULE."/item_class/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{/if}
|
||||
|
||||
{if auth("akszadmin/item_class/remove")}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/item_class/remove')}" data-value="id#{$vo.id}">删 除</a>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
57
application/akszadmin/view/login/index.html
Executable file
57
application/akszadmin/view/login/index.html
Executable file
@ -0,0 +1,57 @@
|
||||
{extend name="index/index"}
|
||||
|
||||
{block name="body"}
|
||||
<div class="login-container" data-supersized="__ROOT__/static/theme/img/login/bg1.jpg,__ROOT__/static/theme/img/login/bg2.jpg">
|
||||
<div class="header notselect layui-hide-xs">
|
||||
<a href="{:url('@')}" class="title">{:sysconf('app_name')}<span class="padding-left-5 font-s10">{:sysconf('app_version')}</span></a>
|
||||
{notempty name='devmode'}
|
||||
<a class="pull-right layui-anim layui-anim-fadein" href='https://gitee.com/zoujingli/ThinkAdmin'>
|
||||
<img src='https://gitee.com/zoujingli/ThinkAdmin/widgets/widget_1.svg' alt='Fork me on Gitee'>
|
||||
</a>
|
||||
{/notempty}
|
||||
</div>
|
||||
<form data-login-form onsubmit="return false" method="post" class="layui-anim layui-anim-upbit" autocomplete="off">
|
||||
<h2 class="notselect">系统管理</h2>
|
||||
<ul>
|
||||
<li class="username">
|
||||
<label>
|
||||
<i class="layui-icon layui-icon-username"></i>
|
||||
<input class="layui-input" required pattern="^\S{4,}$" name="username" autofocus autocomplete="off" placeholder="登录账号" title="请输入登录账号">
|
||||
</label>
|
||||
</li>
|
||||
<li class="password">
|
||||
<label>
|
||||
<i class="layui-icon layui-icon-password"></i>
|
||||
<input class="layui-input" required pattern="^\S{4,}$" name="password" maxlength="32" type="password" autocomplete="off" placeholder="登录密码" title="请输入登录密码">
|
||||
</label>
|
||||
</li>
|
||||
<li class="verify layui-hide">
|
||||
<label class="inline-block relative">
|
||||
<i class="layui-icon layui-icon-picture-fine"></i>
|
||||
<input class="layui-input" required pattern="^\S{4,}$" name="verify" maxlength="4" autocomplete="off" placeholder="验证码" title="请输入验证码">
|
||||
</label>
|
||||
<label data-captcha="{:url(ADMIN_MODULE.'/login/captcha',[],false)}" data-field-verify="verify" data-field-uniqid="uniqid" data-captcha-type="{$captcha_type}" data-captcha-token="{$captcha_token}"></label>
|
||||
</li>
|
||||
<li class="text-center padding-top-20">
|
||||
<button type="submit" class="layui-btn layui-disabled full-width" data-form-loaded="立即登入">正在载入</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
<div class="footer notselect">
|
||||
<p class="layui-hide-xs"><a target="_blank" href="https://www.google.cn/chrome">推荐使用谷歌浏览器</a></p>
|
||||
{:sysconf('site_copy')}
|
||||
{if sysconf('miitbeian')}<span class="padding-5">|</span><a target="_blank" href="http://beian.miit.gov.cn">{:sysconf('miitbeian')}</a>{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='style'}
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
|
||||
<script>if (location.href.indexOf('#') > -1) location.replace(location.href.split('#')[0])</script>
|
||||
<link rel="stylesheet" href="__ROOT__/static/theme/css/login.css">
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script src="__ROOT__/static/login.js"></script>
|
||||
<script src="__ROOT__/static/plugs/supersized/supersized.3.2.7.min.js"></script>
|
||||
{/block}
|
||||
11
application/akszadmin/view/main.html
Executable file
11
application/akszadmin/view/main.html
Executable file
@ -0,0 +1,11 @@
|
||||
<div class="layui-card layui-bg-gray">
|
||||
{block name='style'}{/block}
|
||||
{notempty name='title'}
|
||||
<div class="layui-card-header layui-anim layui-anim-fadein notselect">
|
||||
<span class="layui-icon layui-icon-next font-s10 color-desc margin-right-5"></span>{$title|default=''}
|
||||
<div class="pull-right">{block name='button'}{/block}</div>
|
||||
</div>
|
||||
{/notempty}
|
||||
<div class="layui-card-body layui-anim layui-anim-upbit">{block name='content'}{/block}</div>
|
||||
{block name='script'}{/block}
|
||||
</div>
|
||||
118
application/akszadmin/view/mall/form.html
Executable file
118
application/akszadmin/view/mall/form.html
Executable file
@ -0,0 +1,118 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
|
||||
<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
|
||||
<div class="layui-card-body think-box-shadow padding-left-40">
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs6 relative">
|
||||
<span class="color-green">矿机名称</span>
|
||||
<input name="title" required class="layui-input" placeholder="请输入矿机名称" value="{$vo.title|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">担保方</span>
|
||||
<input name="guarantee" required class="layui-input" placeholder="请输入担保方" value="{$vo.guarantee|default='中国人民保险(香港)有限公司'}">
|
||||
</label>
|
||||
<label class="layui-col-xs3 relative">
|
||||
<span class="color-green">上架时间</span>
|
||||
<input name="time" data-date-input="datetime" required class="layui-input" placeholder="请输入上架时间" value="{$vo.time|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">矿机总量/份</span>
|
||||
<input name="total" required class="layui-input" placeholder="请输入矿机总量/份" value="{$vo.total|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">剩余矿机/份</span>
|
||||
<input name="stock" required class="layui-input" placeholder="请输入剩余矿机/份" value="{$vo.stock|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">保证金元/份</span>
|
||||
<input name="min" required class="layui-input" placeholder="请输入保证金/份" value="{$vo.min|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">使用期限/天</span>
|
||||
<input name="day" required class="layui-input" placeholder="请输入使用期限/天" value="{$vo.day|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">日总产出 BTC/天</span>
|
||||
<input name="day_income" required class="layui-input" placeholder="请输入日总产出 BTC/天" value="{$vo.day_income|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">算力 TH/s</span>
|
||||
<input name="power" required class="layui-input" placeholder="请输入算力 TH/s" value="{$vo.power|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-row layui-col-space15">
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">日化收益率</span>
|
||||
<input name="rate" required class="layui-input" placeholder="请输入日化收益率" value="{$vo.rate|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">日运维费 BTC/天</span>
|
||||
<input name="cost" required class="layui-input" placeholder="请输入日运维费 BTC/天" value="{$vo.cost|default=''}">
|
||||
</label>
|
||||
<label class="layui-col-xs4 relative">
|
||||
<span class="color-green">限投次数</span>
|
||||
<input name="num" required class="layui-input" placeholder="请输入限投次数" value="{$vo.num|default=''}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<span class="color-green label-required-prev">矿机封面图片</span>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">矿机封面</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="90px" class="text-center"><input name="img" type="hidden" value="{$vo.img|default=''}"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>$('[name="img"]').uploadOneImage()</script>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item block">
|
||||
<span class="label-required-prev color-green">矿机详情</span>
|
||||
<textarea name="fixedcontent">{$vo.fixedcontent|default=''|raw}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
|
||||
<button class="layui-btn layui-btn-danger" ng-click="hsitoryBack()" type="button">取消编辑</button>
|
||||
<button class="layui-btn" type="submit">保存项目</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
require(['ckeditor', 'angular'], function () {
|
||||
window.createEditor('[name="fixedcontent"]', {height: 500});
|
||||
var app = angular.module("GoodsForm", []).run(callback);
|
||||
angular.bootstrap(document.getElementById(app.name), [app.name]);
|
||||
|
||||
function callback($rootScope) {
|
||||
$rootScope.hsitoryBack = function () {
|
||||
$.msg.confirm('确定要取消编辑吗?', function (index) {
|
||||
history.back(), $.msg.close(index);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
77
application/akszadmin/view/mall/index.html
Executable file
77
application/akszadmin/view/mall/index.html
Executable file
@ -0,0 +1,77 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="button"}
|
||||
{if auth("akszadmin/mall/add")}
|
||||
<button data-open='{:url(ADMIN_MODULE."/mall/add")}' data-title="添加矿机" class='layui-btn layui-btn-sm layui-btn-primary'>添加矿机</button>
|
||||
{/if}
|
||||
{if auth("akszadmin/mall/remove")}
|
||||
<button data-action='{:url(ADMIN_MODULE."/mall/remove")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除矿机</button>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='mall/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='list-table-check-td think-checkbox'>
|
||||
<input data-auto-none data-check-target='.list-check-box' type='checkbox'>
|
||||
</th>
|
||||
<th class='list-table-sort-td'>
|
||||
<button type="button" data-reload class="layui-btn layui-btn-xs">排序刷新</button>
|
||||
</th>
|
||||
<th class='text-left' width="30%">矿机信息</th>
|
||||
<th class='text-left nowrap' width="30%">矿机配置</th>
|
||||
<th class='text-left nowrap' width="30%">其他配置</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr data-dbclick>
|
||||
<td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
|
||||
<td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
|
||||
<td class='text-left'>
|
||||
<span style="width: 300px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: inline-block;">{$vo.title|default='--'}</span><br>
|
||||
添加时间:{$vo.time|default='--'}<br>
|
||||
使用期限:{$vo.day|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
保证金:{$vo.min|default='--'}元<br>
|
||||
日总产出:{$vo.day_income|default='--'} BTC/天<br>
|
||||
日运维费:{$vo.cost|default='--'} BTC/天<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
算力:{$vo.power|default='--'}TH/s<br>
|
||||
矿机总量:{$vo.total|default='--'}份<br>
|
||||
剩余矿机:{$vo.stock|default='--'}份<br>
|
||||
</td>
|
||||
<td class='text-left'>
|
||||
|
||||
<div class="nowrap margin-bottom-5">
|
||||
{if auth("akszadmin/mall/edit")}
|
||||
<a data-dbclick class="layui-btn layui-btn-sm" data-open='{:url(ADMIN_MODULE."/mall/edit")}?id={$vo.id}'>编 辑</a>
|
||||
{else}
|
||||
<a data-tips-text="您没有编辑矿机的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">编 辑</a>
|
||||
{/if}
|
||||
{if auth("akszadmin/mall/remove")}
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url(ADMIN_MODULE.'/mall/remove')}" data-value="id#{$vo.id}">删 除</a>
|
||||
{else}
|
||||
<a data-tips-text="您没有删除矿机的权限哦!" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删 除</a>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
15
application/akszadmin/view/mall/index_search.html
Executable file
15
application/akszadmin/view/mall/index_search.html
Executable file
@ -0,0 +1,15 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">矿机名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="title" value="{$Think.get.title|default=''}" placeholder="请输入矿机名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
50
application/akszadmin/view/mall_invest/index.html
Executable file
50
application/akszadmin/view/mall_invest/index.html
Executable file
@ -0,0 +1,50 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='mall_invest/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='text-left nowrap' width="30%">租赁信息</th>
|
||||
<th class='text-left nowrap' width="20%">投资人</th>
|
||||
<th class='text-left nowrap' width="20%">投资数据</th>
|
||||
<th class="text-left nowrap" width="15%">时间</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='text-left nowrap' style="max-width: 260px;overflow: hidden">
|
||||
矿机名称:{$vo.title|default='--'}<br>
|
||||
日运维费:{$vo.cost|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
投资人ID:{$vo.uid|default='--'}<br>
|
||||
投资人姓名:{$vo.name|default='--'}<br>
|
||||
投资人电话:{$vo.phone|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
保证金:{$vo.money|default='--'} 元<br>
|
||||
日净收益:{$vo.profit|default='--'} BTC<br>
|
||||
使用期限:{$vo.day|default='--'} 天<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
租赁时间:{$vo.time|default='--'}<br>
|
||||
结束时间:{$vo.time2|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
{if auth("akszadmin/invest_list/detail")}
|
||||
<a data-title="查看详情" class="layui-btn layui-btn-sm" data-open='{:url(ADMIN_MODULE."/mall_invest_list/index")}?i_iid={$vo.id}'>查看详情</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
27
application/akszadmin/view/mall_invest/index_search.html
Executable file
27
application/akszadmin/view/mall_invest/index_search.html
Executable file
@ -0,0 +1,27 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">矿机名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="i_title" value="{$Think.get.i_title|default=''}" placeholder="请输入矿机名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">租赁时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="i_time" value="{$Think.get.i_time|default=''}" placeholder="请选择租赁时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员账号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_phone" value="{$Think.get.u_phone|default=''}" placeholder="请输入会员账号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
43
application/akszadmin/view/mall_invest_list/index.html
Executable file
43
application/akszadmin/view/mall_invest_list/index.html
Executable file
@ -0,0 +1,43 @@
|
||||
{extend name='akszadmin@main'}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow">
|
||||
{include file='mall_invest_list/index_search'}
|
||||
<table class="layui-table margin-top-10" lay-skin="line">
|
||||
{notempty name='list'}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='text-left nowrap' width="30%">投资信息</th>
|
||||
<th class='text-left nowrap' width="20%">投资人</th>
|
||||
<th class='text-left nowrap' width="20%">投资数据</th>
|
||||
<th class="text-left nowrap" width="15%">投资时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{/notempty}
|
||||
<tbody>
|
||||
{foreach $list as $key=>$vo}
|
||||
<tr>
|
||||
<td class='text-left nowrap' style="max-width: 260px;overflow: hidden">
|
||||
矿机名称:{$vo.title|default='--'}<br>
|
||||
挖矿编号:{$vo.id|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
投资人ID:{$vo.uid|default='--'}<br>
|
||||
投资人姓名:{$vo.name|default='--'}<br>
|
||||
投资人电话:{$vo.phone|default='--'}<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
预计收益:{$vo.pay1|default='--'} BTC<br>
|
||||
实际收益:{$vo.pay2|default='--'} BTC<br>
|
||||
</td>
|
||||
<td class='text-left nowrap'>
|
||||
预计收益时间:{$vo.time1|default='--'}<br>
|
||||
实际收益时间:{$vo.time2|default='--'}<br>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
|
||||
</div>
|
||||
{/block}
|
||||
30
application/akszadmin/view/mall_invest_list/index_search.html
Executable file
30
application/akszadmin/view/mall_invest_list/index_search.html
Executable file
@ -0,0 +1,30 @@
|
||||
<fieldset>
|
||||
<legend>条件搜索</legend>
|
||||
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">矿机名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="i_title" value="{$Think.get.i_title|default=''}" placeholder="请输入矿机名称" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">收益时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input data-date-range name="i_time1" value="{$Think.get.i_time1|default=''}" placeholder="请选择收益时间" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<label class="layui-form-label">会员账号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="u_phone" value="{$Think.get.u_phone|default=''}" placeholder="请输入会员账号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-inline">
|
||||
<button class="layui-btn layui-btn-primary"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
<!--<div class="layui-form-item layui-inline" style="margin-left: 20px">
|
||||
<span class="color-desc font-s14">合计返款:<span class="color-red">{$refund}元</span></span>
|
||||
</div>-->
|
||||
</form>
|
||||
<script>form.render()</script>
|
||||
</fieldset>
|
||||
35
application/akszadmin/view/member/form.html
Executable file
35
application/akszadmin/view/member/form.html
Executable file
@ -0,0 +1,35 @@
|
||||
<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
|
||||
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">等级名称</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="name" required value='{$vo.name|default=""}' placeholder="请输入等级名称" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">积分限制</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="value" value='{$vo.value|default="0"}' placeholder="请输入积分限制" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-row margin-bottom-15">
|
||||
<label class="layui-col-xs2 think-form-label">加息利率(%)</label>
|
||||
<label class="layui-col-xs10">
|
||||
<input name="rate" value='{$vo.rate|default="0.00"}' placeholder="请输入加息利率" class="layui-input">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="layui-form-item text-center">
|
||||
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
|
||||
<button class="layui-btn" type='submit'>保存数据</button>
|
||||
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
|
||||
</div>
|
||||
</form>
|
||||
{block name='script'}
|
||||
<script>
|
||||
window.form.render();
|
||||
</script>
|
||||
{/block}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user