落地页安卓使用旧版本

master
liuweiwen 5 years ago
parent 3c72aebe83
commit 1752e16f8d

@ -231,7 +231,30 @@ class HomeController extends Controller
$this->assign('promoteId', $promoteId);
$cur_url = base64_encode(base64_encode("http://" . $_SERVER['HTTP_HOST'] . __SELF__));
$this->assign('cur_url', $cur_url);
$this->display('landingPage');
if ($this->get_device_type() == 'ios') {
$this->display('landingPage');
} else {
$this->display('landingPage2');
}
}
private function get_device_type()
{
//全部变成小写字母
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
$type = 'other';
//分别进行判断
if(strpos($agent, 'iphone') || strpos($agent, 'ipad'))
{
$type = 'ios';
}
if(strpos($agent, 'android'))
{
$type = 'android';
}
return $type;
}

@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta itemprop="name" content="{$game['relation_game_name']}"/>
<meta itemprop="image" content="{$game['icon']}"/>
<meta name="description" itemprop="description" content="{$game['features']}"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<script type="text/javascript" src="__JS__/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<link href="{:get_cover(C('CH_SET_ICO'),'path')}" type="image/x-icon" rel="shortcut icon">
<title>{$game['relation_game_name']}</title>
<link rel="stylesheet" href="__CSS__/20180207/promition.css">
<link rel="stylesheet" href="__CSS__/20180207/game.css">
<link href="__STATIC__/ios9/css/common.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="__CSS__/landing_page.css">
</head>
<body class="main_bg" style="background-color: #0a0a0a;height: auto;">
<input type="hidden" name="title" value="{$game['relation_game_name']}">
<input type="hidden" name="icon" value="{$game['icon']}">
<input type="hidden" name="desc" value="{$game['features']}">
<input type="hidden" name="isIOS13" value="<?php if($isIOS13):?>1<?php else:?>0<?php endif;?>">
<input type="hidden" name="isNewIos" value="<?php if($isNewIos):?>1<?php else:?>0<?php endif;?>">
<?php if ($isWechat):?>
<?php if ($isAndroid):?>
<div class="bn-rule" style="display: none;"><img id="rule-img" src="__STATIC__/ios9/images/android-rule.png"></div>
<?php elseif ($isIOS):?>
<div class="bn-rule" style="display: none;"><img id="rule-img" src="__STATIC__/ios9/images/ios-rule.png"></div>
<?php endif;?>
<?php endif;?>
<div class="h_wrap">
<div id="data-2">
<volist name="game['flooring_page_imgs']" id="item">
<?php if ($downloadUrl == 'https://'.$_SERVER['HTTP_HOST']) :?>
<a href="#" class="no-package"><img src="{$item}" style="width: 100%;"/></a>
<?php else :?>
<a href="javascript:;" class="down-link" down-link="{$downloadUrl}"><img src="{$item}" style="width: 100%;"/></a>
<?php endif ;?>
</volist>
</div>
</div>
<script src="__STATIC__/layer/layer.js"></script>
<script src="__STATIC__/ios9/js/layer/layer.js?VerNo=20190923" type="text/javascript"></script>
<script type="text/javascript">
$('.down-link').on('click', function () {
if ($('.bn-rule').length > 0) {
$('.bn-rule').css('display','block')
$('.bn-rule').css('z-index','12')
return
}
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))}"
return
} else {
layer.confirm('请先到官网注册', {title: '提示'}, function () {
location.href = "/mobile.php?s=/User/login/pid/" + "{$apply.promote_id}" + "/gid/" + "{$apply.game_id}" + ".html"
})
return
}
}
var downLink = $(this).attr('down-link')
location.href = downLink
});
$('.no-package').click(function() {
layer.msg('暂无下载', {
icon: 7,
time: 2000
})
})
$.ajax({
url: "{:U('Home/generateWechatSign')}",
dataType: 'json',
type: 'post',
data: {url: window.location.href},
success: function(response) {
if (response.status) {
wx.config({
// debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来若要查看传入的参数可以在pc端打开参数信息会通过log打出仅在pc端时才会打印。
appId: response.data.appid,
timestamp: response.data.time,
nonceStr: response.data.randStr,
signature: response.data.sign,
jsApiList: ['onMenuShareAppMessage', 'onMenuShareTimeline', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone']
})
var title = $('[name=title]').val();
var description = $('[name=desc]').val();
var icon = $('[name=icon]').val();
wxReady(title, description, icon)
}
}
});
function wxReady(title, description, img) {
wx.ready(function () {
wx.onMenuShareAppMessage({
title: title,
desc: description,
link: window.location.href,
imgUrl: img,
type: '',
dataUrl: ''
});
wx.onMenuShareTimeline({
title: title,
link: window.location.href,
imgUrl: img
});
wx.onMenuShareQQ({
title: title,
desc: description,
link: window.location.href,
imgUrl: img
});
wx.onMenuShareWeibo({
title: title,
desc: description,
link: window.location.href,
imgUrl: img
});
wx.onMenuShareQZone({
title: title,
desc: description,
link: window.location.href,
imgUrl: img
});
});
}
</script>
</body>
</html>
Loading…
Cancel
Save