测试白名单+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);
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,7 +214,14 @@ 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 (isset($data['app_type']) && $data['app_type'] == 2 && $testWhite) {
if ($v['name'] == 'gift' || $v['name'] == 'suppersign') {
unset($menus[$k]);
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 ($v['name'] == 'gift' || $v['name'] == 'balance') {
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'] :
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