Merge remote-tracking branch 'origin/hotfix/qrlogin'
Showing
8 changed files
with
61 additions
and
7 deletions
apps/passport/controllers/update.js
0 → 100644
@@ -13,6 +13,7 @@ const back = require(cRoot + '/back'); | @@ -13,6 +13,7 @@ const back = require(cRoot + '/back'); | ||
13 | const bind = require(cRoot + '/bind'); | 13 | const bind = require(cRoot + '/bind'); |
14 | const reg = require(cRoot + '/reg'); | 14 | const reg = require(cRoot + '/reg'); |
15 | const smsLogin = require(cRoot + '/sms'); | 15 | const smsLogin = require(cRoot + '/sms'); |
16 | +const update = require(cRoot + '/update'); | ||
16 | 17 | ||
17 | 18 | ||
18 | const router = express.Router(); // eslint-disable-line | 19 | const router = express.Router(); // eslint-disable-line |
@@ -107,4 +108,9 @@ router.get('/passport/back/backcode', back.setNewPasswordByMobilePage);// 设置 | @@ -107,4 +108,9 @@ router.get('/passport/back/backcode', back.setNewPasswordByMobilePage);// 设置 | ||
107 | router.post('/passport/back/passwordbyemail', back.setNewPasswordByEmailAPI);// 依据邮箱验证码修改密码 | 108 | router.post('/passport/back/passwordbyemail', back.setNewPasswordByEmailAPI);// 依据邮箱验证码修改密码 |
108 | router.post('/passport/back/passwordbymobile', back.setNewPasswordByMobileAPI);// 依据手机验证码修改密码 | 109 | router.post('/passport/back/passwordbymobile', back.setNewPasswordByMobileAPI);// 依据手机验证码修改密码 |
109 | 110 | ||
111 | +/** | ||
112 | + * 提示升级app | ||
113 | + */ | ||
114 | +router.get('/passport/update', update.index); | ||
115 | + | ||
110 | module.exports = router; | 116 | module.exports = router; |
apps/passport/views/action/app-update.hbs
0 → 100644
public/img/app-update.png
0 → 100644
37.7 KB
@@ -10,19 +10,28 @@ var qrCheck = { | @@ -10,19 +10,28 @@ var qrCheck = { | ||
10 | }, | 10 | }, |
11 | 11 | ||
12 | init: function() { | 12 | init: function() { |
13 | - var ifr, | 13 | + var // ifr, |
14 | u = navigator.userAgent.toLowerCase(), | 14 | u = navigator.userAgent.toLowerCase(), |
15 | isiOS = u.indexOf('os') > -1 || u.indexOf('iphone') > -1 || u.indexOf('mac') > -1 || u.indexOf('ipad') > -1, | 15 | isiOS = u.indexOf('os') > -1 || u.indexOf('iphone') > -1 || u.indexOf('mac') > -1 || u.indexOf('ipad') > -1, |
16 | - qr = this.getQuery('qr'); | 16 | + qr = this.getQuery('qr'), |
17 | + isApp = this.getQuery('app_version'); | ||
17 | 18 | ||
18 | - if (qr) { | 19 | + if (qr && isApp) { |
20 | + location.href = '//m.yohobuy.com/passport/update'; | ||
21 | + } | ||
22 | + | ||
23 | + if (qr && !isApp) { | ||
19 | if (isiOS) { | 24 | if (isiOS) { |
20 | window.location = 'yohobuy://http://m.yohobuy.com/signin.html?qr=' + qr; | 25 | window.location = 'yohobuy://http://m.yohobuy.com/signin.html?qr=' + qr; |
21 | } else { | 26 | } else { |
22 | - ifr = document.createElement('iframe'); | ||
23 | - ifr.src = 'yohobuy://http://m.yohobuy.com/signin.html?qr=' + qr; | ||
24 | - ifr.style.display = 'none'; | ||
25 | - document.body.appendChild(ifr); | 27 | + // 安卓跳下载 |
28 | + location.href = '//m.yohobuy.com/passport/update'; | ||
29 | + | ||
30 | + // 安卓暂时不处理 | ||
31 | + // ifr = document.createElement('iframe'); | ||
32 | + // ifr.src = 'yohobuy://http://m.yohobuy.com/signin.html?qr=' + qr; | ||
33 | + // ifr.style.display = 'none'; | ||
34 | + // document.body.appendChild(ifr); | ||
26 | } | 35 | } |
27 | 36 | ||
28 | // time = Date.now(); | 37 | // time = Date.now(); |
public/js/passport/update.page.js
0 → 100644
public/scss/passport/_app-update.css
0 → 100644
1 | +.app_update { | ||
2 | + background: resolve("./app-update.png"); | ||
3 | + background-size: 100% 100%; | ||
4 | + width: 100%; | ||
5 | + height: height("./app-update.png"); | ||
6 | + | ||
7 | + button { | ||
8 | + position: absolute; | ||
9 | + left: 50%; | ||
10 | + bottom: 220px; | ||
11 | + height: 90px; | ||
12 | + width: 470px; | ||
13 | + margin-left: -235px; | ||
14 | + padding: 0; | ||
15 | + background: #444; | ||
16 | + color: #fff; | ||
17 | + font-size: 30px; | ||
18 | + border-radius: 10px; | ||
19 | + } | ||
20 | +} |
-
Please register or login to post a comment