Authored by 郭成尧

Merge branch 'feature/loginview' into release/6.0.1

... ... @@ -114,7 +114,8 @@ class Reg {
return res.json(regMobileAesResult);
}
AuthHelper.syncUserSession(regMobileAesResult.data.uid, req, res, regMobileAesResult.data.session_key);
yield AuthHelper.syncUserSession(regMobileAesResult.data.uid,
req, res, regMobileAesResult.data.session_key);
// 返回跳转到来源页面
let refer = req.cookies.refer;
... ...
... ... @@ -206,6 +206,7 @@ router.get('/signin.html',
validateCode.forTest, // 测试使用,上灰度前删除
validateCode.load,
login.common.beforeLogin,
login.common.clearCookie,
smsNew.smsLoginPage); // 短信验证码登录
router.get('/reg.html',
validateCode.forTest, // 测试使用,上灰度前删除
... ...
... ... @@ -12,7 +12,7 @@
{{/ countrys}}
</select>
<i class="iconfont arrow-icon">&#xe613;</i>
<i class="line">|</i><input type="text" name="mobile" placeholder="请输入手机号/邮箱" class="mobile-input" autocomplete="off"><i id="clearMobile"
<i class="line">|</i><input type="text" name="mobile" placeholder="请输入手机号" class="mobile-input" autocomplete="off"><i id="clearMobile"
class="iconfont clear">&#xe72a;</i>
</div>
<div class="form-group verify-code">
... ... @@ -25,7 +25,7 @@
id="passwordEyeIcon" class="eye"><i class="iconfont eye-close">&#xe716;</i><i class="iconfont eye-open hide">&#xe714;</i></span>
</div>
<div class="form-group invite-code">
<label for="inviteCode" class="iconfont">&#xe71e;</label><input type="text" name="inviteCode" placeholder="邀请码(无邀请码非必填)" autocomplete="off">
<label for="inviteCode" class="iconfont">&#xe71e;</label><input type="text" name="inviteCode" placeholder="好友潮流口令(非必填)" autocomplete="off">
</div>
<input name="token" type="hidden" value="{{token}}">
<div data-geetest="{{useGeetest}}" id="js-img-check"{{#unless useGeetest}} class="full-img-verify"{{/unless}}></div>
... ...
... ... @@ -30,8 +30,6 @@ class RegisterNew {
tokenInput: $('input[name=token]')
};
this.requested = false;
validate.init();
this.view.clearMobile.on('click', this.clearMobile.bind(this));
... ... @@ -121,8 +119,14 @@ class RegisterNew {
return;
}
if (!validatePWD(password)) {
showErrTip('密码6-20位,请重新输入');
let validateResult = validatePWD(password, result => {
if (!result.valid) {
showErrTip(result.msg);
}
return result.valid;
});
if (!validateResult) {
return;
}
... ... @@ -196,10 +200,6 @@ class RegisterNew {
return;
}
if (this.requested) {
return false;
}
let areaCode = this.view.countryCodeSelector.val();
let phoneNum = this.view.mobileInput.val();
... ... @@ -211,10 +211,7 @@ class RegisterNew {
if (api.phoneRegx[areaCode].test(phoneNum) || areaCode !== '+86') {
validate.getResults().then(result => {
this.requested = true;
$.extend(params, result);
$.ajax({
url: '/passport/reg/verifymobile',
type: 'POST',
... ... @@ -228,13 +225,11 @@ class RegisterNew {
(postResult.changeCaptcha && validate.type !== 2) && validate.refresh();
showErrTip(postResult.message);
this.requested = false;
}
},
error: () => {
showErrTip('出错了,请重试');
validate.refresh();
this.requested = false;
}
});
});
... ...
... ... @@ -37,6 +37,10 @@ class SmsLoginNew extends Page {
init() {
validate.init();
this.bindEvents();
// 多次登录失败跳短信认证填充手机号
this.mobileInput.val(localStorage.loginJumpUrl);
localStorage.removeItem('loginJumpUrl');
}
/**
... ...