apidoc.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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 api.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/live/?l=api.start 开始推流
  199. * @apiVersion 1.0.0
  200. * @apiName api.start
  201. * @apiGroup Live
  202. *
  203. * @apiDescription 开始推流
  204. *
  205. * @apiParam {String} signature 请将字符串signature_dever_2018_jm经过md5加密
  206. * @apiParam {Number} id 推流id
  207. *
  208. * @apiSuccess {Number} id 推流id
  209. * @apiSuccess {Number} log_id 本次推流日志id
  210. */
  211. /**
  212. * @api {get} wonderful/live/?l=api.stop 结束推流
  213. * @apiVersion 1.0.0
  214. * @apiName api.stop
  215. * @apiGroup Live
  216. *
  217. * @apiDescription 结束推流 一定要调用该接口,否则不会生成回放地址
  218. *
  219. * @apiParam {String} signature 请将字符串signature_dever_2018_jm经过md5加密
  220. * @apiParam {Number} id 推流id
  221. * @apiParam {Number} log_id 本次推流日志id
  222. */
  223. /**
  224. * @api {get} wonderful/main/?l=content.home 获取首页数据
  225. * @apiVersion 1.0.0
  226. * @apiName content.home
  227. * @apiGroup Content
  228. *
  229. * @apiDescription 获取首页数据
  230. *
  231. * @apiParam {String} signature signature
  232. *
  233. *
  234. * @apiSuccess {Number} uid 用户id 所有接口中都有该项
  235. * @apiSuccess {Object[]} config 基本配置 所有接口中都有该项
  236. * @apiSuccess {String} config.name 系统名称 请将小程序和app头部名称替换为该字段
  237. * @apiSuccess {String} config.info 系统介绍
  238. * @apiSuccess {String} config.logo 系统logo
  239. * @apiSuccess {Object[]} push_menu 栏目
  240. * @apiSuccess {String} push_menu.name 名称
  241. * @apiSuccess {String} push_menu.pic 图片
  242. * @apiSuccess {String} push_menu.type 类型,参考公共参数中的类型设置说明中的type说明
  243. * @apiSuccess {String} push_menu.id 源表id,根据type计算路径,然后把这个source_id加上就是最终的path,小程序和app同样。
  244. * @apiSuccess {String} push_menu.link 当type==10时有效,链接
  245. * @apiSuccess {String} push_menu.cdate 时间
  246. * @apiSuccess {Object[]} push_focus 焦点图,字段同上
  247. * @apiSuccess {Object[]} push_link 栏目,字段同上
  248. * @apiSuccess {Object[]} push_ad 栏目,字段同上
  249. * @apiSuccess {Object[]} push_up 栏目,字段同上
  250. * @apiSuccess {Object[]} news 更多图文等数据
  251. * @apiSuccess {String} news.id 图文id
  252. * @apiSuccess {String} news.name 名称
  253. * @apiSuccess {String} news.pic_cover 图片
  254. * @apiSuccess {String} news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  255. * @apiSuccess {String} news.pdate 时间
  256. * @apiSuccess {String} news.num_view 浏览量
  257. * @apiSuccess {String} news.num_up 点赞量
  258. * @apiSuccess {String} news.num_comment 评论量
  259. * @apiSuccess {String} news.num_ding 订阅量
  260. * @apiSuccess {String} news.num_user 在线人数
  261. * @apiSuccess {String} news.share_yes 是否显示分享按钮 1显示 2不显示
  262. * @apiSuccess {String} news.share_title 分享标题
  263. * @apiSuccess {String} news.share_pic 分享图片
  264. * @apiSuccess {String} news.share_content 分享内容
  265. */
  266. /**
  267. * @api {get} wonderful/main/?l=content.up 精选推荐更多
  268. * @apiVersion 1.0.0
  269. * @apiName content.up
  270. * @apiGroup Content
  271. *
  272. * @apiDescription 精选推荐更多
  273. *
  274. * @apiParam {String} signature signature
  275. *
  276. *
  277. * @apiSuccess {Object[]} push_up 栏目,字段同上
  278. * @apiSuccess {String} push_up.name 名称
  279. * @apiSuccess {String} push_up.pic 图片
  280. * @apiSuccess {String} push_up.type 类型,参考公共参数中的类型设置说明中的type说明
  281. * @apiSuccess {String} push_up.id 源表id,根据type计算路径,然后把这个source_id加上就是最终的path,小程序和app同样。
  282. * @apiSuccess {String} push_up.link 当type==10时有效,链接
  283. * @apiSuccess {String} push_up.cdate 时间
  284. */
  285. /**
  286. * @api {get} wonderful/main/?l=content.news 精选页图文内容下拉更多
  287. * @apiVersion 1.0.0
  288. * @apiName content.news
  289. * @apiGroup Content
  290. *
  291. * @apiDescription 精选页图文内容下拉更多
  292. *
  293. * @apiParam {String} signature signature
  294. *
  295. * @apiSuccess {Object[]} news 更多图文等数据
  296. * @apiSuccess {String} news.id 图文id
  297. * @apiSuccess {String} news.name 名称
  298. * @apiSuccess {String} news.pic_cover 图片
  299. * @apiSuccess {String} news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  300. * @apiSuccess {String} news.pdate 时间
  301. * @apiSuccess {String} news.num_view 浏览量
  302. * @apiSuccess {String} news.num_up 点赞量
  303. * @apiSuccess {String} news.num_comment 评论量
  304. * @apiSuccess {String} news.num_ding 订阅量
  305. * @apiSuccess {String} news.num_user 在线人数
  306. * @apiSuccess {String} news.share_yes 是否显示分享按钮 1显示 2不显示
  307. * @apiSuccess {String} news.share_title 分享标题
  308. * @apiSuccess {String} news.share_pic 分享图片
  309. * @apiSuccess {String} news.share_content 分享内容
  310. */
  311. /**
  312. * @api {get} wonderful/main/?l=view.article 查看图文内容
  313. * @apiVersion 1.0.0
  314. * @apiName view.article
  315. * @apiGroup Content
  316. *
  317. * @apiDescription 查看图文内容
  318. *
  319. * @apiParam {String} signature signature
  320. * @apiParam {Number} id 图文id
  321. *
  322. * @apiSuccess {Object[]} info 图文数据
  323. * @apiSuccess {String} info.id
  324. * @apiSuccess {String} info.name 名称
  325. * @apiSuccess {String} info.pic_cover 图片
  326. * @apiSuccess {String} info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  327. * @apiSuccess {String} info.pdate 时间
  328. * @apiSuccess {String} info.num_view 浏览量
  329. * @apiSuccess {String} info.num_up 点赞量
  330. * @apiSuccess {String} info.num_comment 评论量
  331. * @apiSuccess {String} info.share_yes 是否显示分享按钮 1显示 2不显示
  332. * @apiSuccess {String} info.share_title 分享标题
  333. * @apiSuccess {String} info.share_pic 分享图片
  334. * @apiSuccess {String} info.share_content 分享内容
  335. * @apiSuccess {String} info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  336. * @apiSuccess {String} info.content 内容
  337. * @apiSuccess {String} info.content_array 数组内容,请使用该字段循环
  338. *
  339. * @apiSuccess {Object[]} comment 评论列表
  340. * @apiSuccess {String} comment.id
  341. * @apiSuccess {String} comment.username 用户名
  342. * @apiSuccess {String} comment.avatar 头像
  343. * @apiSuccess {String} comment.content 内容
  344. * @apiSuccess {String} comment.cdate 时间
  345. */
  346. /**
  347. * @api {get} wonderful/main/?l=view.vod 查看视频内容
  348. * @apiVersion 1.0.0
  349. * @apiName view.vod
  350. * @apiGroup Content
  351. *
  352. * @apiDescription 查看视频内容
  353. *
  354. * @apiParam {String} signature signature
  355. * @apiParam {Number} id 视频id
  356. *
  357. * @apiSuccess {Object[]} info 视频数据
  358. * @apiSuccess {String} info.id
  359. * @apiSuccess {String} info.name 名称
  360. * @apiSuccess {String} info.pic_cover 图片
  361. * @apiSuccess {String} info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  362. * @apiSuccess {String} info.pdate 时间
  363. * @apiSuccess {String} info.num_view 浏览量
  364. * @apiSuccess {String} info.num_up 点赞量
  365. * @apiSuccess {String} info.num_comment 评论量
  366. * @apiSuccess {String} info.share_yes 是否显示分享按钮 1显示 2不显示
  367. * @apiSuccess {String} info.share_title 分享标题
  368. * @apiSuccess {String} info.share_pic 分享图片
  369. * @apiSuccess {String} info.share_content 分享内容
  370. * @apiSuccess {String} info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  371. * @apiSuccess {String} info.content 内容
  372. *
  373. *
  374. * @apiSuccess {Object[]} comment 评论列表
  375. * @apiSuccess {String} comment.id
  376. * @apiSuccess {String} comment.username 用户名
  377. * @apiSuccess {String} comment.avatar 头像
  378. * @apiSuccess {String} comment.content 内容
  379. * @apiSuccess {String} comment.cdate 时间
  380. */
  381. /**
  382. * @api {get} wonderful/main/?l=view.live 查看直播内容
  383. * @apiVersion 1.0.0
  384. * @apiName view.live
  385. * @apiGroup Content
  386. *
  387. * @apiDescription 查看直播内容
  388. *
  389. * @apiParam {String} signature signature
  390. * @apiParam {Number} id 视频id
  391. *
  392. * @apiSuccess {Object[]} info 直播数据
  393. * @apiSuccess {String} info.id
  394. * @apiSuccess {String} info.name 名称
  395. * @apiSuccess {String} info.pic_cover 图片
  396. * @apiSuccess {String} info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  397. * @apiSuccess {String} info.pdate 时间
  398. * @apiSuccess {String} info.num_view 浏览量
  399. * @apiSuccess {String} info.num_up 点赞量
  400. * @apiSuccess {String} info.num_comment 评论量
  401. * @apiSuccess {String} info.share_yes 是否显示分享按钮 1显示 2不显示
  402. * @apiSuccess {String} info.share_title 分享标题
  403. * @apiSuccess {String} info.share_pic 分享图片
  404. * @apiSuccess {String} info.share_content 分享内容
  405. * @apiSuccess {String} info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  406. * @apiSuccess {String} info.content 内容
  407. *
  408. *
  409. * @apiSuccess {Object[]} comment 评论列表
  410. * @apiSuccess {String} comment.id
  411. * @apiSuccess {String} comment.username 用户名
  412. * @apiSuccess {String} comment.avatar 头像
  413. * @apiSuccess {String} comment.content 内容
  414. * @apiSuccess {String} comment.cdate 时间
  415. */
  416. /**
  417. * @api {get} wonderful/main/?l=user.submit_up 点赞
  418. * @apiVersion 1.0.0
  419. * @apiName user.submit_up
  420. * @apiGroup UserAction
  421. *
  422. * @apiDescription 点赞
  423. *
  424. * @apiParam {String} signature signature
  425. * @apiParam {Number} type type类型
  426. * @apiParam {Number} id 当前的数据id
  427. *
  428. * @apiSuccess {String} data ok
  429. */
  430. /**
  431. * @api {get} wonderful/main/?l=user.submit_share 分享
  432. * @apiVersion 1.0.0
  433. * @apiName user.submit_share
  434. * @apiGroup UserAction
  435. *
  436. * @apiDescription 分享
  437. *
  438. * @apiParam {String} signature signature
  439. * @apiParam {Number} type type类型
  440. * @apiParam {Number} id 当前的数据id
  441. *
  442. * @apiSuccess {String} data ok
  443. */
  444. /**
  445. * @api {get} wonderful/main/?l=user.submit_share_reflux 分享回流
  446. * @apiVersion 1.0.0
  447. * @apiName user.submit_share_reflux
  448. * @apiGroup UserAction
  449. *
  450. * @apiDescription 分享回流
  451. *
  452. * @apiParam {String} signature signature
  453. * @apiParam {Number} type type类型
  454. * @apiParam {Number} id 当前的数据id
  455. * @apiParam {String} source_signature 回流的源用户id
  456. *
  457. * @apiSuccess {String} data ok
  458. */
  459. /**
  460. * @api {get} wonderful/main/?l=user.submit_comment 提交评论
  461. * @apiVersion 1.0.0
  462. * @apiName user.submit_comment
  463. * @apiGroup UserAction
  464. *
  465. * @apiDescription 提交评论
  466. *
  467. * @apiParam {String} signature signature
  468. * @apiParam {Number} type type类型
  469. * @apiParam {Number} id 当前的数据id
  470. * @apiParam {String} content 评论内容
  471. *
  472. * @apiSuccess {String} data ok
  473. */