悬浮窗菜单链接

master
zhanglingsheng 5 years ago
parent 4f9ab4b816
commit 479f968940

@ -145,15 +145,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);
if (!isset($data['api_ver']) || $data['api_ver'] != 2) { if (!isset($data['api_ver']) || $data['api_ver'] != 2) {
$this->get_suspend_1(); $this->get_suspend_1();
return ; return ;
} }
if (I('debug') == 1) { // if (I('debug') == 1) {
$data['user_id'] = 1; // $data['user_id'] = 1;
$data['sdk_version'] = 2; // $data['sdk_version'] = 2;
} // }
if(empty($data['user_id'])) { if(empty($data['user_id'])) {
re_msg(1004, 'fail', '用户不存在'); re_msg(1004, 'fail', '用户不存在');
@ -191,8 +190,8 @@ class GameController extends BaseController{
if ($data['sdk_version'] == 1 && $menus[$k]['name'] == 'suppersign'){ if ($data['sdk_version'] == 1 && $menus[$k]['name'] == 'suppersign'){
unset($menus[$k]); unset($menus[$k]);
}elseif($data['sdk_version'] != 1 && $v['name'] == 'suppersign'){ }elseif($data['sdk_version'] != 1 && $v['name'] == 'suppersign'){
$menus[$k]['url'] = C('H5_DOMAIN') . $v['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'] = C('H5_DOMAIN') . $v['ios_url'] . '/user_token/' . $user['user_token']; $menus[$k]['ios_url'] = $v['ios_url'] . '/user_token/' . $user['user_token'] . "/game_id/". $data['game_id'];
}elseif($v['name'] == 'balance'){ }elseif($v['name'] == 'balance'){
$str = urlencode("余额"); $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; $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'){ if ($data['sdk_version'] == 1 && $personalMenu[$k]['name'] == 'suppersign'){
unset($personalMenu[$k]); unset($personalMenu[$k]);
}elseif($data['sdk_version'] != 1 && $v['name'] == 'suppersign'){ }elseif($data['sdk_version'] != 1 && $v['name'] == 'suppersign'){
$personalMenu[$k]['url'] = C('H5_DOMAIN') . $v['url'] . 'user_token/' . $user['user_token']; // $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]['ios_url'] = $v['ios_url'] . '/user_token/' . $user['user_token'] . "/game_id/".$data['game_id'];
}elseif($v['name'] == 'balance'){ }elseif($v['name'] == 'balance'){
$str = urlencode("余额"); $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; $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, 'menus' => $menusArr,
'mine_features' => $personalMenuArr, 'mine_features' => $personalMenuArr,
]; ];
if (I('debug') == 1) // if (I('debug') == 1)
pp(($ret)); // pp(($ret));
re_msg(200,'获取成功',$ret); re_msg(200,'获取成功',$ret);
} }

Loading…
Cancel
Save