apidoc.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. <?php
  2. /**
  3. * @api {get} common.public 公共参数说明
  4. * @apiVersion 1.0.0
  5. * @apiName common.public
  6. * @apiGroup Common
  7. *
  8. * @apiDescription 介绍公共参数
  9. *
  10. * @apiParam {Number} json 是否返回json格式的数据1为返回2为不返回
  11. * @apiParam {Number} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
  12. * @apiParam {Number} pg 分页数,第几页,列表页瀑布流使用该参数
  13. *
  14. * @apiSuccess {Number} status 状态,1为有效2为无效
  15. * @apiSuccess {String} msg 请求的数据是否成功的提示
  16. * @apiSuccess {String} data 如果status为1,data有值
  17. * @apiSuccess {Object[]} page 分页信息
  18. * @apiSuccess {Number} page.total 分页总数
  19. * @apiSuccess {Number} page.current_page 当前页
  20. * @apiSuccess {Number} page.total_page 总页数
  21. * @apiSuccess {Number} page.next_page 下一页
  22. * @apiSuccess {Number} page.prev_page 上一页
  23. * @apiSuccess {Number} page.status 是否有下一页数据,0为没有
  24. */
  25. /**
  26. * @api {get} common.type 类型设置说明
  27. * @apiVersion 1.0.0
  28. * @apiName common.type
  29. * @apiGroup Common
  30. *
  31. * @apiDescription 类型设置说明
  32. *
  33. * @apiParam {String} source_type 请在header中定义,ios:ios | android:android | 移动h5:h5 | 小程序:applet | 公众号:service | pc网站:pc
  34. * @apiParam {Number} type 图文:1 | 视频:2 | 直播:3 | 小刊:4 | 链接:10
  35. * @apiParam {Number} push_ 所有带push_开头的返回参数,返回字典都是一样的,参考获取首页数据中的push_focus
  36. */
  37. /**
  38. * @api {get} wonderful/passport/?l=applet.bind 用户登录
  39. * @apiVersion 1.0.0
  40. * @apiName applet.bind
  41. * @apiGroup AppletPassport
  42. *
  43. * @apiDescription 用户登录
  44. *
  45. * @apiParam {String} code 微信登录返回的code
  46. *
  47. * @apiSuccess {Number} vid 微信id,请保存在本地
  48. * @apiSuccess {Number} uid 用户id,请保存在本地
  49. * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
  50. */
  51. /**
  52. * @api {get} wonderful/passport/?l=applet.update 更新用户信息
  53. * @apiVersion 1.0.0
  54. * @apiName applet.update
  55. * @apiGroup AppletPassport
  56. *
  57. * @apiDescription 更新用户信息
  58. *
  59. * @apiParam {String} nickname 用户昵称
  60. * @apiParam {String} avatarurl 用户头像
  61. * @apiParam {String} iv 微信的加密参数
  62. * @apiParam {String} encryptedData 微信的加密参数
  63. * @apiParam {Number} vid 微信id
  64. * @apiParam {Number} uid 用户id
  65. * @apiParam {String} signature signature
  66. *
  67. *
  68. * @apiSuccess {Number} vid 微信id,请保存在本地
  69. * @apiSuccess {Number} uid 用户id,请保存在本地
  70. * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
  71. */
  72. /**
  73. * @api {get} wonderful/passport/?l=applet.mobile 更新用户手机号-微信绑定
  74. * @apiVersion 1.0.0
  75. * @apiName applet.mobile
  76. * @apiGroup AppletPassport
  77. *
  78. * @apiDescription 更新用户手机号-微信绑定
  79. *
  80. * @apiParam {String} iv 微信的加密参数
  81. * @apiParam {String} encryptedData 微信的加密参数
  82. * @apiParam {Number} vid 微信id
  83. * @apiParam {Number} uid 用户id
  84. * @apiParam {String} signature signature
  85. *
  86. *
  87. * @apiSuccess {Number} vid 微信id,请保存在本地
  88. * @apiSuccess {Number} uid 用户id,请保存在本地
  89. * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
  90. */
  91. /**
  92. * @api {get} wonderful/passport/?l=applet.bind_mobile 更新用户手机号-验证码绑定
  93. * @apiVersion 1.0.0
  94. * @apiName applet.bind_mobile
  95. * @apiGroup AppletPassport
  96. *
  97. * @apiDescription 更新用户手机号-验证码绑定
  98. *
  99. * @apiParam {Number} uid 用户id
  100. * @apiParam {Number} mobile 手机号
  101. * @apiParam {String} mcode 验证码
  102. * @apiParam {String} signature signature
  103. *
  104. * @apiSuccess {Number} uid 用户id,请保存在本地
  105. * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
  106. */
  107. /**
  108. * @api {get} wonderful/passport/?l=reg.getMCode 获取手机验证码
  109. * @apiVersion 1.0.0
  110. * @apiName reg.getMCode
  111. * @apiGroup AppletPassport
  112. *
  113. * @apiDescription 获取手机验证码
  114. *
  115. * @apiParam {Number} mobile 手机号
  116. *
  117. * @apiSuccess {String} msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
  118. */
  119. /**
  120. * @api {get} wonderful/passport/?l=reg.getMCode 获取手机验证码,未登录状态
  121. * @apiVersion 1.0.0
  122. * @apiName reg.getMCode
  123. * @apiGroup AppPassport
  124. *
  125. * @apiDescription 获取手机验证码,未登录状态
  126. *
  127. * @apiParam {Number} mobile 手机号
  128. *
  129. * @apiSuccess {String} msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
  130. */
  131. /**
  132. * @api {get} wonderful/passport/?l=reg.getMCodeLogin 获取手机验证码,已登录状态
  133. * @apiVersion 1.0.0
  134. * @apiName reg.getMCode
  135. * @apiGroup AppPassport
  136. *
  137. * @apiDescription 获取手机验证码,已登录状态
  138. *
  139. * @apiParam {Number} mobile 手机号
  140. * @apiParam {String} signature signature
  141. *
  142. * @apiSuccess {String} msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
  143. */
  144. /**
  145. * @api {get} wonderful/passport/?l=app.login 登录与注册
  146. * @apiVersion 1.0.0
  147. * @apiName app.login
  148. * @apiGroup AppPassport
  149. *
  150. * @apiDescription 登录与注册
  151. *
  152. * @apiParam {Number} mobile 手机号
  153. * @apiParam {String} code 验证码
  154. *
  155. * @apiSuccess {Number} uid 用户id,请保存在本地
  156. * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
  157. */
  158. /**
  159. * @api {get} wonderful/passport/?l=app.update 更新用户信息
  160. * @apiVersion 1.0.0
  161. * @apiName app.update
  162. * @apiGroup AppPassport
  163. *
  164. * @apiDescription 更新用户信息
  165. *
  166. * @apiParam {Number} signature 用户signature
  167. * @apiParam {String} avatar 头像
  168. * @apiParam {String} gender 性别
  169. * @apiParam {String} city 城市
  170. * @apiParam {String} province 省份
  171. * @apiParam {String} country 县区
  172. *
  173. * @apiSuccess {Number} uid 用户id,请保存在本地
  174. * @apiSuccess {String} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
  175. */
  176. /**
  177. * @api {get} wonderful/live/?l=api.get 获取直播推流信息
  178. * @apiVersion 1.0.0
  179. * @apiName live.get
  180. * @apiGroup Live
  181. *
  182. * @apiDescription 获取直播推流信息
  183. *
  184. * @apiParam {String} signature 请将字符串signature_dever_2018_jm经过md5加密
  185. *
  186. * @apiSuccess {Object[]} active 直播活动列表
  187. * @apiSuccess {String} active.id 活动id
  188. * @apiSuccess {String} acitve.name 活动名称
  189. * @apiSuccess {Object[]} active.stream 直播流列表
  190. * @apiSuccess {String} active.stream.id 推流id
  191. * @apiSuccess {String} active.stream.live 推流实际地址
  192. * @apiSuccess {String} active.stream.url_rtmp 播放地址
  193. * @apiSuccess {String} active.stream.url_hls 播放地址
  194. * @apiSuccess {String} active.stream.url_hdl 播放地址
  195. * @apiSuccess {String} active.stream.url_pic 实时截图地址
  196. */
  197. /**
  198. * @api {get} wonderful/main/?l=content.home 获取首页数据
  199. * @apiVersion 1.0.0
  200. * @apiName content.home
  201. * @apiGroup Content
  202. *
  203. * @apiDescription 获取首页数据
  204. *
  205. * @apiParam {String} signature signature
  206. *
  207. *
  208. * @apiSuccess {Number} uid 用户id 所有接口中都有该项
  209. * @apiSuccess {Object[]} config 基本配置 所有接口中都有该项
  210. * @apiSuccess {String} config.name 系统名称 请将小程序和app头部名称替换为该字段
  211. * @apiSuccess {String} config.info 系统介绍
  212. * @apiSuccess {String} config.logo 系统logo
  213. * @apiSuccess {Object[]} push_menu 栏目
  214. * @apiSuccess {String} push_menu.name 名称
  215. * @apiSuccess {String} push_menu.pic 图片
  216. * @apiSuccess {String} push_menu.type 类型,参考公共参数中的类型设置说明中的type说明
  217. * @apiSuccess {String} push_menu.id 源表id,根据type计算路径,然后把这个source_id加上就是最终的path,小程序和app同样。
  218. * @apiSuccess {String} push_menu.link 当type==10时有效,链接
  219. * @apiSuccess {String} push_menu.cdate 时间
  220. * @apiSuccess {Object[]} push_focus 焦点图,字段同上
  221. * @apiSuccess {Object[]} push_link 栏目,字段同上
  222. * @apiSuccess {Object[]} push_ad 栏目,字段同上
  223. * @apiSuccess {Object[]} push_up 栏目,字段同上
  224. * @apiSuccess {Object[]} news 更多图文等数据
  225. * @apiSuccess {String} news.id 图文id
  226. * @apiSuccess {String} news.name 名称
  227. * @apiSuccess {String} news.pic_cover 图片
  228. * @apiSuccess {String} news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  229. * @apiSuccess {String} news.pdate 时间
  230. * @apiSuccess {String} news.num_view 浏览量
  231. * @apiSuccess {String} news.num_up 点赞量
  232. * @apiSuccess {String} news.num_comment 评论量
  233. * @apiSuccess {String} news.num_ding 订阅量
  234. * @apiSuccess {String} news.num_user 在线人数
  235. * @apiSuccess {String} news.share_yes 是否显示分享按钮 1显示 2不显示
  236. * @apiSuccess {String} news.share_title 分享标题
  237. * @apiSuccess {String} news.share_pic 分享图片
  238. * @apiSuccess {String} news.share_content 分享内容
  239. */
  240. /**
  241. * @api {get} wonderful/main/?l=content.up 精选推荐更多
  242. * @apiVersion 1.0.0
  243. * @apiName content.up
  244. * @apiGroup Content
  245. *
  246. * @apiDescription 精选推荐更多
  247. *
  248. * @apiParam {String} signature signature
  249. *
  250. *
  251. * @apiSuccess {Object[]} push_up 栏目,字段同上
  252. * @apiSuccess {String} push_up.name 名称
  253. * @apiSuccess {String} push_up.pic 图片
  254. * @apiSuccess {String} push_up.type 类型,参考公共参数中的类型设置说明中的type说明
  255. * @apiSuccess {String} push_up.id 源表id,根据type计算路径,然后把这个source_id加上就是最终的path,小程序和app同样。
  256. * @apiSuccess {String} push_up.link 当type==10时有效,链接
  257. * @apiSuccess {String} push_up.cdate 时间
  258. */
  259. /**
  260. * @api {get} wonderful/main/?l=content.news 精选页图文内容下拉更多
  261. * @apiVersion 1.0.0
  262. * @apiName content.news
  263. * @apiGroup Content
  264. *
  265. * @apiDescription 精选页图文内容下拉更多
  266. *
  267. * @apiParam {String} signature signature
  268. *
  269. * @apiSuccess {Object[]} news 更多图文等数据
  270. * @apiSuccess {String} news.id 图文id
  271. * @apiSuccess {String} news.name 名称
  272. * @apiSuccess {String} news.pic_cover 图片
  273. * @apiSuccess {String} news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  274. * @apiSuccess {String} news.pdate 时间
  275. * @apiSuccess {String} news.num_view 浏览量
  276. * @apiSuccess {String} news.num_up 点赞量
  277. * @apiSuccess {String} news.num_comment 评论量
  278. * @apiSuccess {String} news.num_ding 订阅量
  279. * @apiSuccess {String} news.num_user 在线人数
  280. * @apiSuccess {String} news.share_yes 是否显示分享按钮 1显示 2不显示
  281. * @apiSuccess {String} news.share_title 分享标题
  282. * @apiSuccess {String} news.share_pic 分享图片
  283. * @apiSuccess {String} news.share_content 分享内容
  284. */
  285. /**
  286. * @api {get} wonderful/main/?l=view.article 查看图文内容
  287. * @apiVersion 1.0.0
  288. * @apiName view.article
  289. * @apiGroup Content
  290. *
  291. * @apiDescription 查看图文内容
  292. *
  293. * @apiParam {String} signature signature
  294. * @apiParam {Number} id 图文id
  295. *
  296. * @apiSuccess {Object[]} info 图文数据
  297. * @apiSuccess {String} info.id
  298. * @apiSuccess {String} info.name 名称
  299. * @apiSuccess {String} info.pic_cover 图片
  300. * @apiSuccess {String} info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  301. * @apiSuccess {String} info.pdate 时间
  302. * @apiSuccess {String} info.num_view 浏览量
  303. * @apiSuccess {String} info.num_up 点赞量
  304. * @apiSuccess {String} info.num_comment 评论量
  305. * @apiSuccess {String} info.share_yes 是否显示分享按钮 1显示 2不显示
  306. * @apiSuccess {String} info.share_title 分享标题
  307. * @apiSuccess {String} info.share_pic 分享图片
  308. * @apiSuccess {String} info.share_content 分享内容
  309. * @apiSuccess {String} info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  310. * @apiSuccess {String} info.content 内容
  311. * @apiSuccess {String} info.content_array 数组内容,请使用该字段循环
  312. *
  313. * @apiSuccess {Object[]} comment 评论列表
  314. * @apiSuccess {String} comment.id
  315. * @apiSuccess {String} comment.username 用户名
  316. * @apiSuccess {String} comment.avatar 头像
  317. * @apiSuccess {String} comment.content 内容
  318. * @apiSuccess {String} comment.cdate 时间
  319. */
  320. /**
  321. * @api {get} wonderful/main/?l=view.vod 查看视频内容
  322. * @apiVersion 1.0.0
  323. * @apiName view.vod
  324. * @apiGroup Content
  325. *
  326. * @apiDescription 查看视频内容
  327. *
  328. * @apiParam {String} signature signature
  329. * @apiParam {Number} id 视频id
  330. *
  331. * @apiSuccess {Object[]} info 视频数据
  332. * @apiSuccess {String} info.id
  333. * @apiSuccess {String} info.name 名称
  334. * @apiSuccess {String} info.pic_cover 图片
  335. * @apiSuccess {String} info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  336. * @apiSuccess {String} info.pdate 时间
  337. * @apiSuccess {String} info.num_view 浏览量
  338. * @apiSuccess {String} info.num_up 点赞量
  339. * @apiSuccess {String} info.num_comment 评论量
  340. * @apiSuccess {String} info.share_yes 是否显示分享按钮 1显示 2不显示
  341. * @apiSuccess {String} info.share_title 分享标题
  342. * @apiSuccess {String} info.share_pic 分享图片
  343. * @apiSuccess {String} info.share_content 分享内容
  344. * @apiSuccess {String} info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  345. * @apiSuccess {String} info.content 内容
  346. *
  347. *
  348. * @apiSuccess {Object[]} comment 评论列表
  349. * @apiSuccess {String} comment.id
  350. * @apiSuccess {String} comment.username 用户名
  351. * @apiSuccess {String} comment.avatar 头像
  352. * @apiSuccess {String} comment.content 内容
  353. * @apiSuccess {String} comment.cdate 时间
  354. */
  355. /**
  356. * @api {get} wonderful/main/?l=view.live 查看直播内容
  357. * @apiVersion 1.0.0
  358. * @apiName view.live
  359. * @apiGroup Content
  360. *
  361. * @apiDescription 查看直播内容
  362. *
  363. * @apiParam {String} signature signature
  364. * @apiParam {Number} id 视频id
  365. *
  366. * @apiSuccess {Object[]} info 直播数据
  367. * @apiSuccess {String} info.id
  368. * @apiSuccess {String} info.name 名称
  369. * @apiSuccess {String} info.pic_cover 图片
  370. * @apiSuccess {String} info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  371. * @apiSuccess {String} info.pdate 时间
  372. * @apiSuccess {String} info.num_view 浏览量
  373. * @apiSuccess {String} info.num_up 点赞量
  374. * @apiSuccess {String} info.num_comment 评论量
  375. * @apiSuccess {String} info.share_yes 是否显示分享按钮 1显示 2不显示
  376. * @apiSuccess {String} info.share_title 分享标题
  377. * @apiSuccess {String} info.share_pic 分享图片
  378. * @apiSuccess {String} info.share_content 分享内容
  379. * @apiSuccess {String} info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  380. * @apiSuccess {String} info.content 内容
  381. *
  382. *
  383. * @apiSuccess {Object[]} comment 评论列表
  384. * @apiSuccess {String} comment.id
  385. * @apiSuccess {String} comment.username 用户名
  386. * @apiSuccess {String} comment.avatar 头像
  387. * @apiSuccess {String} comment.content 内容
  388. * @apiSuccess {String} comment.cdate 时间
  389. */
  390. /**
  391. * @api {get} wonderful/main/?l=user.submit_up 点赞
  392. * @apiVersion 1.0.0
  393. * @apiName user.submit_up
  394. * @apiGroup UserAction
  395. *
  396. * @apiDescription 点赞
  397. *
  398. * @apiParam {String} signature signature
  399. * @apiParam {Number} type type类型
  400. * @apiParam {Number} id 当前的数据id
  401. *
  402. * @apiSuccess {String} data ok
  403. */
  404. /**
  405. * @api {get} wonderful/main/?l=user.submit_share 分享
  406. * @apiVersion 1.0.0
  407. * @apiName user.submit_share
  408. * @apiGroup UserAction
  409. *
  410. * @apiDescription 分享
  411. *
  412. * @apiParam {String} signature signature
  413. * @apiParam {Number} type type类型
  414. * @apiParam {Number} id 当前的数据id
  415. *
  416. * @apiSuccess {String} data ok
  417. */
  418. /**
  419. * @api {get} wonderful/main/?l=user.submit_share_reflux 分享回流
  420. * @apiVersion 1.0.0
  421. * @apiName user.submit_share_reflux
  422. * @apiGroup UserAction
  423. *
  424. * @apiDescription 分享回流
  425. *
  426. * @apiParam {String} signature signature
  427. * @apiParam {Number} type type类型
  428. * @apiParam {Number} id 当前的数据id
  429. * @apiParam {String} source_signature 回流的源用户id
  430. *
  431. * @apiSuccess {String} data ok
  432. */
  433. /**
  434. * @api {get} wonderful/main/?l=user.submit_comment 提交评论
  435. * @apiVersion 1.0.0
  436. * @apiName user.submit_comment
  437. * @apiGroup UserAction
  438. *
  439. * @apiDescription 提交评论
  440. *
  441. * @apiParam {String} signature signature
  442. * @apiParam {Number} type type类型
  443. * @apiParam {Number} id 当前的数据id
  444. * @apiParam {String} content 评论内容
  445. *
  446. * @apiSuccess {String} data ok
  447. */