正在显示
1 个修改的文件
包含
0 行增加
和
597 行删除
接口模型.md
已删除
100644 → 0
1 | -## 认证 | ||
2 | - | ||
3 | -### 登录 | ||
4 | - | ||
5 | -* URL: /v1/auth/login | ||
6 | -* 格式: JSON | ||
7 | -* HTTP请求方式: POST | ||
8 | -* 请求示例 | ||
9 | -```json | ||
10 | -{ | ||
11 | - "uid":3507839547244544 | ||
12 | -} | ||
13 | -``` | ||
14 | - | ||
15 | - | ||
16 | -* 应答示例 | ||
17 | -```json | ||
18 | -{ | ||
19 | - "code": 0, | ||
20 | - "msg": "登录成功", | ||
21 | - "data": { | ||
22 | - "authCode": "f7641e7d1cb811ea942d000c29ad8d6d" | ||
23 | - } | ||
24 | -} | ||
25 | -``` | ||
26 | - | ||
27 | - | ||
28 | -### 短信验证码 | ||
29 | - | ||
30 | -* URL: /v1/auth/smsCode | ||
31 | -* 格式: JSON | ||
32 | -* HTTP请求方式: POST | ||
33 | -* 请求示例 | ||
34 | -```json | ||
35 | -{ | ||
36 | - "phone":"18860180001" | ||
37 | -} | ||
38 | -``` | ||
39 | - | ||
40 | - | ||
41 | -* 应答示例 | ||
42 | -```json | ||
43 | -{ | ||
44 | - "code": 0, | ||
45 | - "msg": "登录成功", | ||
46 | - "data":{} | ||
47 | -} | ||
48 | -``` | ||
49 | - | ||
50 | - | ||
51 | -### 获取token | ||
52 | - | ||
53 | -* URL: /v1/auth/accessToken | ||
54 | -* 格式: JSON | ||
55 | -* HTTP请求方式: POST | ||
56 | -* 请求示例 | ||
57 | -```json | ||
58 | -{ | ||
59 | - "clientId":"lks3Z8Ncn2j", | ||
60 | - "clientSecret":"gtfhyjukiol3Qncbvmdwe67khh", | ||
61 | - "authCode":"5251839614a611eaab01000c29ad8d6d" | ||
62 | -} | ||
63 | -``` | ||
64 | - | ||
65 | - | ||
66 | -* 应答示例 | ||
67 | -```json | ||
68 | -{ | ||
69 | - "code": 0, | ||
70 | - "msg": "成功", | ||
71 | - "data": { | ||
72 | - "refreshToken": "8debc5a314a611eaab01000c29ad8d6d", | ||
73 | - "accessToken": "8debc59814a611eaab01000c29ad8d6d", | ||
74 | - "expiresIn": 3600 | ||
75 | - } | ||
76 | -} | ||
77 | -``` | ||
78 | - | ||
79 | -### 刷新token | ||
80 | - | ||
81 | -* URL: /v1/auth/refreshToken | ||
82 | -* 格式: JSON | ||
83 | -* HTTP请求方式: POST | ||
84 | -* 请求示例 | ||
85 | -```json | ||
86 | -{ | ||
87 | - "clientId":"lks3Z8Ncn2j", | ||
88 | - "clientSecret":"gtfhyjukiol3Qncbvmdwe67khh", | ||
89 | - "refreshToken":"8debc5a314a611eaab01000c29ad8d6d" | ||
90 | -} | ||
91 | -``` | ||
92 | - | ||
93 | - | ||
94 | -* 应答示例 | ||
95 | -```json | ||
96 | -{ | ||
97 | - "code": 0, | ||
98 | - "msg": "成功", | ||
99 | - "data": { | ||
100 | - "refreshToken": "8debc5a314a611eaab01000c29ad8d6d", | ||
101 | - "accessToken": "dd57fa4914a611eaab01000c29ad8d6d", | ||
102 | - "expiresIn": 3600 | ||
103 | - } | ||
104 | -} | ||
105 | -``` | ||
106 | - | ||
107 | -### 更新设备 | ||
108 | - | ||
109 | -* URL: /v1/auth/updateDevice | ||
110 | -* 格式: JSON | ||
111 | -* HTTP请求方式: POST | ||
112 | -* 请求示例 | ||
113 | -```json | ||
114 | -{ | ||
115 | - "clientId":"123456", | ||
116 | - "deviceToken":"123456" | ||
117 | -} | ||
118 | -``` | ||
119 | - | ||
120 | - | ||
121 | -* 应答示例 | ||
122 | -```json | ||
123 | -{ | ||
124 | - "code": 0, | ||
125 | - "msg": "更新成功", | ||
126 | - "data": null | ||
127 | -} | ||
128 | -``` | ||
129 | - | ||
130 | - | ||
131 | -### 注销登录 | ||
132 | - | ||
133 | -* URL: /v1/auth/rovoke | ||
134 | -* 格式: JSON | ||
135 | -* HTTP请求方式: POST | ||
136 | -* 请求示例 | ||
137 | -```json | ||
138 | -{ | ||
139 | - | ||
140 | -} | ||
141 | -``` | ||
142 | - | ||
143 | - | ||
144 | -* 应答示例 | ||
145 | -```json | ||
146 | -{ | ||
147 | - "code": 0, | ||
148 | - "msg": "成功", | ||
149 | - "data":{} | ||
150 | -} | ||
151 | -``` | ||
152 | - | ||
153 | -## 用户中心 | ||
154 | - | ||
155 | -### 修改手机号 检查手机验证码 | ||
156 | -* URL: /v1/user/checkSmsCode | ||
157 | -* 格式: JSON | ||
158 | -* HTTP请求方式: POST | ||
159 | -* 请求示例 | ||
160 | -```json | ||
161 | -{ | ||
162 | - "captcha":"252051" | ||
163 | -} | ||
164 | -``` | ||
165 | - | ||
166 | -* 应答示例 | ||
167 | -```json | ||
168 | -{ | ||
169 | - "code": 0, | ||
170 | - "msg": "成功", | ||
171 | - "data":{} | ||
172 | -} | ||
173 | -``` | ||
174 | - | ||
175 | - | ||
176 | -### 修改手机号 | ||
177 | -* URL: /v1/user/changePhone | ||
178 | -* 格式: JSON | ||
179 | -* HTTP请求方式: POST | ||
180 | -* 请求示例 | ||
181 | -```json | ||
182 | -{ | ||
183 | - "phone":"18860180001", | ||
184 | - "captcha":"077163" | ||
185 | -} | ||
186 | -``` | ||
187 | - | ||
188 | -* 应答示例 | ||
189 | -```json | ||
190 | -{ | ||
191 | - "code": 0, | ||
192 | - "msg": "成功", | ||
193 | - "data":{} | ||
194 | -} | ||
195 | -``` | ||
196 | - | ||
197 | -### 重置密码 | ||
198 | -* URL: /v1/user/resetPassword | ||
199 | -* 格式: JSON | ||
200 | -* HTTP请求方式: POST | ||
201 | -* 请求示例 | ||
202 | -```json | ||
203 | -{ | ||
204 | - "newPwd":"123456", | ||
205 | - "confirmPwd":"123456" | ||
206 | -} | ||
207 | -``` | ||
208 | - | ||
209 | -* 应答示例 | ||
210 | -```json | ||
211 | -{ | ||
212 | - "code": 0, | ||
213 | - "msg": "成功", | ||
214 | - "data":{} | ||
215 | -} | ||
216 | -``` | ||
217 | - | ||
218 | -### 修改密码 | ||
219 | -* URL: /v1/user/changePassword | ||
220 | -* 格式: JSON | ||
221 | -* HTTP请求方式: POST | ||
222 | -* 请求示例 | ||
223 | -```json | ||
224 | -{ | ||
225 | - "newPwd":"1234567", | ||
226 | - "confirmPwd":"1234567", | ||
227 | - "oldPwd":"123456" | ||
228 | -} | ||
229 | -``` | ||
230 | - | ||
231 | -* 应答示例 | ||
232 | -```json | ||
233 | -{ | ||
234 | - "code": 0, | ||
235 | - "msg": "成功", | ||
236 | - "data":{} | ||
237 | -} | ||
238 | -``` | ||
239 | - | ||
240 | -### 用户信息 | ||
241 | -* URL: /v1/user/userInfo | ||
242 | -* 格式: JSON | ||
243 | -* HTTP请求方式: POST | ||
244 | -* 请求示例 | ||
245 | -```json | ||
246 | -{ | ||
247 | -} | ||
248 | -``` | ||
249 | - | ||
250 | -* 应答示例 | ||
251 | -```json | ||
252 | -{ | ||
253 | - "code": 0, | ||
254 | - "msg": "成功", | ||
255 | - "data": { | ||
256 | - "user": { | ||
257 | - "uid": 1, | ||
258 | - "uname": "Jennifer Clark", | ||
259 | - "phone": "18065048301", | ||
260 | - "image": { | ||
261 | - "path": "https://wx.qlogo.cn/mmopen/vi_32/AA24UDKOHgm9gy631bhPkjbrhQysEicjQLDibACO3DNksPpLuuwOYVhUPCDFud0W07wuICfkmhYng3ZtQo59Juzw/132", | ||
262 | - "w": 0, | ||
263 | - "h": 0 | ||
264 | - }, | ||
265 | - "department": "部门1", | ||
266 | - "position": "董事长", | ||
267 | - "imToken": "741df673c1671f8fad6d5d20adfa165e", | ||
268 | - "companyId": 1, | ||
269 | - "company": "test_company" | ||
270 | - } | ||
271 | - } | ||
272 | -} | ||
273 | -``` | ||
274 | - | ||
275 | -### 公司列表 | ||
276 | -* URL: /v1/user/userCompanys | ||
277 | -* 格式: JSON | ||
278 | -* HTTP请求方式: POST | ||
279 | -* 请求示例 | ||
280 | -```json | ||
281 | -{ | ||
282 | -} | ||
283 | -``` | ||
284 | - | ||
285 | -* 应答示例 | ||
286 | -```json | ||
287 | -{ | ||
288 | - "code": 0, | ||
289 | - "msg": "成功", | ||
290 | - "data": { | ||
291 | - "companys": [ | ||
292 | - { | ||
293 | - "id": 1, | ||
294 | - "name": "test_company" | ||
295 | - }, | ||
296 | - { | ||
297 | - "id": 2, | ||
298 | - "name": "dyt_company" | ||
299 | - } | ||
300 | - ] | ||
301 | - } | ||
302 | -} | ||
303 | -``` | ||
304 | - | ||
305 | - | ||
306 | -### 切换公司 | ||
307 | -* URL: /v1/user/switchCompany | ||
308 | -* 格式: JSON | ||
309 | -* HTTP请求方式: POST | ||
310 | -* 请求示例 | ||
311 | -```json | ||
312 | -{ | ||
313 | - "companyId":1 | ||
314 | -} | ||
315 | -``` | ||
316 | - | ||
317 | -* 应答示例 | ||
318 | -```json | ||
319 | -{ | ||
320 | - "code": 0, | ||
321 | - "msg": "成功", | ||
322 | - "data": {} | ||
323 | -} | ||
324 | -``` | ||
325 | - | ||
326 | - | ||
327 | -## 机会 | ||
328 | - | ||
329 | -### 机会类型 | ||
330 | -* URL: /v1/chance/chanceType | ||
331 | -* 格式: JSON | ||
332 | -* HTTP请求方式: POST | ||
333 | -* 请求示例 | ||
334 | -```json | ||
335 | -{ | ||
336 | -} | ||
337 | -``` | ||
338 | - | ||
339 | -* 应答示例 | ||
340 | -```json | ||
341 | -{ | ||
342 | - "code": 0, | ||
343 | - "msg": "成功", | ||
344 | - "data": { | ||
345 | - "list": [ | ||
346 | - { | ||
347 | - "id": 1, | ||
348 | - "name": "产品", | ||
349 | - "icon": "" | ||
350 | - }, | ||
351 | - { | ||
352 | - "id": 2, | ||
353 | - "name": "渠道", | ||
354 | - "icon": "" | ||
355 | - }, | ||
356 | - { | ||
357 | - "id": 3, | ||
358 | - "name": "客户", | ||
359 | - "icon": "" | ||
360 | - }, | ||
361 | - { | ||
362 | - "id": 4, | ||
363 | - "name": "区域", | ||
364 | - "icon": "" | ||
365 | - }, | ||
366 | - { | ||
367 | - "id": 5, | ||
368 | - "name": "其他", | ||
369 | - "icon": "" | ||
370 | - } | ||
371 | - ] | ||
372 | - } | ||
373 | -} | ||
374 | -``` | ||
375 | - | ||
376 | -### 机会模板 | ||
377 | -* URL: /v1/chance/templates | ||
378 | -* 格式: JSON | ||
379 | -* HTTP请求方式: POST | ||
380 | -* 请求示例 | ||
381 | -```json | ||
382 | -{ | ||
383 | - "chanceTypeId":1 | ||
384 | -} | ||
385 | -``` | ||
386 | - | ||
387 | -* 应答示例 | ||
388 | -```json | ||
389 | -{ | ||
390 | - "code": 0, | ||
391 | - "msg": "成功", | ||
392 | - "data": { | ||
393 | - "list": [ | ||
394 | - { | ||
395 | - "id": 1, | ||
396 | - "name": "产品-1", | ||
397 | - "doc": "新型产品1", | ||
398 | - "icon": "", | ||
399 | - "formList": [ | ||
400 | - { | ||
401 | - "id": 1, | ||
402 | - "name": "产品名称", | ||
403 | - "inputType": "text", | ||
404 | - "sectionType": 1, | ||
405 | - "value": "", | ||
406 | - "required": 0 | ||
407 | - }, | ||
408 | - { | ||
409 | - "id": 2, | ||
410 | - "name": "竞品", | ||
411 | - "inputType": "text", | ||
412 | - "sectionType": 2, | ||
413 | - "value": "", | ||
414 | - "required": 0 | ||
415 | - } | ||
416 | - ] | ||
417 | - } | ||
418 | - ] | ||
419 | - } | ||
420 | -} | ||
421 | -``` | ||
422 | - | ||
423 | -### 提交机会 | ||
424 | -* URL: /v1/chance/submit | ||
425 | -* 格式: JSON | ||
426 | -* HTTP请求方式: POST | ||
427 | -* 请求示例 | ||
428 | -```json | ||
429 | -{ | ||
430 | - "id":279802775016046593, | ||
431 | - "auditTemplateId": 1, | ||
432 | - "content": "是否素:是\n 出厂价格:¥100 \n", | ||
433 | - "formList": [{ | ||
434 | - "lable": "是否素食", | ||
435 | - "inputType": "text", | ||
436 | - "section": 1, | ||
437 | - "value": "" | ||
438 | - }, | ||
439 | - { | ||
440 | - "lable": "竞品", | ||
441 | - "inputType": "text", | ||
442 | - "section": 2, | ||
443 | - "value": "" | ||
444 | - } | ||
445 | - ], | ||
446 | - "speechs": [{ | ||
447 | - "path": "www.xx.com/file/xx/xx...", | ||
448 | - "duration": 60 | ||
449 | - }, | ||
450 | - { | ||
451 | - "path": "www.xx.com/file/xx/xx...", | ||
452 | - "duration": 30 | ||
453 | - } | ||
454 | - ], | ||
455 | - "pictures": [{ | ||
456 | - "path": "www.xx.com/file/xx/xx...", | ||
457 | - "w": 600, | ||
458 | - "h": 600 | ||
459 | - }, | ||
460 | - { | ||
461 | - "path": "www.xx.com/file/xx/xx...", | ||
462 | - "w": 600, | ||
463 | - "h": 600 | ||
464 | - } | ||
465 | - ], | ||
466 | - "videos": [{ | ||
467 | - "path": "www.xx.com/file/xx/xx...", | ||
468 | - "cover": "www.xx.com/file/xx/xx...", | ||
469 | - "duration": 60 | ||
470 | - }, | ||
471 | - { | ||
472 | - "path": "www.xx.com/file/xx/xx...", | ||
473 | - "cover": "www.xx.com/file/xx/xx...", | ||
474 | - "duration": 30 | ||
475 | - } | ||
476 | - ], | ||
477 | - "relatedDepartments": 1 | ||
478 | -} | ||
479 | -``` | ||
480 | - | ||
481 | -* 应答示例 | ||
482 | -```json | ||
483 | -{ | ||
484 | - "code": 0, | ||
485 | - "msg": "成功", | ||
486 | - "data": {} | ||
487 | -} | ||
488 | -``` | ||
489 | - | ||
490 | - | ||
491 | -## 文件上传 | ||
492 | - | ||
493 | -### 上传图片 | ||
494 | -* URL: /v1/upload/image | ||
495 | -* 格式: JSON | ||
496 | -* HTTP请求方式: POST | ||
497 | -* 请求示例 | ||
498 | -```json | ||
499 | -{ | ||
500 | -} | ||
501 | -``` | ||
502 | - | ||
503 | -``` | ||
504 | -form-data: file | ||
505 | -``` | ||
506 | - | ||
507 | -* 应答示例 | ||
508 | -```json | ||
509 | -{ | ||
510 | - "code": 0, | ||
511 | - "msg": "成功", | ||
512 | - "data": { | ||
513 | - "paths": [ | ||
514 | - "http:/192.168.139.137:8080/file/opp/image/20191214/1576290273_H7WDQpksZyXaGxmwKQDC5T6mhQBMTF3M.png" | ||
515 | - ] | ||
516 | - } | ||
517 | -} | ||
518 | -``` | ||
519 | - | ||
520 | -### 上传语音 | ||
521 | -* URL: /v1/upload/voice | ||
522 | -* 格式: JSON | ||
523 | -* HTTP请求方式: POST | ||
524 | -* 请求示例 | ||
525 | -```json | ||
526 | -{ | ||
527 | -} | ||
528 | -``` | ||
529 | - | ||
530 | -``` | ||
531 | -form-data: file | ||
532 | -``` | ||
533 | - | ||
534 | -* 应答示例 | ||
535 | -```json | ||
536 | -{ | ||
537 | - "code": 0, | ||
538 | - "msg": "成功", | ||
539 | - "data": { | ||
540 | - "paths": [ | ||
541 | - "http:/192.168.139.137:8080/file/opp/voice/20191214/1576290273_H7WDQpksZyXaGxmwKQDC5T6mhQBMTF3M.wav" | ||
542 | - ] | ||
543 | - } | ||
544 | -} | ||
545 | -``` | ||
546 | - | ||
547 | -### 上传视频 | ||
548 | -* URL: /v1/upload/video | ||
549 | -* 格式: JSON | ||
550 | -* HTTP请求方式: POST | ||
551 | -* 请求示例 | ||
552 | -```json | ||
553 | -{ | ||
554 | -} | ||
555 | -``` | ||
556 | - | ||
557 | -* 应答示例 | ||
558 | -```json | ||
559 | -{ | ||
560 | - "code": 0, | ||
561 | - "msg": "成功", | ||
562 | - "data": { | ||
563 | - "paths": [ | ||
564 | - "http:/192.168.139.137:8080/file/opp/video/20191214/1576290351_R3h4nQxxcMJ7ympktMsYBBQ6bAcFC6xj.mp3" | ||
565 | - ] | ||
566 | - } | ||
567 | -} | ||
568 | -``` | ||
569 | - | ||
570 | -## 部门统计 | ||
571 | - | ||
572 | -### 部门列表 | ||
573 | -* URL: /v1/department/departments | ||
574 | -* 格式: JSON | ||
575 | -* HTTP请求方式: POST | ||
576 | -* 请求示例 | ||
577 | -```json | ||
578 | -{ | ||
579 | - "type": 0 | ||
580 | -} | ||
581 | -``` | ||
582 | - | ||
583 | -* 应答示例 | ||
584 | -```json | ||
585 | -{ | ||
586 | - "code": 0, | ||
587 | - "msg": "成功", | ||
588 | - "data": { | ||
589 | - "departments": [ | ||
590 | - { | ||
591 | - "id": 1, | ||
592 | - "name": "部门1" | ||
593 | - } | ||
594 | - ] | ||
595 | - } | ||
596 | -} | ||
597 | -``` |
-
请 注册 或 登录 后发表评论