|
|
@ -42,12 +42,14 @@ class GameController extends BaseController{
|
|
|
|
public function get_suspend(){
|
|
|
|
public function get_suspend(){
|
|
|
|
$data = json_decode(base64_decode(file_get_contents("php://input"),true));
|
|
|
|
$data = json_decode(base64_decode(file_get_contents("php://input"),true));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$data['user_id'] = 1;
|
|
|
|
$user_token = M('User','tab_')->where(['id' => $data['user_id']])->getField('user_token');
|
|
|
|
if(empty($data['user_id'])) {
|
|
|
|
|
|
|
|
re_msg(1004, 'fail', '用户不存在');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$user_token = M('user','tab_')->where(['id' => $data['user_id']])->getField('user_token');
|
|
|
|
|
|
|
|
|
|
|
|
if(empty($data['user_id']) || empty($user_token))
|
|
|
|
if (!$user_token) {
|
|
|
|
{
|
|
|
|
re_msg(1004, 'fail', '数据有误');
|
|
|
|
re_msg(1004,'fail','用户不存在');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$sdkMenus = M('tool','tab_')->where(['name' => 'sdk_menu'])->find();
|
|
|
|
$sdkMenus = M('tool','tab_')->where(['name' => 'sdk_menu'])->find();
|
|
|
|
$menus = json_decode($sdkMenus['config'],true);
|
|
|
|
$menus = json_decode($sdkMenus['config'],true);
|
|
|
@ -55,14 +57,13 @@ class GameController extends BaseController{
|
|
|
|
foreach($menus as $k => $v)
|
|
|
|
foreach($menus as $k => $v)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$menus[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon'];
|
|
|
|
$menus[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon'];
|
|
|
|
$menus[$k]['url'] = $v['icon'] . '/user_token' . $user_token;
|
|
|
|
$menus[$k]['url'] = $v['url'] . '/user_token/' . $user_token;
|
|
|
|
unset($menus[$k]['ios_url']);
|
|
|
|
if ($menus[$k]['type'] == 1)
|
|
|
|
}
|
|
|
|
$menus[$k]['ios_url'] = "?action=".$menus[$k]['name'];
|
|
|
|
foreach($menus_item as $k => $v)
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$menus[$k]['ios_url'] = $menus[$k]['url']."?action=push";
|
|
|
|
$menus_item[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon'];
|
|
|
|
|
|
|
|
$menus_item[$k]['url'] = $v['icon'] . '/user_token' . $user_token;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
array_multisort(array_column($menus,'sort'),SORT_ASC,$menus);
|
|
|
|
array_multisort(array_column($menus,'sort'),SORT_ASC,$menus);
|
|
|
|
|
|
|
|
|
|
|
|
$ball_status = M('config','sys_')->where(['name' => 'WAP_SUSPEND_SHWO_STATUS'])->getField('value');
|
|
|
|
$ball_status = M('config','sys_')->where(['name' => 'WAP_SUSPEND_SHWO_STATUS'])->getField('value');
|
|
|
@ -80,6 +81,7 @@ class GameController extends BaseController{
|
|
|
|
'menus' => $menus,
|
|
|
|
'menus' => $menus,
|
|
|
|
'menus_item' => $menus_item,
|
|
|
|
'menus_item' => $menus_item,
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
// pp($data);
|
|
|
|
re_msg(200,'获取成功',$data);
|
|
|
|
re_msg(200,'获取成功',$data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//获取游戏域名
|
|
|
|
//获取游戏域名
|
|
|
|