index.js
2.18 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
/**
* 拓客户,看线索接口
*/
import api from '~/utils/request/request'
const serverApi = {
// 拓客户
productByscene: 'scrm.api.busassistant.activity.findSceneProductStatus',
// 看线索
unread: 'scrm.api.busassistant.clue.unread', //获取未读线索数量
page: 'scrm.api.busassistant.clue.page', //分页查询线索列表
read: 'scrm.api.busassistant.clue.read', //标记线索已读
tag: 'scrm.api.busassistant.clue.tag', //线索标记意向客户
battleMessage: 'scrm.api.busassistant.message.battleMessage' //获取最新战报消息
}
// 拓客户
const productBysceneApi = data => {
return api.post(
{
method: serverApi.productByscene,
...data
},
true
)
}
// 看线索
const unreadApi = data => {
return api.post(
{
method: serverApi.unread,
...data
},
true
)
}
const pageApi = data => {
return api.post(
{
method: serverApi.page,
...data
},
true
)
}
const readApi = data => {
return api.post(
{
method: serverApi.read,
...data
},
true
)
}
const tagApi = data => {
return api.post(
{
method: serverApi.tag,
...data
},
true
)
}
const battleMessageApi = data => {
return api.post({
method: serverApi.battleMessage,
...data
})
}
// 获取活动记录全集
const getActivityRecordApi = data => {
return api.post({
method: `entmicro.api.business.activityRecord.list`,
apiProjectName: 'drac',
...data
}, true)
}
// 根据id查询
const getActivityDetailApi = data => {
return api.post({
method: `entmicro.api.business.activityRecord.detail`,
apiProjectName: 'drac',
...data
})
}
module.exports = {
/** 线索埋点数据上报
* operationType 操作类型(0:分享 1:浏览 2:申请活动)
*/
reportData(data = {}, operationType = 0) {
return api.post({
method: 'scrm.api.busassistant.clue.report',
...data,
operationType,
operationDate: new Date().format('yyyy-MM-dd hh:mm:ss')
})
},
productBysceneApi,
unreadApi,
pageApi,
readApi,
tagApi,
battleMessageApi,
getActivityRecordApi,
getActivityDetailApi
}