| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import request from '@/service/request'
- export const setDialog = (data: CHAT.DIALOG_PARAMS) => {
- return request<string>({
- url: '/dialog/set',
- method: 'POST',
- data
- })
- }
- export const rmDialog = (id: string) => {
- return request<string>({
- url: '/dialog/rm',
- method: 'POST',
- data: { id }
- })
- }
- export const dialoglist = () => {
- return request<CHAT.DIALOG>({
- url: 'dialog/list',
- method: 'GET'
- })
- }
- export const conversationList = (dialogId: string) => {
- return request<CHAT.CONVERSATION[]>({
- url: `conversation/list?dialog_id=${dialogId}`,
- method: 'GET'
- })
- }
- export const setConversation = (data: CHAT.CONVERSATION) => {
- return request<boolean>({
- url: '/conversation/set',
- method: 'POST',
- data
- })
- }
- export const rmConversation = (data: {'dialog_id': string, 'conversation_ids': string[]}) => {
- return request<boolean>({
- url: 'conversation/rm',
- method: 'POST',
- data
- })
- }
|