测试白名单+TF包 不显示相关

master
tping 4 years ago
parent 971e9219c0
commit 8fa93eb480

@ -160,20 +160,21 @@ class GameController extends BaseController{
$this->get_suspend_1(); $this->get_suspend_1();
return ; return ;
} }
// if (I('debug') == 1) {
// $data['user_id'] = 1;
// $data['sdk_version'] = 2;
// }
// 美国IP 贝塔版 // 美国IP 贝塔版
$ip = get_client_ip(); $ip = get_client_ip();
$isUSIP = ip_is_country($ip); $isUSIP = ip_is_country($ip);
// $isUSIP = false;
// var_dump($isUSIP);
if(empty($data['user_id'])) { if(empty($data['user_id'])) {
re_msg(1004, 'fail', '用户不存在'); re_msg(1004, 'fail', '用户不存在');
} }
// 测试白名单用户一定走内购支付
$testWhite = M('forbit_ip', 'tab_')->where([
'user_id' => $data['user_id'],
'type' => 2
])->find();
$user = M('user','tab_')->field('account,balance')->where(['id' => $data['user_id']])->find(); $user = M('user','tab_')->field('account,balance')->where(['id' => $data['user_id']])->find();
$user['user_token'] = $data['user_token']; $user['user_token'] = $data['user_token'];
if (!$user['user_token']) { if (!$user['user_token']) {
@ -213,7 +214,14 @@ class GameController extends BaseController{
// var_dump($isUSIP); // var_dump($isUSIP);
//判断是否开启苹果内购beta包美国ip且是否在白名单当中 //判断是否开启苹果内购beta包美国ip且是否在白名单当中
if (isset($data['app_type']) && $data['app_type'] == 2 && $isUSIP) { if (isset($data['app_type']) && $data['app_type'] == 2 && $isUSIP) {
if ($v['name'] == 'gift' || $v['name'] == 'suppersign') {
unset($menus[$k]);
continue;
}
}
// 测试白名单用户不显示
if (isset($data['app_type']) && $data['app_type'] == 2 && $testWhite) {
if ($v['name'] == 'gift' || $v['name'] == 'suppersign') { if ($v['name'] == 'gift' || $v['name'] == 'suppersign') {
unset($menus[$k]); unset($menus[$k]);
continue; continue;
@ -280,6 +288,14 @@ class GameController extends BaseController{
} }
} }
// 测试白名单用户不显示
if (isset($data['app_type']) && $data['app_type'] == 2 && $testWhite) {
if ($v['name'] == 'gift' || $v['name'] == 'balance') {
unset($personalMenu[$k]);
continue;
}
}
if (isset($data['app_type']) && $data['app_type'] == 2 && $isUSIP) { if (isset($data['app_type']) && $data['app_type'] == 2 && $isUSIP) {
if ($v['name'] == 'gift' || $v['name'] == 'balance') { if ($v['name'] == 'gift' || $v['name'] == 'balance') {
unset($personalMenu[$k]); unset($personalMenu[$k]);
@ -288,9 +304,7 @@ class GameController extends BaseController{
} }
//测试账号苹果审核 //测试账号苹果审核
$personalMenu[$k]['icon'] = (substr($v['icon'], 0, 7) == "http://" || substr($v['icon'], 0, 8) == "https://" ) ? $v['icon'] : $personalMenu[$k]['icon'] = (substr($v['icon'], 0, 7) == "http://" || substr($v['icon'], 0, 8) == "https://" ) ? $v['icon'] : C('ADMIN_DOMAIN') . $v['icon'];
C('ADMIN_DOMAIN') . $v['icon'];
// die;
if($v['type'] != 3){ if($v['type'] != 3){
if (substr($personalMenu[$k]['url'], 0, 7) == "http://" || substr($personalMenu[$k]['url'], 0, 8) == "https://") { if (substr($personalMenu[$k]['url'], 0, 7) == "http://" || substr($personalMenu[$k]['url'], 0, 8) == "https://") {
$personalMenu[$k]['url'] = $personalMenu[$k]['url'] . '/user_token/' . $user['user_token']."/game_id/".$data['game_id'].'/sdk_version/'.$data['sdk_version'].'/api_ver/2'; $personalMenu[$k]['url'] = $personalMenu[$k]['url'] . '/user_token/' . $user['user_token']."/game_id/".$data['game_id'].'/sdk_version/'.$data['sdk_version'].'/api_ver/2';
@ -344,8 +358,6 @@ class GameController extends BaseController{
'menus' => $menusArr, 'menus' => $menusArr,
'mine_features' => $personalMenuArr, 'mine_features' => $personalMenuArr,
]; ];
// if (I('debug') == 1)
// pp(($ret));
re_msg(200,'获取成功',$ret); re_msg(200,'获取成功',$ret);
} }

Loading…
Cancel
Save