Blame view

README.md 13.8 KB
8fa7cc70   aarongao   ..
1
2
3
4

## 乐游图后端接口文档
| Specification | Value |
|-----|-----|
cfcccc99   aarongao   ok
5
| API Version | 1.0.0 |
8fa7cc70   aarongao   ..
6
7
8
9
10
11
12
13
14
15
16
| BasePath | https://letu.api.imagchina.com |



### API List
1. [增加访问日志](#accesslog-post)
1. [查询所有商品](#allcommodity-get)
1. [查询所有游玩项目](#allitems-get)
1. [查询所有线路](#allline-get)
1. [所有景区基础信息](#allscenic-get)
1. [查询商品信息](#commodityinfo-get)
f56bf95d   aarongao   ..
17
1. [增加投诉](#createcomplaint-post)
8fa7cc70   aarongao   ..
18
19
20
21
1. [增加调查](#investigation-save-post)
1. [查询设备信息](#iteminfo-get)
1. [查询线路信息](#lineinfo-get)
1. [用户登录&注册](#loginuser-post)
483ade81   aarongao   v1.1
22
1. [返回景区基础信息](#scenicinfo-get)
8fa7cc70   aarongao   ..
23
24
25
26
27
28
1. [发送短信验证码](#sms-send-post)
1. [标签列表](#tags-get)
1. [更新商品](#updatecommodity-post)
1. [更新设施](#updateitem-post)
1. [更新等待时间](#updateitemtime-post)
1. [更新线路](#updateline-post)
483ade81   aarongao   v1.1
29
1. [更新景区基础信息](#updatescenic-post)
8fa7cc70   aarongao   ..
30
31
32
33
34
35
36
37
38
1. [修改用户信息](#updateuser-post)
1. [上传](#upload-post)
1. [获取用户信息](#userinfo-get)



<a name="accesslog-post"></a>

#### /AccessLog (POST)
8bea6075   aarongao   new
39
40
41
42
43


增加访问日志

| Param Name | Example | Data Type | Description | Required? |
8fa7cc70   aarongao   ..
44
45
46
47
|-----|-----|-----|-----|-----|
| UserId | 5dfb03070a9ac17ac7a82054    | string | 用户ID | Yes |
| UserName | Aaron    | string | 用户名称 | Yes |
| TypeNum | 9    | int | 类型编号 | Yes |
15b2f923   aarongao   ..
48
49
| TypeName | 点击个人中心    | string | 类型名称 | Yes |
| DateTime | 1578556751220    | int | 时间戳 | Yes |
d631c7b6   aarongao   ..
50
| Location | {"Latitude": 119, "Longitude": 39}    | string | 位置 | Yes |
8fa7cc70   aarongao   ..
51
52
53
54
55
| Remarks | 备注    | string | 备注 | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
58ec1105   aarongao   new
56
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) |  |
8fa7cc70   aarongao   ..
57
58
59
60
61
62
63
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="allcommodity-get"></a>

#### /AllCommodity (GET)
483ade81   aarongao   v1.1
64

8fa7cc70   aarongao   ..
65
66

查询所有商品
cfcccc99   aarongao   ok
67

8fa7cc70   aarongao   ..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Price=价格;ShopName=店铺名称;KvPhoto用于列表页的图片;TopPhoto详情页最上面的轮播图;Images详情页下面的产品详细图 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="allitems-get"></a>

#### /AllItems (GET)


查询所有游玩项目

| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Tags所属标签,标签有分类;LimitHeight限高;PlayDuration游玩时长;SceneTime场次时间;Picture照片;Voice音频;AverageConsumption平均消费;Menu菜单 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |

cfcccc99   aarongao   ok
87

8fa7cc70   aarongao   ..
88
89
90
91
92
93
94
95
96
97
98
99
100

<a name="allline-get"></a>

#### /AllLine (GET)


查询所有线路

| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;SubName副标题;PlayDuration游玩时长;Suitable适合人群;Location线路点坐标;Annotations需要点亮的设施id;Distance距离 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |

58ec1105   aarongao   new
101

8fa7cc70   aarongao   ..
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

<a name="allscenic-get"></a>

#### /AllScenic (GET)


所有景区基础信息

| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) |  |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="commodityinfo-get"></a>

#### /CommodityInfo (GET)


查询商品信息

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| id | 5dfb03070a9ac17ac7a82054    | string | id | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Price=价格;ShopName=店铺名称;KvPhoto用于列表页的图片;TopPhoto详情页最上面的轮播图;Images详情页下面的产品详细图 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="createcomplaint-post"></a>

#### /CreateComplaint (POST)


增加投诉

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
cfcccc99   aarongao   ok
145
| mobile | 18616619599    | string | 联系电话 | Yes |
8fa7cc70   aarongao   ..
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
178
179
180
181
182
183
| type | 1    | string | 类型 | Yes |
| content | 卫生不干净    | string | 投诉内容 | Yes |
| image | ["http://www.xx.com/123.jpg","http://www.xx.com/123.jpg"]    | string | 照片数组 | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="investigation-save-post"></a>

#### /Investigation/Save (POST)


增加调查

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| UserId | 1111111    | string | UserId | Yes |
| Mobile | 18616619599    | string | 联系电话 | Yes |
| type | 1    | string | 类型 | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="iteminfo-get"></a>

#### /ItemInfo (GET)


f56bf95d   aarongao   ..
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
查询设备信息

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| id | 5dfb03070a9ac17ac7a82054    | string | 设备id | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Name":"名称","Describe":"介绍","OpenHours":"开放时间","Mobile":"电话","Address":"地址","SLocation":{"Latitude":0,"Longitude":0},"Picture":["照片1","照片2"]}} |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="lineinfo-get"></a>

#### /LineInfo (GET)


查询线路信息
8fa7cc70   aarongao   ..
204
205
206
207
208
209
210

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| id | 5dfb03070a9ac17ac7a82054    | string | id | Yes |


| Code | Type | Model | Message |
483ade81   aarongao   v1.1
211
212
213
214
215
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;SubName副标题;PlayDuration游玩时长;Suitable适合人群;Location线路点坐标;Annotations需要点亮的设施id;Distance距离 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |


8fa7cc70   aarongao   ..
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269

<a name="loginuser-post"></a>

#### /LoginUser (POST)


用户登录&注册

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| mobile | aaron    | string | 手机号 | Yes |
| password | 1    | string | 密码或验证码(使用验证码的新手机号自动注册) | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e09c64c1c09c6f0f7ca2fa9","Token":"640bf934e425aba5d3c90998b2641f2f0ca07261d334d9615d1cd4790b5f34e7"}} 调用其它需要登陆的接口时携带token,有过期时间 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="scenicinfo-get"></a>

#### /ScenicInfo (GET)


返回景区基础信息

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| id | 5dfb03070a9ac17ac7a82054    | string | 景区id | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;Describe介绍;OpenHours营业时间;Picture最上面图片;ShopAdPicture商城列表页图片;ItemScenicPicture项目场次照片;ActivityPicture活动照片;VideoList视频 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="sms-send-post"></a>

#### /Sms/Send (POST)


发送短信验证码

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| Mobile | 18616619599    | string | 手机号 | Yes |
| Location | {"Latitude": 119, "Longitude": 39}    | string | 位置 | Yes |


| Code | Type | Model | Message |
f56bf95d   aarongao   ..
270
|-----|-----|-----|-----|
8fa7cc70   aarongao   ..
271
272
273
274
275
276
277
278
279
280
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"}验证码3分钟内有效 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="tags-get"></a>

#### /Tags (GET)


483ade81   aarongao   v1.1
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
标签列表

| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Type":"menu","Name":"服务设施"},{"Type":"normal","Name":"不错"},{"Type":"thrilling","Name":"刺激"},{"Type":"recommend","Name":"必玩"}]} |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="updatecommodity-post"></a>

#### /UpdateCommodity (POST)


更新商品

| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) |  |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |

8fa7cc70   aarongao   ..
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334


<a name="updateitem-post"></a>

#### /UpdateItem (POST)


更新设施

| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Tags所属标签,标签有分类;LimitHeight限高;PlayDuration游玩时长;SceneTime场次时间;Picture照片;Voice音频;AverageConsumption平均消费;Menu菜单 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="updateitemtime-post"></a>

#### /UpdateItemTime (POST)


更新等待时间

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| item | [{"id":"5df864740a9ac17ac7a7feb8","time":"20"},{"id":"5df8660924e03417008b4567","time":"33"}]    | string | 设备列表 | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {errcode: 0, result: "ok"} |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |

cfcccc99   aarongao   ok
335

8fa7cc70   aarongao   ..
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428

<a name="updateline-post"></a>

#### /UpdateLine (POST)


更新线路

| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) |  |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="updatescenic-post"></a>

#### /UpdateScenic (POST)


更新景区基础信息

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| id | 5dfb03070a9ac17ac7a82054    | string | 景区id | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;Describe介绍;OpenHours营业时间;Picture最上面图片;ShopAdPicture商城列表页图片;ItemScenicPicture项目场次照片;ActivityPicture活动照片;VideoList视频 |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="updateuser-post"></a>

#### /UpdateUser (POST)


修改用户信息

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| password | 1    | string | 密码 | Yes |
| confirmpassword | 1    | string | 确认密码 | Yes |
| birthday | 2010.10.10    | string | 生日 | Yes |
| fullname | aarongao    | string | 全名 | Yes |
| code | 12345678    | string | 6位验证码 | Yes |
| mobile | 18616619599    | string | 手机,同用户名 | Yes |
| openid | 12345    | string | 微信id | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="upload-post"></a>

#### /Upload (POST)


上传

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| file | 1    | file | 文件 | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"图片地址"} |
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |



<a name="userinfo-get"></a>

#### /UserInfo (GET)


获取用户信息

| Param Name | Example | Data Type | Description | Required? |
|-----|-----|-----|-----|-----|
| id | aaron    | string | 用户id | Yes |


| Code | Type | Model | Message |
|-----|-----|-----|-----|
| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e09c64c1c09c6f0f7ca2fa9","Token":"640bf934e425aba5d3c90998b2641f2f0ca07261d334d9615d1cd4790b5f34e7"}} |
483ade81   aarongao   v1.1
429
| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |
8fa7cc70   aarongao   ..

cfcccc99   aarongao   ok

8fa7cc70   aarongao   ..

8bea6075   aarongao   new

8fa7cc70   aarongao   ..

483ade81   aarongao   v1.1

8fa7cc70   aarongao   ..

15b2f923   aarongao   ..

d631c7b6   aarongao   ..

15b2f923   aarongao   ..

d631c7b6   aarongao   ..

15b2f923   aarongao   ..

d631c7b6   aarongao   ..

15b2f923   aarongao   ..

d631c7b6   aarongao   ..

15b2f923   aarongao   ..

8fa7cc70   aarongao   ..

869149fa   aarongao   ..

8fa7cc70   aarongao   ..

58ec1105   aarongao   new

8fa7cc70   aarongao   ..

483ade81   aarongao   v1.1

8fa7cc70   aarongao   ..

cfcccc99   aarongao   ok

8fa7cc70   aarongao   ..