|
|
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,15 +9,15 @@ 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 serviceApi.get('operations/api/v5/resource/get', {
|
|
|
content_code: resource
|
|
|
content_code: content_code
|
|
|
}, {cache: true});
|
|
|
}
|
|
|
}
|
...
|
...
|
|