index.js
3.81 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
173
174
175
176
177
import req from "@/api/http.js";
function getCommonConfig(config) {
return {
...config,
serverIp:
window.localStorage.getItem("serverIp") || "https://store.keliuyun.com",
};
}
const tourApi = {
getLiveAddress(params, config) {
return req(
"get",
`/patrol/patrolDeviceChannel/getLiveAddress/${params.id}`,
params,
getCommonConfig(config)
);
},
// 查询视频平台token
getPatrolDeviceToken(params, config) {
return req("GET", `/patrol/patrolDevice/token`, params, config);
},
getLiveInfo(params, config) {
return req(
"get",
`/patrol/patrolDeviceChannel/getLiveInfo/${params.id}`,
params,
getCommonConfig(config)
);
},
// 截图
getCapture(params, config) {
return req(
"get",
`/patrol/patrolDeviceChannel/capture/${params.id}`,
params,
getCommonConfig(config)
);
},
// 提交巡店记录
submitPatrolRecord(params, config) {
return req("post", `/patrol/patrolRecord`, params, getCommonConfig(config));
},
setBookmark(params, config) {
return req(
"post",
`/patrol/patrolGate/bookmark`,
params,
getCommonConfig(config)
);
},
delBookmark(params, config) {
return req(
"post",
`/patrol/patrolGate/unbookmark`,
params,
getCommonConfig(config)
);
},
// 获取监控点
getPatrolGateList(params, config) {
return req(
"get",
`/patrol/patrolGate/list`,
params,
getCommonConfig(config)
);
},
uploadScreenshot(params, config) {
return req(
"post",
`/patrol/b-patrol-screenshot`,
params,
getCommonConfig(config)
);
},
// 获取抓拍图
getScreenshotList(params, config) {
return req(
"GET",
`/b-patrol-screenshot/list`,
params,
getCommonConfig(config)
);
},
// 巡店模板
getPatrolTemplateListFun(params, config) {
return req(
"get",
`/patrol/b-patrol-template/list`,
params,
getCommonConfig(config)
);
},
// 查询单个模板
getPatrolTemplateOne(params, config) {
return req(
"get",
`/patrol/b-patrol-template/${params.id}`,
params,
getCommonConfig(config)
);
},
getPatrolSopTypeTree(params, config) {
return req(
"get",
`/patrol/patrolSopType/tree`,
params,
getCommonConfig(config)
);
},
getUsers(params, config) {
return req(
"get",
`/patrol/s-user/mall/${params.mallId}`,
{},
getCommonConfig(config)
);
},
//提交巡店记录
confirmPatrolRecord(params, config) {
return req("post", `/patrol/patrolRecord`, params, getCommonConfig(config));
},
// 获取通道的视频直播与回放地址
getLiveAndPlaybackAddress(params, config) {
return req(
"GET",
`/patrol/patrolDeviceChannel/getLiveAndPlaybackAddress`,
params,
getCommonConfig(config)
);
},
// 云控制
ptzStart(params, config) {
return req(
"PUT",
`/patrol/patrolDeviceChannel/ptzStart`,
params,
getCommonConfig(config)
);
},
ptzStop(params, config) {
return req(
"PUT",
`/patrol/patrolDeviceChannel/ptzStop`,
params,
getCommonConfig(config)
);
},
// 获取设备录像记录
getThroughVideoRecord(params, config) {
return req(
"GET",
`/patrol/patrolDeviceChannel/video/record`,
params,
getCommonConfig(config)
);
},
// 获取设备分组
getDeviceGroupList(shopId) {
return req(
"GET",
`/patrol/b-mall-org/mall/${shopId}`,
{},
getCommonConfig({})
);
},
// 修改监控场景
editPatrolGate(params, config) {
return req(
"PUT",
`/patrol/patrolGate/${params.id}`,
params,
getCommonConfig(config)
);
},
};
export default tourApi;