|
|
|
@ -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));
|
|
|
|
|