diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index b40b6ac1b..aea5ece38 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -198,7 +198,7 @@ class HomeController extends Controller ->find(); $game['icon'] = get_cover($game['icon'], 'path'); - $gameSource = M('GameSource', 'tab_')->field(['create_time', 'org_plist_url'])->where(array('game_id' => $game['id']))->find(); + $gameSource = M('GameSource', 'tab_')->field(['create_time', 'org_plist_url', 'is_new_sdk'])->where(array('game_id' => $game['id']))->find(); $imageIds = explode(',', $game['flooring_page_imgs']) ?? []; $imageUrls = []; @@ -229,6 +229,7 @@ class HomeController extends Controller $this->assign('apply', $apply); $this->assign('game', $game); $this->assign('promoteId', $promoteId); + $this->assign('is_new_sdk', $gameSource['is_new_sdk']); $cur_url = base64_encode(base64_encode("http://" . $_SERVER['HTTP_HOST'] . __SELF__)); $this->assign('cur_url', $cur_url); if ($this->get_device_type() == 'ios') { diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html index ea2721885..db15d640c 100644 --- a/Application/Home/View/default/Home/landingPage.html +++ b/Application/Home/View/default/Home/landingPage.html @@ -273,6 +273,7 @@ ?> + @@ -299,13 +300,19 @@ if ($('input[name=isNewIos]').val() == 0 && $('input[name=isIOS13]').val() == 1) { if (parseInt("{:I('get.status', 0)}") > 0) { - location.href = "{:U('iosDown',array('gid'=>$apply['game_id'],'pid'=>$apply['promote_id'],'status'=>1))}" + location.href = "{:U('iosDown',array('gid'=>$apply['game_id'],'pid'=>$apply['promote_id'],'status'=>1))}"; return } else { - layer.confirm('请先到官网注册', {title: '提示'}, function () { - // location.href = '{:U("User/login",array("url"=>base64_encode(base64_encode(U("Game/detail",array("id"=>$_GET["id"], "pid" => $apply.promote_id, "gid" => $apply.game_id))))))}'; - location.href = "/mobile.php?s=/User/login/pid/" + "{$apply.promote_id}" + "/gid/" + "{$apply.game_id}" + "/url/"+ cur_url + ".html" - }); + var is_new_sdk = $('#is_new_sdk').val(); + if (is_new_sdk) { + location.href = "{:U('iosDown',array('gid'=>$apply['game_id'],'pid'=>$apply['promote_id'],'status'=>1))}"; + return + } else { + layer.confirm('请先到官网注册', {title: '提示'}, function () { + // location.href = '{:U("User/login",array("url"=>base64_encode(base64_encode(U("Game/detail",array("id"=>$_GET["id"], "pid" => $apply.promote_id, "gid" => $apply.game_id))))))}'; + location.href = "/mobile.php?s=/User/login/pid/" + "{$apply.promote_id}" + "/gid/" + "{$apply.game_id}" + "/url/"+ cur_url + ".html" + }); + } return } }