import request from '@/utils/request'



//查询会话记录列表
export function getList(data) {
    return request({
        url: `/core/conversation/list`,
        method: 'post',
        data
    })
}


//发送
export function sendMsg(data) {
    return request({
        url: `/core/conversation/sendMsg`,
        method: 'post',
        data
    })
}


//订单页面 点击沟通 获取会话记录详细信息
export function getOrderConversationInfo(data) {
    return request({
        url: `/core/conversation/getOrderConversationInfo`,
        method: 'post',
        data
    })
}

//消息列表页面 点击会话 获取会话记录详细信息
export function getListConversationInfo(params) {
    return request({
        url: `/core/conversation/getListConversationInfo`,
        method: 'get',
        params
    })
}


//帮助与客服，获取与客服会话记录和详细信息
export function getHelpConversation(data) {
    return request({
        url: `/core/conversation/getHelpConversation`,
        method: 'post',
        data
    })
}


//打开会话框时，设置已读
export function setRead(data) {
    return request({
        url: `/core/conversation/setRead`,
        method: 'post',
        data
    })
}



//删除会话记录
export function conversationRemove(data) {
    return request({
        url: `/core/conversation/remove`,
        method: 'post',
        data
    })
}


//获取历史聊天记录，目前设置为获取10条
export function getHistoryMsg(data) {
    return request({
        url: `/core/conversation/getHistoryMsg`,
        method: 'post',
        data
    })
}