From 44e2cdfc46d5ab34daff661b494b939f52ffd6ba Mon Sep 17 00:00:00 2001 From: tping Date: Wed, 25 Nov 2020 17:28:31 +0800 Subject: [PATCH 1/5] =?UTF-8?q?1126=20=E5=AE=A2=E6=9C=8DQQ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/GameController.class.php | 24 +++++++++++++------ .../Sdk/Controller/NoticeController.class.php | 12 ++++++++++ .../Sdk/Controller/UserController.class.php | 4 ++++ 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index 2edaccbc..a4072737 100644 --- a/Application/Sdk/Controller/GameController.class.php +++ b/Application/Sdk/Controller/GameController.class.php @@ -40,14 +40,24 @@ class GameController extends BaseController{ public function init_sdk() { $data = json_decode(base64_decode(file_get_contents("php://input")), true); - /* if (I('debug') == 1) { - $data['user_id'] = 1; - $data['sdk_version'] = 2; - } */ + + $game = M('game', 'tab_')->where([ + 'id' => $data['game_id'] + ])->order('sort desc')->find(); $contact_cs = M('tool','tab_')->where(['name' => 'contact_cs'])->find(); $contact_cs = json_decode($contact_cs['config'],true); foreach($contact_cs as $k => &$v) { + if ($game['kefu_qq_type'] == 0) + $kefuQQ = C('APP_QQ'); + if ($game['kefu_qq_type'] == 1) + $kefuQQ = ''; + if ($game['kefu_qq_type'] == 2) + $kefuQQ = $game['kefu_qq']; + + $contact_cs[$k]['act'] = $kefuQQ; + $contact_cs[$k]['ios_url'] = $kefuQQ; + $contact_cs[$k]['icon'] = C('ADMIN_DOMAIN') . $contact_cs[$k]['icon']; // if (substr($contact_cs[$k]['url'], 0, 7) == "http://" || substr($contact_cs[$k]['url'], 0, 8) == "https://") { @@ -99,11 +109,11 @@ class GameController extends BaseController{ } array_multisort(array_column($contact_cs,'sort'),SORT_ASC,$menus); - $ret = [ + $contact_cs[$k]['act'] = "mqq://im/chat?chat_type=wpa&uin=" . "123456456" . "&version=1&src_type=web"; + + $ret = [ 'contact_cs' => $contact_cs[$k], ]; - /* if (I('debug') == 1) - pp(($ret)); */ re_msg(200,'获取成功',$ret); } diff --git a/Application/Sdk/Controller/NoticeController.class.php b/Application/Sdk/Controller/NoticeController.class.php index 7a788f5c..9a4c7378 100644 --- a/Application/Sdk/Controller/NoticeController.class.php +++ b/Application/Sdk/Controller/NoticeController.class.php @@ -408,6 +408,18 @@ class NoticeController extends BaseController{ $data['QQ_GROUP_KEY'] = C('QQ_GROUP_KEY'); $data['APP_QQ_GROUP'] = C('APP_QQ_GROUP'); $data['APP_EMAIL'] = C('APP_EMAIL'); + + $game = M('game', 'tab_')->where([ + 'id' => $request['game_id'] + ])->order('sort desc')->find(); + + if ($game['kefu_qq_type'] == 0) + $data['APP_QQ'] = C('APP_QQ'); + if ($game['kefu_qq_type'] == 1) + $data['APP_QQ'] = ''; + if ($game['kefu_qq_type'] == 2) + $data['APP_QQ'] = $game['kefu_qq']; + // 魔幻游戏 隐藏客服 if ($request['game_id'] == 197 || $request['game_id'] == 198 || $request['game_id'] == 201 || $request['game_id'] == 202 // 马踏乱世 diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index a3ad8ea9..63381927 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -2935,6 +2935,10 @@ class UserController extends BaseController $request = json_decode(base64_decode(file_get_contents("php://input")), true); + if (!isset($request['unique_code'])) { + $this -> new_set_message(200, "", []); + } + $device_record = M('device_record', 'tab_'); $map = array( 'unique_code' => $request['unique_code'], From 60d8fc655dc869d425fa46b607a887252bdd707d Mon Sep 17 00:00:00 2001 From: tping Date: Wed, 25 Nov 2020 17:40:31 +0800 Subject: [PATCH 2/5] =?UTF-8?q?1126=20=E5=AE=A2=E6=9C=8DQQ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/GameController.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index a4072737..3c1fa8d8 100644 --- a/Application/Sdk/Controller/GameController.class.php +++ b/Application/Sdk/Controller/GameController.class.php @@ -109,7 +109,6 @@ class GameController extends BaseController{ } array_multisort(array_column($contact_cs,'sort'),SORT_ASC,$menus); - $contact_cs[$k]['act'] = "mqq://im/chat?chat_type=wpa&uin=" . "123456456" . "&version=1&src_type=web"; $ret = [ 'contact_cs' => $contact_cs[$k], From 5bfcb77aea48c7f0ddb91c6bad29911892840101 Mon Sep 17 00:00:00 2001 From: tping Date: Thu, 26 Nov 2020 14:21:28 +0800 Subject: [PATCH 3/5] =?UTF-8?q?1126=20=E5=AE=A2=E6=9C=8DQQ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/GameController.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index 3c1fa8d8..13a66c8d 100644 --- a/Application/Sdk/Controller/GameController.class.php +++ b/Application/Sdk/Controller/GameController.class.php @@ -102,12 +102,16 @@ class GameController extends BaseController{ $contact_cs[$k]['act'] = ""; $contact_cs[$k]['type'] = -1; // IOS - $contact_cs[$k]['ios_url'] = ""; + $contact_cs[$k]['act'] = ""; } } } - + + if ($game['kefu_qq_type'] == 1) { + $contact_cs[$k]['act'] = ""; + $contact_cs[$k]['act'] = ""; + } array_multisort(array_column($contact_cs,'sort'),SORT_ASC,$menus); $ret = [ From 08d7cf766edea21dd91ce44f6a8efed4a9af3e02 Mon Sep 17 00:00:00 2001 From: tping Date: Thu, 26 Nov 2020 14:36:35 +0800 Subject: [PATCH 4/5] =?UTF-8?q?1126=20=E5=AE=A2=E6=9C=8DQQ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/GameController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index 13a66c8d..c30a8a86 100644 --- a/Application/Sdk/Controller/GameController.class.php +++ b/Application/Sdk/Controller/GameController.class.php @@ -102,7 +102,7 @@ class GameController extends BaseController{ $contact_cs[$k]['act'] = ""; $contact_cs[$k]['type'] = -1; // IOS - $contact_cs[$k]['act'] = ""; + $contact_cs[$k]['ios_url'] = ""; } } @@ -110,7 +110,7 @@ class GameController extends BaseController{ if ($game['kefu_qq_type'] == 1) { $contact_cs[$k]['act'] = ""; - $contact_cs[$k]['act'] = ""; + $contact_cs[$k]['ios_url'] = ""; } array_multisort(array_column($contact_cs,'sort'),SORT_ASC,$menus); From a04266b476102b98c70d3e03054a44c1bf54a4a9 Mon Sep 17 00:00:00 2001 From: tping Date: Fri, 27 Nov 2020 13:55:59 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=80=9A=E7=9F=A5=20?= =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=82=B9=E5=90=8E=E9=9D=A2.00?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Api/GameApi.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Application/Common/Api/GameApi.class.php b/Application/Common/Api/GameApi.class.php index f8a4e249..016b219c 100644 --- a/Application/Common/Api/GameApi.class.php +++ b/Application/Common/Api/GameApi.class.php @@ -49,6 +49,7 @@ class GameApi { if (isset($pay_data['deduction_amount']) && $pay_data['deduction_amount'] > 0) { $pay_data['cost'] += $pay_data['deduction_amount']; } + $pay_data['cost'] = number_format($pay_data['cost'], 2, '.', ''); $md5_sign = md5($pay_data['pay_order_number'].$pay_data['cost']."1".$pay_data['extend'].$game_data['game_key']); $data = array(