Authored by 郭成尧

conflice-handle

... ... @@ -37,7 +37,7 @@ class Auth {
profile: profile,
password: aes.aesPwd(password),
isSkip: isSkip ? isSkip : 'N',
business_line: FROM[from]
business_line: FROM[from].business_line
};
if (shoppingKey) {
... ...
const serviceApi = global.yoho.ServiceAPI;
const resources = {
yohobuy: 'b7a510c2ece17d205a8f17b06ee8d2af',
yohomars: '',
yohocoffee: ''
};
const FROM = require('../../../config/from');
class LoginNewModel extends global.yoho.BaseModel {
constructor(ctx) {
... ... @@ -13,20 +9,22 @@ class LoginNewModel extends global.yoho.BaseModel {
/**
* 调用接口获取登录页顶部的 Banner
*/
getTopBanner(which) {
let resource = resources.yohobuy;
getTopBanner(from) {
let content_code = FROM.yohobuy.content_code;
if (which) {
resource = resources[which];
if (from) {
content_code = FROM[from].content_code;
}
return this.get({
api: serviceApi,
url: 'operations/api/v5/resource/get',
data: {
content_code: resource
content_code: content_code
},
param: {cache: true}
param: {
cache: true
}
});
}
}
... ...
... ... @@ -23,7 +23,7 @@ class PhoneService {
area: param.area,
code: param.code,
shopping_key: param.shopping_key,
business_line: FROM[param.from]
business_line: FROM[param.from].business_line
});
}
... ...
... ... @@ -108,7 +108,7 @@ const RegService = {
verifyCode: smsCode,
inviteCode: inviteCode,
isFromMy,
business_line: FROM[from]
business_line: FROM[from].business_line
};
if (shoppingKey) {
... ...
... ... @@ -2,8 +2,24 @@
* 登录来源
*/
module.exports = {
yohobuy: 'Yoho!Buy',
yohomars: 'mars',
yohocoffee: 'Yo!Coffee',
yohogreen: 'Yo!Green'
yohobuy: {
business_line: 'Yoho!Buy',
content_code: 'b7a510c2ece17d205a8f17b06ee8d2af'
},
yohomars: {
business_line: 'mars',
content_code: ''
},
yohocoffee: {
business_line: 'Yo!Coffee',
content_code: ''
},
yohogreen: {
business_line: 'Yo!Green',
content_code: ''
},
yoholittle: {
business_line: 'Yo!Little',
content_code: ''
}
};
... ...