marketing.js
3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 16:16:03
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-28 17:47:10
* @FilePath: \scrm-micro-link\src\api\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http, http_gpt, http_merchant, http_no_session } from '@/main'
const url = '/rop-scrm-entmicro/router'
//客户概览
const viewData = params => {
params.method = 'entmicro.api.Customer.customer.view.data'
return http({
url,
method: 'POST',
data: params,
sign: true
})
}
const getChatGPTList = params => {
return http_gpt({
url: 'openai/title',
method: 'POST',
data: params,
sign: false,
returnAll: false
})
}
const calendarPage = params => {
params.method = 'marketing.api.calendar.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
const calendarDetail = params => {
params.method = 'marketing.api.calendar.detail'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//营销任务-导入客户
const importCustomer = params => {
params.method = 'marketing.api.supermarket.importCustomer'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//获取机器人下拉列表
const getRobotList = params => {
params.method = 'marketing.api.supermarket.bulge.getRobotList'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//查询员工列表
const findMerchantStaffList = params => {
params.method = 'merchants.api.open.findMerchantStaffList'
return http_merchant({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
//创建超级营销
const createSuperMarketing = params => {
params.method = 'marketing.api.supermarket.createSuperMarketing'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
const findActivityInfo = params => {
params.method = 'marketing.api.supermarket.findActivityInfo'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//获取小管家二维码
const EntWechatQrCode = params => {
params.method = 'marketing.api.supermarket.EntWechatQrCode'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
const activityDetail = params => {
params.method = 'scrm.api.shopmall.activity.detail'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 门店详情
const findMerchantDetailByMerchantNo = params => {
params.method = 'merchants.api.open.findMerchantDetailByMerchantNo'
return http_merchant({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const registerSso = params => {
params.method = 'scrm.api.shopmall.staff.bulge.register'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const updateApi = params => {
params.method = `scrm.api.shopmall.activity.bulge.add.or.update`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const importModel = params => {
params.method = `marketing.api.supermarket.customer.importModel`
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
viewData,
getChatGPTList,
calendarPage,
calendarDetail,
importCustomer,
getRobotList,
findMerchantStaffList,
createSuperMarketing,
updateApi,
activityDetail,
findActivityInfo,
registerSso,
EntWechatQrCode,
findMerchantDetailByMerchantNo,
importModel
}