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( diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index 2edaccbc..c30a8a86 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://") { @@ -97,13 +107,16 @@ class GameController extends BaseController{ } } - + + if ($game['kefu_qq_type'] == 1) { + $contact_cs[$k]['act'] = ""; + $contact_cs[$k]['ios_url'] = ""; + } array_multisort(array_column($contact_cs,'sort'),SORT_ASC,$menus); - $ret = [ + + $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'],