apidoc.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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 Passport
  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 Passport
  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 Passport
  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 Passport
  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 Passport
  112. *
  113. * @apiDescription 获取手机验证码
  114. *
  115. * @apiParam {Number} mobile 手机号
  116. * @apiParam {String} signature signature
  117. *
  118. * @apiSuccess {String} msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
  119. */
  120. /**
  121. * @api {get} wonderful/main/?l=live.get 获取直播推流信息
  122. * @apiVersion 1.0.0
  123. * @apiName live.get
  124. * @apiGroup Live
  125. *
  126. * @apiDescription 获取直播推流信息
  127. *
  128. * @apiParam {String} key 流的key
  129. * @apiParam {String} signature 请将字符串signature_dever_2018_jm经过md5加密
  130. *
  131. * @apiSuccess {Object[]} live 推流列表
  132. * @apiSuccess {String} live.id 推流id
  133. * @apiSuccess {String} live.live 推流实际地址
  134. * @apiSuccess {String} live.url_rtmp 播放地址
  135. * @apiSuccess {String} live.url_hls 播放地址
  136. * @apiSuccess {String} live.url_hdl 播放地址
  137. * @apiSuccess {String} live.url_pic 实时截图地址
  138. */
  139. /**
  140. * @api {get} wonderful/main/?l=content.home 获取首页数据
  141. * @apiVersion 1.0.0
  142. * @apiName api.home
  143. * @apiGroup Content
  144. *
  145. * @apiDescription 获取首页数据
  146. *
  147. * @apiParam {String} signature signature
  148. *
  149. *
  150. * @apiSuccess {Number} uid 用户id 所有接口中都有该项
  151. * @apiSuccess {Object[]} config 基本配置 所有接口中都有该项
  152. * @apiSuccess {String} config.name 系统名称
  153. * @apiSuccess {String} config.info 系统介绍
  154. * @apiSuccess {String} config.logo 系统logo
  155. * @apiSuccess {Object[]} push_menu 栏目
  156. * @apiSuccess {String} push_menu.name 名称
  157. * @apiSuccess {String} push_menu.pic 图片
  158. * @apiSuccess {String} push_menu.type 类型,参考公共参数中的类型设置说明中的type说明
  159. * @apiSuccess {String} push_menu.id 源表id,根据type计算路径,然后把这个source_id加上就是最终的path,小程序和app同样。
  160. * @apiSuccess {String} push_menu.link 当type==10时有效,链接
  161. * @apiSuccess {String} push_menu.cdate 时间
  162. * @apiSuccess {Object[]} push_focus 焦点图,字段同上
  163. * @apiSuccess {Object[]} push_link 栏目,字段同上
  164. * @apiSuccess {Object[]} push_ad 栏目,字段同上
  165. * @apiSuccess {Object[]} push_up 栏目,字段同上
  166. * @apiSuccess {Object[]} news 更多数据
  167. * @apiSuccess {String} news.id id的值
  168. * @apiSuccess {String} news.name 名称
  169. * @apiSuccess {String} news.pic 图片
  170. * @apiSuccess {String} news.type 类型,参考公共参数中的类型设置说明中的type说明
  171. */