Authored by 毕凯

Merge remote-tracking branch 'origin/hotfix/onlinebug' into release/6.5

... ... @@ -27,8 +27,12 @@ function pushHistory() {
return false;
}
window.history.replaceState(state, null, state.url);
window.history.pushState({page: pages[1]}, null, url);
try {
window.history.replaceState(state, null, state.url);
window.history.pushState({page: pages[1]}, null, url);
} catch (e) {
return;
}
}
if (/micromessenger/i.test(navigator.userAgent) &&
... ...
... ... @@ -6,6 +6,7 @@ const showErrTip = tip.show;
const api = require('../api');
const trim = $.trim;
const Validate = require('plugin/validata');
const cookie = require('yoho-cookie');
const validate = new Validate($captcha, {
useREM: {
rootFontSize: 40,
... ... @@ -136,9 +137,11 @@ class Login {
location.href = res.href;
this.view.loginBtn.text('登录成功');
} else if (data.code === 4189) {
localStorage.loginJumpUrl = $('#account').val();
localStorage.loginJump = 'true';
location.href = data.url;
cookie.set('_loginJumpUrl', $('input[name=username]').val());
showErrTip('您的账号存在安全隐患需要进行身份验证');
setTimeout(() => {
location.href = data.url;
}, 2500);
} else if (data.code === 510 || data.code === 50004) {
location.href = data.url;
} else {
... ...
... ... @@ -20,6 +20,7 @@ let $account = $('#account'),
let api = require('../api');
let tip = require('plugin/tip');
let cookie = require('yoho-cookie');
let trim = $.trim;
let showErrTip = tip.show;
... ... @@ -97,9 +98,11 @@ function loginAuth(params, acc) {
location.href = res.href;
$loginBtn.text('登录成功');
} else if (data.code === 4189) {
localStorage.loginJumpUrl = $('#account').val();
localStorage.loginJump = 'true';
location.href = data.url;
cookie.set('_loginJumpUrl', $('input[name=username]').val());
showErrTip('您的账号存在安全隐患需要进行身份验证');
setTimeout(() => {
location.href = data.url;
}, 2500);
} else if (data.code === 510 || data.code === 50004) {
location.href = data.url;
} else {
... ...
... ... @@ -174,10 +174,3 @@ page = {
$(function() {
page.init();
});
// 多次登录失败跳短信认证填充手机号
if (localStorage.loginJump) {
$('.sms-login .title').text('身份验证');
$('.sms-login-msg').before('<p class="sms-login-msg">您的账号存在安全隐患需要进行身份验证</p>');
localStorage.removeItem('loginJump');
}
... ...
... ... @@ -17,6 +17,7 @@ tip = require('plugin/tip');
api = require('./api');
checkPoint = require('./smslogin/check-point');
let cookie = require('yoho-cookie');
// 图片验证码
let Validate = require('plugin/validata');
... ... @@ -149,5 +150,5 @@ $(function() {
});
// 多次登录失败跳短信认证填充手机号
$('#phone-num').val(localStorage.loginJumpUrl);
localStorage.removeItem('loginJumpUrl');
$('#phone-num').val(cookie.get('_loginJumpUrl'));
cookie.remove('_loginJumpUrl');
... ...
... ... @@ -5,6 +5,7 @@ import checkPoint from './check-point';
import Page from 'yoho-page';
import Validate from 'plugin/validata';
const $captcha = $('#js-img-check');
const cookie = require('yoho-cookie');
const validate = new Validate($captcha, {
useREM: {
rootFontSize: 40,
... ... @@ -42,16 +43,19 @@ class SmsLoginNew extends Page {
this.selector.getVerifyCodeBtn.data('oneClick', false);
// 多次登录失败跳短信认证填充手机号
this.selector.mobileInput.val(localStorage.loginJumpUrl);
localStorage.removeItem('loginJumpUrl');
if (window.queryString && window.queryString.area && window.queryString.mobile) {
this.selector.countryCodeSelector.val('+' + window.queryString.area);
this.selector.mobileInput.val(window.queryString.mobile);
this.selector.mobileInput.trigger('input');
}
// 多次登录失败跳短信认证填充手机号
if (cookie.get('_loginJumpUrl')) {
this.selector.mobileInput.val(cookie.get('_loginJumpUrl'));
this.selector.mobileInput.trigger('input');
this.selector.getVerifyCodeBtn.click();
cookie.remove('_loginJumpUrl');
}
}
/**
... ... @@ -193,6 +197,11 @@ class SmsLoginNew extends Page {
let areaCode = this.selector.countryCodeSelector.val();
let phone = $.trim(this.selector.mobileInput.val());
if (cookie.get('_loginJumpUrl')) {
this.countDown();
return;
}
validate.getResults().then(result => {
let params = {
area: areaCode.replace('+', ''),
... ...
... ... @@ -71,7 +71,7 @@ module.exports = function() {
}
});
wx.ready(function() {
typeof wx !== 'undefined' && wx.ready(function() {
let shareTitle = $('#shareTitle').val();
let shareImg = $('#shareImg').val();
let shareDesc = $('#shareDesc').val();
... ...
... ... @@ -1016,6 +1016,8 @@ $listNav.on('touchend touchcancel', function(e) {
navType = 'sale';
} else if ($this.hasClass('popularity')) {
navType = 'popularity';
} else {
navType = 'default';
}
nav = navInfo[navType];
... ...