diff --git a/Application/Sdk/Controller/BaseController.class.php b/Application/Sdk/Controller/BaseController.class.php index dc64b3c5..8af0c5c2 100644 --- a/Application/Sdk/Controller/BaseController.class.php +++ b/Application/Sdk/Controller/BaseController.class.php @@ -11,7 +11,7 @@ class BaseController extends RestController{ 'Apple.apple_platform_pay','Spend.notice','Apple.apple_union_pay','WapPay.wap_shortcut_pay', 'WapPay.shortcut_pay','WapPay.android_shortcut_pay','WapPay.wap_shortcut_pay','WapPay.wap_shortcut_pay', 'Apple.apple_weixin_pay','Ipa365','User.user_login','platform_coin_deduction','get_user_money', - 'file_pay','pay','GameGiftPage','UserH', 'PayH5','init_sdk','order_status' + 'file_pay','pay','GameGiftPage','UserH', 'PayH5','init_sdk', // 'test','Game.get_suspend', ]; @@ -19,7 +19,7 @@ class BaseController extends RestController{ protected $noNeedToken = [ 'Changyan', 'Exchange', 'FengHuoApi', 'File', 'Game', 'GameGift', 'GameNotify', 'Info', 'ios-wap-Pay', 'Jpush', 'LoginNotify', 'Notice', 'OA', 'OTP', 'OTPServer', 'Pay', 'Payios', 'PointShop', 'Spend', - 'User', 'WapPay', 'Wechat', 'XinJiApi', 'Notice', 'init_sdk', 'order_status', + 'User', 'WapPay', 'Wechat', 'XinJiApi', 'Notice', 'init_sdk', // 'test', ]; protected $userId; diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index 745c581a..e15c6a38 100644 --- a/Application/Sdk/Controller/GameController.class.php +++ b/Application/Sdk/Controller/GameController.class.php @@ -93,7 +93,7 @@ class GameController extends BaseController{ $data = json_decode(base64_decode(file_get_contents("php://input")), true); if (I('debug') == 1) { $data['user_id'] = 1; - $data['sdk_version'] = 2; + $data['sdk_version'] = 1; } if(empty($data['user_id'])) { @@ -106,8 +106,10 @@ class GameController extends BaseController{ $sdkMenus = M('tool','tab_')->where(['name' => 'sdk_menu'])->find(); $menus = json_decode($sdkMenus['config'],true); foreach($menus as $k => $v) { - if(!empty($v['menu_version']) && $data['sdk_version'] != 0 && $v['menu_version'] != $data['sdk_version']) + if(!empty($v['menu_version']) && $data['sdk_version'] != 0 && $v['menu_version'] != $data['sdk_version']){ unset($menus[$k]); + continue; + } $menus[$k]['icon'] = C('ADMIN_DOMAIN') . $menus[$k]['icon']; // die; if (substr($menus[$k]['url'], 0, 7) == "http://" || substr($menus[$k]['url'], 0, 8) == "https://") { @@ -133,6 +135,7 @@ class GameController extends BaseController{ foreach($personalMenu as $k => $v) { if(!empty($v['menu_version']) && $data['sdk_version'] != 0 && $v['menu_version'] != $data['sdk_version']){ unset($personalMenu[$k]); + continue; } $personalMenu[$k]['icon'] = C('ADMIN_DOMAIN') . $personalMenu[$k]['icon']; // die; @@ -158,6 +161,16 @@ class GameController extends BaseController{ array_multisort(array_column($menus,'sort'),SORT_ASC,$menus); array_multisort(array_column($personalMenu,'sort'),SORT_ASC,$personalMenu); + $menusArr = []; + foreach($menus as $k => $v){ + $menusArr[] = $menus[$k]; + } + + $personalMenuArr = []; + foreach($personalMenu as $k => $v){ + $personalMenuArr[] = $personalMenu[$k]; + } + $ball_status = M('config','sys_')->where(['name' => 'WAP_SUSPEND_SHWO_STATUS'])->getField('value'); $sites_ball_logo = M('config','sys_')->where(['name' => 'WAP_SUSPEND_ICON'])->getField('value'); $sites_ball_logo = get_cover( $sites_ball_logo ,'path'); @@ -170,8 +183,8 @@ class GameController extends BaseController{ $ret = [ 'sites_ball_logo' => $sites_ball_logo, 'ball_status' => $ball_status, - 'menus' => $menus, - 'mine_features' => $personalMenu, + 'menus' => $menusArr, + 'mine_features' => $personalMenuArr, ]; if (I('debug') == 1) pp(($ret)); diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index a2a32d65..1ebc32fb 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -462,7 +462,8 @@ class PayH5Controller extends BaseController{ 'paytype' => 'alipay', 'orderno' => $orderno, 'game_id' => $game_id, - 'gopay' => 1 // 立即支付 + 'gopay' => 1, // 立即支付 + 'tx_client' => 'tx_forbid_return', // android 返回键 ))]); exit; } @@ -1375,7 +1376,9 @@ ADD COLUMN `pay_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER 'paytype' => 'weixinpay', 'orderno' => $request['pay_order_number'], 'game_id' => $game_id, - 'gopay' => 1 // 立即支付 + 'gopay' => 1, // 立即支付 + 'user_token' => $this->userToken, + 'tx_client' => 'tx_forbid_return', // android 返回键 ))]); exit; diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index de0a92a8..18153991 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -28,6 +28,14 @@ class UserController extends BaseController $this -> set_message(1001, "fail", "登录数据不能为空"); } + + $ip = get_client_ip(); + $device_bans_ip = M('device_bans','tab_')->where(['tag' => $ip,'type' => 2])->find(); + $device_bans_num = M('device_bans','tab_')->where(['tag' => $user['device_number'],'type' => 1])->find(); + if(!empty($device_bans_ip) || !empty($device_bans_num)){ + $this->set_message(1004, "fail", "设备已被禁用"); + } + /*是否开启Ucenter*/ if (C('UC_OPEN') == 1) { $userApi = new MemberApi();