diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 811ef56b4..8293239b0 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -886,11 +886,18 @@ class QueryController extends ThinkController public function withdrawDetails($id) { + $page = intval(I('p', 1)); + $row = intval(I('row', 10)); $id = intval($id); $map['withdraw_id'] = $id; - $data = M('Spend', 'tab_') + $model = M('Spend', 'tab_'); + $data = $model ->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id') - ->where($map)->select(); + ->where($map) + ->order('id desc') + ->page($page, $row) + ->select(); + $count = $model->where($map)->count('id'); //提现状态 $withdrawStatus = M('withdraw', 'tab_') @@ -903,6 +910,10 @@ class QueryController extends ThinkController $list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']); } + $page = set_pagination($count, $row); + if ($page) { + $this->assign('_page', $page); + } $this->assign('listData', $data); $this->assign('withdrawStatus', $withdrawStatus); $this->display(); diff --git a/Application/Admin/Controller/SdkMenuController.class.php b/Application/Admin/Controller/SdkMenuController.class.php index faefbfea9..09c6ea401 100644 --- a/Application/Admin/Controller/SdkMenuController.class.php +++ b/Application/Admin/Controller/SdkMenuController.class.php @@ -2,175 +2,151 @@ namespace Admin\Controller; -class SdkMenuController extends ThinkController{ +class SdkMenuController extends ThinkController +{ - public $but_type = [ - '0' => 'h5页面', - '1' => '原生', - '2' => '外部链接', - '3' => 'h5资源', - ]; + public $but_type = [ + '0' => 'h5页面', + '1' => '原生', + '2' => '外部链接', + '3' => 'h5资源', + ]; - public $menu_version = [ - '0' => '双平台', - '1' => '安卓', - '2' => 'ios', - ]; + public $menu_version = [ + '0' => '双平台', + '1' => '安卓', + '2' => 'ios', + ]; - public function lists() - { - $menu_name = I('get.menu_name','sdk_menu'); - $sdkMenus = M('tool','tab_')->where(['name' => $menu_name])->find(); - $config = json_decode($sdkMenus['config'],true); - if(!empty($config)) - { - foreach($config as $k => $v) - { - $config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon']; - $config[$k]['type'] = $this->but_type[$v['type']]; - $config[$k]['menu_version'] = $this->menu_version[$v['menu_version']]; - } - } - $this->assign('list',$config); - $this->assign('menu_name',$menu_name); - $this->assign('menu_list',$this->getMenuList()); - $this->meta_title = '悬浮球菜单'; - $this->display('lists'); - } + public function lists() + { + $menu_name = I('get.menu_name', 'sdk_menu'); + $sdkMenus = M('tool', 'tab_')->where(['name' => $menu_name])->find(); + $config = json_decode($sdkMenus['config'], true); + if (!empty($config)) { + foreach ($config as $k => $v) { + $config[$k]['icon'] = (substr($v['icon'], 0, 7) == "http://" || substr($v['icon'], 0, 8) == "https://" ) ? $v['icon'] : (is_https() ? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . $v['icon']); + $config[$k]['type'] = $this->but_type[$v['type']]; + $config[$k]['menu_version'] = $this->menu_version[$v['menu_version']]; + } + } + $this->assign('list', $config); + $this->assign('menu_name', $menu_name); + $this->assign('menu_list', $this->getMenuList()); + $this->meta_title = '悬浮球菜单'; + $this->display('lists'); + } - public function add() - { - $menu_name = I('get.menu_name','sdk_menu'); - $sdkMenus = M('tool','tab_')->where(['name' => $menu_name])->find(); - $config = json_decode($sdkMenus['config'],true); - if(!empty($config)) - { - $config1 = $config; - $id = array_pop($config1); - $id = $id['id'] + 1; - }else - { - $config = []; - $id = 1; - } + public function add() + { + $menu_name = I('get.menu_name', 'sdk_menu'); + $sdkMenus = M('tool', 'tab_')->where(['name' => $menu_name])->find(); + $config = json_decode($sdkMenus['config'], true); + if (!empty($config)) { + $config1 = $config; + $id = array_pop($config1); + $id = $id['id'] + 1; + } else { + $config = []; + $id = 1; + } - if(IS_POST) - { - $post = I('post.'); - $cover = $_REQUEST['icon']; - $post['cover'] = $cover; - $post['id'] = $id; - array_push($config,$post); - $sdkMenus['config'] = json_encode($config); - if(empty($sdkMenus['name'])) - { - $sdkMenus['name'] = $menu_name; - $sdkMenus['title'] = '悬浮球菜单'; - M('tool','tab_')->data($sdkMenus)->add(); - }else - { - M('tool','tab_')->where(['name' => $menu_name])->data($sdkMenus)->save(); - } - $this->success('新增成功', U('lists',['menu_name' => $menu_name])); - } + if (IS_POST) { + $post = I('post.'); + $post['cover'] = $post['icon']; + $post['id'] = $id; + $post['icon'] = get_cover($post['icon'], "path"); + array_push($config, $post); + $sdkMenus['config'] = json_encode($config); + if (empty($sdkMenus['name'])) { + $sdkMenus['name'] = $menu_name; + $sdkMenus['title'] = '悬浮球菜单'; + M('tool', 'tab_')->data($sdkMenus)->add(); + } else { + M('tool', 'tab_')->where(['name' => $menu_name])->data($sdkMenus)->save(); + } + $this->success('新增成功', U('lists', ['menu_name' => $menu_name])); + } - $data['sort'] = $id; - $this->meta_title = '悬浮球菜单'; - $this->assign('type','add'); - $this->assign('data',$data); - $this->assign('menu_name',$menu_name); - $this->assign('but_type',$this->but_type); - $this->assign('menu_version',$this->menu_version); - $this->display('add'); - } + $data['sort'] = $id; + $this->meta_title = '悬浮球菜单'; + $this->assign('type', 'add'); + $this->assign('data', $data); + $this->assign('menu_name', $menu_name); + $this->assign('but_type', $this->but_type); + $this->assign('menu_version', $this->menu_version); + $this->display('add'); + } - public function edit($id) - { - $menu_name = I('get.menu_name','sdk_menu'); - $sdkMenus = M('tool','tab_')->where(['name' => $menu_name])->find(); - $config = json_decode($sdkMenus['config'],true); - if(IS_POST) - { - foreach($config as $k => $v) - { - if($v['id'] == $id) - { - $post = I('post.'); - foreach($post as $key => $val) - { - if($key == 'icon') - { - $picRes = M('picture')->where(['id'=>intval($val)])->find(); - $path = $picRes['path']; - $config[$k][$key] = $path; - $config[$k]['cover'] = $val; - }else - { - $config[$k][$key] = $val; - $config[$k]['cover'] = ''; - } - } - break; - } - } - $sdkMenus['config'] = json_encode($config); - M('tool','tab_')->where(['name' => $menu_name])->data($sdkMenus)->save(); - $this->success('修改成功', U('lists',['menu_name' => $menu_name])); - } - $data = []; - foreach($config as $k => $v) - { - if($v['id'] == $id) - { - $v['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon']; - $data = $v; - break; - } - } - if(empty($data)) - { - $this->error('菜单不存在','lists'); - } - $img[0] = $data['cover']; - $this->meta_title = '悬浮球菜单'; - $this->assign('type','edit'); - $this->assign('data',$data); - $this->assign('img',$img); - $this->assign('menu_name',$menu_name); - $this->assign('but_type',$this->but_type); - $this->assign('menu_version',$this->menu_version); - $this->display('add'); - } + public function edit($id) + { + $menu_name = I('get.menu_name', 'sdk_menu'); + $sdkMenus = M('tool', 'tab_')->where(['name' => $menu_name])->find(); + $config = json_decode($sdkMenus['config'], true); + if (IS_POST) { + foreach ($config as $k => $v) { + if ($v['id'] == $id) { + $post = I('post.'); + foreach ($post as $key => $val) { + if ($key == 'icon') { + $config[$k]['cover'] = $post['icon']; + $config[$k]['icon'] = get_cover($post['icon'], "path"); + } else { + $config[$k][$key] = $post[$key]; + } + } + break; + } + } + $sdkMenus['config'] = json_encode($config); + M('tool', 'tab_')->where(['name' => $menu_name])->data($sdkMenus)->save(); + $this->success('修改成功', U('lists', ['menu_name' => $menu_name])); + } + $data = []; + foreach ($config as $k => $v) { + if ($v['id'] == $id) { + $data = $v; + break; + } + } + if (empty($data)) { + $this->error('菜单不存在', 'lists'); + } + $img[0] = $data['cover']; + $this->meta_title = '悬浮球菜单'; + $this->assign('type', 'edit'); + $this->assign('data', $data); + $this->assign('img', $img); + $this->assign('menu_name', $menu_name); + $this->assign('but_type', $this->but_type); + $this->assign('menu_version', $this->menu_version); + $this->display('add'); + } + public function del($id) + { + $menu_name = I('get.menu_name', 'sdk_menu'); + if (!is_array($id)) { + $data[] = $id; + } else { + $data = $id; + } + $sdkMenus = M('tool', 'tab_')->where(['name' => $menu_name])->find(); + $config = json_decode($sdkMenus['config'], true); + foreach ($config as $k => $v) { + if (in_array($v['id'], $data)) { + unset($config[$k]); + } + } + $sdkMenus['config'] = json_encode($config); + M('tool', 'tab_')->where(['name' => $menu_name])->data($sdkMenus)->save(); + $this->success('删除成功', U('lists', ['menu_name' => $menu_name])); + } - public function del($id) - { - $menu_name = I('get.menu_name','sdk_menu'); - if(!is_array($id)) - { - $data[] = $id; - }else - { - $data = $id; - } - $sdkMenus = M('tool','tab_')->where(['name' => $menu_name])->find(); - $config = json_decode($sdkMenus['config'],true); - foreach($config as $k => $v) - { - if(in_array($v['id'], $data)) - { - unset($config[$k]); - } - } - $sdkMenus['config'] = json_encode($config); - M('tool','tab_')->where(['name' => $menu_name])->data($sdkMenus)->save(); - $this->success('删除成功', U('lists',['menu_name' => $menu_name])); - } + public function getMenuList() + { + $data = M('tool', 'tab_')->where(['type' => 5])->select(); + return $data; + } - public function getMenuList() - { - $data = M('tool','tab_')->where(['type' => 5])->select(); - return $data; - } - -} \ No newline at end of file +} diff --git a/Application/Admin/Controller/StatisticsController.class.php b/Application/Admin/Controller/StatisticsController.class.php index 3b4b3f85e..4dd30404b 100644 --- a/Application/Admin/Controller/StatisticsController.class.php +++ b/Application/Admin/Controller/StatisticsController.class.php @@ -48,10 +48,10 @@ class StatisticsController extends ThinkController { $this->assign('pay',$list_data['pay']); $this->assign('game_chart',$list_data['chart']); - $this->assign('promotereg',$promote_data['reg']); - $this->assign('promoteactive',$promote_data['active']); - $this->assign('promotepay',$promote_data['pay']); - $this->assign('promote_chart',$promote_data['chart']); + $this->assign('promotereg',array_slice($promote_data['reg'], 0, 10)); + $this->assign('promoteactive',array_slice($promote_data['active'], 0, 10)); + $this->assign('promotepay',array_slice($promote_data['pay'], 0, 10)); + $this->assign('promote_chart', $promote_data['chart']); // 日历 diff --git a/Application/Admin/View/Promote/add.html b/Application/Admin/View/Promote/add.html index 2e002fc29..aa06266ae 100644 --- a/Application/Admin/View/Promote/add.html +++ b/Application/Admin/View/Promote/add.html @@ -3,17 +3,17 @@ - - - + + - - - + + +
diff --git a/Application/Admin/View/Promote/edit.html b/Application/Admin/View/Promote/edit.html index 64bac02d2..365ca2e56 100644 --- a/Application/Admin/View/Promote/edit.html +++ b/Application/Admin/View/Promote/edit.html @@ -171,7 +171,7 @@ 二级密码: - 二级密码为推广员后台会长代充时使用 + 二级密码适用于推广后台会长代充与财务管理功能 diff --git a/Application/Admin/View/Query/withdrawDetails.html b/Application/Admin/View/Query/withdrawDetails.html index b6067b5de..17fb51e33 100644 --- a/Application/Admin/View/Query/withdrawDetails.html +++ b/Application/Admin/View/Query/withdrawDetails.html @@ -9,6 +9,10 @@ + +