channel-api.js
610 Bytes
/**
* 频道页
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2016/7/26
*/
'use strict';
// const api = global.yoho.API;
const api = global.yoho.ServiceAPI;
const channelMap = require('../../../config/channel-type').channelMap;
const getChannelDataAsync = type => {
const data = {
client_type: 'web',
content_code: channelMap[type].code,
gender: channelMap[type].gender,
page: 1,
limit: 1000
};
return api.get('operations/api/v5/resource/home', data, {
cache: true,
code: 200
});
};
module.exports = {
getChannelDataAsync
};