悬浮窗菜单链接

master
zhanglingsheng 5 years ago
parent 4f9ab4b816
commit 479f968940

@ -145,15 +145,14 @@ class GameController extends BaseController{
*/
public function get_suspend(){
$data = json_decode(base64_decode(file_get_contents("php://input")), true);
if (!isset($data['api_ver']) || $data['api_ver'] != 2) {
$this->get_suspend_1();
return ;
}
if (I('debug') == 1) {
$data['user_id'] = 1;
$data['sdk_version'] = 2;
}
// if (I('debug') == 1) {
// $data['user_id'] = 1;
// $data['sdk_version'] = 2;
// }
if(empty($data['user_id'])) {
re_msg(1004, 'fail', '用户不存在');
@ -191,8 +190,8 @@ class GameController extends BaseController{
if ($data['sdk_version'] == 1 && $menus[$k]['name'] == 'suppersign'){
unset($menus[$k]);
}elseif($data['sdk_version'] != 1 && $v['name'] == 'suppersign'){
$menus[$k]['url'] = C('H5_DOMAIN') . $v['url'] . '/user_token/' . $user['user_token'];
$menus[$k]['ios_url'] = C('H5_DOMAIN') . $v['ios_url'] . '/user_token/' . $user['user_token'];
// $menus[$k]['url'] = $v['url'] . '/user_token/' . $user['user_token'] . "/game_id/". $data['game_id'];
$menus[$k]['ios_url'] = $v['ios_url'] . '/user_token/' . $user['user_token'] . "/game_id/". $data['game_id'];
}elseif($v['name'] == 'balance'){
$str = urlencode("余额");
$menus[$k]['ios_url'] = C('H5_DOMAIN') . $v['ios_url'] . '/user_token/' . $user['user_token']."/game_id/".$data['game_id'].'/sdk_version/'.$data['sdk_version'].'/api_ver/2' . '?action=pay&nav_title=' . $str;
@ -228,8 +227,8 @@ class GameController extends BaseController{
if ($data['sdk_version'] == 1 && $personalMenu[$k]['name'] == 'suppersign'){
unset($personalMenu[$k]);
}elseif($data['sdk_version'] != 1 && $v['name'] == 'suppersign'){
$personalMenu[$k]['url'] = C('H5_DOMAIN') . $v['url'] . 'user_token/' . $user['user_token'];
$personalMenu[$k]['ios_url'] = C('H5_DOMAIN') . $v['ios_url'] . '/user_token/' . $user['user_token'];
// $personalMenu[$k]['url'] = C('H5_DOMAIN') . $v['url'] . 'user_token/' . $user['user_token'];
$personalMenu[$k]['ios_url'] = $v['ios_url'] . '/user_token/' . $user['user_token'] . "/game_id/".$data['game_id'];
}elseif($v['name'] == 'balance'){
$str = urlencode("余额");
$personalMenu[$k]['ios_url'] = C('H5_DOMAIN') . $v['ios_url'] . '/user_token/' . $user['user_token']."/game_id/".$data['game_id'].'/sdk_version/'.$data['sdk_version'].'/api_ver/2' . '?action=pay&nav_title=' . $str;
@ -265,8 +264,8 @@ class GameController extends BaseController{
'menus' => $menusArr,
'mine_features' => $personalMenuArr,
];
if (I('debug') == 1)
pp(($ret));
// if (I('debug') == 1)
// pp(($ret));
re_msg(200,'获取成功',$ret);
}

Loading…
Cancel
Save