Authored by 陈峰

开发账号密码登录

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