xlb-main-login
Version:
``` yarn install ```
137 lines (118 loc) • 3.63 kB
JavaScript
import { wei_url } from '@/api/config'
import { axios } from '@/utils/request'
const baseUrl = '/demo-wechat-work/v1/wechat/work/'
/* *************************** 列表页 ************************* */
//渠道活码列表
export function getgreetlist(params, type) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/' + type,
method: 'get',
params,
})
}
//渠道码 - 导出
export function exportExcel(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/1/data/export/source',
method: 'get',
params,
})
}
//删除语列表
export function delgreetlist(type, id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/' + type + '/' + id,
method: 'delete',
})
}
//查询单个数据二维码
export function getmemberqr(type, id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/' + type + '/' + id + '/img',
method: 'get',
})
}
//下载渠道码
export function downsDitch(type, id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/' + type + '/' + id + '/img',
method: 'get',
})
}
/* *************************** 新增/编辑页 ************************* */
//新增欢迎语列表
export function addgreet(data, type) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/' + type,
method: 'post',
data,
})
}
//查询欢迎语列表
export function greetdetail(type, id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/' + type + '/' + id,
method: 'get',
})
}
//编辑欢迎语列表
export function uploadgreet(data, type) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/' + type,
method: 'put',
data,
})
}
/* *************************** 数据分析页 ************************* */
// type: 1:渠道码页面 2:欢迎语页面
//渠道码卡片数据 http://localhost:8080/v1/wechat/work/source/{type}/{id}/data/info
export function ditchHead(id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/1/' + id + '/data/info',
method: 'get',
})
}
//渠道码 渠道分析-统计时间
export function ditchTrend(id, params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/1/' + id + '/data/chart',
method: 'get',
params,
})
}
//渠道码 用户列表
export function userlistdata(id, params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/1/' + id + '/data/user',
method: 'get',
params,
})
}
/* *************************** 选择标签 ************************* */
//新增自动打标签
export function addAutotags(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'tags',
method: 'post',
data,
})
}
//分页查询自动打标签
export function getAutotags() {
return axios({
url: wei_url + baseUrl + 'tags',
method: 'get',
})
}
/* *************************** 用户列表 ************************* */
//渠道码-用户列表-导出 export
export function userListexport(id, params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/source/1/' + id + '/data/export',
method: 'get',
params,
})
}