xlb-main-login
Version:
``` yarn install ```
161 lines (143 loc) • 3.73 kB
JavaScript
import { img_url, wei_url } from './config'
import { axios } from '@/utils/request'
// 客服列表
export function getCustomlist(params) {
return axios({
url: wei_url + '/demo-pub/v1/message/',
method: 'get',
params,
})
}
// 发送客服文字
export function Customsendtext(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/v1/event/save',
method: 'post',
data,
})
}
// 发送客服图文
export function Customsend(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/v1/event/save',
method: 'post',
data,
})
}
// 查询用户
export function wxUserSearch(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/v1/event/save',
method: 'post',
data,
})
}
// 发送模板
export function sendCustomToWx(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-pub/v1/message/push/',
method: 'post',
data,
})
}
// 删除图片
export function delCustomtext(id, type) {
return axios({
url: wei_url + '/demo-pub/v1/message/' + type + '/' + id + '/',
method: 'delete',
})
}
// 删除图文
export function delCustomdis(id, type) {
return axios({
url: wei_url + '/demo-pub/v1/message/' + type + '/' + id + '/',
method: 'delete',
})
}
// 新增客服消息 文字
export function Customsavetext(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-pub/v1/message/2/',
method: 'post',
data,
})
}
// 修改客服消息 文字
export function editCustomsavetext(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-pub/v1/message/2/',
method: 'put',
data,
})
}
// 客服消息 文字详情
export function Customsavetextdetail(id) {
return axios({
url: wei_url + '/demo-pub/v1/message/2/' + id + '/',
method: 'get',
})
}
// 修改客服消息 图文详情
export function Customsavedisetail(id) {
return axios({
url: wei_url + '/demo-pub/v1/message/1/' + id + '/',
method: 'get',
})
}
// 新增客服消息 图文
export function Customsavedis(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-pub/v1/message/1/',
method: 'post',
data,
})
}
// 修改客服消息 图文
export function editCustomsavedis(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-pub/v1/message/1/',
method: 'put',
data,
})
}
//上传图片图片
export function uploadFormText(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-utils/v1/file/pub/msg/file/',
method: 'post',
data,
})
}
//上传图文图片
export function uploadFormDis(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-utils/v1/file/pub/msg/file/',
method: 'post',
data,
})
}
//用户列表查询
export function getcustomslist(params) {
return axios({
url: img_url + '/demo-wx-config/v1/config/user/list/',
method: 'get',
params,
})
}
//所有用户数量查询
export function getcustomslcount() {
return axios({
url: wei_url + '/demo-pub/v1/message/count/',
method: 'get',
})
}