Files
ipms-sjy-ui/src/api/mall/promotion/kefu/conversation/index.ts

73 lines
1.4 KiB
TypeScript
Raw Normal View History

2024-07-01 11:36:07 +08:00
import request from '@/config/axios'
// TODO @puhui999注释要不放在属性后面避免太长哈
2024-07-01 11:36:07 +08:00
export interface KeFuConversationRespVO {
/**
*
*/
id: number
/**
*
*/
userId: number
/**
*
*/
userAvatar: string
/**
*
*/
userNickname: string
2024-07-01 11:36:07 +08:00
/**
*
*/
lastMessageTime: Date
/**
*
*/
lastMessageContent: string
/**
*
*/
lastMessageContentType: number
/**
*
*/
adminPinned: boolean
/**
*
*/
userDeleted: boolean
/**
*
*/
adminDeleted: boolean
/**
*
*/
adminUnreadMessageCount: number
/**
*
*/
createTime?: string
}
// 客服会话 API
export const KeFuConversationApi = {
// 获得客服会话列表
getConversationList: async () => {
return await request.get({ url: '/promotion/kefu-conversation/list' })
},
// 客服会话置顶
updateConversationPinned: async (data: any) => {
return await request.put({
url: '/promotion/kefu-conversation/update-conversation-pinned',
data
})
},
// 删除客服会话
deleteConversation: async (id: number) => {
return await request.get({ url: '/promotion/kefu-conversation/delete?id' + id })
}
}