var system=require("../../system")
const querystring = require('querystring');
const AppletBase =require("../applet.base");
class WxArticle extends AppletBase{
constructor(){
super();
this.articleSve=system.getObject("service.articleSve");
this.channelSve=system.getObject("service.newschannelSve");
}
//按照用途枚举查询出所有的课堂频道
//usageType='kt',本方法写死
//返回课堂频道到小程序端
async getChannelByUsageType(query,body){
return await this.articleSve.findChannel(body);
}
//小程序端传newschannel_id到后台
async getCoursesByChannelId(query,body){
return await this.articleSve.findAndCountAll2(body);
}
//获取详细信息
async getArticle(query,body){
return await this.articleSve.findArticle(body);
}
}
module.exports=WxArticle;