From da37c19c3faacd543a08bf67aae966eafa53874f Mon Sep 17 00:00:00 2001 From: leo <342377760@qq.com> Date: Thu, 28 Oct 2021 14:06:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?=E6=9C=80=E4=BD=8E=E5=85=85=E5=80=BC=E9=87=91=E9=A2=9D=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Base.php | 2 +- application/admin/controller/Groups.php | 3 +++ application/admin/view/groups/editgroup.html | 8 ++++++++ application/admin/view/groups/index.html | 1 + application/api/controller/Game.php | 3 +++ application/service/controller/Base.php | 4 ++-- server/modules/api/controller/ChatLogic.php | 2 +- 7 files changed, 19 insertions(+), 4 deletions(-) diff --git a/application/admin/controller/Base.php b/application/admin/controller/Base.php index 6184295..e32833b 100644 --- a/application/admin/controller/Base.php +++ b/application/admin/controller/Base.php @@ -80,7 +80,7 @@ class Base extends Controller // $this->redirect(APP_PATH . '404.html'); $this->nullSession(); - echo ""; + echo ""; return; } diff --git a/application/admin/controller/Groups.php b/application/admin/controller/Groups.php index 585da6f..a920b08 100644 --- a/application/admin/controller/Groups.php +++ b/application/admin/controller/Groups.php @@ -128,6 +128,9 @@ class Groups extends Base if(!empty($has)){ return json(['code' => -1, 'data' => '', 'msg' => '该平台已经存在']); } + if ($param['min_recharge_amount'] < 0) { + return json(['code' => -1, 'data' => '', 'msg' => '最低充值金额不能小于 0']); + } try{ $group = $gdb->where('id', $param['id'])->find(); diff --git a/application/admin/view/groups/editgroup.html b/application/admin/view/groups/editgroup.html index 2fa08ba..2129888 100644 --- a/application/admin/view/groups/editgroup.html +++ b/application/admin/view/groups/editgroup.html @@ -93,6 +93,14 @@ +
+ +
+ + +
+
+
diff --git a/application/admin/view/groups/index.html b/application/admin/view/groups/index.html index f72b98a..2f25e11 100644 --- a/application/admin/view/groups/index.html +++ b/application/admin/view/groups/index.html @@ -44,6 +44,7 @@ 充值余额 充值赠送类型 充值赠送值 + 玩家最低充值金额(分) 平台状态 操作 diff --git a/application/api/controller/Game.php b/application/api/controller/Game.php index 783ce26..044d382 100644 --- a/application/api/controller/Game.php +++ b/application/api/controller/Game.php @@ -115,12 +115,15 @@ class Game extends Base 'recharge_gift_type' => isset($group['recharge_gift_type']) ? $group['recharge_gift_type'] : 0, 'recharge_gift_value' => isset($group['recharge_gift_value']) ? $group['recharge_gift_value'] : 0, ]; + // 玩家最低充值金额(分) + $min_recharge_amount = isset($group['recharge_gift_value']) ? $group['recharge_gift_value'] : 0; $data = [ 'code' => 200, 'msg' => '获取成功.', 'data' => $kfList ? $kfList : [], 'recharge_gift' => $recharge_gift, + 'min_recharge_amount' => $min_recharge_amount, ]; return json($data); diff --git a/application/service/controller/Base.php b/application/service/controller/Base.php index e51ba9b..c8635c7 100644 --- a/application/service/controller/Base.php +++ b/application/service/controller/Base.php @@ -35,7 +35,7 @@ class Base extends Controller // $this->redirect(APP_PATH . '404.html'); $this->nullSession(); - echo ""; + echo ""; return; } @@ -161,7 +161,7 @@ class Base extends Controller { $ga = new GoogleAuthenticator(); $key = $ga->createSecret($this->googleAuthSecretLength); - $content = $ga->getQrContent($this->request->host(),$key,session('l_user_name').'['.date('Y-m-d H:i:s').']'); + $content = $ga->getQrContent($this->request->host(),$key,session('l_user_id').'['.date('Y-m-d H:i:s').']'); if (isset($key)){ return json(['code' => 1, 'key' => $key, 'qrcode_url' => $content, 'msg' => '获取成功']); } diff --git a/server/modules/api/controller/ChatLogic.php b/server/modules/api/controller/ChatLogic.php index e5d21d4..a0d119b 100644 --- a/server/modules/api/controller/ChatLogic.php +++ b/server/modules/api/controller/ChatLogic.php @@ -452,7 +452,7 @@ class ChatLogic extends Base public function chat() { try { - $content = self::$_requestParam['param']['content']; + $content = htmlspecialchars(self::$_requestParam['param']['content']); $contentType = empty(self::$_requestParam['param']['content_type']) ? "" : self::$_requestParam['param']['content_type']; $kfType = '';