login-new.js
595 Bytes
const serviceApi = global.yoho.ServiceAPI;
const FROM = require('../../../config/from');
class LoginNewModel extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
/**
* 调用接口获取登录页顶部的 Banner
*/
getTopBanner(from) {
let content_code = FROM.yohobuy.content_code;
if (from) {
content_code = FROM[from].content_code;
}
return serviceApi.get('operations/api/v5/resource/get', {
content_code: content_code
}, {cache: true});
}
}
module.exports = LoginNewModel;