import http from "@/api/http.js"

/* 互动管理 */

export default {
	/**
	 * 报告列表
	 * @param {ClassifyIdFirst} params 
	 * @param {Keyword} params 
	 * @param {SysIsRead} params 0-未读，1-全部
	 * @param {PageSize} params 
	 * @param {CurrentIndex} params 
	 * @param {ClassifyIdSecond} params 
	 * @returns 
	 */
	reportlist: params => {
		return http.get('/yb/comment/report/list',params)
	},

	/**
	 * 留言列表
	 * @param {CurrentIndex} params 
	 * @param {PageSize} params 
	 * @param {ReportId} params 
	 * @param {ReportChapterId} params 
	 * @param {HotTopType} params 
	 * @returns 
	 */
	messgaelist: params => {
		return http.get('/yb/comment/list',params)
	},

	/**
	 * 回复
	 * @param {CommentId content} params 
	 * @returns 
	 */
	reply: params => {
		return http.post('/yb/comment/reply/add',params)
	},
	
	/**
	 * 置顶/取消
	 * @param {CommentId} params 
	 * @returns 
	 */
	setTop: params => {
		return http.post('/yb/comment/top',params)
	},

	/**
	 * 精选/取消
	 * @param {CommentId} params 
	 * @returns 
	 */
	setHot: params => {
		return http.post('/yb/comment/hot',params)
	},

	/**
	 * 删除回复
	 * @param {CommentId} params 
	 * @returns 
	 */
	delReply: params => {
		return http.post('/yb/comment/reply/del',params)
	},

	/**
	 * 删除留言
	 * @param {CommentId} params 
	 * @returns 
	 */
	delMsg: params => {
		return http.post('/yb/comment/del',params)
	},

	/**
	 * 点赞列表
	 * @param {SortParam} params LikeNum
	 * @param {SortType} params asc、desc
	 * @param {PageSize} params 
	 * @param {CurrentIndex} params 
	 * @returns 
	 */
	likelist: params => {
		return http.get('/yb/like/report/list',params)
	},

	/**
	 * 点赞详情
	 * @param {PageSize} params 
	 * @param {CurrentIndex} params 
	 * @param {ReportId} params 
	 * @param {ReportChapterId} params 
	 * @returns 
	 */
	likeDetail: params => {
		return http.get('/yb/like/list',params)
	},


	/**
	 * 留言板管理员列表
	 * @param {RoleTypeCode} params yb_comment_admin留言板  yb_voice_admin语音 
	 * @param {PageSize} params 
	 * @param {CurrentIndex} params 
	 * @returns 
	 */
	messageManageList: params => {
		return http.get('/system/role/admin/list',params)
	},

	/**
	 * 配置管理员
	 * @param {AdminIds} params 
	 * @param {RoleTypeCode} params yb_comment_admin留言板  yb_voice_admin语音 
	 * @returns 
	 */
	setMessageAuth: params => {
		return http.post('/system/role/admin/add',params)
	},

		/**
		 * 删除管理员
		 * @param {SysRoleAdminId} params 
		 * @returns 
		 */
	delMessageAuth: params => {
		return http.post('/system/role/admin/del',params)
	},

		/**
		 * 所有用户
		 * @param {RoleLevel} params 
		 * @returns 
		 */
	allUserList: () => {
		return http.get('/system/role/seller/list')
	},

	/**
	 * 语音播报板块列表
	 */
	voiceList:params=>{
		return http.get('/yb/voice/section/list',params)
	},

	/**
	 * 语音播报新增板块
	 * @param SectionName 板块名称
	 * @param VarietyId 品种id
	 * @param VarietyName 品种名称
	 */
	addVoiceSection:params=>{
		return http.post('/yb/voice/section/add',params)
	},

	/**
	 * 启用/禁用 语音播报板块
	 * @param SectionId
	 * @param Enable
	 */
	editVoiceSection:params=>{
		return http.get('/yb/voice/section/edit',params)
	},

	

	/* ===========问答评论===================== */
	/**
	 * 点赞/吐槽列表
	 * @param {*} params 
	 * DataType	点赞：like；吐槽：tease
			SortParam	按照点赞/吐槽数排序：num
			SortType	asc  ;  desc
			CurrentIndex
			PageSize
	 * @returns 
	 */
	questionLikeList: params => {
		return http.get('/yb/community/question/like_tease_question_list',params)
	},

	/**
	 * 点赞/吐槽详情列表
	 * @param {*} params 
	 * CommunityQuestionId
	 * DataType
	 * CurrentIndex
	 * PageSize
	 * @returns 
	 */
	questionLikeDetail: params => {
		return http.get('/yb/community/question/like_tease_list',params)
	},

	/**
	 * 问答评论列表
	 * @param {*} params 
	 * CurrentIndex
	 * PageSize
	 * HotStatus   -1:全部 0-未精选，1-已精选
	 * @returns 
	 */
	questionCommentList: params => {
		return http.get('/yb/community/question/comment/list',params)
	},

	/**
	 * 删除评论
	 * @param {*} params  CommunityQuestionCommentId
	 * @returns 
	 */
	questionCommentDel: params => {
		return http.post('/yb/community/question/comment/delete',params)
	},

	/**
	 * 设置精选
	 * @param {*} params CommunityQuestionCommentId
	 * @returns 
	 */
	setHotQuestionComment:  params => {
		return http.post('/yb/community/question/comment/hot',params)
	},

	/**
	 * 留言板消息通知
	 */
	getAllNoticeList:params=>{
		return http.get('/yb/comment/all_list',params)
	},

	// ==========================留言管理
	/**
	 * 所有板块的留言列表
	 * @param {*} params 
	 * CurrentIndex 请求页码
	 * PageSize 请求页数
	 * KeyWord  搜索关键字 --留言内容
	 * ProductType 板块类型序号 1-研报 2-问答社区
	 * @returns 
	 */
	getAllBoardMessage:params=>{
		return http.get('/yb/product/comment/list',params)
	},
	/**
	 * 所有板块列表
	 * @param {*} params 
	 * @returns 
	 */
	 getProductList:params=>{
		return http.get('/yb/comment/product',params)
	},
	/**
	 * 置顶/取消置顶
	 * @param {*} params 
	 * CommentId 留言Id
	 * @returns
	*/
		messageTop:params=>{
		return http.post('/yb/comment/top',params)
	},
	/**
	 * 置顶/取消置顶
	 * @param {*} params 
	 * CommentId 留言Id
	 * ProductType 板块类型序号 1-研报 2-问答社区
	 * @returns 
	*/
	messageDelete:params=>{
		return http.post('/yb/product/comment/del',params)
	},
	/**
	 * 新增回复
	 * @param {*} params 
	 * CommentId 留言Id
	 * content 回复内容
	 * @returns 
	*/
	messageReplay:params=>{
		return http.post('/yb/comment/reply/add',params)
	}
}
