|
|
@ -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);
|
|
|
|
$ret = [
|
|
|
|
$contact_cs[$k]['act'] = "mqq://im/chat?chat_type=wpa&uin=" . "123456456" . "&version=1&src_type=web";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$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);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|