import {httpApi} from "../../request/httpApi";

export default {
    //获取工单服务列表
    async queryUserOpinionPage(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinion/queryUserOpinionPage',
            method: 'get',
            params: form
        }, msg);
    },
    //获取当前用户提交的工单服务
    async queryCurrentUserOpinionList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinion/queryCurrentUserOpinionList',
            method: 'post',
            data: form
        }, msg)
    },
    //新增工单服务信息
    async saveUserOpinion(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinion/saveUserOpinion',
            method: 'post',
            data: form
        }, msg)
    },
    //获取当前工单的最新流程
    async queryUserFlowOpinion(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinionFlow/queryCurrentUserOpinionFlowByUserOpinionId',
            method: 'get',
            params: form
        }, msg)
    },
    //统合处理意见接口
    async disposeUserFeedback(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinionFlow/disposeUserOpinionFeedback',
            method: 'post',
            params: form
        }, msg)
    },
    //获取字典信息
    async queryDictBizList(msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinion/queryDictBizList',
            method: 'get'
        },msg)
    },
    //获取当前工单下的所有评论
    async queryCommentsList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinionComments/queryUserOpinionCommentsByUserOpinionId',
            method: 'get',
            params: form
        }, msg)
    },
    //新增评论
    async saveUserComments(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinionComments/saveUserOpinionComments',
            method: 'post',
            data: form
        }, msg)
    },
    //点赞
    async addGoodNumber(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinion/addGoodNumber',
            method: 'post',
            params: form
        }, msg)
    },
    //取消点赞
    async cancelGood(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userOpinion/cancelGood',
            method: 'post',
            params: form
        }, msg)
    },
}
