Showing
5 changed files
with
29 additions
and
17 deletions
@@ -37,7 +37,7 @@ class Auth { | @@ -37,7 +37,7 @@ class Auth { | ||
37 | profile: profile, | 37 | profile: profile, |
38 | password: aes.aesPwd(password), | 38 | password: aes.aesPwd(password), |
39 | isSkip: isSkip ? isSkip : 'N', | 39 | isSkip: isSkip ? isSkip : 'N', |
40 | - business_line: FROM[from] | 40 | + business_line: FROM[from].business_line |
41 | }; | 41 | }; |
42 | 42 | ||
43 | if (shoppingKey) { | 43 | if (shoppingKey) { |
1 | const serviceApi = global.yoho.ServiceAPI; | 1 | const serviceApi = global.yoho.ServiceAPI; |
2 | -const resources = { | ||
3 | - yohobuy: 'b7a510c2ece17d205a8f17b06ee8d2af', | ||
4 | - yohomars: '', | ||
5 | - yohocoffee: '' | ||
6 | -}; | 2 | +const FROM = require('../../../config/from'); |
7 | 3 | ||
8 | class LoginNewModel extends global.yoho.BaseModel { | 4 | class LoginNewModel extends global.yoho.BaseModel { |
9 | constructor(ctx) { | 5 | constructor(ctx) { |
@@ -13,15 +9,15 @@ class LoginNewModel extends global.yoho.BaseModel { | @@ -13,15 +9,15 @@ class LoginNewModel extends global.yoho.BaseModel { | ||
13 | /** | 9 | /** |
14 | * 调用接口获取登录页顶部的 Banner | 10 | * 调用接口获取登录页顶部的 Banner |
15 | */ | 11 | */ |
16 | - getTopBanner(which) { | ||
17 | - let resource = resources.yohobuy; | 12 | + getTopBanner(from) { |
13 | + let content_code = FROM.yohobuy.content_code; | ||
18 | 14 | ||
19 | - if (which) { | ||
20 | - resource = resources[which]; | 15 | + if (from) { |
16 | + content_code = FROM[from].content_code; | ||
21 | } | 17 | } |
22 | 18 | ||
23 | return serviceApi.get('operations/api/v5/resource/get', { | 19 | return serviceApi.get('operations/api/v5/resource/get', { |
24 | - content_code: resource | 20 | + content_code: content_code |
25 | }, {cache: true}); | 21 | }, {cache: true}); |
26 | } | 22 | } |
27 | } | 23 | } |
@@ -23,7 +23,7 @@ class PhoneService { | @@ -23,7 +23,7 @@ class PhoneService { | ||
23 | area: param.area, | 23 | area: param.area, |
24 | code: param.code, | 24 | code: param.code, |
25 | shopping_key: param.shopping_key, | 25 | shopping_key: param.shopping_key, |
26 | - business_line: FROM[param.from] | 26 | + business_line: FROM[param.from].business_line |
27 | }); | 27 | }); |
28 | } | 28 | } |
29 | 29 |
@@ -108,7 +108,7 @@ const RegService = { | @@ -108,7 +108,7 @@ const RegService = { | ||
108 | verifyCode: smsCode, | 108 | verifyCode: smsCode, |
109 | inviteCode: inviteCode, | 109 | inviteCode: inviteCode, |
110 | isFromMy, | 110 | isFromMy, |
111 | - business_line: FROM[from] | 111 | + business_line: FROM[from].business_line |
112 | }; | 112 | }; |
113 | 113 | ||
114 | if (shoppingKey) { | 114 | if (shoppingKey) { |
@@ -2,8 +2,24 @@ | @@ -2,8 +2,24 @@ | ||
2 | * 登录来源 | 2 | * 登录来源 |
3 | */ | 3 | */ |
4 | module.exports = { | 4 | module.exports = { |
5 | - yohobuy: 'Yoho!Buy', | ||
6 | - yohomars: 'mars', | ||
7 | - yohocoffee: 'Yo!Coffee', | ||
8 | - yohogreen: 'Yo!Green' | 5 | + yohobuy: { |
6 | + business_line: 'Yoho!Buy', | ||
7 | + content_code: 'b7a510c2ece17d205a8f17b06ee8d2af' | ||
8 | + }, | ||
9 | + yohomars: { | ||
10 | + business_line: 'mars', | ||
11 | + content_code: '' | ||
12 | + }, | ||
13 | + yohocoffee: { | ||
14 | + business_line: 'Yo!Coffee', | ||
15 | + content_code: '' | ||
16 | + }, | ||
17 | + yohogreen: { | ||
18 | + business_line: 'Yo!Green', | ||
19 | + content_code: '' | ||
20 | + }, | ||
21 | + yoholittle: { | ||
22 | + business_line: 'Yo!Little', | ||
23 | + content_code: '' | ||
24 | + } | ||
9 | }; | 25 | }; |
-
Please register or login to post a comment