Authored by htoooth

修复错误

@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 6
7 const api = global.yoho.API; 7 const api = global.yoho.API;
8 8
9 -const signinAsnyc = (area, profile, password, shoppingKey) => { 9 +const signinAsync = (area, profile, password, shoppingKey) => {
10 let param = { 10 let param = {
11 method: 'app.passport.signin', 11 method: 'app.passport.signin',
12 area: area, 12 area: area,
@@ -53,7 +53,7 @@ const signinByWechatAsync = (nickname, openId, sourceType, shoppingKey, unionId) @@ -53,7 +53,7 @@ const signinByWechatAsync = (nickname, openId, sourceType, shoppingKey, unionId)
53 }; 53 };
54 54
55 module.exports = { 55 module.exports = {
56 - signinAsnyc, 56 + signinAsync,
57 signinByOtherOpenIDAsync, 57 signinByOtherOpenIDAsync,
58 signinByWechatAsync 58 signinByWechatAsync
59 }; 59 };
@@ -15,7 +15,7 @@ const AlipayStrategy = require('./passport-alipay').Strategy; @@ -15,7 +15,7 @@ const AlipayStrategy = require('./passport-alipay').Strategy;
15 15
16 const md5 = require('md5'); 16 const md5 = require('md5');
17 17
18 -const loginService = require('./login-service'); 18 +const LoginService = require('./login-service');
19 19
20 const config = global.yoho.config; 20 const config = global.yoho.config;
21 const helpers = global.yoho.helpers; 21 const helpers = global.yoho.helpers;
@@ -76,7 +76,7 @@ passport.use(new LocalStrategy({ @@ -76,7 +76,7 @@ passport.use(new LocalStrategy({
76 if (accountTimes >= 10) { 76 if (accountTimes >= 10) {
77 done({message: '您的账号已被暂时锁定,请30分钟后再试'}, null); 77 done({message: '您的账号已被暂时锁定,请30分钟后再试'}, null);
78 } else { 78 } else {
79 - return loginService.signin(area, username, password, shoppingKey).then((result) => { 79 + return LoginService.signinAsync(area, username, password, shoppingKey).then((result) => {
80 if (result.code && result.code === 200 && result.data.uid) { 80 if (result.code && result.code === 200 && result.data.uid) {
81 cache.del(errorLoginKey); 81 cache.del(errorLoginKey);
82 82
@@ -48,7 +48,7 @@ function AlipayStrategy(options, verify) { @@ -48,7 +48,7 @@ function AlipayStrategy(options, verify) {
48 options = options || {}; 48 options = options || {};
49 passport.Strategy.call(this); 49 passport.Strategy.call(this);
50 this.name = 'alipay'; 50 this.name = 'alipay';
51 - this._verify = verif 51 + this._verify = verify;
52 this._options = options; 52 this._options = options;
53 } 53 }
54 54
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 count--; 57 count--;
58 countDown.innerHTML = count; 58 countDown.innerHTML = count;
59 } else { 59 } else {
60 - location.href = '/'; 60 + location.href = '/passport/login';
61 } 61 }
62 }, 1000); 62 }, 1000);
63 })(); 63 })();