Authored by 郭成尧

Merge branch 'feature/loginview' into release/6.0.1

... ... @@ -28,11 +28,11 @@ const router = express.Router(); // eslint-disable-line
router.get('/passport/geetest/register', geetest.register);
// 兼容老的路由
router.get('/signin.html', login.common.weixinCheck, validateCode.load,
login.common.beforeLogin, login.common.clearCookie, smsLogin.loginPage);
router.get('/reg.html', validateCode.load, disableBFCahce, reg.index);
router.get('/login.html', validateCode.load,
login.common.beforeLogin, login.common.clearCookie, login.local.international);
// router.get('/signin.html', login.common.weixinCheck, validateCode.load,
// login.common.beforeLogin, login.common.clearCookie, smsLogin.loginPage);
// router.get('/reg.html', validateCode.load, disableBFCahce, reg.index);
// router.get('/login.html', validateCode.load,
// login.common.beforeLogin, login.common.clearCookie, login.local.international);
router.get('/phoneback.html', back.indexMobilePage);
router.get('/emailback.html', back.indexEmailPage);
... ... @@ -40,21 +40,21 @@ router.get('/emailback.html', back.indexEmailPage);
router.get('/passport/signout/index', login.common.clearCookie, login.local.logout);
// 登录页面
router.get('/passport/login',
validateCode.load,
login.common.beforeLogin,
login.common.clearCookie,
login.loginShowCaptchaByIp,
login.local.loginPage
);
router.get('/passport/international',
validateCode.load,
login.common.beforeLogin,
login.common.clearCookie,
login.loginShowCaptchaByIp,
login.local.international
);
// router.get('/passport/login',
// validateCode.load,
// login.common.beforeLogin,
// login.common.clearCookie,
// login.loginShowCaptchaByIp,
// login.local.loginPage
// );
// router.get('/passport/international',
// validateCode.load,
// login.common.beforeLogin,
// login.common.clearCookie,
// login.loginShowCaptchaByIp,
// login.local.international
// );
// 本地登录
router.post('/passport/login/auth', validateCode.check, login.local.login);
... ... @@ -63,8 +63,9 @@ router.post('/passport/login/auth', validateCode.check, login.local.login);
router.get('/passport/login/check', login.common.check);
// SMS 短信
router.use('/passport/sms_login', login.common.beforeLogin, smsLogin.beforeIn);
router.get('/passport/sms_login', validateCode.load, smsLogin.loginPage);
// router.use('/passport/sms_login', login.common.beforeLogin, smsLogin.beforeIn);
// router.get('/passport/sms_login', validateCode.load, smsLogin.loginPage);
router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck);
router.get('/passport/sms_login/token.json',
smsLogin.tokenBefore,
... ... @@ -113,7 +114,8 @@ router.post('/passport/bind/changeMobile', bind.changeMobile);
* 注册
*/
router.use('/passport/reg/*', disableBFCahce);
router.get('/passport/reg/index', validateCode.load, reg.index);
// router.get('/passport/reg/index', validateCode.load, reg.index);
router.post('/passport/reg/verifymobile', validateCode.check, reg.sendCodeBusyBoy, reg.verifyMobile);
router.get('/passport/reg/code', reg.guardStep(2), reg.code);
router.post('/passport/reg/sendcode', reg.guardStep(2), reg.sendCodeBusyBoy, reg.sendCode);
... ... @@ -173,29 +175,46 @@ const smsNew = new SmsNew();
const BackNew = require('./controllers/back-new');
const backNew = new BackNew();
router.get('/passport/login-new',
router.get('/passport/login',
validateCode.load,
login.common.beforeLogin,
login.common.clearCookie,
login.loginShowCaptchaByIp,
loginNew.loginPage); // 普通登录
router.get('/passport/international-new',
router.get('/passport/international',
validateCode.load,
login.common.beforeLogin,
login.common.clearCookie,
login.loginShowCaptchaByIp,
loginNew.international); // 国际账号登录
router.get('/passport/reg-new',
router.get('/passport/reg/index',
validateCode.forTest, // 测试使用,上灰度前删除
validateCode.load,
regNew.regPage); // 注册页面
router.post('/passport/register-new',
reg.sendCodeBusyBoy,
regNew.register); // 注册请求
router.get('/passport/sms-login-new',
router.get('/passport/sms_login',
validateCode.forTest, // 测试使用,上灰度前删除
validateCode.load,
smsNew.smsLoginPage); // 短信验证码登录
// 兼容老的路由
router.get('/signin.html',
validateCode.forTest, // 测试使用,上灰度前删除
validateCode.load,
smsNew.smsLoginPage); // 短信验证码登录
router.get('/reg.html',
validateCode.forTest, // 测试使用,上灰度前删除
validateCode.load,
regNew.regPage); // 注册页面
router.get('/login.html',
validateCode.load,
login.common.beforeLogin,
login.common.clearCookie,
login.loginShowCaptchaByIp,
loginNew.international); // 国际账号登录
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); // 通过邮箱找回密码成功页
... ...