1126 客服QQ

master
tping 4 years ago
parent 6dd525339e
commit 44e2cdfc46

@ -40,14 +40,24 @@ class GameController extends BaseController{
public function init_sdk() { public function init_sdk() {
$data = json_decode(base64_decode(file_get_contents("php://input")), true); $data = json_decode(base64_decode(file_get_contents("php://input")), true);
/* if (I('debug') == 1) {
$data['user_id'] = 1; $game = M('game', 'tab_')->where([
$data['sdk_version'] = 2; 'id' => $data['game_id']
} */ ])->order('sort desc')->find();
$contact_cs = M('tool','tab_')->where(['name' => 'contact_cs'])->find(); $contact_cs = M('tool','tab_')->where(['name' => 'contact_cs'])->find();
$contact_cs = json_decode($contact_cs['config'],true); $contact_cs = json_decode($contact_cs['config'],true);
foreach($contact_cs as $k => &$v) { 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']; $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://") { 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); 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 = [ $ret = [
'contact_cs' => $contact_cs[$k], 'contact_cs' => $contact_cs[$k],
]; ];
/* if (I('debug') == 1)
pp(($ret)); */
re_msg(200,'获取成功',$ret); re_msg(200,'获取成功',$ret);
} }

@ -408,6 +408,18 @@ class NoticeController extends BaseController{
$data['QQ_GROUP_KEY'] = C('QQ_GROUP_KEY'); $data['QQ_GROUP_KEY'] = C('QQ_GROUP_KEY');
$data['APP_QQ_GROUP'] = C('APP_QQ_GROUP'); $data['APP_QQ_GROUP'] = C('APP_QQ_GROUP');
$data['APP_EMAIL'] = C('APP_EMAIL'); $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 if ($request['game_id'] == 197 || $request['game_id'] == 198
|| $request['game_id'] == 201 || $request['game_id'] == 202 // 马踏乱世 || $request['game_id'] == 201 || $request['game_id'] == 202 // 马踏乱世

@ -2935,6 +2935,10 @@ class UserController extends BaseController
$request = json_decode(base64_decode(file_get_contents("php://input")), true); $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_'); $device_record = M('device_record', 'tab_');
$map = array( $map = array(
'unique_code' => $request['unique_code'], 'unique_code' => $request['unique_code'],

Loading…
Cancel
Save