getBanner.js
702 Bytes
/**
* getBanner model
* @author: gxh<xuhui.ge@yoho.cn>
* @date: 2016/11/30
*/
'use strict';
const URL_OPERATIONS_RESOURCE_GET = 'operations/api/v5/resource/get';
module.exports = class extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
/**
* 获取资源数据
*
* @string content_code
* @return array
*/
getResource(content_code) { //eslint-disable-line
return this.get({
url: URL_OPERATIONS_RESOURCE_GET,
data: {
content_code: content_code
},
param: {
cache: true
},
api: global.yoho.ServiceAPI
});
}
};