Authored by zzzzzzz

下载页

'use strict';
exports.index = (req, res) => {
res.render('app-update', {
width750: true,
});
};
... ...
... ... @@ -13,6 +13,7 @@ const back = require(cRoot + '/back');
const bind = require(cRoot + '/bind');
const reg = require(cRoot + '/reg');
const smsLogin = require(cRoot + '/sms');
const update = require(cRoot + '/update');
const router = express.Router(); // eslint-disable-line
... ... @@ -107,4 +108,9 @@ router.get('/passport/back/backcode', back.setNewPasswordByMobilePage);// 设置
router.post('/passport/back/passwordbyemail', back.setNewPasswordByEmailAPI);// 依据邮箱验证码修改密码
router.post('/passport/back/passwordbymobile', back.setNewPasswordByMobileAPI);// 依据手机验证码修改密码
/**
* 提示升级app
*/
router.get('/passport/update', update.index);
module.exports = router;
... ...
<section class='app_update'>
<button>立即升级</button>
</section>
\ No newline at end of file
... ...
... ... @@ -10,19 +10,27 @@ var qrCheck = {
},
init: function() {
var ifr,
var // ifr,
u = navigator.userAgent.toLowerCase(),
isiOS = u.indexOf('os') > -1 || u.indexOf('iphone') > -1 || u.indexOf('mac') > -1 || u.indexOf('ipad') > -1,
qr = this.getQuery('qr');
if (qr && this.getQuery('app_version')) {
location.href = '//m.yohobuy.com/passport/update';
}
if (qr) {
if (isiOS) {
window.location = 'yohobuy://http://m.yohobuy.com/signin.html?qr=' + qr;
} else {
ifr = document.createElement('iframe');
ifr.src = 'yohobuy://http://m.yohobuy.com/signin.html?qr=' + qr;
ifr.style.display = 'none';
document.body.appendChild(ifr);
// 安卓跳下载
location.href = '//m.yohobuy.com/passport/update';
// 安卓暂时不处理
// ifr = document.createElement('iframe');
// ifr.src = 'yohobuy://http://m.yohobuy.com/signin.html?qr=' + qr;
// ifr.style.display = 'none';
// document.body.appendChild(ifr);
}
// time = Date.now();
... ...
var $ = require('yoho-jquery');
$('body').height($(window).height());
$('.app_update').height($(window).height()).width($(window).width());
$('button').on('click', function() {
window.location = 'http://www.yohoshow.com/about/index/yohobuyqr';
});
... ...
.app_update {
background: resolve("./app-update.png");
background-size: 100% 100%;
button {
position: absolute;
left: 50%;
bottom: 220px;
height: 90px;
width: 470px;
margin-left: -235px;
padding: 0;
background: #444;
color: #fff;
font-size: 30px;
border-radius: 10px;
}
}
... ...
... ... @@ -6,3 +6,4 @@
@import "code";
@import "bind";
@import "success";
@import "app-update";
... ...