From 55cc0c91e424c1e9e502d655b9ef2f559665da62 Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 17 Oct 2019 13:52:30 +0800 Subject: [PATCH 01/42] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A4=BC=E5=8C=85?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Giftbag/add.html | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Application/Admin/View/Giftbag/add.html b/Application/Admin/View/Giftbag/add.html index a1ce0fc1c..966861cc5 100644 --- a/Application/Admin/View/Giftbag/add.html +++ b/Application/Admin/View/Giftbag/add.html @@ -212,8 +212,7 @@ if($("#game_id").val()){ $(function(){ $("#gift_platform").change(function() { - var radio = $("#gift_platform input[type='radio']:checked").val(); - $('#giftbag_version').val(radio); + setGiftbagVersion(); }); $(".inp_radio").change(function () { changePage(); @@ -242,11 +241,21 @@ $("#server_id").change(function() { $("#game_id").change(function(){ $("#game_name").val($("#game_id option:selected").text()); + var ratio_type=$("#game_id").children('option:selected').attr('sdk_version'); - $("input[type='radio'][name='giftbag_version'][value='"+ratio_type+"']").prop("checked",true); - // $('#giftbag_version').val(ratio_type); + + var radio = $("#gift_platform input[type='radio']:checked").val(); + if (radio!=3) { + $("input[type='radio'][name='giftbag_version'][value='" + ratio_type + "']").prop("checked", true); + setGiftbagVersion(); + } + + // $('#giftbag_version').val(ratio_type); fun_ajax($("#game_id option:selected").val()); - changePage(); + if (ratio_type!=2) { + changePage(); + } + // changePage(); }); function fun_ajax(gid){ @@ -308,5 +317,10 @@ function changePage() { $("#gift_time").show(); } } + +function setGiftbagVersion() { + var radio = $("#gift_platform input[type='radio']:checked").val(); + $('#giftbag_version').val(radio); +} \ No newline at end of file From 44121ed30374af0aec50fe7adc32e65af29bb3aa Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 17 Oct 2019 13:59:26 +0800 Subject: [PATCH 02/42] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A4=BC=E5=8C=85?= =?UTF-8?q?=E7=95=8C=E9=9D=A2js=20bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Giftbag/add.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Application/Admin/View/Giftbag/add.html b/Application/Admin/View/Giftbag/add.html index 966861cc5..f91325baf 100644 --- a/Application/Admin/View/Giftbag/add.html +++ b/Application/Admin/View/Giftbag/add.html @@ -297,6 +297,13 @@ function changePage() { setTimeout(function() { $("#tip").removeClass('block tip_right'); },1500); + + $("#gift_status").show(); + + $("#gift_type").show(); + $("#gift_server").show(); + $("#gift_time").show(); + } else { $("#gift_status").hide(); $($("#gift_status input[type='radio']").eq(1)).prop('checked',true); From aabaa9ae01dc34caa6bb9e10133544c6565f0544 Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 17 Oct 2019 14:14:45 +0800 Subject: [PATCH 03/42] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=AE=A1=E7=90=86bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/TestResourceController.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index d20157bf8..55be6005b 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -200,9 +200,14 @@ class TestResourceController extends BaseController $arrUserId = array_column($data,'id'); $logId = implode(',',$arrUserId); - $logRead = M('protect_log_read','tab_') - ->where("log_id IN({$logId}) and promote_id = {$promote_id}") - ->select(); + if ($logId) { + $logRead = M('protect_log_read','tab_') + ->where("log_id IN({$logId}) and promote_id = {$promote_id}") + ->select(); + } + else { + $logRead = []; + } $upsetData = array_column($logRead,'log_id'); From f4bc47015609b4f06799e6542b8930c01fded314 Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 17 Oct 2019 15:03:14 +0800 Subject: [PATCH 04/42] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=97=A5=E5=BF=97bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/TestResourceController.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index bfe155bea..e05b25b6c 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -199,9 +199,14 @@ class TestResourceController extends ThinkController $arrUserId = array_column($data,'id'); $logId = implode(',',$arrUserId); - $logRead = M('protect_log_read','tab_') - ->where("log_id IN({$logId}) and promote_id = {$promote_id}") - ->select(); + if ($logId) { + $logRead = M('protect_log_read','tab_') + ->where("log_id IN({$logId}) and promote_id = {$promote_id}") + ->select(); + } + else { + $logRead = []; + } $upsetData = array_column($logRead,'log_id'); From f00ff01f9541c1af55455083935edef7b49a22ab Mon Sep 17 00:00:00 2001 From: zyx Date: Fri, 18 Oct 2019 18:19:12 +0800 Subject: [PATCH 05/42] =?UTF-8?q?php=E7=89=88=E6=9C=AC=E9=97=AE=E9=A2=98bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index c87284739..a2c806fe8 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -61,7 +61,7 @@ function str2arr($str, $glue = ',') * @return string * @author 麦当苗儿 */ -function arr2str($arr, $glue = ',') +function arr2str($arr=[], $glue = ',') { return implode($glue, $arr); } From aeab84e4260f7e0da48b61ec3b997cf5ff1dd7ed Mon Sep 17 00:00:00 2001 From: zyx Date: Mon, 21 Oct 2019 14:32:23 +0800 Subject: [PATCH 06/42] =?UTF-8?q?=E5=B0=86=E9=A6=96=E9=A1=B5=E5=BC=80?= =?UTF-8?q?=E6=9C=8D=E4=BF=A1=E6=81=AFicon=E6=94=B9=E6=88=9080*80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Promote/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index 9650f0bfa..50549f26b 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -167,7 +167,7 @@ - + {$data.game_name} 安卓、iOS安卓iOS {$data.start_time|date="m-d H:i",###} From 24d5bf34c756107ea768c958ce0ad395088db61e Mon Sep 17 00:00:00 2001 From: zyx Date: Wed, 23 Oct 2019 10:45:46 +0800 Subject: [PATCH 07/42] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9=E5=BF=AB=E6=8D=B7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 51 +++++ .../Admin/View/Promote/shortCutMenu.html | 59 ++++++ .../Admin/View/Promote/shortCutMenuEdit.html | 184 ++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 Application/Admin/View/Promote/shortCutMenu.html create mode 100644 Application/Admin/View/Promote/shortCutMenuEdit.html diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index c16003a1b..db3697742 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -1,5 +1,6 @@ meta_title = '快捷菜单管理'; + $this->m_title = '站点设置(推广员后台)'; + + $list = M("quick_menu","tab_")->page($page,$row)->select(); + + $count = M("quick_menu","tab_")->count(); + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + + $this->assign('list',$list); + $this->display(); + + } + + public function shortCutMenuEdit() { + + $id = I("id"); + $where['id'] = $id; + + $data = M("quick_menu","tab_")->where($where)->find(); + + $this->assign("data",$data); + $this->meta_title = '快捷菜单管理编辑'; + $this->m_title = '站点设置(推广员后台)'; + $this->display(); + } + + public function shortCutMenuSave() { + + $where['id'] = I("id"); + $save['icon'] = I("icon"); + + M('quick_menu', 'tab_')->startTrans(); //事物 + try{ + M('quick_menu', 'tab_')->where($where)->save($save); + }catch (Exception $e) { + M('quick_menu', 'tab_')->rollback();//回滚 + } + M('quick_menu', 'tab_')->commit(); //提交事物 + + $this->success('保存成功',U("promote/shortCutMenu")); + + } + } diff --git a/Application/Admin/View/Promote/shortCutMenu.html b/Application/Admin/View/Promote/shortCutMenu.html new file mode 100644 index 000000000..f72fd9812 --- /dev/null +++ b/Application/Admin/View/Promote/shortCutMenu.html @@ -0,0 +1,59 @@ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ID菜单名称菜单跳转地址菜单图标操作
{$list.id}{$list.name}{$list.url}编辑
aOh! 暂时还没有内容!
+
+
+ {$_page|default=''} +
+ + +
+ + + + \ No newline at end of file diff --git a/Application/Admin/View/Promote/shortCutMenuEdit.html b/Application/Admin/View/Promote/shortCutMenuEdit.html new file mode 100644 index 000000000..17cdc2b81 --- /dev/null +++ b/Application/Admin/View/Promote/shortCutMenuEdit.html @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + +
菜单名称: + +
菜单跳转地址: + +
角色名称: +
+ + + + +
+ +
+ +
+
+
+ + +
+ +
+
+ + + +
+ + + 返回 + +
+
+
+
+ + + +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ''; + + + + + + + From 953564d2919514af0486d41bb53937e9c02ca2e5 Mon Sep 17 00:00:00 2001 From: jbrazz <2436953959@qq.com> Date: Wed, 23 Oct 2019 10:57:32 +0800 Subject: [PATCH 08/42] upt --- Application/Media/View/default/Public/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Media/View/default/Public/base.html b/Application/Media/View/default/Public/base.html index 4e18fa2fd..bf90e22e5 100644 --- a/Application/Media/View/default/Public/base.html +++ b/Application/Media/View/default/Public/base.html @@ -229,8 +229,8 @@
-
- +
+ + + + +
+ + +
+
+ +
+ +
+ +
+
+ + - +
+ + +
+
+
+ +
+ + +
+ 搜索 +
+
+ + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 充值账号提交时间平台币数量付款金额汇入银行支付凭证备注审核状态操作
aOh! 暂时还没有内容!
{$data.promote_account}{:set_show_time($data['create_time'])}{$data.pay_amount}{$data.real_amount}— —{$data.pay_order_number}{$data.remark} + 待审核 + 审核通过 + 审核不通过 + + + 查看 +
+
+
+
+ + {$_page|default=''} +
+ + + + + + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + diff --git a/Application/Admin/View/PromoteCoin/offlineOrderInfo.html b/Application/Admin/View/PromoteCoin/offlineOrderInfo.html new file mode 100644 index 000000000..cb0193cb3 --- /dev/null +++ b/Application/Admin/View/PromoteCoin/offlineOrderInfo.html @@ -0,0 +1,154 @@ + + + + + + + +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
充值账号: + {$data['promote_account']} +
平台币数量: + {$data['pay_amount']} +
购买金额: + {$data['real_amount']} +
汇入银行: + -- +
支付凭证: + {$data['pay_order_number']} +
支付截图: + +
备注: + {$data['remark']} +
+
+ + +
+
+
+
+
+
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + \ No newline at end of file From d56bebdaa6647acc3ec247f73c43f71f49fd7146 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 23 Oct 2019 18:16:13 +0800 Subject: [PATCH 22/42] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=90=8E?= =?UTF-8?q?=E5=8F=B0->=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2|=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E6=98=8E=E7=BB=86->=E7=8E=A9=E5=AE=B6=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E6=A3=80=E7=B4=A2=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=AE=8C?= =?UTF-8?q?=E6=95=B4=E6=9F=A5=E8=AF=A2|=E7=8E=A9=E5=AE=B6=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?ID=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 4 ++-- Application/Home/View/default/Query/recharge.html | 2 +- Application/Home/View/default/Query/register.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 1c76845ed..a60797584 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -101,7 +101,7 @@ class QueryController extends BaseController empty(I('sdk_version')) || $map['tab_game.sdk_version'] = I('sdk_version'); empty(I('server_id')) || $map['tab_spend.server_id'] = I('server_id'); empty(I('game_player_name')) || $map['tab_spend.game_player_name'] = ['like', '%' . I('game_player_name') . '%']; - empty(I('user_account')) || $map['tab_spend.user_account'] = ['like', '%' . I('user_account') . '%']; + empty(I('user_account')) || $map['tab_spend.user_account'] = I('user_account'); empty(I('order_number')) || $map['tab_spend.order_number'] = I('order_number'); $map['tab_spend.pay_status'] = 1; $map['tab_spend.is_check'] = ['neq', 2]; @@ -231,7 +231,7 @@ class QueryController extends BaseController $map['tab_user.register_time'] = ['between', [strtotime(I('begtime')), strtotime(I('endtime')) + 86399]]; } - empty(I('account')) || $map['tab_user.account'] = ['like', '%' . I('account') . '%']; + empty(I('account')) || $map['tab_user.account'] = I('account'); empty(I('id')) || $map['tab_user.id'] = intval(I('id')); $data = M('User', 'tab_') diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html index 842af2012..83eb497cd 100644 --- a/Application/Home/View/default/Query/recharge.html +++ b/Application/Home/View/default/Query/recharge.html @@ -203,7 +203,7 @@ - {$vo.user_account} + {$vo.user_account} {$vo.order_number} {:get_pay_way($vo['pay_way'])} {$vo.pay_amount} diff --git a/Application/Home/View/default/Query/register.html b/Application/Home/View/default/Query/register.html index 0d2a5cbf9..169dca9da 100644 --- a/Application/Home/View/default/Query/register.html +++ b/Application/Home/View/default/Query/register.html @@ -124,7 +124,7 @@ - {$vo.account} + {$vo.account} {$vo.promote_account}({$vo.pro_real_name}) {$vo.device_number} {$vo.register_time|date='Y-m-d H:i:s',###} From cd29b17e03ebc4c375cc58b3fa9a334759319e55 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 23 Oct 2019 20:02:52 +0800 Subject: [PATCH 23/42] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=90=8E?= =?UTF-8?q?=E5=8F=B0->2=E6=8E=A8=E5=B9=BF=E5=91=98=E5=BC=80=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Public/promote_base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index 0b91d3371..ab70ef3f2 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -47,7 +47,7 @@ 推广员管理
- + From 2f124bffbbea12ba4d1eb59cda18415aaffc4b8a Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Thu, 24 Oct 2019 08:51:51 +0800 Subject: [PATCH 24/42] coin_num --- Application/Admin/View/PromoteCoin/offlineList.html | 2 +- Application/Admin/View/PromoteCoin/offlineOrderInfo.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/PromoteCoin/offlineList.html b/Application/Admin/View/PromoteCoin/offlineList.html index bfb744abb..ef6e8927a 100644 --- a/Application/Admin/View/PromoteCoin/offlineList.html +++ b/Application/Admin/View/PromoteCoin/offlineList.html @@ -115,7 +115,7 @@ {$data.promote_account} {:set_show_time($data['create_time'])} - {$data.pay_amount} + {$data.coin_num} {$data.real_amount} — — {$data.pay_order_number} diff --git a/Application/Admin/View/PromoteCoin/offlineOrderInfo.html b/Application/Admin/View/PromoteCoin/offlineOrderInfo.html index cb0193cb3..30f8c2aed 100644 --- a/Application/Admin/View/PromoteCoin/offlineOrderInfo.html +++ b/Application/Admin/View/PromoteCoin/offlineOrderInfo.html @@ -45,7 +45,7 @@ 平台币数量: - {$data['pay_amount']} + {$data['coin_num']} From c4f7a928f9f11f00958712454c7d445c84df1f5f Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 24 Oct 2019 09:41:48 +0800 Subject: [PATCH 25/42] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E6=B3=A8=E5=86=8C=E8=A7=84=E5=88=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Mobile/Controller/UserController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index 7e32cf78e..674d9ea2d 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -370,7 +370,7 @@ class UserController extends BaseController break; } - if (!preg_match("/^1[34578]\d{9}$/", $phone)) { + if (!preg_match("/^1[345789]\d{9}$/", $phone)) { echo json_encode(['status' => 0, 'msg' => '手机号格式不正确']); die; } From 74f88da23930483bd6b8ec9057190b30e35c6a18 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 24 Oct 2019 10:33:49 +0800 Subject: [PATCH 26/42] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->84?= =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=BC=80=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/PromoteController.class.php | 2 +- Application/Home/View/default/Public/promote_base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 10c8c8194..9f7aa6b64 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -38,7 +38,7 @@ class PromoteController extends BaseController $this->meta_title = "首页"; $loginPromote = $this->getLoginPromote(); - $whiteList = [1, 8]; + $whiteList = [1, 8, 84]; $isOpenQuery = in_array($loginPromote['id'], $whiteList) || in_array($loginPromote['parent_id'], $whiteList) || in_array($loginPromote['grand_id'], $whiteList) ? true : false; if (!$isOpenQuery) { diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index 0050c3781..1c5b7af27 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -48,7 +48,7 @@
From 736c0fd4320f8b54c11febd1e109f05970ce213c Mon Sep 17 00:00:00 2001 From: jbrazz <2436953959@qq.com> Date: Thu, 24 Oct 2019 10:46:17 +0800 Subject: [PATCH 27/42] fix --- .../Admin/Controller/AjaxController.class.php | 7 ++ .../Controller/MemberController.class.php | 28 +++++--- .../RechargeSumController.class.php | 32 +++++---- .../Controller/SpendController.class.php | 45 +++++++----- .../Admin/Controller/UserController.class.php | 5 ++ .../Admin/Model/PromoteModel.class.php | 17 +++++ Application/Admin/Model/SpendModel.class.php | 11 +-- Application/Admin/View/Member/user_info.html | 69 ++++++++++++++++--- .../Admin/View/RechargeSum/summation.html | 44 +++++++++++- Application/Admin/View/Spend/lists.html | 41 +++++++++++ Application/Admin/View/User/rolelist.html | 40 ++++++++++- 11 files changed, 275 insertions(+), 64 deletions(-) diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index b854f8b2d..ad020d72d 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -8,6 +8,8 @@ namespace Admin\Controller; +use Admin\Model\PromoteModel; + class AjaxController extends ThinkController{ /** @@ -125,4 +127,9 @@ class AjaxController extends ThinkController{ $this->AjaxReturn($return_msg); } } + + public function getPromotersByLevel($level=1) + { + $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevel($level)]); + } } \ No newline at end of file diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index b203db626..98f059052 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -19,9 +19,15 @@ class MemberController extends ThinkController if($_REQUEST['promote_id']=='UC'){ $maps['tab_user.promote_account'] = 'UC用户'; $hav .= "tab_user.promote_account = 'UC用户' "; - }else{ - $maps['tab_user.promote_id'] = I('promote_id'); - $hav .= "tab_user.promote_id = " . I('promote_id'); + } else if ($_REQUEST['promote_id']==0) { + $maps['tab_user.promote_id'] = 0; + $hav .= "tab_user.promote_id = 0"; + } else{ + $promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select(); + if ($promoter_ids) { + $maps['tab_user.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))]; + $hav .= "tab_user.promote_id in (".implode(',', array_column($promoter_ids, 'id')).") "; + } } } if(I('type',1) == 1){ @@ -56,8 +62,7 @@ class MemberController extends ThinkController $maps['tab_user.register_type'] = ['in',[0,3,4,5,6]]; } } - - + if (isset($_REQUEST['account'])) { empty($hav) || $hav .= ' AND '; $hav .= "tab_user.account like '%" . I('account') . "%'"; @@ -105,10 +110,10 @@ class MemberController extends ThinkController unset($_REQUEST['status']); } - if (isset($_REQUEST['viplevel'])) { - - $havs = get_vip_level_limit('recharge_total',$_REQUEST['viplevel']); - } + if (isset($_REQUEST['viplevel'])) { + + $havs = get_vip_level_limit('recharge_total',$_REQUEST['viplevel']); + } $page = intval($p); $page = $page ? $page : 1; //默认显示第一页数据 @@ -158,13 +163,13 @@ class MemberController extends ThinkController ->select(false); $data = $usermodel->table('('.$sql1.') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,(a.deposit_total+IFNULL(sum(ss.pay_amount),0)) as recharge_total,check_status') - ->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1') + ->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1') + ->join(isset($_REQUEST['game_id']) ? "tab_user_play as up on up.user_id = a.id and up.game_id = {$_REQUEST['game_id']} " : false) ->page($page, $row) ->having($havs) ->group('a.id') ->order($order) ->select(); - // var_dump($data);die; //计数 @@ -172,6 +177,7 @@ class MemberController extends ThinkController $sql = M('user', 'tab_')->field('tab_user.id,(IFNULL(sum(b.pay_amount),0) + IFNULL(sum(ss.pay_amount),0)) AS recharge_total') ->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1') ->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1') + ->join(isset($_REQUEST['game_id']) ? "tab_user_play as up on up.user_id = tab_user.id and up.game_id = {$_REQUEST['game_id']} " : false) ->where($map) ->group('tab_user.id') ->where($hav) diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php index 3f6518cfa..84eec8aa7 100644 --- a/Application/Admin/Controller/RechargeSumController.class.php +++ b/Application/Admin/Controller/RechargeSumController.class.php @@ -44,21 +44,23 @@ class RechargeSumController extends ThinkController{ $map['pay_way'] = array('egt',0); } - if(!empty($_REQUEST['promote_id']) && $_REQUEST['promote_id'] != "ALL"){ - switch ($_REQUEST['promote_id']) { - case 'GUANFANG': - $map['promote_id'] = 0; - $rmap['promote_id'] = 0; - break; - case 'PROMOTE': - $map['promote_id'] = array('neq',0); - $rmap['promote_id'] = array('neq',0); - break; - default: - $map['promote_id'] = $_REQUEST['promote_id']; - $rmap['promote_id'] = $_REQUEST['promote_id']; - break; - } + if(!empty($_REQUEST['promote_id'])){ + // switch ($_REQUEST['promote_id']) { + // case 'GUANFANG': + // $map['promote_id'] = 0; + // $rmap['promote_id'] = 0; + // break; + // case 'PROMOTE': + // $map['promote_id'] = array('neq',0); + // $rmap['promote_id'] = array('neq',0); + // break; + // default: + // $map['promote_id'] = $_REQUEST['promote_id']; + // $rmap['promote_id'] = $_REQUEST['promote_id']; + // break; + // } + $promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select(); + $promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null; } //当天注册人数 diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index 92b3067ca..c58167a3b 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -11,65 +11,72 @@ class SpendController extends ThinkController { const model_name = 'Spend'; public function lists(){ if(isset($_REQUEST['user_account'])){ - $map['user_account']=array('like','%'.trim($_REQUEST['user_account']).'%'); + $map['tab_spend.user_account']=array('like','%'.trim($_REQUEST['user_account']).'%'); unset($_REQUEST['user_account']); } if(isset($_REQUEST['spend_ip'])){ - $map['spend_ip']=array('like','%'.trim($_REQUEST['spend_ip']).'%'); + $map['tab_spend.spend_ip']=array('like','%'.trim($_REQUEST['spend_ip']).'%'); unset($_REQUEST['spend_ip']); } if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){ - $map['pay_time'] =array('BETWEEN',array(strtotime($_REQUEST['time-start']),strtotime($_REQUEST['time-end'])+24*60*60-1)); + $map['tab_spend.pay_time'] =array('BETWEEN',array(strtotime($_REQUEST['time-start']),strtotime($_REQUEST['time-end'])+24*60*60-1)); unset($_REQUEST['time-start']);unset($_REQUEST['time-end']); }elseif(isset($_REQUEST['time-start'])){ - $map['pay_time'] = ['GT',strtotime(I('time-start'))]; + $map['tab_spend.pay_time'] = ['GT',strtotime(I('time-start'))]; unset($_REQUEST['time-start']); }elseif(isset($_REQUEST['time-end'])){ - $map['pay_time'] = ['LT',strtotime(I('time-end'))+86399]; + $map['tab_spend.pay_time'] = ['LT',strtotime(I('time-end'))+86399]; unset($_REQUEST['time-end']); } if(isset($_REQUEST['start'])&&isset($_REQUEST['end'])){ - $map['pay_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1)); + $map['tab_spend.pay_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1)); unset($_REQUEST['start']);unset($_REQUEST['end']); }elseif(isset($_REQUEST['start'])){ - $map['pay_time'] = ['GT',strtotime(I('start'))]; + $map['tab_spend.pay_time'] = ['GT',strtotime(I('start'))]; unset($_REQUEST['start']); }elseif(isset($_REQUEST['end'])){ - $map['pay_time'] = ['LT',strtotime(I('end'))+86399]; + $map['tab_spend.pay_time'] = ['LT',strtotime(I('end'))+86399]; unset($_REQUEST['end']); } if(isset($_REQUEST['game_name'])){ if($_REQUEST['game_name']=='全部'){ unset($_REQUEST['game_name']); }else{ - $map['game_name']=$_REQUEST['game_name']; + $map['tab_spend.game_name']=$_REQUEST['game_name']; unset($_REQUEST['game_name']); } } if(isset($_REQUEST['server_name'])){ - $map['server_name']=$_REQUEST['server_name']; + $map['tab_spend.server_name']=$_REQUEST['server_name']; unset($_REQUEST['server_name']); } if(isset($_REQUEST['pay_order_number'])){ - $map['pay_order_number']=array('like','%'.trim($_REQUEST['pay_order_number']).'%'); + $map['tab_spend.pay_order_number']=array('like','%'.trim($_REQUEST['pay_order_number']).'%'); unset($_REQUEST['pay_order_number']); } if(isset($_REQUEST['pay_status'])){ - $map['pay_status']=$_REQUEST['pay_status']; + $map['tab_spend.pay_status']=$_REQUEST['pay_status']; unset($_REQUEST['pay_status']); } if(isset($_REQUEST['pay_way'])){ if($_REQUEST['pay_way']==2){ - $map['pay_way']=['in','2,3,4']; + $map['tab_spend.pay_way']=['in','2,3,4']; }else{ - $map['pay_way']=$_REQUEST['pay_way']; + $map['tab_spend.pay_way']=$_REQUEST['pay_way']; } unset($_REQUEST['pay_way']); } if(isset($_REQUEST['pay_game_status'])){ - $map['pay_game_status']=$_REQUEST['pay_game_status']; + $map['tab_spend.pay_game_status']=$_REQUEST['pay_game_status']; unset($_REQUEST['pay_game_status']); } + if(isset($_REQUEST['promote_id'])) { + $map['_complex'] = ['tp.parent_id'=>$_REQUEST['promote_id'], 'tp.grand_id'=>$_REQUEST['promote_id'], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or']; + $tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id"; + //unset($_REQUEST['promote_id']); + } else { + $tab_promote_join = false; + } if($_REQUEST['data_order']!=''){ $data_order=reset(explode(',',$_REQUEST['data_order'])); @@ -84,9 +91,9 @@ class SpendController extends ThinkController { $map1=$map; $map1['pay_status']=1; - $total=null_to_0(D(self::model_name)->where($map1)->sum('pay_amount')); - $ttotal=null_to_0(D(self::model_name)->where('pay_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount')); - $ytotal=null_to_0(D(self::model_name)->where('pay_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount')); + $total=null_to_0(D(self::model_name)->where($map1)->join($tab_promote_join)->sum('pay_amount')); + $ttotal=null_to_0(D(self::model_name)->where('pay_time'.total(1))->where(array('pay_status'=>1))->join($tab_promote_join)->sum('pay_amount')); + $ytotal=null_to_0(D(self::model_name)->where('pay_time'.total(5))->where(array('pay_status'=>1))->join($tab_promote_join)->sum('pay_amount')); $this->assign('total',$total); $this->assign('ttotal',$ttotal); $this->assign('ytotal',$ytotal); @@ -104,6 +111,6 @@ class SpendController extends ThinkController { $this->assign('_page',$data['page']); $this->display(); - } + } diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index b9b8ff816..aec80c71f 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -569,6 +569,11 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){ $map['role_name'] = trim($_REQUEST['role_name']); unset($_REQUEST['role_name']); } + if (isset($_REQUEST['promote_id'])) { + $promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select(); + $promoter_ids ? $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null; + + } empty(I('user_account')) || $map['user_account'] = ['like',"%".I('user_account')."%"]; $list = $this->lists(M('user_play_info', 'tab_'), $map, 'play_time desc'); $this->assign('list', $list); diff --git a/Application/Admin/Model/PromoteModel.class.php b/Application/Admin/Model/PromoteModel.class.php index 379fa42ee..a12fecfa6 100644 --- a/Application/Admin/Model/PromoteModel.class.php +++ b/Application/Admin/Model/PromoteModel.class.php @@ -371,4 +371,21 @@ class PromoteModel extends Model{ return $user; } + + public function getPromotersByLevel($level=1) + { + $result = []; + switch ($level) { + case 1: // 会长 + $result = $this->field("id, nickname")->where("grand_id = 0 and parent_id = 0")->select(); + break; + case 2: // 组长 + $result = $this->field("id, nickname")->where("grand_id = 0 and parent_id > 0")->select(); + break; + case 3: //组员 + $result = $this->field("id, nickname")->where("parent_id > 0 and grand_id > 0")->select(); + break; + } + return $result; + } } \ No newline at end of file diff --git a/Application/Admin/Model/SpendModel.class.php b/Application/Admin/Model/SpendModel.class.php index 5f03bb50f..bfb91151c 100644 --- a/Application/Admin/Model/SpendModel.class.php +++ b/Application/Admin/Model/SpendModel.class.php @@ -720,14 +720,14 @@ protected function _after_select(&$result,$options){ } else { $row = 10; } - - $list = $this->field($field?:true) + $list = $this->field("tab_spend.*") + ->join("left join tab_promote as tp on tp.id = tab_spend.promote_id") ->where($map) ->page($page, $row) - ->order($order?$order:'pay_time desc') + ->order($order?$order:'tab_spend.pay_time desc') ->select(); - $count = $this->where($map)->count(); + $count = $this->where($map)->join("left join tab_promote as tp on tp.id = tab_spend.promote_id")->count(); $data['data'] = $list; @@ -738,6 +738,7 @@ protected function _after_select(&$result,$options){ } return $data; - } + } + } diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index 9dbf16d59..5bb75a9ad 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -73,7 +73,7 @@
-
+
@@ -103,15 +103,38 @@
-
- -
+
+ +
+
+ +
+
+ + - +
+
+ +
@@ -375,6 +398,30 @@ $(function(){ autoclose:true, pickerPosition:'bottom-left' }) + var promote_id = "{:I('promote_id')}"; + $("#promote_level").change(function(){ + $.ajax({ + url:"{:U('Ajax/getPromotersByLevel')}", + type:"get", + data:{level:$("#promote_level option:selected").val()}, + dataType:'json', + success:function(response){ + str = ''; + // $.each(response.data, function(index, item){ + // console.log(item.id); + // str += ''; + // }); + data = response.data; + for (var i in data){ + str += "" + } + $("#promote_id").empty(); + $("#promote_id").append(str); + $("#promote_id").select2(); + } + }) + }); + $("#promote_level").change(); }) function shenhe(){ var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) { diff --git a/Application/Admin/View/RechargeSum/summation.html b/Application/Admin/View/RechargeSum/summation.html index f565d0e41..51ee0b684 100644 --- a/Application/Admin/View/RechargeSum/summation.html +++ b/Application/Admin/View/RechargeSum/summation.html @@ -55,7 +55,7 @@
-
+
+
+ + - +
+
+ +
@@ -268,6 +282,32 @@ $(function(){ autoclose: true, pickerPosition: 'bottom-left' }) + + var promote_id = "{:I('promote_id')}"; + console.log(promote_id); + $("#promote_level").change(function(){ + $.ajax({ + url:"{:U('Ajax/getPromotersByLevel')}", + type:"get", + data:{level:$("#promote_level option:selected").val()}, + dataType:'json', + success:function(response){ + str = ""; + // $.each(response.data, function(index, item){ + // console.log(item.id); + // str += ''; + // }); + data = response.data; + for (var i in data){ + str += "" + } + $("#promote_id").empty(); + $("#promote_id").append(str); + $("#promote_id").select2(); + } + }) + }); + $("#promote_level").change(); }) diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index e4c2e2aad..b160f7f19 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -96,6 +96,20 @@
+
+
+ + - +
+
+ +
@@ -463,6 +477,33 @@ } }) }); + + var promote_id = "{:I('promote_id')}"; + console.log(promote_id); + $("#promote_level").change(function(){ + $.ajax({ + url:"{:U('Ajax/getPromotersByLevel')}", + type:"get", + data:{level:$("#promote_level option:selected").val()}, + dataType:'json', + success:function(response){ + str = ""; + // $.each(response.data, function(index, item){ + // console.log(item.id); + // str += ''; + // }); + data = response.data; + for (var i in data){ + str += "" + } + $("#promote_id").empty(); + $("#promote_id").append(str); + $("#promote_id").select2(); + } + }) + }); + $("#promote_level").change(); + var game_id = "{:I('game_name')}"; var game_server = "{:I('server_name')}"; if(game_id){ diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index a6b8e04ab..b5b65bc90 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -69,7 +69,21 @@
- +
+ + - +
+
+ +
@@ -224,5 +238,29 @@ $(".select_gallery").select2(); } }) } + var promote_id = "{:I('promote_id')}"; + $("#promote_level").change(function(){ + $.ajax({ + url:"{:U('Ajax/getPromotersByLevel')}", + type:"get", + data:{level:$("#promote_level option:selected").val()}, + dataType:'json', + success:function(response){ + str = ''; + // $.each(response.data, function(index, item){ + // console.log(item.id); + // str += ''; + // }); + data = response.data; + for (var i in data){ + str += "" + } + $("#promote_id").empty(); + $("#promote_id").append(str); + $("#promote_id").select2(); + } + }) + }); + $("#promote_level").change(); From c6da6fb7057d4d0eb526753634e4249b6e670c02 Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 24 Oct 2019 13:27:36 +0800 Subject: [PATCH 28/42] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=85=85=E5=80=BC=E4=BF=A1=E6=81=AF=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/TestResource/index.html | 2 - .../Admin/View/TestResource/lists.html | 2 - .../View/TestResource/protectLogList.html | 2 - .../View/TestResource/supportNumberList.html | 2 - .../Controller/PromoteController.class.php | 170 ++++++++++++++++-- .../Home/View/default/Promote/index.html | 16 +- 6 files changed, 165 insertions(+), 29 deletions(-) diff --git a/Application/Admin/View/TestResource/index.html b/Application/Admin/View/TestResource/index.html index 626ac4211..72d2a6bec 100644 --- a/Application/Admin/View/TestResource/index.html +++ b/Application/Admin/View/TestResource/index.html @@ -184,8 +184,6 @@ Think.setValue('{$key}',"{$vo}"); - $('.side-sub-menu').eq(0).show(); - $(".select_gallery").select2(); - - -
-
- 推荐产品 - +更多 -
-
-
- - -
-
-
- -