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

master
tping 4 years ago
parent 971e9219c0
commit 8fa93eb480

@ -160,20 +160,21 @@ class GameController extends BaseController{
$this->get_suspend_1();
return ;
}
// if (I('debug') == 1) {
// $data['user_id'] = 1;
// $data['sdk_version'] = 2;
// }
// 美国IP 贝塔版
$ip = get_client_ip();
$isUSIP = ip_is_country($ip);
// $isUSIP = false;
// var_dump($isUSIP);
$isUSIP = ip_is_country($ip);
if(empty($data['user_id'])) {
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['user_token'] = $data['user_token'];
if (!$user['user_token']) {
@ -213,11 +214,18 @@ class GameController extends BaseController{
// var_dump($isUSIP);
//判断是否开启苹果内购beta包美国ip且是否在白名单当中
if (isset($data['app_type']) && $data['app_type'] == 2 && $isUSIP) {
if ($v['name'] == 'gift' || $v['name'] == 'suppersign') {
unset($menus[$k]);
continue;
}
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') {
unset($menus[$k]);
continue;
}
}
//测试账号苹果审核
@ -262,14 +270,14 @@ class GameController extends BaseController{
}
if(!empty($v['game_status'])) {
$game_status = explode(',', $v['game_status']);
if(in_array($data['game_id'], $game_status)) {
unset($personalMenu[$k]);
continue;
}
if(in_array($data['game_id'], $game_status)) {
unset($personalMenu[$k]);
continue;
}
}
if(isset($v['status']) && $v['status'] == 0) {
unset($personalMenu[$k]);
continue;
continue;
}
//测试账号苹果审核
$game_user = ['test11', 'test12', 'test13', 'test142', 'test171','test830','test1003','test1002','test170','test169'];
@ -279,18 +287,24 @@ class GameController extends BaseController{
continue;
}
}
// 测试白名单用户不显示
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 ($v['name'] == 'gift' || $v['name'] == 'balance') {
if ($v['name'] == 'gift' || $v['name'] == 'balance') {
unset($personalMenu[$k]);
continue;
}
}
//测试账号苹果审核
$personalMenu[$k]['icon'] = (substr($v['icon'], 0, 7) == "http://" || substr($v['icon'], 0, 8) == "https://" ) ? $v['icon'] :
C('ADMIN_DOMAIN') . $v['icon'];
// die;
$personalMenu[$k]['icon'] = (substr($v['icon'], 0, 7) == "http://" || substr($v['icon'], 0, 8) == "https://" ) ? $v['icon'] : C('ADMIN_DOMAIN') . $v['icon'];
if($v['type'] != 3){
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';
@ -344,8 +358,6 @@ class GameController extends BaseController{
'menus' => $menusArr,
'mine_features' => $personalMenuArr,
];
// if (I('debug') == 1)
// pp(($ret));
re_msg(200,'获取成功',$ret);
}

Loading…
Cancel
Save