Commit 5e3fa69d8a22391cca6adac7a606e405c6616bd2
1 parent
74de40c6
Exists in
v1.2
and in
2 other branches
2
Showing
1 changed file
with
389 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,389 @@ |
1 | + | |
2 | +## 乐游图后端接口文档 | |
3 | +| Specification | Value | | |
4 | +|-----|-----| | |
5 | +| API Version | 1.0.0 | | |
6 | +| BasePath | https://letu.api.imagchina.com | | |
7 | + | |
8 | + | |
9 | + | |
10 | +### API List | |
11 | +1. [查询所有商品](#/AllCommodity) | |
12 | +1. [查询所有游玩项目](#/AllItems) | |
13 | +1. [查询所有线路](#/AllLine) | |
14 | +1. [所有景区基础信息](#/AllScenic) | |
15 | +1. [查询商品信息](#/CommodityInfo) | |
16 | +1. [增加投诉](#/CreateComplaint) | |
17 | +1. [创建标签](#/CreateTag) | |
18 | +1. [用户注册](#/CreateUser) | |
19 | +1. [查询线路信息](#/LineInfo) | |
20 | +1. [用户登录](#/LoginUser) | |
21 | +1. [查询设备信息](#/ScenicInfo) | |
22 | +1. [标签列表](#/Tags) | |
23 | +1. [更新商品](#/UpdateCommodity) | |
24 | +1. [更新设施](#/UpdateItem) | |
25 | +1. [更新等待时间](#/UpdateItemTime) | |
26 | +1. [更新线路](#/UpdateLine) | |
27 | +1. [更新景区基础信息](#/UpdateScenic) | |
28 | +1. [更新标签](#/UpdateTag) | |
29 | +1. [上传](#/Upload) | |
30 | +1. [获取用户信息](#/UserInfo) | |
31 | + | |
32 | + | |
33 | + | |
34 | +<a name="/AllCommodity"></a> | |
35 | + | |
36 | +#### /AllCommodity (GET) | |
37 | + | |
38 | + | |
39 | +查询所有商品 | |
40 | + | |
41 | +| Code | Type | Model | Message | | |
42 | +|-----|-----|-----|-----| | |
43 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Price=价格;ShopName=店铺名称;KvPhoto用于列表页的图片;TopPhoto详情页最上面的轮播图;Images详情页下面的产品详细图 | | |
44 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
45 | + | |
46 | + | |
47 | + | |
48 | +<a name="/AllItems"></a> | |
49 | + | |
50 | +#### /AllItems (GET) | |
51 | + | |
52 | + | |
53 | +查询所有游玩项目 | |
54 | + | |
55 | +| Code | Type | Model | Message | | |
56 | +|-----|-----|-----|-----| | |
57 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Tags所属标签,标签有分类;LimitHeight限高;PlayDuration游玩时长;SceneTime场次时间;Picture照片;Voice音频;AverageConsumption平均消费;Menu菜单 | | |
58 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
59 | + | |
60 | + | |
61 | + | |
62 | +<a name="/AllLine"></a> | |
63 | + | |
64 | +#### /AllLine (GET) | |
65 | + | |
66 | + | |
67 | +查询所有线路 | |
68 | + | |
69 | +| Code | Type | Model | Message | | |
70 | +|-----|-----|-----|-----| | |
71 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;SubName副标题;PlayDuration游玩时长;Suitable适合人群;Location线路点坐标;Annotations需要点亮的设施id | | |
72 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
73 | + | |
74 | + | |
75 | + | |
76 | +<a name="/AllScenic"></a> | |
77 | + | |
78 | +#### /AllScenic (GET) | |
79 | + | |
80 | + | |
81 | +所有景区基础信息 | |
82 | + | |
83 | +| Code | Type | Model | Message | | |
84 | +|-----|-----|-----|-----| | |
85 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | |
86 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
87 | + | |
88 | + | |
89 | + | |
90 | +<a name="/CommodityInfo"></a> | |
91 | + | |
92 | +#### /CommodityInfo (GET) | |
93 | + | |
94 | + | |
95 | +查询商品信息 | |
96 | + | |
97 | +| Param Name | Example | Data Type | Description | Required? | | |
98 | +|-----|-----|-----|-----|-----| | |
99 | +| id | 5dfb03070a9ac17ac7a82054 | string | id | Yes | | |
100 | + | |
101 | + | |
102 | +| Code | Type | Model | Message | | |
103 | +|-----|-----|-----|-----| | |
104 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Price=价格;ShopName=店铺名称;KvPhoto用于列表页的图片;TopPhoto详情页最上面的轮播图;Images详情页下面的产品详细图 | | |
105 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
106 | + | |
107 | + | |
108 | + | |
109 | +<a name="/CreateComplaint"></a> | |
110 | + | |
111 | +#### /CreateComplaint (POST) | |
112 | + | |
113 | + | |
114 | +增加投诉 | |
115 | + | |
116 | +| Param Name | Example | Data Type | Description | Required? | | |
117 | +|-----|-----|-----|-----|-----| | |
118 | +| mobile | 18616619599 | string | 联系电话 | Yes | | |
119 | +| type | 1 | string | 类型 | Yes | | |
120 | +| content | 卫生不干净 | string | 投诉内容 | Yes | | |
121 | +| image | ["http://www.xx.com/123.jpg","http://www.xx.com/123.jpg"] | string | 照片数组 | Yes | | |
122 | + | |
123 | + | |
124 | +| Code | Type | Model | Message | | |
125 | +|-----|-----|-----|-----| | |
126 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | |
127 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
128 | + | |
129 | + | |
130 | + | |
131 | +<a name="/CreateTag"></a> | |
132 | + | |
133 | +#### /CreateTag (POST) | |
134 | + | |
135 | + | |
136 | +创建标签 | |
137 | + | |
138 | +| Code | Type | Model | Message | | |
139 | +|-----|-----|-----|-----| | |
140 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Type":"menu","Name":"服务设施"},{"Type":"normal","Name":"不错"},{"Type":"thrilling","Name":"刺激"},{"Type":"recommend","Name":"必玩"}]} | | |
141 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
142 | + | |
143 | + | |
144 | + | |
145 | +<a name="/CreateUser"></a> | |
146 | + | |
147 | +#### /CreateUser (POST) | |
148 | + | |
149 | + | |
150 | +用户注册 | |
151 | + | |
152 | +| Param Name | Example | Data Type | Description | Required? | | |
153 | +|-----|-----|-----|-----|-----| | |
154 | +| password | 1 | string | 密码 | Yes | | |
155 | +| confirmpassword | 1 | string | 确认密码 | Yes | | |
156 | +| birthday | 2010.10.10 | string | 生日 | Yes | | |
157 | +| fullname | aarongao | string | 全名 | Yes | | |
158 | +| mobile | 18616619599 | string | 手机,同用户名 | Yes | | |
159 | +| openid | 12345 | string | 微信id | Yes | | |
160 | + | |
161 | + | |
162 | +| Code | Type | Model | Message | | |
163 | +|-----|-----|-----|-----| | |
164 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | |
165 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
166 | + | |
167 | + | |
168 | + | |
169 | +<a name="/LineInfo"></a> | |
170 | + | |
171 | +#### /LineInfo (GET) | |
172 | + | |
173 | + | |
174 | +查询线路信息 | |
175 | + | |
176 | +| Param Name | Example | Data Type | Description | Required? | | |
177 | +|-----|-----|-----|-----|-----| | |
178 | +| id | 5dfb03070a9ac17ac7a82054 | string | id | Yes | | |
179 | + | |
180 | + | |
181 | +| Code | Type | Model | Message | | |
182 | +|-----|-----|-----|-----| | |
183 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;SubName副标题;PlayDuration游玩时长;Suitable适合人群;Location线路点坐标;Annotations需要点亮的设施id | | |
184 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
185 | + | |
186 | + | |
187 | + | |
188 | +<a name="/LoginUser"></a> | |
189 | + | |
190 | +#### /LoginUser (POST) | |
191 | + | |
192 | + | |
193 | +用户登录 | |
194 | + | |
195 | +| Param Name | Example | Data Type | Description | Required? | | |
196 | +|-----|-----|-----|-----|-----| | |
197 | +| mobile | aaron | string | 用户名 | Yes | | |
198 | +| password | 1 | string | 密码 | Yes | | |
199 | + | |
200 | + | |
201 | +| Code | Type | Model | Message | | |
202 | +|-----|-----|-----|-----| | |
203 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e09c64c1c09c6f0f7ca2fa9","Username":"admin","Password":"123","Birthday":"","FullName":"","Mobile":"","Openid":"","Token":"640bf934e425aba5d3c90998b2641f2f0ca07261d334d9615d1cd4790b5f34e7"}} 调用其它需要登陆的接口时携带token,有过期时间 | | |
204 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
205 | + | |
206 | + | |
207 | + | |
208 | +<a name="/ScenicInfo"></a> | |
209 | + | |
210 | +#### /ScenicInfo (GET) | |
211 | + | |
212 | + | |
213 | +查询设备信息 | |
214 | + | |
215 | +| Param Name | Example | Data Type | Description | Required? | | |
216 | +|-----|-----|-----|-----|-----| | |
217 | +| id | 5dfb03070a9ac17ac7a82054 | string | 设备id | Yes | | |
218 | + | |
219 | + | |
220 | +| Code | Type | Model | Message | | |
221 | +|-----|-----|-----|-----| | |
222 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Name":"名称","Describe":"介绍","OpenHours":"开放时间","Mobile":"电话","Address":"地址","SLocation":{"Latitude":0,"Longitude":0},"Picture":["照片1","照片2"]}} | | |
223 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
224 | + | |
225 | + | |
226 | +<a name="/ScenicInfo"></a> | |
227 | + | |
228 | +#### /ScenicInfo (GET) | |
229 | + | |
230 | + | |
231 | +基础信息 | |
232 | + | |
233 | +| Param Name | Example | Data Type | Description | Required? | | |
234 | +|-----|-----|-----|-----|-----| | |
235 | +| id | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | |
236 | + | |
237 | + | |
238 | +| Code | Type | Model | Message | | |
239 | +|-----|-----|-----|-----| | |
240 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Name":"名称","Describe":"介绍","OpenHours":"开放时间","Mobile":"电话","Address":"地址","SLocation":{"Latitude":0,"Longitude":0},"Picture":["照片1","照片2"]}} | | |
241 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
242 | + | |
243 | + | |
244 | + | |
245 | +<a name="/Tags"></a> | |
246 | + | |
247 | +#### /Tags (GET) | |
248 | + | |
249 | + | |
250 | +标签列表 | |
251 | + | |
252 | +| Code | Type | Model | Message | | |
253 | +|-----|-----|-----|-----| | |
254 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Type":"menu","Name":"服务设施"},{"Type":"normal","Name":"不错"},{"Type":"thrilling","Name":"刺激"},{"Type":"recommend","Name":"必玩"}]} | | |
255 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
256 | + | |
257 | + | |
258 | + | |
259 | +<a name="/UpdateCommodity"></a> | |
260 | + | |
261 | +#### /UpdateCommodity (POST) | |
262 | + | |
263 | + | |
264 | +更新商品 | |
265 | + | |
266 | +| Code | Type | Model | Message | | |
267 | +|-----|-----|-----|-----| | |
268 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | |
269 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
270 | + | |
271 | + | |
272 | + | |
273 | +<a name="/UpdateItem"></a> | |
274 | + | |
275 | +#### /UpdateItem (POST) | |
276 | + | |
277 | + | |
278 | +更新设施 | |
279 | + | |
280 | +| Code | Type | Model | Message | | |
281 | +|-----|-----|-----|-----| | |
282 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Tags所属标签,标签有分类;LimitHeight限高;PlayDuration游玩时长;SceneTime场次时间;Picture照片;Voice音频;AverageConsumption平均消费;Menu菜单 | | |
283 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
284 | + | |
285 | + | |
286 | + | |
287 | +<a name="/UpdateItemTime"></a> | |
288 | + | |
289 | +#### /UpdateItemTime (POST) | |
290 | + | |
291 | + | |
292 | +更新等待时间 | |
293 | + | |
294 | +| Param Name | Example | Data Type | Description | Required? | | |
295 | +|-----|-----|-----|-----|-----| | |
296 | +| item | [{"id":"5df864740a9ac17ac7a7feb8","time":"20"},{"id":"5df8660924e03417008b4567","time":"33"}] | string | 设备列表 | Yes | | |
297 | + | |
298 | + | |
299 | +| Code | Type | Model | Message | | |
300 | +|-----|-----|-----|-----| | |
301 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {errcode: 0, result: "ok"} | | |
302 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
303 | + | |
304 | + | |
305 | + | |
306 | +<a name="/UpdateLine"></a> | |
307 | + | |
308 | +#### /UpdateLine (POST) | |
309 | + | |
310 | + | |
311 | +更新线路 | |
312 | + | |
313 | +| Code | Type | Model | Message | | |
314 | +|-----|-----|-----|-----| | |
315 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | |
316 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
317 | + | |
318 | + | |
319 | + | |
320 | +<a name="/UpdateScenic"></a> | |
321 | + | |
322 | +#### /UpdateScenic (POST) | |
323 | + | |
324 | + | |
325 | +更新景区基础信息 | |
326 | + | |
327 | +| Param Name | Example | Data Type | Description | Required? | | |
328 | +|-----|-----|-----|-----|-----| | |
329 | +| id | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | |
330 | + | |
331 | + | |
332 | +| Code | Type | Model | Message | | |
333 | +|-----|-----|-----|-----| | |
334 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Name":"名称","Describe":"介绍","OpenHours":"开放时间","Mobile":"电话","Address":"地址","SLocation":{"Latitude":0,"Longitude":0},"Picture":["照片1","照片2"]}} | | |
335 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
336 | + | |
337 | + | |
338 | + | |
339 | +<a name="/UpdateTag"></a> | |
340 | + | |
341 | +#### /UpdateTag (POST) | |
342 | + | |
343 | + | |
344 | +更新标签 | |
345 | + | |
346 | +| Code | Type | Model | Message | | |
347 | +|-----|-----|-----|-----| | |
348 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Type":"menu","Name":"服务设施"},{"Type":"normal","Name":"不错"},{"Type":"thrilling","Name":"刺激"},{"Type":"recommend","Name":"必玩"}]} | | |
349 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
350 | + | |
351 | + | |
352 | + | |
353 | +<a name="/Upload"></a> | |
354 | + | |
355 | +#### /Upload (POST) | |
356 | + | |
357 | + | |
358 | +上传 | |
359 | + | |
360 | +| Param Name | Example | Data Type | Description | Required? | | |
361 | +|-----|-----|-----|-----|-----| | |
362 | +| file | 1 | file | 文件 | Yes | | |
363 | + | |
364 | + | |
365 | +| Code | Type | Model | Message | | |
366 | +|-----|-----|-----|-----| | |
367 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"图片地址"} | | |
368 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
369 | + | |
370 | + | |
371 | + | |
372 | +<a name="/UserInfo"></a> | |
373 | + | |
374 | +#### /UserInfo (GET) | |
375 | + | |
376 | + | |
377 | +获取用户信息 | |
378 | + | |
379 | +| Param Name | Example | Data Type | Description | Required? | | |
380 | +|-----|-----|-----|-----|-----| | |
381 | +| id | aaron | string | 用户id | Yes | | |
382 | + | |
383 | + | |
384 | +| Code | Type | Model | Message | | |
385 | +|-----|-----|-----|-----| | |
386 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e09c64c1c09c6f0f7ca2fa9","Username":"admin","Password":"123","Birthday":"","FullName":"","Mobile":"","Openid":"","Token":"640bf934e425aba5d3c90998b2641f2f0ca07261d334d9615d1cd4790b5f34e7"}} | | |
387 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | |
388 | + | |
389 | + | ... | ... |