Commit 8fa7cc70d7017f606a858f524ea4023e53ffdb4a
1 parent
dc2b95eb
Exists in
v1.2
and in
1 other branch
..
Showing
2 changed files
with
984 additions
and
1 deletions
Show diff stats
README.md
@@ -0,0 +1,971 @@ | @@ -0,0 +1,971 @@ | ||
1 | + | ||
2 | +## 乐游图后端接口文档 | ||
3 | +| Specification | Value | | ||
4 | +|-----|-----| | ||
5 | +| API Version | 1.0.0 | | ||
6 | +| BasePath | 正式 leyoutu.st-i.com.cn; 测试 leyoutu.sti-uat.com | | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | +### API List | ||
11 | +1. [查询所有商品](#allcommodity-get) | ||
12 | +1. [投诉 - 查询所有投诉](#allcomplaint-get) | ||
13 | +1. [设备管理 - 获得所有设备的等待时间](#allitemtime-get) | ||
14 | +1. [设备管理 - 查询所有游玩项目](#allitems-get) | ||
15 | +1. [查询所有线路](#allline-get) | ||
16 | +1. [操作员管理 - 所有操作员](#alloperator-get) | ||
17 | +1. [所有景区基础信息](#allscenic-get) | ||
18 | +1. [标签 - 所有标签](#alltag-get) | ||
19 | +1. [标签 - 按照标签分组查看所有标签](#alltaggroup-get) | ||
20 | +1. [查询所有用户行为](#alluserlog-get) | ||
21 | +1. [用户管理 - 检查Token是否过期](#checktoken-post) | ||
22 | +1. [查询商品信息](#commodityinfo-get) | ||
23 | +1. [投诉 - 增加投诉](#createcomplaint-post) | ||
24 | +1. [查询用户的定时提醒](#dealymessage-info-get) | ||
25 | +1. [创建提醒](#dealymessage-create-post) | ||
26 | +1. [删除提醒](#dealymessage-remove-post) | ||
27 | +1. [图标管理 - 返回图标基础信息](#icon-info-get) | ||
28 | +1. [图标管理 - 增加或修改图标信息](#icon-update-post) | ||
29 | +1. [图标管理 - 所有图标](#icon-all-get) | ||
30 | +1. [问券调查 - 增加调查](#investigation-save-post) | ||
31 | +1. [问券调查 - 查询所有问券调查](#investigation-list-get) | ||
32 | +1. [设备管理 - 查询设备信息](#iteminfo-get) | ||
33 | +1. [查询线路信息](#lineinfo-get) | ||
34 | +1. [操作员管理 - 操作员登录](#loginoperator-post) | ||
35 | +1. [用户管理 - 用户登录&注册](#loginuser-post) | ||
36 | +1. [用户管理 - 注册客户端](#registerdevice-post) | ||
37 | +1. [用户管理 - 删除用户(注销)](#removeuser-post) | ||
38 | +1. [返回景区基础信息](#scenicinfo-get) | ||
39 | +1. [发送短信验证码](#sms-send-post) | ||
40 | +1. [查询系统信息接口](#systeminfo-get) | ||
41 | +1. [标签 - 增加标签](#tag-create-post) | ||
42 | +1. [标签 - 删除标签](#tag-remove-post) | ||
43 | +1. [菜单管理 - 查询所有菜单](#topmenus-all-get) | ||
44 | +1. [菜单管理 - 更新菜单](#topmenus-update-post) | ||
45 | +1. [保存用户移动轨迹(5分钟提交一次)](#trajectory-save-post) | ||
46 | +1. [更新商品](#updatecommodity-post) | ||
47 | +1. [设备管理 - 更新设施](#updateitem-post) | ||
48 | +1. [设备管理 - 更新等待时间](#updateitemtime-post) | ||
49 | +1. [更新线路](#updateline-post) | ||
50 | +1. [操作员管理 - 修改用户信息](#updateoperator-post) | ||
51 | +1. [更新景区基础信息](#updatescenic-post) | ||
52 | +1. [用户管理 - 修改用户信息](#updateuser-post) | ||
53 | +1. [上传](#upload-post) | ||
54 | +1. [用户管理 - 获取用户信息](#userinfo-get) | ||
55 | +1. [增加用户行为日志](#userlog-post) | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | +<a name="allcommodity-get"></a> | ||
60 | + | ||
61 | +#### /AllCommodity (GET) | ||
62 | + | ||
63 | + | ||
64 | +查询所有商品 | ||
65 | + | ||
66 | +| Param Name | Example | Data Type | Description | Required? | | ||
67 | +|-----|-----|-----|-----|-----| | ||
68 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
69 | + | ||
70 | + | ||
71 | +| Code | Type | Model | Message | | ||
72 | +|-----|-----|-----|-----| | ||
73 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Price=价格;ShopName=店铺名称;KvPhoto用于列表页的图片;TopPhoto详情页最上面的轮播图;Images详情页下面的产品详细图 | | ||
74 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | +<a name="allcomplaint-get"></a> | ||
79 | + | ||
80 | +#### /AllComplaint (GET) | ||
81 | + | ||
82 | + | ||
83 | +投诉 - 查询所有投诉 | ||
84 | + | ||
85 | +| Param Name | Example | Data Type | Description | Required? | | ||
86 | +|-----|-----|-----|-----|-----| | ||
87 | +| Page | 1 | int | 当前第几页 | Yes | | ||
88 | + | ||
89 | + | ||
90 | +| Code | Type | Model | Message | | ||
91 | +|-----|-----|-----|-----| | ||
92 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | ||
93 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
94 | + | ||
95 | + | ||
96 | + | ||
97 | +<a name="allitemtime-get"></a> | ||
98 | + | ||
99 | +#### /AllItemTime (GET) | ||
100 | + | ||
101 | + | ||
102 | +设备管理 - 获得所有设备的等待时间 | ||
103 | + | ||
104 | +| Param Name | Example | Data Type | Description | Required? | | ||
105 | +|-----|-----|-----|-----|-----| | ||
106 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
107 | + | ||
108 | + | ||
109 | +| Code | Type | Model | Message | | ||
110 | +|-----|-----|-----|-----| | ||
111 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {5df864740a9ac17ac7a7feb8: '20',.....} | | ||
112 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {} | | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | +<a name="allitems-get"></a> | ||
117 | + | ||
118 | +#### /AllItems (GET) | ||
119 | + | ||
120 | + | ||
121 | +设备管理 - 查询所有游玩项目 | ||
122 | + | ||
123 | +| Param Name | Example | Data Type | Description | Required? | | ||
124 | +|-----|-----|-----|-----|-----| | ||
125 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
126 | + | ||
127 | + | ||
128 | +| Code | Type | Model | Message | | ||
129 | +|-----|-----|-----|-----| | ||
130 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Tags所属标签,标签有分类;LimitHeight限高;PlayDuration游玩时长;SceneTime场次时间;Picture照片;Voice音频;AverageConsumption平均消费;Menu菜单, OpenHours开放时间: LocationDescription位置描述; Reminder温馨提示; State运行状态0=正常1=停运 | | ||
131 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | +<a name="allline-get"></a> | ||
136 | + | ||
137 | +#### /AllLine (GET) | ||
138 | + | ||
139 | + | ||
140 | +查询所有线路 | ||
141 | + | ||
142 | +| Code | Type | Model | Message | | ||
143 | +|-----|-----|-----|-----| | ||
144 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;SubName副标题;PlayDuration游玩时长;Suitable适合人群;Location线路点坐标;Annotations需要点亮的设施id;Distance距离 | | ||
145 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | +<a name="alloperator-get"></a> | ||
150 | + | ||
151 | +#### /AllOperator (GET) | ||
152 | + | ||
153 | + | ||
154 | +操作员管理 - 所有操作员 | ||
155 | + | ||
156 | +| Param Name | Example | Data Type | Description | Required? | | ||
157 | +|-----|-----|-----|-----|-----| | ||
158 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
159 | +| Token | 5dfb03070a9ac17ac7a82054 | string | 用户token | Yes | | ||
160 | + | ||
161 | + | ||
162 | +| Code | Type | Model | Message | | ||
163 | +|-----|-----|-----|-----| | ||
164 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | ||
165 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
166 | + | ||
167 | + | ||
168 | + | ||
169 | +<a name="allscenic-get"></a> | ||
170 | + | ||
171 | +#### /AllScenic (GET) | ||
172 | + | ||
173 | + | ||
174 | +所有景区基础信息 | ||
175 | + | ||
176 | +| Code | Type | Model | Message | | ||
177 | +|-----|-----|-----|-----| | ||
178 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | ||
179 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
180 | + | ||
181 | + | ||
182 | + | ||
183 | +<a name="alltag-get"></a> | ||
184 | + | ||
185 | +#### /AllTag (GET) | ||
186 | + | ||
187 | + | ||
188 | +标签 - 所有标签 | ||
189 | + | ||
190 | +| Param Name | Example | Data Type | Description | Required? | | ||
191 | +|-----|-----|-----|-----|-----| | ||
192 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
193 | + | ||
194 | + | ||
195 | +| Code | Type | Model | Message | | ||
196 | +|-----|-----|-----|-----| | ||
197 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Type":"menu","Name":"服务设施"},{"Type":"normal","Name":"不错"},{"Type":"thrilling","Name":"刺激"},{"Type":"recommend","Name":"必玩"}]} | | ||
198 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
199 | + | ||
200 | + | ||
201 | + | ||
202 | +<a name="alltaggroup-get"></a> | ||
203 | + | ||
204 | +#### /AllTagGroup (GET) | ||
205 | + | ||
206 | + | ||
207 | +标签 - 按照标签分组查看所有标签 | ||
208 | + | ||
209 | +| Param Name | Example | Data Type | Description | Required? | | ||
210 | +|-----|-----|-----|-----|-----| | ||
211 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
212 | + | ||
213 | + | ||
214 | +| Code | Type | Model | Message | | ||
215 | +|-----|-----|-----|-----| | ||
216 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Tags":["儿童","成人","青少年"],"Type":"age"}]} | | ||
217 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
218 | + | ||
219 | + | ||
220 | + | ||
221 | +<a name="alluserlog-get"></a> | ||
222 | + | ||
223 | +#### /AllUserLog (GET) | ||
224 | + | ||
225 | + | ||
226 | +查询所有用户行为 | ||
227 | + | ||
228 | +| Param Name | Example | Data Type | Description | Required? | | ||
229 | +|-----|-----|-----|-----|-----| | ||
230 | +| Page | 1 | int | 当前第几页 | Yes | | ||
231 | + | ||
232 | + | ||
233 | +| Code | Type | Model | Message | | ||
234 | +|-----|-----|-----|-----| | ||
235 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"total":1,"currpage":1,"totalpages":1,"prepage":20,"result":} | | ||
236 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
237 | + | ||
238 | + | ||
239 | + | ||
240 | +<a name="checktoken-post"></a> | ||
241 | + | ||
242 | +#### /CheckToken (POST) | ||
243 | + | ||
244 | + | ||
245 | +用户管理 - 检查Token是否过期 | ||
246 | + | ||
247 | +| Param Name | Example | Data Type | Description | Required? | | ||
248 | +|-----|-----|-----|-----|-----| | ||
249 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
250 | + | ||
251 | + | ||
252 | +| Code | Type | Model | Message | | ||
253 | +|-----|-----|-----|-----| | ||
254 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
255 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":401,"errmsg":"token过期"} | | ||
256 | + | ||
257 | + | ||
258 | + | ||
259 | +<a name="commodityinfo-get"></a> | ||
260 | + | ||
261 | +#### /CommodityInfo (GET) | ||
262 | + | ||
263 | + | ||
264 | +查询商品信息 | ||
265 | + | ||
266 | +| Param Name | Example | Data Type | Description | Required? | | ||
267 | +|-----|-----|-----|-----|-----| | ||
268 | +| id | 5dfb03070a9ac17ac7a82054 | string | id | Yes | | ||
269 | + | ||
270 | + | ||
271 | +| Code | Type | Model | Message | | ||
272 | +|-----|-----|-----|-----| | ||
273 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Price=价格;ShopName=店铺名称;KvPhoto用于列表页的图片;TopPhoto详情页最上面的轮播图;Images详情页下面的产品详细图 | | ||
274 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
275 | + | ||
276 | + | ||
277 | + | ||
278 | +<a name="createcomplaint-post"></a> | ||
279 | + | ||
280 | +#### /CreateComplaint (POST) | ||
281 | + | ||
282 | + | ||
283 | +投诉 - 增加投诉 | ||
284 | + | ||
285 | +| Param Name | Example | Data Type | Description | Required? | | ||
286 | +|-----|-----|-----|-----|-----| | ||
287 | +| Mobile | 18616619599 | string | 联系电话 | Yes | | ||
288 | +| Name | 高先生 | string | 姓名 | Yes | | ||
289 | +| Code | 123456 | string | 验证码 | Yes | | ||
290 | +| Sex | 男 | string | 性别 | Yes | | ||
291 | +| ScenicId | 5e1ed07524e03431008b4572 | string | 景区id | Yes | | ||
292 | +| Type | 1 | string | 类型 | Yes | | ||
293 | +| Content | 卫生不干净 | string | 投诉内容 | Yes | | ||
294 | +| Image | ["http://www.xx.com/123.jpg","http://www.xx.com/123.jpg"] | string | 照片数组 | Yes | | ||
295 | + | ||
296 | + | ||
297 | +| Code | Type | Model | Message | | ||
298 | +|-----|-----|-----|-----| | ||
299 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
300 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
301 | + | ||
302 | + | ||
303 | + | ||
304 | +<a name="dealymessage-info-get"></a> | ||
305 | + | ||
306 | +#### /DealyMessage/Info (GET) | ||
307 | + | ||
308 | + | ||
309 | +查询用户的定时提醒 | ||
310 | + | ||
311 | +| Param Name | Example | Data Type | Description | Required? | | ||
312 | +|-----|-----|-----|-----|-----| | ||
313 | +| UserId | 5dfb03070a9ac17ac7a82054 | string | 用户id | Yes | | ||
314 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
315 | + | ||
316 | + | ||
317 | +| Code | Type | Model | Message | | ||
318 | +|-----|-----|-----|-----| | ||
319 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | DelayTime=执行时间;Type=类型(0请求url地址1发送app通知);Fail失败次数;Title=通知标题;Content=通知内容;DeviceToken=设备id | | ||
320 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
321 | + | ||
322 | + | ||
323 | +<a name="dealymessage-create-post"></a> | ||
324 | + | ||
325 | +#### /DealyMessage/Create (POST) | ||
326 | + | ||
327 | + | ||
328 | +创建提醒 | ||
329 | + | ||
330 | +| Param Name | Example | Data Type | Description | Required? | | ||
331 | +|-----|-----|-----|-----|-----| | ||
332 | +| UserId | 5dfb03070a9ac17ac7a82054 | string | 用户id | Yes | | ||
333 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
334 | +| DeviceToken | 5dfb03070a9ac17ac7a82054 | string | 设备id | Yes | | ||
335 | +| Title | 表演时间提醒 | string | 标题 | Yes | | ||
336 | +| Content | 5分钟后有表演 | string | 内容 | Yes | | ||
337 | +| DelayTime | 1579066863 | string | 到达这个时间戳就执行 | Yes | | ||
338 | + | ||
339 | + | ||
340 | +| Code | Type | Model | Message | | ||
341 | +|-----|-----|-----|-----| | ||
342 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
343 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
344 | + | ||
345 | + | ||
346 | +<a name="dealymessage-remove-post"></a> | ||
347 | + | ||
348 | +#### /DealyMessage/Remove (POST) | ||
349 | + | ||
350 | + | ||
351 | +删除提醒 | ||
352 | + | ||
353 | +| Param Name | Example | Data Type | Description | Required? | | ||
354 | +|-----|-----|-----|-----|-----| | ||
355 | +| id | 5dfb03070a9ac17ac7a82054 | string | 提醒id | Yes | | ||
356 | +| UserId | 5dfb03070a9ac17ac7a82054 | string | 用户id | Yes | | ||
357 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
358 | + | ||
359 | + | ||
360 | +| Code | Type | Model | Message | | ||
361 | +|-----|-----|-----|-----| | ||
362 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
363 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
364 | + | ||
365 | + | ||
366 | + | ||
367 | +<a name="icon-info-get"></a> | ||
368 | + | ||
369 | +#### /Icon/Info (GET) | ||
370 | + | ||
371 | + | ||
372 | +图标管理 - 返回图标基础信息 | ||
373 | + | ||
374 | +| Param Name | Example | Data Type | Description | Required? | | ||
375 | +|-----|-----|-----|-----|-----| | ||
376 | +| id | 5dfb03070a9ac17ac7a82054 | string | 图标id | Yes | | ||
377 | + | ||
378 | + | ||
379 | +| Code | Type | Model | Message | | ||
380 | +|-----|-----|-----|-----| | ||
381 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称:Picture图片地址:id图标id | | ||
382 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
383 | + | ||
384 | + | ||
385 | +<a name="icon-update-post"></a> | ||
386 | + | ||
387 | +#### /Icon/Update (POST) | ||
388 | + | ||
389 | + | ||
390 | +图标管理 - 增加或修改图标信息 | ||
391 | + | ||
392 | +| Param Name | Example | Data Type | Description | Required? | | ||
393 | +|-----|-----|-----|-----|-----| | ||
394 | +| id | 5dfb03070a9ac17ac7a82054 | string | 图标id | Yes | | ||
395 | +| ScenicId | 5e0d504e24e03431008b4567 | string | 景区id | Yes | | ||
396 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
397 | + | ||
398 | + | ||
399 | +| Code | Type | Model | Message | | ||
400 | +|-----|-----|-----|-----| | ||
401 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称:Picture图片地址:id图标id:ScenicId景区id | | ||
402 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
403 | + | ||
404 | + | ||
405 | +<a name="icon-all-get"></a> | ||
406 | + | ||
407 | +#### /Icon/All (GET) | ||
408 | + | ||
409 | + | ||
410 | +图标管理 - 所有图标 | ||
411 | + | ||
412 | +| Param Name | Example | Data Type | Description | Required? | | ||
413 | +|-----|-----|-----|-----|-----| | ||
414 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
415 | + | ||
416 | + | ||
417 | +| Code | Type | Model | Message | | ||
418 | +|-----|-----|-----|-----| | ||
419 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称:Picture图片地址:id图标id:ScenicId景区id | | ||
420 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
421 | + | ||
422 | + | ||
423 | + | ||
424 | +<a name="investigation-save-post"></a> | ||
425 | + | ||
426 | +#### /Investigation/Save (POST) | ||
427 | + | ||
428 | + | ||
429 | +问券调查 - 增加调查 | ||
430 | + | ||
431 | +| Param Name | Example | Data Type | Description | Required? | | ||
432 | +|-----|-----|-----|-----|-----| | ||
433 | +| UserId | 1111111 | string | UserId | Yes | | ||
434 | +| Mobile | 18616619599 | string | 联系电话 | Yes | | ||
435 | +| type | 1 | string | 类型 | Yes | | ||
436 | + | ||
437 | + | ||
438 | +| Code | Type | Model | Message | | ||
439 | +|-----|-----|-----|-----| | ||
440 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
441 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
442 | + | ||
443 | + | ||
444 | +<a name="investigation-list-get"></a> | ||
445 | + | ||
446 | +#### /Investigation/List (GET) | ||
447 | + | ||
448 | + | ||
449 | +问券调查 - 查询所有问券调查 | ||
450 | + | ||
451 | +| Param Name | Example | Data Type | Description | Required? | | ||
452 | +|-----|-----|-----|-----|-----| | ||
453 | +| Page | 1 | int | 当前第几页 | Yes | | ||
454 | + | ||
455 | + | ||
456 | +| Code | Type | Model | Message | | ||
457 | +|-----|-----|-----|-----| | ||
458 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"total":1,"currpage":1,"totalpages":1,"prepage":20,"result":} | | ||
459 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
460 | + | ||
461 | + | ||
462 | + | ||
463 | +<a name="iteminfo-get"></a> | ||
464 | + | ||
465 | +#### /ItemInfo (GET) | ||
466 | + | ||
467 | + | ||
468 | +设备管理 - 查询设备信息 | ||
469 | + | ||
470 | +| Param Name | Example | Data Type | Description | Required? | | ||
471 | +|-----|-----|-----|-----|-----| | ||
472 | +| id | 5dfb03070a9ac17ac7a82054 | string | 设备id | Yes | | ||
473 | + | ||
474 | + | ||
475 | +| Code | Type | Model | Message | | ||
476 | +|-----|-----|-----|-----| | ||
477 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Tags所属标签,标签有分类;LimitHeight限高;PlayDuration游玩时长;SceneTime场次时间;Picture照片;Voice音频;AverageConsumption平均消费;Menu菜单, OpenHours开放时间: LocationDescription位置描述; Reminder温馨提示; State运行状态0=正常1=停运 | | ||
478 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
479 | + | ||
480 | + | ||
481 | + | ||
482 | +<a name="lineinfo-get"></a> | ||
483 | + | ||
484 | +#### /LineInfo (GET) | ||
485 | + | ||
486 | + | ||
487 | +查询线路信息 | ||
488 | + | ||
489 | +| Param Name | Example | Data Type | Description | Required? | | ||
490 | +|-----|-----|-----|-----|-----| | ||
491 | +| id | 5dfb03070a9ac17ac7a82054 | string | id | Yes | | ||
492 | + | ||
493 | + | ||
494 | +| Code | Type | Model | Message | | ||
495 | +|-----|-----|-----|-----| | ||
496 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;SubName副标题;PlayDuration游玩时长;Suitable适合人群;Location线路点坐标;Annotations需要点亮的设施id;Distance距离 | | ||
497 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
498 | + | ||
499 | + | ||
500 | + | ||
501 | +<a name="loginoperator-post"></a> | ||
502 | + | ||
503 | +#### /LoginOperator (POST) | ||
504 | + | ||
505 | + | ||
506 | +操作员管理 - 操作员登录 | ||
507 | + | ||
508 | +| Param Name | Example | Data Type | Description | Required? | | ||
509 | +|-----|-----|-----|-----|-----| | ||
510 | +| Username | aaron | string | 用户名 | Yes | | ||
511 | +| Password | 123 | string | 密码 | Yes | | ||
512 | + | ||
513 | + | ||
514 | +| Code | Type | Model | Message | | ||
515 | +|-----|-----|-----|-----| | ||
516 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e09c64c1c09c6f0f7ca2fa9","Token":"640bf934e425aba5d3c90998b2641f2f0ca07261d334d9615d1cd4790b5f34e7"}} 调用其它需要登陆的接口时携带token,有过期时间 | | ||
517 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
518 | + | ||
519 | + | ||
520 | + | ||
521 | +<a name="loginuser-post"></a> | ||
522 | + | ||
523 | +#### /LoginUser (POST) | ||
524 | + | ||
525 | + | ||
526 | +用户管理 - 用户登录&注册 | ||
527 | + | ||
528 | +| Param Name | Example | Data Type | Description | Required? | | ||
529 | +|-----|-----|-----|-----|-----| | ||
530 | +| Mobile | aaron | string | 手机号 | Yes | | ||
531 | +| Code | 1 | string | 验证码(使用验证码的新手机号自动注册) | Yes | | ||
532 | +| DeviceId | abc123 | string | 手机唯一识别码,不重复(存放于http.header中) | | | ||
533 | +| Mac | abc123 | string | 网卡Mac地址(存放于http.header中) | | | ||
534 | +| SystemType | ios | string | ios,android(存放于http.header中) | | | ||
535 | +| SystemVersion | 13.01 | string | 手机版本(存放于http.header中) | | | ||
536 | +| SystemModel | iphone8 | string | 手机型号(存放于http.header中) | | | ||
537 | +| AppVersion | 1.0 | string | app版本号(存放于http.header中) | | | ||
538 | +| DeviceToken | abc | string | 推送token(存放于http.header中) | | | ||
539 | + | ||
540 | + | ||
541 | +| Code | Type | Model | Message | | ||
542 | +|-----|-----|-----|-----| | ||
543 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e09c64c1c09c6f0f7ca2fa9","Token":"640bf934e425aba5d3c90998b2641f2f0ca07261d334d9615d1cd4790b5f34e7"}} 调用其它需要登陆的接口时携带token,有过期时间 | | ||
544 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
545 | + | ||
546 | + | ||
547 | + | ||
548 | +<a name="registerdevice-post"></a> | ||
549 | + | ||
550 | +#### /RegisterDevice (POST) | ||
551 | + | ||
552 | + | ||
553 | +用户管理 - 注册客户端 | ||
554 | + | ||
555 | +| Param Name | Example | Data Type | Description | Required? | | ||
556 | +|-----|-----|-----|-----|-----| | ||
557 | +| DeviceId | abc123 | string | 手机唯一识别码,不重复(存放于http.header中) | | | ||
558 | +| Mac | abc123 | string | 网卡Mac地址(存放于http.header中) | | | ||
559 | +| SystemType | ios | string | ios,android(存放于http.header中) | | | ||
560 | +| SystemVersion | 13.01 | string | 手机版本(存放于http.header中) | | | ||
561 | +| SystemModel | iphone8 | string | 手机型号(存放于http.header中) | | | ||
562 | +| AppVersion | 1.0 | string | app版本号(存放于http.header中) | | | ||
563 | +| DeviceToken | abc | string | 推送token(存放于http.header中) | | | ||
564 | + | ||
565 | + | ||
566 | +| Code | Type | Model | Message | | ||
567 | +|-----|-----|-----|-----| | ||
568 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
569 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
570 | + | ||
571 | + | ||
572 | + | ||
573 | +<a name="removeuser-post"></a> | ||
574 | + | ||
575 | +#### /RemoveUser (POST) | ||
576 | + | ||
577 | + | ||
578 | +用户管理 - 删除用户(注销) | ||
579 | + | ||
580 | +| Param Name | Example | Data Type | Description | Required? | | ||
581 | +|-----|-----|-----|-----|-----| | ||
582 | +| id | aaron | string | 用户id | Yes | | ||
583 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
584 | + | ||
585 | + | ||
586 | +| Code | Type | Model | Message | | ||
587 | +|-----|-----|-----|-----| | ||
588 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
589 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
590 | + | ||
591 | + | ||
592 | + | ||
593 | +<a name="scenicinfo-get"></a> | ||
594 | + | ||
595 | +#### /ScenicInfo (GET) | ||
596 | + | ||
597 | + | ||
598 | +返回景区基础信息 | ||
599 | + | ||
600 | +| Param Name | Example | Data Type | Description | Required? | | ||
601 | +|-----|-----|-----|-----|-----| | ||
602 | +| id | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
603 | + | ||
604 | + | ||
605 | +| Code | Type | Model | Message | | ||
606 | +|-----|-----|-----|-----| | ||
607 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;Describe介绍;OpenHours营业时间;Picture最上面图片;ShopAdPicture商城列表页图片;ItemScenicPicture项目场次照片;ActivityPicture活动照片;VideoList视频(VideoPicture=首桢图片);InvestigationUrl问券调查的url;RangeLocation景区范围(多个坐标点) | | ||
608 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
609 | + | ||
610 | + | ||
611 | + | ||
612 | +<a name="sms-send-post"></a> | ||
613 | + | ||
614 | +#### /Sms/Send (POST) | ||
615 | + | ||
616 | + | ||
617 | +发送短信验证码 | ||
618 | + | ||
619 | +| Param Name | Example | Data Type | Description | Required? | | ||
620 | +|-----|-----|-----|-----|-----| | ||
621 | +| Mobile | 18616619599 | string | 手机号 | Yes | | ||
622 | +| Location | {"Latitude": 119, "Longitude": 39} | string | 位置 | Yes | | ||
623 | + | ||
624 | + | ||
625 | +| Code | Type | Model | Message | | ||
626 | +|-----|-----|-----|-----| | ||
627 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"}验证码1分钟内有效 | | ||
628 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
629 | + | ||
630 | + | ||
631 | + | ||
632 | +<a name="systeminfo-get"></a> | ||
633 | + | ||
634 | +#### /SystemInfo (GET) | ||
635 | + | ||
636 | + | ||
637 | +查询系统信息接口 | ||
638 | + | ||
639 | +| Code | Type | Model | Message | | ||
640 | +|-----|-----|-----|-----| | ||
641 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Version=最新版本号UpdateLocationInterval上报位置时间间隔(秒) | | ||
642 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
643 | + | ||
644 | + | ||
645 | + | ||
646 | +<a name="tag-create-post"></a> | ||
647 | + | ||
648 | +#### /Tag/Create (POST) | ||
649 | + | ||
650 | + | ||
651 | +标签 - 增加标签 | ||
652 | + | ||
653 | +| Param Name | Example | Data Type | Description | Required? | | ||
654 | +|-----|-----|-----|-----|-----| | ||
655 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
656 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
657 | +| TagName | 广场 | string | 标签名称 | Yes | | ||
658 | +| TagGroup | location | string | 群组名称 | Yes | | ||
659 | + | ||
660 | + | ||
661 | +| Code | Type | Model | Message | | ||
662 | +|-----|-----|-----|-----| | ||
663 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
664 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
665 | + | ||
666 | + | ||
667 | +<a name="tag-remove-post"></a> | ||
668 | + | ||
669 | +#### /Tag/Remove (POST) | ||
670 | + | ||
671 | + | ||
672 | +标签 - 删除标签 | ||
673 | + | ||
674 | +| Param Name | Example | Data Type | Description | Required? | | ||
675 | +|-----|-----|-----|-----|-----| | ||
676 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
677 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
678 | +| TagName | 广场 | string | 标签名称 | Yes | | ||
679 | +| TagGroup | location | string | 群组名称 | Yes | | ||
680 | + | ||
681 | + | ||
682 | +| Code | Type | Model | Message | | ||
683 | +|-----|-----|-----|-----| | ||
684 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
685 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
686 | + | ||
687 | + | ||
688 | + | ||
689 | +<a name="topmenus-all-get"></a> | ||
690 | + | ||
691 | +#### /TopMenus/All (GET) | ||
692 | + | ||
693 | + | ||
694 | +菜单管理 - 查询所有菜单 | ||
695 | + | ||
696 | +| Param Name | Example | Data Type | Description | Required? | | ||
697 | +|-----|-----|-----|-----|-----| | ||
698 | +| ScenicId | 5e0d504e24e03431008b4567 | string | 景区id | Yes | | ||
699 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
700 | + | ||
701 | + | ||
702 | +| Code | Type | Model | Message | | ||
703 | +|-----|-----|-----|-----| | ||
704 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Id":"","ScenicId":"","Title":"玩水","Tags":["玩水"]},{"Id":"","ScenicId":"","Title":"设施","Tags":["服务设施","游玩项目"]}]} | | ||
705 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
706 | + | ||
707 | + | ||
708 | +<a name="topmenus-update-post"></a> | ||
709 | + | ||
710 | +#### /TopMenus/Update (POST) | ||
711 | + | ||
712 | + | ||
713 | +菜单管理 - 更新菜单 | ||
714 | + | ||
715 | +| Param Name | Example | Data Type | Description | Required? | | ||
716 | +|-----|-----|-----|-----|-----| | ||
717 | +| ScenicId | 5e0d504e24e03431008b4567 | string | 景区id | Yes | | ||
718 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
719 | + | ||
720 | + | ||
721 | +| Code | Type | Model | Message | | ||
722 | +|-----|-----|-----|-----| | ||
723 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Id":"","ScenicId":"","Title":"玩水","Tags":["玩水"]},{"Id":"","ScenicId":"","Title":"设施","Tags":["服务设施","游玩项目"]}]} | | ||
724 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
725 | + | ||
726 | + | ||
727 | + | ||
728 | +<a name="trajectory-save-post"></a> | ||
729 | + | ||
730 | +#### /Trajectory/Save (POST) | ||
731 | + | ||
732 | + | ||
733 | +保存用户移动轨迹(5分钟提交一次) | ||
734 | + | ||
735 | +| Param Name | Example | Data Type | Description | Required? | | ||
736 | +|-----|-----|-----|-----|-----| | ||
737 | +| UserId | 5dfb03070a9ac17ac7a82054 | string | 用户id | Yes | | ||
738 | +| Location | {"Latitude": 119, "Longitude": 39} | string | 经纬度 | Yes | | ||
739 | + | ||
740 | + | ||
741 | +| Code | Type | Model | Message | | ||
742 | +|-----|-----|-----|-----| | ||
743 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
744 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
745 | + | ||
746 | + | ||
747 | + | ||
748 | +<a name="updatecommodity-post"></a> | ||
749 | + | ||
750 | +#### /UpdateCommodity (POST) | ||
751 | + | ||
752 | + | ||
753 | +更新商品 | ||
754 | + | ||
755 | +| Param Name | Example | Data Type | Description | Required? | | ||
756 | +|-----|-----|-----|-----|-----| | ||
757 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
758 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
759 | + | ||
760 | + | ||
761 | +| Code | Type | Model | Message | | ||
762 | +|-----|-----|-----|-----| | ||
763 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | ||
764 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
765 | + | ||
766 | + | ||
767 | + | ||
768 | +<a name="updateitem-post"></a> | ||
769 | + | ||
770 | +#### /UpdateItem (POST) | ||
771 | + | ||
772 | + | ||
773 | +设备管理 - 更新设施 | ||
774 | + | ||
775 | +| Param Name | Example | Data Type | Description | Required? | | ||
776 | +|-----|-----|-----|-----|-----| | ||
777 | +| id | 5dfb03070a9ac17ac7a82054 | string | 设备id | Yes | | ||
778 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
779 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
780 | + | ||
781 | + | ||
782 | +| Code | Type | Model | Message | | ||
783 | +|-----|-----|-----|-----| | ||
784 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Tags所属标签,标签有分类;LimitHeight限高;PlayDuration游玩时长;SceneTime场次时间;Picture照片;Voice音频;AverageConsumption平均消费;Menu菜单, OpenHours开放时间: LocationDescription位置描述; Reminder温馨提示; State运行状态0=正常1=停运 | | ||
785 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
786 | + | ||
787 | + | ||
788 | + | ||
789 | +<a name="updateitemtime-post"></a> | ||
790 | + | ||
791 | +#### /UpdateItemTime (POST) | ||
792 | + | ||
793 | + | ||
794 | +设备管理 - 更新等待时间 | ||
795 | + | ||
796 | +| Param Name | Example | Data Type | Description | Required? | | ||
797 | +|-----|-----|-----|-----|-----| | ||
798 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
799 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
800 | +| item | [{"id":"5df864740a9ac17ac7a7feb8","time":"20"},{"id":"5df8660924e03417008b4567","time":"33"}] | string | 设备列表 | Yes | | ||
801 | + | ||
802 | + | ||
803 | +| Code | Type | Model | Message | | ||
804 | +|-----|-----|-----|-----| | ||
805 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {errcode: 0, result: "ok"} | | ||
806 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
807 | + | ||
808 | + | ||
809 | + | ||
810 | +<a name="updateline-post"></a> | ||
811 | + | ||
812 | +#### /UpdateLine (POST) | ||
813 | + | ||
814 | + | ||
815 | +更新线路 | ||
816 | + | ||
817 | +| Param Name | Example | Data Type | Description | Required? | | ||
818 | +|-----|-----|-----|-----|-----| | ||
819 | +| id | 5dfb03070a9ac17ac7a82054 | string | 线路id | Yes | | ||
820 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
821 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
822 | + | ||
823 | + | ||
824 | +| Code | Type | Model | Message | | ||
825 | +|-----|-----|-----|-----| | ||
826 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | | | ||
827 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
828 | + | ||
829 | + | ||
830 | + | ||
831 | +<a name="updateoperator-post"></a> | ||
832 | + | ||
833 | +#### /UpdateOperator (POST) | ||
834 | + | ||
835 | + | ||
836 | +操作员管理 - 修改用户信息 | ||
837 | + | ||
838 | +| Param Name | Example | Data Type | Description | Required? | | ||
839 | +|-----|-----|-----|-----|-----| | ||
840 | +| id | aaron | string | 用户id | Yes | | ||
841 | +| ScenicId | 5e0d504e24e03431008b4567 | string | 景区id | Yes | | ||
842 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
843 | +| Username | aarongao | string | 用户名 | Yes | | ||
844 | +| Remarks | 18616619599 | string | 备注 | Yes | | ||
845 | +| Password | 12345 | string | 密码 | Yes | | ||
846 | + | ||
847 | + | ||
848 | +| Code | Type | Model | Message | | ||
849 | +|-----|-----|-----|-----| | ||
850 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
851 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
852 | + | ||
853 | + | ||
854 | + | ||
855 | +<a name="updatescenic-post"></a> | ||
856 | + | ||
857 | +#### /UpdateScenic (POST) | ||
858 | + | ||
859 | + | ||
860 | +更新景区基础信息 | ||
861 | + | ||
862 | +| Param Name | Example | Data Type | Description | Required? | | ||
863 | +|-----|-----|-----|-----|-----| | ||
864 | +| id | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
865 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
866 | + | ||
867 | + | ||
868 | +| Code | Type | Model | Message | | ||
869 | +|-----|-----|-----|-----| | ||
870 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Name名称;Describe介绍;OpenHours营业时间;Picture最上面图片;ShopAdPicture商城列表页图片;ItemScenicPicture项目场次照片;ActivityPicture活动照片;VideoList视频(VideoPicture=首桢图片);InvestigationUrl问券调查的url;RangeLocation景区范围(多个坐标点) | | ||
871 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
872 | + | ||
873 | + | ||
874 | + | ||
875 | +<a name="updateuser-post"></a> | ||
876 | + | ||
877 | +#### /UpdateUser (POST) | ||
878 | + | ||
879 | + | ||
880 | +用户管理 - 修改用户信息 | ||
881 | + | ||
882 | +| Param Name | Example | Data Type | Description | Required? | | ||
883 | +|-----|-----|-----|-----|-----| | ||
884 | +| id | aaron | string | 用户id | Yes | | ||
885 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
886 | +| Birthday | 2010.10.10 | string | 生日 | Yes | | ||
887 | +| FullName | aarongao | string | 全名 | Yes | | ||
888 | +| Code | 12345678 | string | 6位验证码 | Yes | | ||
889 | +| Mobile | 18616619599 | string | 手机,同用户名 | Yes | | ||
890 | +| Sex | 男 | string | 性别 | Yes | | ||
891 | +| Openid | 12345 | string | 微信id | Yes | | ||
892 | + | ||
893 | + | ||
894 | +| Code | Type | Model | Message | | ||
895 | +|-----|-----|-----|-----| | ||
896 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
897 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
898 | + | ||
899 | + | ||
900 | + | ||
901 | +<a name="upload-post"></a> | ||
902 | + | ||
903 | +#### /Upload (POST) | ||
904 | + | ||
905 | + | ||
906 | +上传 | ||
907 | + | ||
908 | +| Param Name | Example | Data Type | Description | Required? | | ||
909 | +|-----|-----|-----|-----|-----| | ||
910 | +| file | 1 | file | 文件 | Yes | | ||
911 | + | ||
912 | + | ||
913 | +| Code | Type | Model | Message | | ||
914 | +|-----|-----|-----|-----| | ||
915 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"图片地址"} | | ||
916 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
917 | + | ||
918 | + | ||
919 | + | ||
920 | +<a name="userinfo-get"></a> | ||
921 | + | ||
922 | +#### /UserInfo (GET) | ||
923 | + | ||
924 | + | ||
925 | +用户管理 - 获取用户信息 | ||
926 | + | ||
927 | +| Param Name | Example | Data Type | Description | Required? | | ||
928 | +|-----|-----|-----|-----|-----| | ||
929 | +| id | aaron | string | 用户id | Yes | | ||
930 | +| Token | wgergejfwe | string | 用户token | Yes | | ||
931 | + | ||
932 | + | ||
933 | +| Code | Type | Model | Message | | ||
934 | +|-----|-----|-----|-----| | ||
935 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e09c64c1c09c6f0f7ca2fa9","Token":"640bf934e425aba5d3c90998b2641f2f0ca07261d334d9615d1cd4790b5f34e7"}} | | ||
936 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
937 | + | ||
938 | + | ||
939 | + | ||
940 | +<a name="userlog-post"></a> | ||
941 | + | ||
942 | +#### /UserLog (POST) | ||
943 | + | ||
944 | + | ||
945 | +增加用户行为日志 | ||
946 | + | ||
947 | +| Param Name | Example | Data Type | Description | Required? | | ||
948 | +|-----|-----|-----|-----|-----| | ||
949 | +| Type | 访问页面 | string | 安装;卸载;访问页面;使用功能;缩放地图;进入景区 | Yes | | ||
950 | +| SubType | 景区详情 | string | 推荐;景区详情;登陆;商城;投诉建议;问券调查....(app中能点的都加上) | Yes | | ||
951 | +| ScenicId | 5dfb03070a9ac17ac7a82054 | string | 景区id | Yes | | ||
952 | +| UserId | 5dfb03070a9ac17ac7a82054 | string | 用户ID | Yes | | ||
953 | +| UserName | Aaron | string | 用户名称 | Yes | | ||
954 | +| Location | {"Latitude": 119, "Longitude": 39} | string | 位置 | Yes | | ||
955 | +| Remarks | 备注 | string | 备注 | Yes | | ||
956 | +| Source | 用户分享 | string | 来源 | Yes | | ||
957 | +| DeviceId | abc123 | string | 手机唯一识别码,不重复(存放于http.header中) | Yes | | ||
958 | +| Mac | abc123 | string | 网卡Mac地址(存放于http.header中) | Yes | | ||
959 | +| SystemType | ios | string | ios,android(存放于http.header中) | Yes | | ||
960 | +| SystemVersion | 13.01 | string | 手机版本(存放于http.header中) | Yes | | ||
961 | +| SystemModel | iphone8 | string | 手机型号(存放于http.header中) | Yes | | ||
962 | +| AppVersion | 1.0 | string | app版本号(存放于http.header中) | Yes | | ||
963 | +| DeviceToken | abc | string | 推送token(存放于http.header中) | Yes | | ||
964 | + | ||
965 | + | ||
966 | +| Code | Type | Model | Message | | ||
967 | +|-----|-----|-----|-----| | ||
968 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"} | | ||
969 | +| 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | | ||
970 | + | ||
971 | + |
main.go
@@ -2,6 +2,7 @@ package main | @@ -2,6 +2,7 @@ package main | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "encoding/json" | 4 | "encoding/json" |
5 | + "flag" | ||
5 | "github.com/aarongao/tools" | 6 | "github.com/aarongao/tools" |
6 | "github.com/davecgh/go-spew/spew" | 7 | "github.com/davecgh/go-spew/spew" |
7 | "github.com/gin-gonic/gin" | 8 | "github.com/gin-gonic/gin" |
@@ -34,6 +35,12 @@ func main() { | @@ -34,6 +35,12 @@ func main() { | ||
34 | err := decoder.Decode(&Config.Info) | 35 | err := decoder.Decode(&Config.Info) |
35 | tools.CheckError(err) | 36 | tools.CheckError(err) |
36 | 37 | ||
38 | + // 启动参数中的端口号 | ||
39 | + var runPort string | ||
40 | + flag.StringVar(&runPort, "port", "", "端口号,默认为8080") | ||
41 | + flag.Parse() | ||
42 | + | ||
43 | + | ||
37 | // 连接数据库 | 44 | // 连接数据库 |
38 | // Set client options | 45 | // Set client options |
39 | clientOptions := options.Client() | 46 | clientOptions := options.Client() |
@@ -196,7 +203,12 @@ func main() { | @@ -196,7 +203,12 @@ func main() { | ||
196 | spew.Dump(err) | 203 | spew.Dump(err) |
197 | } | 204 | } |
198 | 205 | ||
199 | - Gin.Run(Config.Info.ServerPort) | 206 | + // 默认情况使用配置文件中的端口号,除非在启动命令中指定-port :808x |
207 | + _port := Config.Info.ServerPort | ||
208 | + if runPort != ""{ | ||
209 | + _port = runPort | ||
210 | + } | ||
211 | + Gin.Run(_port) | ||
200 | } | 212 | } |
201 | 213 | ||
202 | func InitController(method string, uri string, handFunc func(c *gin.Context), auth *DB.SModel) { | 214 | func InitController(method string, uri string, handFunc func(c *gin.Context), auth *DB.SModel) { |