import {get,post} from './http'
/* 留言 */

/**
 * 点赞/取消
 * "report_id": 2351,
    "report_chapter_id": 1166,
		"old_report_id":0,
		"old_report_chapter_id":0,
		"source_agent": 1
 */
export const setLike = params => {
	return post('/like/set',{ ...params,source_agent: 1 })
}

/**
 * 发布留言
 * "report_id": 2236,
	"report_chapter_id": 267,
	"old_report_id":0,
	"old_report_chapter_id":0,
	"source_agent":1,
	"content":"hiodfsdfsd",
	"is_show_name":1
	*/
export const publishMsg = params => {
	return post('/comment/set',{...params,source_agent: 1})
}

/**
 * 删除留言
 * comment_id
 */
export const delComment = params => {
	return post('/comment/del',params)
}

/**
 * 精选留言列表 
 * @param {*} params 
 * report_id report_chapter_id current_index page_size old_report_id old_report_chapter_id
 * @returns 
 */
export const getHotMessage = params => {
	return get('/comment/hot',params)
}

/**
 * 我的留言列表 
 * @param {*} params 
 * report_id report_chapter_id old_report_id old_report_chapter_id
 * @returns 
 */
export const getMyMessage = params => {
	return get('/comment/my',params)
}