Authored by 郭成尧

Merge branch 'feature/loginview' into release/6.0.1

... ... @@ -82,7 +82,20 @@ const load = (req, res, next) => {
return next();
};
/**
* 测试使用,上线前删除
*/
const forTest = (req, res, next) => {
if (req.query.image) {
_.set(req, 'app.locals.wap.geetest.validation', true);
} else {
_.set(req, 'app.locals.wap.geetest.validation', false);
}
return next();
};
module.exports = {
check,
load
load,
forTest
};
... ...
... ... @@ -185,11 +185,17 @@ router.get('/passport/international-new',
login.common.clearCookie,
login.loginShowCaptchaByIp,
loginNew.international); // 国际账号登录
router.get('/passport/reg-new', validateCode.load, regNew.regPage); // 注册页面
router.get('/passport/reg-new',
validateCode.forTest, // 测试使用,上灰度前删除
validateCode.load,
regNew.regPage); // 注册页面
router.post('/passport/register-new',
reg.sendCodeBusyBoy,
regNew.register); // 注册请求
router.get('/passport/sms-login-new', validateCode.load, smsNew.smsLoginPage); // 短信验证码登录
router.get('/passport/sms-login-new',
validateCode.forTest, // 测试使用,上灰度前删除
validateCode.load,
smsNew.smsLoginPage); // 短信验证码登录
router.get('/passport/back/mobile-new', backNew.backByMobile); // 通过手机找回密码
router.get('/passport/back/email-new', backNew.backByEmail); // 通过邮箱找回密码
router.get('/passport/back/email-success-new', backNew.backByEmailSuccess); // 通过邮箱找回密码成功页
... ...
... ... @@ -40,9 +40,9 @@ class RegisterNew {
this.view.passwordEyeIcon.on('click', this.passwordShowStatus.bind(this));
if ($captcha.data('geetest')) {
validate.init();
this.view.getVerifyCodeBtn.on('click', this.getVerifyCode.bind(this));
} else {
validate.init();
this.view.getVerifyCodeBtn.on('click', this.imgVerifyInit.bind(this));
}
}
... ... @@ -54,7 +54,7 @@ class RegisterNew {
if (!this.view.getVerifyCodeBtn.hasClass('active')) {
return;
}
validate.init();
validate.refresh();
$(document).off('click.refresh').on('click.refresh', '.img-check-refresh', this.imgVerifyInit.bind(this));
if (!$('#getVerifyCodeBtnByValidate').length) {
$captcha.append('<div class="validate-sub-btn"><button id="getVerifyCodeBtnByValidate">获取验证码</button></div>'); // eslint-disable-line
... ...
... ... @@ -44,9 +44,9 @@ class SmsLoginNew extends Page {
this.selector.smsLoginBtn.on('click', this.login.bind(this));
if ($captcha.data('geetest')) {
validate.init();
this.selector.getVerifyCodeBtn.on('click', this.getVerifyCode.bind(this));
} else {
validate.init();
this.selector.getVerifyCodeBtn.on('click', this.imgVerifyInit.bind(this));
}
}
... ... @@ -58,7 +58,7 @@ class SmsLoginNew extends Page {
if (!this.selector.getVerifyCodeBtn.hasClass('active')) {
return;
}
validate.init();
validate.refresh();
$(document).off('click.refresh').on('click.refresh', '.img-check-refresh', this.imgVerifyInit.bind(this));
if (!$('#getVerifyCodeBtnByValidate').length) {
$captcha.append('<div class="validate-sub-btn"><button id="getVerifyCodeBtnByValidate">获取验证码</button></div>'); // eslint-disable-line
... ...