Authored by 陈峰

开发账号密码登录

@@ -30,7 +30,7 @@ exports.get = (req, res, next) => { @@ -30,7 +30,7 @@ exports.get = (req, res, next) => {
30 30
31 exports.imgCheck = (req, res, next) => { 31 exports.imgCheck = (req, res, next) => {
32 if (req.session.captchaSrc) { 32 if (req.session.captchaSrc) {
33 - return request(`${req.session.captchaSrc}?watermark/2/text/${uuid.v4()}/fontsize/120/dissolve/10`) 33 + return request(`${req.session.captchaSrc}?watermark/2/text/${uuid.v4()}/fontsize/120/dissolve/10/format/jpg`)
34 .pipe(res); 34 .pipe(res);
35 } 35 }
36 return next(); 36 return next();
@@ -73,6 +73,7 @@ const _step1 = (req, res, next) => { @@ -73,6 +73,7 @@ const _step1 = (req, res, next) => {
73 qqLoginUrl: '/passport/login/qq', // 腾讯QQ登录的URL链接 73 qqLoginUrl: '/passport/login/qq', // 腾讯QQ登录的URL链接
74 wechatLoginUrl: '/passport/login/wechat', // 微信登录的URL链接 74 wechatLoginUrl: '/passport/login/wechat', // 微信登录的URL链接
75 internationalUrl: '/passport/international', // 国际号登录的URL链接 75 internationalUrl: '/passport/international', // 国际号登录的URL链接
  76 + accountUrl: '/passport/login', // 账号密码登录URL链接
76 phoneRetriveUrl: '/passport/back/mobile', // 通过手机号找回密码的URL链接 77 phoneRetriveUrl: '/passport/back/mobile', // 通过手机号找回密码的URL链接
77 emailRetriveUrl: '/passport/back/email', // 通过邮箱找回密码的URL链接 78 emailRetriveUrl: '/passport/back/email', // 通过邮箱找回密码的URL链接
78 areaCode: '+86', // 默认的区号 79 areaCode: '+86', // 默认的区号
@@ -33,12 +33,11 @@ router.get('/emailback.html', back.indexEmailPage); @@ -33,12 +33,11 @@ router.get('/emailback.html', back.indexEmailPage);
33 router.get('/passport/signout/index', login.local.logout); 33 router.get('/passport/signout/index', login.local.logout);
34 34
35 // 登录页面 35 // 登录页面
36 -// router.get('/passport/login', login.common.beforeLogin, login.local.loginPage);  
37 -router.get('/passport/login', login.common.beforeLogin, smsLogin.loginPage);  
38 -// router.get('/passport/international', login.common.beforeLogin, login.local.international); 36 +router.get('/passport/login', login.local.loginPage);
  37 +router.get('/passport/international', login.common.beforeLogin, login.local.international);
39 38
40 // 本地登录 39 // 本地登录
41 -// router.post('/passport/login/auth', login.local.login); 40 +router.post('/passport/login/auth', login.local.login);
42 41
43 // SMS 短信 42 // SMS 短信
44 router.use('/passport/sms_login', login.common.beforeLogin, smsLogin.beforeIn); 43 router.use('/passport/sms_login', login.common.beforeLogin, smsLogin.beforeIn);
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 {{!--图片验证 end--}} 14 {{!--图片验证 end--}}
15 <button id="btn-next" class="btn btn-next disable row" disabled>获取短信验证码</button> 15 <button id="btn-next" class="btn btn-next disable row" disabled>获取短信验证码</button>
16 <p class="op-container"> 16 <p class="op-container">
  17 + <a class="op-item internat" href={{accountUrl}}>账号密码登录</a>
17 {{!--<a class="op-item internat" href={{internationalUrl}}>海外手机</a>--}} 18 {{!--<a class="op-item internat" href={{internationalUrl}}>海外手机</a>--}}
18 {{!--<a class="op-item sms-login" href={{smsLoginUrl}}>快速登录</a>--}} 19 {{!--<a class="op-item sms-login" href={{smsLoginUrl}}>快速登录</a>--}}
19 <span id="forget-pwd" class="op-item forget-pwd">忘记密码</span> 20 <span id="forget-pwd" class="op-item forget-pwd">忘记密码</span>