Showing
5 changed files
with
9 additions
and
12 deletions
@@ -22,6 +22,6 @@ module.exports = class extends global.yoho.BaseModel { | @@ -22,6 +22,6 @@ module.exports = class extends global.yoho.BaseModel { | ||
22 | params.shopping_key = shoppingKey; | 22 | params.shopping_key = shoppingKey; |
23 | } | 23 | } |
24 | 24 | ||
25 | - return this.api.get({data: params}); | 25 | + return this.get({data: params}); |
26 | } | 26 | } |
27 | }; | 27 | }; |
@@ -5,14 +5,13 @@ | @@ -5,14 +5,13 @@ | ||
5 | 'use strict'; | 5 | 'use strict'; |
6 | 6 | ||
7 | const aes = require('./aes-pwd'); | 7 | const aes = require('./aes-pwd'); |
8 | -const logger = global.yoho.logger; | ||
9 | 8 | ||
10 | module.exports = class extends global.yoho.BaseModel { | 9 | module.exports = class extends global.yoho.BaseModel { |
11 | constructor(ctx) { | 10 | constructor(ctx) { |
12 | super(ctx); | 11 | super(ctx); |
13 | } | 12 | } |
14 | 13 | ||
15 | - signinByPasswordWithAes(area, profile, password, shoppingKey, clientIp) { | 14 | + signinByPasswordWithAes(area, profile, password, shoppingKey) { |
16 | let param = { | 15 | let param = { |
17 | method: 'sesame.flowering.higher', | 16 | method: 'sesame.flowering.higher', |
18 | area: area, | 17 | area: area, |
@@ -24,8 +23,6 @@ module.exports = class extends global.yoho.BaseModel { | @@ -24,8 +23,6 @@ module.exports = class extends global.yoho.BaseModel { | ||
24 | param.shopping_key = shoppingKey; | 23 | param.shopping_key = shoppingKey; |
25 | } | 24 | } |
26 | 25 | ||
27 | - logger.info('login successfully by password from', clientIp); | ||
28 | - | ||
29 | return this.post({data: param}); | 26 | return this.post({data: param}); |
30 | } | 27 | } |
31 | 28 |
@@ -36,7 +36,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -36,7 +36,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
36 | 36 | ||
37 | signin(type, area, profile, password, shoppingKey, close) { | 37 | signin(type, area, profile, password, shoppingKey, close) { |
38 | let loginBy = { | 38 | let loginBy = { |
39 | - password: this.api.signinByPasswordWithAes(this.api), | 39 | + password: this.api.signinByPasswordWithAes.bind(this.api), |
40 | sms: this.api.signinBySMS.bind(this.api), | 40 | sms: this.api.signinBySMS.bind(this.api), |
41 | qrcode: this.api.signinByQrCode.bind(this.api) | 41 | qrcode: this.api.signinByQrCode.bind(this.api) |
42 | }; | 42 | }; |
@@ -21,7 +21,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -21,7 +21,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
21 | mobile: mobile | 21 | mobile: mobile |
22 | }; | 22 | }; |
23 | 23 | ||
24 | - return this.api.post({data: params}); | 24 | + return this.post({data: params}); |
25 | } | 25 | } |
26 | 26 | ||
27 | validMobileCode(area, mobile, code) { | 27 | validMobileCode(area, mobile, code) { |
@@ -32,7 +32,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -32,7 +32,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
32 | code: code | 32 | code: code |
33 | }; | 33 | }; |
34 | 34 | ||
35 | - return this.api.post({data: params}); | 35 | + return this.post({data: params}); |
36 | } | 36 | } |
37 | 37 | ||
38 | regMobileAes(area, mobile, password, code, shoppingKey, inviteCode) { | 38 | regMobileAes(area, mobile, password, code, shoppingKey, inviteCode) { |
@@ -52,6 +52,6 @@ module.exports = class extends global.yoho.BaseModel { | @@ -52,6 +52,6 @@ module.exports = class extends global.yoho.BaseModel { | ||
52 | params.inviteCode = inviteCode; | 52 | params.inviteCode = inviteCode; |
53 | } | 53 | } |
54 | 54 | ||
55 | - return this.api.post({data: params}); | 55 | + return this.post({data: params}); |
56 | } | 56 | } |
57 | }; | 57 | }; |
@@ -15,7 +15,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -15,7 +15,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
15 | * 根据手机号获取用户信息 | 15 | * 根据手机号获取用户信息 |
16 | */ | 16 | */ |
17 | findByMobileAsync(area, mobile) { | 17 | findByMobileAsync(area, mobile) { |
18 | - return this.api.get({ | 18 | + return this.get({ |
19 | data: { | 19 | data: { |
20 | mobile: mobile, | 20 | mobile: mobile, |
21 | area: area, | 21 | area: area, |
@@ -59,7 +59,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -59,7 +59,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
59 | method: 'app.passport.profile' | 59 | method: 'app.passport.profile' |
60 | }; | 60 | }; |
61 | 61 | ||
62 | - return this.api.get({data: param}); | 62 | + return this.get({data: param}); |
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
@@ -69,7 +69,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -69,7 +69,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
69 | uid: uid | 69 | uid: uid |
70 | }; | 70 | }; |
71 | 71 | ||
72 | - return this.api.get({data: param}); | 72 | + return this.get({data: param}); |
73 | } | 73 | } |
74 | }; | 74 | }; |
75 | 75 |
-
Please register or login to post a comment