custom.js
541 Bytes
/**
* 自定义频道页面 model
* @author: Bi Kai<kai.bi@yoho.cn>
* @date: 2016/05/09
*/
'use strict';
const utils = '../../../utils';
const resourcesProcess = require(`${utils}/resources-process`);
const service = global.yoho.ServiceAPI;
const getResourceData = (code) => {
return service.get('operations/api/v5/resource/get', {
content_code: code
}, {
cache: true,
code: 200
}).then(result => {
return resourcesProcess(result.data);
});
};
module.exports = {
getResourceData
};