76 lines
1.2 KiB
JavaScript
76 lines
1.2 KiB
JavaScript
import request from "@/utils/request/request";
|
|
|
|
export const getSessionList = (data) => {
|
|
return request({
|
|
url: '/chat/list',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export const sessionDetailReq = (data) => {
|
|
return request({
|
|
url: '/chat/detail',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export const createSession = (data) => {
|
|
return request({
|
|
url: '/chat/create',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export const postRequest = (url,data) => {
|
|
return request({
|
|
url,
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export const uploadImg = (data) => {
|
|
return request({
|
|
loading:false,
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data'
|
|
},
|
|
url:'/upload/img',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
export const uploadFormData = (data) => {
|
|
return request({
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data'
|
|
},
|
|
url:'/chat/get-file-text',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
// 登录
|
|
export const loginApi = (data) => {
|
|
return request({
|
|
url: '/user/login',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
// 获取验证码
|
|
export const getCode = (data) => {
|
|
return request({
|
|
url: '/user/send',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
// 菜单
|
|
export const getMenuApi = (data) => {
|
|
return request({
|
|
url: '/rule/rules',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|