|
@@ -12,32 +12,44 @@
|
|
|
<script src="../static/js/vender/toastr/toastr.min.js"></script>
|
|
|
<script src="../static/js/vender/config.js"></script>
|
|
|
<style>
|
|
|
- .code-container {
|
|
|
- background: url(../static/img/shaky/bg.png);
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-size: 7.5rem 100vh;
|
|
|
+ .middle{
|
|
|
+ position: relative;
|
|
|
+ width: 7.5rem;
|
|
|
+ height: 33.33vh;
|
|
|
}
|
|
|
.btn-content {
|
|
|
position: absolute;
|
|
|
- bottom: 42.6vh;
|
|
|
+ bottom: 8.6vh;
|
|
|
left: 2.12rem;
|
|
|
}
|
|
|
.btn-active {
|
|
|
position: absolute;
|
|
|
- bottom: 48.5vh;
|
|
|
+ bottom: 15vh;
|
|
|
left: 2.12rem;
|
|
|
}
|
|
|
.download-app{
|
|
|
width: 3.26rem;
|
|
|
height: 0.88rem;
|
|
|
}
|
|
|
+ .imgs{
|
|
|
+ width: 7.5rem;
|
|
|
+ height: 33.38vh;
|
|
|
+ margin-top: -0.05vh;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
- <div class="code-container">
|
|
|
- <div class="btn-content">
|
|
|
- <img class="download-app" src="../static/img/shaky/btn.png" />
|
|
|
+ <div class="container">
|
|
|
+ <div class="middle">
|
|
|
+ <div class="btn-content" id="js_btn">
|
|
|
+ <img class="download-app" src="../static/img/zhongqiuActivity/btn.png" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="mask">
|
|
|
<div class="point">
|
|
@@ -53,22 +65,44 @@
|
|
|
let timer,flag = true;
|
|
|
var url = window.location.href;
|
|
|
url = url.split('/')
|
|
|
+ // var baseUrl = 'https://test.androidscloud.com/'
|
|
|
var loc = window.location.search,
|
|
|
n1 = loc.length,//地址的总长度
|
|
|
n2 = loc.indexOf("="),//取得=号的位置
|
|
|
id = loc.substr(n2 + 1, n1 - n2),//从=号后面的内容
|
|
|
u = navigator.userAgent,
|
|
|
+ ua = navigator.userAgent.toLowerCase(),
|
|
|
isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
|
|
- isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
+ isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
|
|
|
+ imgs = ['../static/img/zhongqiuActivity/header.png','../static/img/zhongqiuActivity/middle.png','../static/img/zhongqiuActivity/footer.png'];
|
|
|
//长屏判断
|
|
|
if(document.documentElement.clientHeight > 736){
|
|
|
- const codeContainer = document.getElementsByClassName('code-container')[0];
|
|
|
- codeContainer.style.background = 'url(../static/img/shaky/iphonex-bg.png)';
|
|
|
- codeContainer.style.backgroundRepeat = 'no-repeat';
|
|
|
- codeContainer.style.backgroundSize = '7.5rem 100vh';
|
|
|
+ imgs = ['../static/img/zhongqiuActivity/iphoneX01.png','../static/img/zhongqiuActivity/iphoneX02.png','../static/img/zhongqiuActivity/iphoneX03.png'];
|
|
|
const btnContent = document.getElementsByClassName('btn-content')[0];
|
|
|
btnContent.className = 'btn-active';
|
|
|
}
|
|
|
+ //异步加载图片
|
|
|
+ async function loadAsync() {
|
|
|
+ let promise = function(url) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ const image = new Image();
|
|
|
+ image.src = url;
|
|
|
+ image.className = 'imgs';
|
|
|
+ image.onload = function() {
|
|
|
+ if(image.src.includes('header.png') || image.src.includes('iphoneX01.png')){
|
|
|
+ $('.container')[0].insertBefore(image, $('.middle')[0]);
|
|
|
+ }else{
|
|
|
+ $('.middle')[0].appendChild(image);
|
|
|
+ }
|
|
|
+ resolve('ok');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ for(let url of imgs) {
|
|
|
+ await promise(url);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ loadAsync();
|
|
|
//埋点
|
|
|
if(isAndroid){
|
|
|
operate('中秋活动落地页');
|
|
@@ -94,8 +128,7 @@
|
|
|
})
|
|
|
}
|
|
|
//点击下载APP
|
|
|
- $('.btn-content')[0].addEventListener('click',()=>{
|
|
|
- var ua = navigator.userAgent.toLowerCase();
|
|
|
+ $('#js_btn')[0].addEventListener('click',()=>{
|
|
|
if(ua.match(/MicroMessenger/i)=="micromessenger" || ua.match(/QQ\/[0-9]/i)){
|
|
|
$('.point').animate({top: '0.1rem'},"fast");
|
|
|
$('.mask').css('background','rgba(0,0,0,0.7)');
|
|
@@ -106,6 +139,8 @@
|
|
|
}else if(isiOS){
|
|
|
operate('中秋活动落地页-iOS');
|
|
|
window.location.href = 'https://www.pgyer.com/gemini6';
|
|
|
+ }else{
|
|
|
+ operate('中秋活动落地页-安卓','click');
|
|
|
}
|
|
|
},false);
|
|
|
//调用下载接口
|
|
@@ -124,7 +159,7 @@
|
|
|
cache: false,
|
|
|
success: function (res) {
|
|
|
if(res.status === 0){
|
|
|
- window.location.href = 'http://wjzx.androidscloud.com:9090/file-center/fileOperate/downloadFile?id=573420181';
|
|
|
+ window.location.href = 'https://wjzx.androidscloud.com:9091/file-center/fileOperate/downloadFile?id=573420181';
|
|
|
}else{
|
|
|
stopManyClick(() =>{
|
|
|
toastr.error(res.msg)
|