xlb-main-login
Version:
``` yarn install ```
1,997 lines (1,795 loc) • 46 kB
JavaScript
import { img_url, modal_url, QQMapKey, wei_url } from './config'
import { axios } from '@/utils/request'
const baseUrl = '/demo-wechat-work/v1/wechat/work/'
const baseActivity = '/wecom-inner'
const baseActivityWork = '/wecom-inner/v1/wechat/work/'
const baseWork = '/demo-wechat-work'
const baseClient = '/api/demo-wechat-work/v1/analysis'
const testLink = 'http://192.168.0.105:8080/api'
//销售额
export function orderList(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/order/summary',
method: 'get',
params,
})
}
//付费人数
export function paymentlist(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/order/summary',
method: 'get',
params,
})
}
//去重客户数
export function chosenumList(params) {
return axios({
url: '/api/demo-wechat-work/v1/analysis/customer/distinct',
method: 'get',
params,
})
}
//总访客数
export function visitantList(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/uv/summary',
method: 'get',
params,
})
}
//总访问量
export function visitorInfo(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/uv/summary',
method: 'get',
params,
})
}
//销售额图表
export function marketList(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/order/range',
method: 'get',
params,
})
}
//付费人数图表
export function paymentInfo(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/order/range',
method: 'get',
params,
})
}
//访问客数图表
export function graphList(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/uv/range',
method: 'get',
params,
})
}
//访问量图表
export function graphicList(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/uv/range',
method: 'get',
params,
})
}
//销售额排行榜
export function marketRankList(params) {
return axios({
url: baseClient + '/shop/order/rank',
method: 'get',
params,
})
}
//付费人数排行榜
export function paymentRankList(params) {
return axios({
url: baseClient + '/shop/order/rank',
method: 'get',
params,
})
}
//总访客数排行榜
export function graphRankList(params) {
return axios({
url: baseClient + '/shop/uvpv/rank',
method: 'get',
params,
})
}
//总访问量排行榜
export function graphicRankList(params) {
return axios({
url: baseClient + '/shop/uvpv/rank',
method: 'get',
params,
})
}
//销售额详情导出
export function deriveGraphicExcel(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/order/date/e',
method: 'get',
params
})
}
//总客户数
export function customerList() {
return axios({
url: '/api/demo-wechat-work/v1/analysis/customer/summary',
method: 'get',
})
}
//活动总客户数
export function epidemiological() {
return axios({
url: baseClient + '/event/summary',
method: 'get',
})
}
//净增总客户数
export function preparation(params) {
return axios({
url: baseClient + '/event/summary',
method: 'get',
params,
})
}
//删除客户数
export function removeInfoList() {
return axios({
url: baseClient + '/customer/delete/summary',
method: 'get',
})
}
//客户数图表
export function diagramList(params) {
return axios({
url: baseClient + '/customer/range',
method: 'get',
params,
})
}
//活动客户数图表
export function analysisList(params) {
return axios({
url: baseClient + '/event/range',
method: 'get',
params,
})
}
//净增客户数图表
export function increaselist(params) {
return axios({
url: baseClient + '/event/range',
method: 'get',
params,
})
}
//删除客户数图表
export function diagramDeleteList(params) {
return axios({
url: baseClient + '/customer/delete/range',
method: 'get',
params,
})
}
//客户数员工排行榜
export function rankList(params) {
return axios({
url: baseClient + '/customer/rank',
method: 'get',
params,
})
}
//活动客户数排行榜
export function rankActivityList(params) {
return axios({
url: baseClient + '/event/rank',
method: 'get',
params,
})
}
//净增客户数排行榜
export function rankIncreaseList(params) {
return axios({
url: baseClient + '/event/rank',
method: 'get',
params,
})
}
//删除客户数员工排行榜
export function rankDeleteList(params) {
return axios({
url: baseClient + '/customer/delete/rank',
method: 'get',
params,
})
}
//客户数详情
export function correspondentList(params) {
return axios({
url: baseClient + '/customer/date',
method: 'get',
params,
})
}
export function spondentList(params) {
return axios({
url: '/api/demo-distribution/v1/analysis/order/date',
method: 'get',
params,
})
}
//客户数详情导出
export function deriveExcel(params) {
return axios({
url: baseClient + '/customer/date/e',
method: 'get',
params,
})
}
export function removeData(params) {
return axios({
url: img_url + '/demo-wechat-work/v1/wechat/work/custom/lossRemind/number',
method: 'get',
params,
})
}
//批量删除客户号码记录
export function removeList(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: img_url + '/demo-wechat-work/v1/wechat/work/batch-add-custom/phone/batch',
method: 'delete',
data,
})
}
// 趣味测试方式二
export function getQuweiQrcodetwo(id) {
return axios({
url: modal_url + '/demo-wechat-work/v1/wechat/work/festival/' + id + '/work-qr',
method: 'get',
})
}
// 趣味测试方式二
export function getQuweiLinktwo(id) {
return axios({
url: modal_url + '/demo-wechat-work/v1/wechat/work/festival/' + id + '/url',
method: 'get',
})
}
// 查询同步状态
export function getMemberStatus() {
return axios({
url: modal_url + '/demo-wechat-work/v1/wechat/work/staff/status',
method: 'get',
})
}
// 查询单个同步状态
export function getSingleStatus(userId) {
return axios({
url: modal_url +`/demo-wechat-work/v1/wechat/work/staff/${userId}/type`,
method: 'get',
})
}
// 趣味测试方式三
export function getQuweiQunfa(id) {
return axios({
url: modal_url + '/demo-wechat-work/v1/wechat/work/festival/' + id + '/sendMsg',
method: 'get',
})
}
// 提交活动
export function setActivity(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wx-sys/v1/event/',
method: 'post',
data,
})
}
// 更新活动1
export function updateActivity(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wx-sys/v1/event/',
method: 'put',
data,
})
}
// 获取活动列表1
export function getallspreadlist(params) {
return axios({
url: wei_url + '/demo-wx-sys/v1/event/0/',
method: 'get',
params,
})
}
// 开启关闭活动1
export function startSpread(id, type) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wx-sys/v1/event/' + id + '/' + type + '/update',
method: 'put',
})
}
// 删除活动
export function delactivity(id) {
return axios({
url: wei_url + '/demo-wx-sys/v1/event/' + id + '/',
method: 'delete',
})
}
//高级功能
export function advanced(id) {
return axios({
url: wei_url + '/demo-distribution/v1/event/' + id + '/url',
method: 'get',
})
}
//获取活动详情1
export function editActivity(id) {
return axios({
url: wei_url + '/demo-wx-sys/v1/event/0/' + id + '/',
method: 'get',
})
}
//上传海报
export function uploadSpreadBackgroundCards(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: img_url + '/demo-utils/v1/file/sys/bg/file/',
method: 'post',
data,
})
}
//上传公众号活动结束图片
export function uploadActivityEndImage(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: img_url + '/demo-utils/v1/file/sys/m/file/' + '&send=1',
method: 'post',
data,
})
}
//上传公众号活动一级达成
export function uploadLevel1Image(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: img_url + '/demo-utils/v1/file/sys/m/file/' + '&send=1',
method: 'post',
data,
})
}
//上传公众号活动二级达成
export function uploadLevel2Image(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: img_url + '/demo-utils/v1/file/sys/m/file/' + '&send=1',
method: 'post',
data,
})
}
export function uploadLevel3Image(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: img_url + '/demo-utils/v1/file/sys/m/file/' + '&send=1',
method: 'post',
data,
})
}
////订阅号////
// 获取活动列表1
export function getallspreadsuplist(params) {
return axios({
url: wei_url + '/demo-wx-sys/v1/event/1/',
method: 'get',
params,
})
}
//获取活动详情1
export function editsupActivity(id) {
return axios({
url: wei_url + '/demo-wx-sys/v1/event/1/' + id + '/',
method: 'get',
})
}
//获取所有活动列表
export function getallspreadalllist(params) {
return axios({
url: wei_url + '/demo-wx-sys/v1/event/2/',
method: 'get',
params,
})
}
/*企业微信公众号*/
// 编辑活动状态
export function wxstartSpread(type, id, state) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseWork + '/v1/wechat/work/' + 'event/' + type + '/' + id + '/state/' + state,
method: 'put',
})
}
//活动列表
export function wxListActivity(params, type) {
return axios({
url: wei_url + baseUrl + 'event/' + type,
method: 'get',
params,
})
}
//群列表
export function qunListActivity(params, type) {
return axios({
url: modal_url + baseWork + '/v1/wechat/work/event/' + type,
method: 'get',
params,
})
}
//群删除
export function qundelactivity(params) {
return axios({
url: modal_url + baseWork + '/v1/wechat/work/event/4/' + params,
method: 'delete',
})
}
// 群查询
export function quneditActivity(id) {
return axios({
url: modal_url + baseWork + '/v1/wechat/work/event/4/' + id + '/',
method: 'get',
})
}
//新增群渠道码列表
export function posTGroupList(eventId, data, source = '') {
let url = modal_url + baseUrl + 'event/' + eventId + '/spread'
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/'
}
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: url,
method: 'post',
data,
})
}
//分页查询群渠道码列表
export function getGroupList(eventId, params, source = '') {
let url = modal_url + baseUrl + 'event/' + eventId + '/spread'
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/'
params.eventId = eventId
}
console.log(params)
return axios({
url: url,
method: 'get',
params,
})
}
//删除群渠道码列表
export function deleteGruopList(eventId, id, source = '') {
let url = modal_url + baseUrl + 'event/' + eventId + '/spread/' + id
let params
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/'
params = {
eventId: eventId,
id: id,
}
}
return axios({
url: url,
method: 'delete',
params,
})
}
//下载渠道码
export function downGroupWorkQr(eventId, id, source = '') {
let url = modal_url + baseUrl + 'event/' + eventId + '/spread/group/qr/' + id
let params
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/qr/code/' + id
params = {
eventId: eventId,
id: id,
}
}
return axios({
url: url,
method: 'get',
params,
})
}
//渠道码复制链接
export function copyGroupWorkQr(eventId, id, source = '') {
let url = modal_url + baseUrl + 'event/' + eventId + '/spread/group/copy/' + id
let params
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/url'
params = {
eventId: eventId,
id: id,
}
}
return axios({
url: url,
method: 'get',
params,
})
}
//活动删除
export function wxdelactivity(id, type) {
return axios({
url: wei_url + baseUrl + 'event/' + type + '/' + id,
method: 'delete',
})
}
//活动详情
export function wxeditActivity(id, type) {
return axios({
url: wei_url + baseUrl + 'event/' + type + '/' + id,
method: 'get',
})
}
//活动新增
export function wxaddActivity(data, type) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseWork + '/v1/wechat/work/' + 'event/' + type,
method: 'post',
data,
})
}
//活动更新
export function wxupdateActivity(data, type) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'event/' + type,
method: 'put',
data,
})
}
/*企业微信公众号*/
/*企业微信公众号*/
//初始化员工列表
export function inityuanlist(state) {
let url = ''
if (state === 0) {
url = wei_url + baseUrl + 'staff/init3'
} else if (state === 4) {
url = wei_url + baseUrl + 'staff/init4'
} else {
url = wei_url + baseUrl + 'staff/init3'
}
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: url,
method: 'post',
})
}
//获取员工列表
export function yuanlist(params) {
return axios({
url: wei_url + baseUrl + 'staff',
method: 'get',
params,
})
}
//修改员工列表
export function edityuanlist(userid) {
return axios({
url: wei_url + baseUrl + 'staff/' + userid + '/type',
method: 'get',
})
}
//清除员工绑定活动
export function delyuanlist(userid) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'staff/' + userid + '/event/staff',
method: 'put',
})
}
//获取首个推广码
export function tuiguanglist(id, type) {
return axios({
url: wei_url + baseWork + '/v1/wechat/work/' + 'event/' + type + '/' + id + '/qr',
method: 'get',
})
}
//个人朋友圈员工列表
export function personcirclelist(current, size, searchText) {
return axios({
url: wei_url + baseUrl + 'moment/user/' + '?current=' + current + '&size=' + size + '&searchText=' + searchText,
method: 'get',
})
}
//查询朋友圈开启状态
export function searchcircle() {
return axios({
url: wei_url + baseUrl + 'moment/state/',
method: 'get',
})
}
//分页查询自动打标签
export function getAutotags() {
return axios({
url: wei_url + baseUrl + 'tags',
method: 'get',
})
}
//新增自动打标签
export function addAutotags(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'tags',
method: 'post',
data,
})
}
//编辑自动打标签
export function updateAutotags(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'tags',
method: 'put',
data,
})
}
//删除自动打标签
export function deleteAutotags(params) {
return axios({
url: wei_url + baseUrl + 'tags' + '?groupIdList=' + params.groupIdList,
method: 'delete',
})
}
//更新朋友圈开启状态
export function updatecircle(state) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'moment/state/' + state + '',
method: 'put',
})
}
//分页查询所有客户信息
export function getMembers(current, size, query) {
if (query.gender == undefined) {
query.gender = ''
}
if (query.relation == undefined) {
query.relation = ''
}
if (query.spread == undefined) {
query.spread = ''
}
if (query.tagContain == undefined) {
query.tagContain = ''
}
const url =
wei_url +
'/demo-wechat-work/v1/wechat/work/custom' +
'?current=' +
current +
'&size=' +
size +
'&customName=' +
query.customName +
'&endTime=' +
query.endTime +
'&gender=' +
query.gender +
'&relation=' +
query.relation +
'&spread=' +
query.spread +
'&staffUserId=' +
query.staffUserId +
'&startTime=' +
query.startTime +
'&tagContain=' +
query.tagContain +
'&tagId=' +
query.tag
return axios({
url: url,
method: 'get',
})
}
//分页查询所有客户信息
export function getMembersNew(params) {
const url = wei_url + '/demo-wechat-work/v1/wechat/work/custom'
return axios({
url: url,
method: 'get',
params,
})
}
//分页查询流失提醒
export function getLossRemindMembers(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/custom/lossRemind',
method: 'get',
params,
})
}
//导出分页查询流失提醒
export function exportgetLossRemindMembers(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/custom/lossRemind/e',
method: 'get',
params,
})
}
//客户管理导出Excel
export function exportExcel(query) {
if (query.gender == undefined) {
query.gender = ''
}
if (query.relation == undefined) {
query.relation = ''
}
if (query.spread == undefined) {
query.spread = ''
}
if (query.tagContain == undefined) {
query.tagContain = ''
}
if (query.tagId == undefined) {
query.tagId = ''
}
debugger
const url =
wei_url +
baseUrl +
'custom/export' +
'?customName=' +
query.customName +
'&endTime=' +
query.endTime +
'&gender=' +
query.gender +
'&relation=' +
query.relation +
'&spread=' +
query.spread +
'&staffUserId=' +
query.staffUserId +
'&startTime=' +
query.startTime +
'&tagContain=' +
query.tagContain +
'&tagId=' +
query.tagId
return axios({
url: url,
method: 'get',
})
}
//同步所有客户信息
export function syncAllInformation() {
return axios({
url: wei_url + baseUrl + 'custom/syncAll',
method: 'post',
})
}
//批量打标签
export function batchLabeling(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'custom/pushTagBatch',
method: 'post',
data,
})
}
//获取流失状态提醒
export function getLossRemind() {
return axios({
url: wei_url + baseUrl + 'custom/lossRemind/state',
method: 'get',
})
}
//更新流失状态提醒
export function putLossRemind(state) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'custom/lossRemind/state/' + state,
method: 'put',
})
}
//单个客户详情
export function personDetails(externalUserId, staffId) {
return axios({
url: wei_url + baseUrl + 'custom/detail' + '?externalUserId=' + externalUserId + '&staffId=' + staffId,
method: 'get',
})
}
//添加追踪客户详情
export function detailTracking(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'externalUser/trace',
method: 'post',
data,
})
}
//查询客户详情生命周期
export function getlifeCycle() {
return axios({
url: wei_url + '/demo-wechat-work/v1/life-circles',
method: 'get',
})
}
//客户详情添加标签
export function postTagging(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'custom/pushTag',
method: 'post',
data,
})
}
//分页查询客户动态
export function getexternalUserList(externalUserId, staffUserId, current, size) {
const url =
wei_url +
baseUrl +
'externalUser/list' +
'?externalUserId=' +
externalUserId +
'&staffUserId=' +
staffUserId +
'¤t=' +
current +
'&size=' +
size
return axios({
url: url,
method: 'get',
})
}
//分页查询群聊
export function getgroupChatList(groupName, ownerId, current, size) {
const url =
wei_url +
baseUrl +
'group' +
'?ownerId=' +
ownerId +
'&groupName=' +
groupName +
'¤t=' +
current +
'&size=' +
size
return axios({
url: url,
method: 'get',
})
}
//分页查询群聊new 2021-6-30 14:37 lyz
export function getgroupChatListNew(page) {
const url =
wei_url +
baseUrl +
'group' +
'?ownerId=' +
page.ownerId +
'&groupName=' +
page.groupName +
'¤t=' +
page.current +
'&size=' +
page.size
return axios({
url: url,
method: 'get',
})
}
//分页查询群聊
export function getgroupChatShow(params) {
return axios({
url: wei_url + baseUrl + 'group',
method: 'get',
params,
})
}
//同步群数据
export function postgroupChatList() {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'group/syncGroup',
method: 'post',
})
}
//导出群数据
export function exportgroupChatList(groupName, ownerId) {
return axios({
url: wei_url + baseUrl + 'group/export/' + '?groupName=' + groupName + '&ownerId=' + ownerId,
method: 'get',
})
}
//去重客户群数
export function chosenumGroupList(params) {
return axios({
url: '/api/demo-wechat-work/v1/analysis/group/member/distinct',
method: 'get',
params,
})
}
//获取群主 GET
export function getgroupChatOwnerList() {
return axios({
url: wei_url + baseUrl + 'group/owner',
method: 'get',
})
}
//获取员工列表 new 2021-7-1 14:40 lyz
export function getStaffList(params) {
return axios({
url: wei_url + baseUrl + 'staff',
method: 'get',
params,
})
}
//获取群主 GET
export function getgroupChatOwnerListall(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/group/owner',
method: 'get',
params,
})
}
//查询群详情
export function getgroupChatOwnerDetail(chatId) {
return axios({
url: wei_url + baseUrl + 'group/' + chatId,
method: 'get',
})
}
//导出群详情
export function exporTgroupChatOwnerDetail(chatId) {
return axios({
url: wei_url + baseUrl + 'group/export/detail/' + chatId,
method: 'get',
})
}
//分页查询企业微信渠道码列表
export function getspreadList(params, eventId) {
return axios({
url: wei_url + baseUrl + 'event/' + eventId + '/spread',
method: 'get',
params,
})
}
//新增企业微信渠道码列表
export function posTspreadList(eventId, data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'event/' + eventId + '/spread',
method: 'post',
data,
})
}
//编辑企业微信渠道码列表
export function puTspreadList(eventId, data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'event/' + eventId + '/spread',
method: 'put',
data,
})
}
//删除企业微信渠道码列表
export function deleteSpreadList(eventId, id) {
return axios({
url: wei_url + baseUrl + 'event/' + eventId + '/spread/' + id,
method: 'delete',
})
}
//下载渠道码列表
export function downqrcodeQiYe(eventId, id, source) {
let url = wei_url + baseUrl + 'event/' + eventId + '/spread/qr/' + id
let params
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/qr/code'
params = {
eventId: eventId,
id: id,
}
}
return axios({
url: url,
method: 'get',
params,
})
}
// 推广,一键群发
export function groupSend(eventId, id, source) {
let url = wei_url + baseUrl + 'event/' + eventId + '/spread/sendMsg/' + id
let params
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/sendMsg'
params = {
eventId: eventId,
id: id,
}
return axios({
url: url,
method: 'get',
params,
})
} else {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: url,
method: 'post',
})
}
}
// 推广,复制链接
export function copyLink(eventId, id, source = '') {
let url = wei_url + baseUrl + 'event/' + eventId + '/spread/url/' + id
let params
if (source === 'jinqun') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/url'
params = {
eventId: eventId,
id: id,
}
}
return axios({
url: url,
method: 'get',
params,
})
}
//下载好友获客列表
export function downqrcodeQiWorkQr(eventId, id, source = '', type = '') {
let url = wei_url + baseUrl + 'event/' + eventId + '/spread/work-qr/' + id
let params
if (source === 'jinqun') {
if (type === 'FIRST') {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/qr/code'
} else {
url = modal_url + baseWork + '/v1/mp/task/into/group/spread/qr/code/group'
}
params = {
eventId: eventId,
id: id,
}
}
console.log(params)
return axios({
url: url,
method: 'get',
params,
})
}
//企业微信朋友圈列表查询
export function wechatCirclelist(current, size) {
return axios({
url: wei_url + baseUrl + 'moment' + '?current=' + current + '&size=' + size,
method: 'get',
})
}
//发布企业微信朋友圈
export function wechatCirclePublish(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'moment',
method: 'post',
data,
})
}
//编辑企业微信朋友圈
export function wechatCirclEdit(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'moment',
method: 'put',
data,
})
}
//查询企业微信朋友圈详情
export function inquiryCircle(id) {
return axios({
url: wei_url + baseUrl + 'moment/' + id,
method: 'get',
})
}
//删除企业微信朋友圈
export function deleteCircle(id) {
return axios({
url: wei_url + baseUrl + 'moment/' + id + '',
method: 'delete',
})
}
//企业话术查询分组
export function getGroup() {
return axios({
url: wei_url + baseUrl + 'quick-replys/groups',
method: 'get',
})
}
//企业话术新增分组
export function addGroup(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'quick-replys/groups',
method: 'post',
data,
})
}
//企业话术新增分组
export function editGroup(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'quick-replys/groups',
method: 'put',
data,
})
}
//企业话术上移下移接口
export function moveGroup(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'quick-replys/groups/move',
method: 'put',
data,
})
}
//雷达上移下移接口
export function moveRadGroup(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'radar/group/move',
method: 'put',
data,
})
}
//企业话术删除分组
export function deleteGroup(id) {
return axios({
url: wei_url + baseUrl + 'quick-replys/groups/' + id + '',
method: 'delete',
})
}
//企业话术查询话术
export function getMetadatas(params) {
const url = wei_url + baseUrl + 'quick-replys/groups/metadatas'
return axios({
url: url,
method: 'get',
params,
})
}
//企业话术新增话术
export function addMetadatas(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'quick-replys/groups/metadatas',
method: 'post',
data,
})
}
//企业话术修改话术
export function editMetadatas(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'quick-replys/groups/metadatas',
method: 'put',
data,
})
}
//企业话术右侧内容
export function moveMetadatas(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'quick-replys/groups/metadatas/move',
method: 'put',
data,
})
}
//企业话术更新分组数据
export function groupingList(groupId) {
return axios({
url: wei_url + baseUrl + 'quick-replys/groups/info?groupId=' + groupId,
method: 'get',
})
}
//只能雷达右侧内容
export function moveRadardatas(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'radar/move',
method: 'put',
data,
})
}
//企业话术删除话术
export function deleteMetadatas(id) {
return axios({
url: wei_url + baseUrl + 'quick-replys/groups/metadatas/' + id,
method: 'delete',
})
}
//批量加好友获取列表
export function getPhoneList(params) {
const current = params.current
const size = params.size
const staffIds = params.staffIds
const searchText = params.searchText
const type = params.type
const url =
wei_url +
baseUrl +
'batch-add-custom/phone' +
'?current=' +
current +
'&size=' +
size +
'&searchText=' +
searchText +
'&staffIds=' +
staffIds +
'&type=' +
type
return axios({
url: url,
method: 'get',
})
}
//上传文件记录
export function uploadFileRecordGet(params) {
const current = params.current
const size = params.size
const staffIds = params.staffIds
const searchText = params.searchText
const url =
wei_url +
baseUrl +
'batch-add-custom' +
'?current=' +
current +
'&size=' +
size +
'&searchText=' +
searchText +
'&staffIds=' +
staffIds
return axios({
url: url,
method: 'get',
})
}
//上传文件
export function uploadFileRecordPost(data) {
return axios({
headers: { 'Content-Type': 'multipart/form-data' },
url: wei_url + baseUrl + 'batch-add-custom',
method: 'post',
data,
})
}
//批量添加好友删除客户
// export function uploadFileRecordDelete(,id) {
// const url =
// wei_url +
// baseUrl + 'batch-add-custom/'+id+'' +
//
// return axios.delete(url).then(res => {
// return Promise.resolve(res.data);
// })
// }
//批量添加好友删除客户
export function uploadFileRecordDelete(id) {
return axios({
url: wei_url + baseUrl + 'batch-add-custom/phone/' + id,
method: 'delete',
})
}
//查询客户画像配置
export function getWechatConfig() {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/config/' + '?bizId=1',
method: 'get',
})
}
//修改客户画像配置
export function putWechatConfig(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/wechat/work/config/',
method: 'put',
data,
})
}
//直播创建
export function postLiveStatistics(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/wechat/work/living/',
method: 'post',
data,
})
}
//修改直播
export function putLiveStatistics(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/wechat/work/living/',
method: 'put',
data,
})
}
//单个直播详情
export function getLiveStatisticsDetail(id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/living/' + id,
method: 'get',
})
}
//删除直播
export function deleteLiveStatisticsDetail(id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/living/' + id,
method: 'delete',
})
}
//直播查看详情结果
export function getLiveStatisticsListInfo(id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/living/' + id + '/result',
method: 'get',
})
}
//直播统计列表
export function getLiveStatisticsList(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/living/' + '?current=' + params.current + '&size=' + params.size,
method: 'get',
})
}
//直播导出查看详情
export function exportWorkLivingInfo(livingid) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/WorkLivingInfo/export' + '?livingid=' + livingid,
method: 'get',
})
}
//在职继承列表
export function getOnJobMembers(params) {
// if (query.gender == undefined) {
// query.gender = ''
// }
// if (query.spread == undefined) {
// query.spread = ''
// }
const url = wei_url + '/demo-wechat-work/v1/wechat/work/custom-transfer/on-job'
// +
// '?current=' +
// query.current +
// '&size=' +
// query.size +
// '&customName=' +
// query.customName +
// '&endTime=' +
// query.endTime +
// '&gender=' +
// query.gender +
// '&spread=' +
// query.spread +
// '&staffUserId=' +
// query.staffUserId +
// '&startTime=' +
// query.startTime +
// '&tag=' +
// query.tag
return axios({
url: url,
method: 'get',
params,
})
}
// 在职继承分配客户
export function assignCustomers(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/wechat/work/custom-transfer/transfer-custom',
method: 'post',
data,
})
}
//查询分享获客列表
export function getWechatGroupFissionList(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/group/welcome/msg/',
method: 'get',
params,
})
}
//查询分享获客单个详情
export function getWechatGroupFissionSingle(id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/group/welcome/msg/' + id + '?id=' + id,
method: 'get',
})
}
//新增分享获客
export function postWechatGroupFissionSingle(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/group/welcome/msg/',
method: 'post',
data,
})
}
//修改分享获客
export function putWechatGroupFissionSingle(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + '/demo-wechat-work/v1/group/welcome/msg/',
method: 'put',
data,
})
}
//生命周期占比列表
// 海报列表
export function getProportionOfLifeCycleList(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/data/life-circle/data',
method: 'get',
params,
})
}
// 海报列表
export function getProportionExecl(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/data/life-circle/data/e',
method: 'get',
params,
})
}
//客户数据
export function memberList(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/overview/customNum',
method: 'get',
params,
})
}
//客户数据
export function saleroominfo(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/overview/staffOrder',
method: 'get',
params,
})
}
//标签占比列表
export function getProportionOfLabelsList(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/custom/analysis/tag',
method: 'get',
params,
})
}
//标签占比列表
export function getProportionOExelc(params) {
return axios({
url: wei_url + '/demo-wechat-work/v1/wechat/work/custom/analysis/tag/e',
method: 'get',
params,
})
}
//删除分享获客
export function deleteWechatGroupFissionSingle(id) {
return axios({
url: wei_url + '/demo-wechat-work/v1/group/welcome/msg/' + id,
method: 'delete',
})
}
//查询雷达列表
export function getRadarListPagination(params) {
return axios({
url: wei_url + baseUrl + 'radar/',
method: 'get',
params,
})
}
//新增智能雷达分组
export function getRadarGroup() {
return axios({
url: wei_url + baseUrl + 'radar/group',
method: 'get',
})
}
//新增智能雷达分组
export function addRadarGroup(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'radar/group',
method: 'post',
data,
})
}
//编辑智能雷达分组
export function editRadarGroup(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'radar/group',
method: 'put',
data,
})
}
//删除智能雷达分组
export function deleteRadarGroup(id) {
return axios({
url: wei_url + baseUrl + 'radar/group/' + id,
method: 'delete',
})
}
//查询单个智能雷达分组group/info
export function getRadar(id) {
return axios({
url: wei_url + baseUrl + 'radar/' + id,
method: 'GET',
})
}
//删除单个智能雷达
export function deleteRadar(id) {
return axios({
url: wei_url + baseUrl + 'radar/' + id,
method: 'delete',
})
}
//获取编辑单个智能雷达详情
export function radargroupingList(groupId) {
return axios({
url: wei_url + baseUrl + 'radar/group/info?groupId=' + groupId,
method: 'get',
})
}
//创建单个智能雷达
export function postRadar(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url +baseUrl + 'radar/',
method: 'post',
data,
})
}
//编辑单个智能雷达
export function putRadar(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url +baseUrl + 'radar/',
method: 'put',
data,
})
}
//获取单个智能雷达详情页
export function getRadarDetailList(id, query) {
if (!query.name) {
query.name = ''
}
if (!query.endTime) {
query.endTime = ''
}
if (!query.startTime) {
query.startTime = ''
}
if (!query.spread || query.spread != 0) {
query.spread = ''
}
if (query.staffUserId.length <= 0) {
query.staffUserId = ''
}
const url =
wei_url +
baseUrl +
'radar/' +
id+
'/detail/user' +
'?current=' +
query.current +
'&size=' +
query.size +
'&name=' +
query.name +
'&endTime=' +
query.endTime +
'&spread=' +
query.spread +
'&staffUserId=' +
query.staffUserId +
'&startTime=' +
query.startTime
return axios({
url: url,
method: 'get',
})
}
//获取单个智能雷达详情页
export function getRadarDetail(id,query) {
return axios({
url: wei_url + baseUrl + 'radar/' + id + '/detail',
method: 'get',
})
}
//*********************企业红包*************************
//企业红包列表
export function getRedpacklist(params) {
return axios({
url: wei_url + baseUrl + 'redPacketTool/',
method: 'get',
params,
})
}
//企业红包开启关闭
export function getRedpackstatus(id, state) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'redPacketTool/' + id + '/' + state,
method: 'put',
})
}
//新增企业红包
export function getRedpackadd(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'redPacketTool/',
method: 'post',
data,
})
}
//编辑企业红包
export function getRedpackedit(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'redPacketTool/',
method: 'put',
data,
})
}
//删除企业红包
export function getRedpackdelete(id) {
return axios({
url: wei_url + baseUrl + 'redPacketTool/' + id,
method: 'delete',
})
}
//红包已发放金额
export function getactivityfindmoney(id) {
return axios({
url: wei_url + baseUrl + 'redPacketTool/' + id + '/sentMoney',
method: 'get',
})
}
//企业红包详情
export function getRedpackdetail(id) {
return axios({
url: wei_url + baseUrl + 'redPacketTool/' + id,
method: 'get',
})
}
//单个企业红包数据分析
export function getRedpackanalysis(id) {
return axios({
url: wei_url + baseUrl + 'radar/' + id + '/detail',
method: 'get',
})
}
//整体企业红包客户数
export function getactivitynum(params) {
return axios({
url: wei_url + baseUrl + 'redPacketTool/data/info',
method: 'get',
params,
})
}
//整体企业红包数据分析
export function getRedpackanalysisall(params) {
const data = JSON.stringify(params)
var param = JSON.parse(data)
if (param.min) {
param.min = parseInt(param.min * 100)
}
if (param.max) {
param.max = parseInt(param.max * 100)
}
return axios({
url: wei_url + baseUrl + 'redPacketTool/data/user',
method: 'get',
params,
})
}
//整体企业红包数据分析下载
export function getRedpackanalysisallexport(params) {
const data = JSON.stringify(params)
var param = JSON.parse(data)
if (param.min) {
param.min = parseInt(param.min * 100)
}
if (param.max) {
param.max = parseInt(param.max * 100)
}
if (param.redPacketId) {
param.redPacketId = param.redPacketId.toString()
}
return axios({
url: wei_url + baseUrl + 'redPacketTool/data/export',
method: 'get',
params,
})
}
//成员朋友圈配置
export function getMomentSend(data) {
return axios({
headers: { 'Content-Type': 'application/json;charset=UTF-8' },
url: wei_url + baseUrl + 'moment/send/config',
method: 'post',
data,
})
}
//downloadStencil
export function downloadStencil(type, groupId, token) {
window.location.href =
wei_url + baseUrl + 'quick-replys/upload/template?type=' + type + '&groupId=' + groupId + '&access_token=' + token
}
//快捷话术导出话术
export function deriveMetadata(type, groupId, token) {
window.location.href =
wei_url + baseUrl + 'quick-replys/export/metadatas?type=' + type + '&groupId=' + groupId + '&access_token=' + token
}
//快捷话术导入话术
export function channelMetadata(data, type, searchText) {
return axios({
headers: { 'Content-Type': 'multipart/form-data' },
url: wei_url + baseUrl + 'quick-replys/import/metadatas?type=' + type + '&searchText=' + searchText,
method: 'post',
data,
})
}
axios.jsonp = (url, data) => {
if (!url) throw new Error('url is necessary')
const callback = 'CALLBACK' + Math.random().toString().substr(9, 18)
const JSONP = document.createElement('script')
JSONP.setAttribute('type', 'text/javascript')
const headEle = document.getElementsByTagName('head')[0]
let ret = ''
if (data) {
if (typeof data === 'string') ret = '&' + data
else if (typeof data === 'object') {
for (const key in data) ret += '&' + key + '=' + encodeURIComponent(data[key])
}
ret += '&_time=' + Date.now()
}
JSONP.src = `${url}?callback=${callback}${ret}`
return new Promise((resolve) => {
window[callback] = (r) => {
resolve(r)
headEle.removeChild(JSONP)
delete window[callback]
}
headEle.appendChild(JSONP)
})
}
// 腾讯地图关键词搜索
export function getQQMapKeywordsSearch(keyword) {
// 地图api较少,不需要切换线上和测试没单独用config文件
return axios.jsonp('https://apis.map.qq.com/ws/place/v1/suggestion/', {
region: '南京',
keyword: keyword,
key: QQMapKey,
output: 'jsonp',
})
}