api.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | API Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register API routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | is assigned the "api" middleware group. Enjoy building your API!
  11. |
  12. */
  13. Route::group(['namespace' => 'Api'], function(){
  14. Route::group(['namespace' => 'V1'], function(){
  15. //测试
  16. Route::resource('test', 'TestController');
  17. //微信信息通知地址(暂时没有用)
  18. Route::resource('wx_notification', 'WxNotificationController');
  19. //统一微信入口 授权拿第三方用户id
  20. Route::get('third_wx_auth', 'ThirdWxController@auth');
  21. //统一微信入口 获取JSSDK
  22. Route::post('third_wx_jssdk', 'ThirdWxController@getJsSdk');
  23. //统一微信入口 授权拿第三方用户id
  24. Route::get('third_user_info', 'ThirdWxController@getUserInfo');
  25. //统一用户名密码入口
  26. Route::resource('third_up', 'ThirdUpController');
  27. //iOS 审核显示
  28. Route::get('iOSshow', 'VersionController@iOSshow');
  29. //api认证
  30. Route::group(['middleware'=>['apiSign']], function(){
  31. //天气预报接口
  32. Route::resource('weather', 'WeatherController');
  33. //版本信息
  34. Route::resource('version', 'VersionController');
  35. //推荐
  36. Route::resource('commend', 'CommendController');
  37. //token验证
  38. Route::group(['middleware'=>['token']], function(){
  39. //退出登陆
  40. Route::resource('login_out', 'LoginOutController', ['only'=>['store']]);
  41. //用户
  42. Route::resource('user', 'UserController');
  43. //统一H5聊天
  44. Route::resource('third_h5_chat', 'ThirdH5ChatController');
  45. //上传图片
  46. Route::resource('upload', 'UploadController', ['only'=>['store']]);
  47. //AI聊天历史列表
  48. Route::get('AiChatList', 'Chat\AiChatController@index');
  49. //AI聊天发送数据
  50. Route::post('AiChatSendData', 'Chat\AiChatController@sendData');
  51. //banner
  52. // Route::resource('banner', 'BannerController', ['only'=>['index']]);
  53. // 系统配置
  54. // Route::resource('config', 'SysConfigController', ['only'=>['index']]);
  55. // //专家来了
  56. // Route::group(['namespace' => 'Specialist', 'prefix' => 'specialist'], function(){
  57. // //首页 一级栏目列表 二级栏目列表 栏目详情
  58. // Route::resource('index', 'IndexController');
  59. //// Route::resource('getChapterList', 'IndexController');
  60. // Route::get('getChapterList', 'IndexController@getChapterList')->name('getChapterList');
  61. // //详情 列表 详情
  62. // Route::resource('specialist_info', 'SpecialistInfoController');
  63. // });
  64. //心理大厅
  65. Route::group(['namespace' => 'Mentality', 'prefix' => 'mentality'], function(){
  66. //反馈意见
  67. // Route::resource('feedback','FeedBackController');
  68. // //量表分类 列表
  69. // Route::resource('scale_category', 'ScaleCategoryController');
  70. // //量表 列表
  71. // Route::resource('scale', 'ScaleController');
  72. // //获取数据
  73. // Route::get('gettestinfo', 'ScaleController@getTestInfo')->name('getTestInfo');
  74. //开始测评
  75. Route::get('start_test', 'ScaleController@startTest')->name('startTest');
  76. // //训练分类 列表
  77. // Route::resource('drill_category', 'DrillCategoryController');
  78. //// 训练 列表 详情
  79. // Route::resource('drill', 'DrillController');
  80. //// 训练扩展 详情
  81. // Route::resource('play', 'PlayController');
  82. // //心情记录 列表 详情 添加 修改
  83. // Route::resource('mood', 'MoodController');
  84. // //用户周记录 列表,详情
  85. // Route::resource('week', 'WeekController');
  86. // //心情等级 列表
  87. // Route::resource('mood_level', 'MoodLevelController');
  88. // //心情标签 列表
  89. // Route::resource('mood_tag', 'MoodTagController');
  90. // //睡眠等级 列表
  91. // Route::resource('sleep_level', 'SleepLevelController');
  92. //睡眠 列表 添加
  93. // Route::resource('sleep', 'SleepController');
  94. // //给未来的信 添加
  95. // Route::resource('letter', 'LetterController');
  96. // //统计 心情 睡眠
  97. // Route::resource('statistics', 'StatisticsController');
  98. // //统计心情下拉选择
  99. // Route::get('mood_select', 'StatisticsController@getMoodSelect')->name('statisticsMoodSelect');
  100. // //统计睡眠下拉选择
  101. // Route::get('sleep_select', 'StatisticsController@getSleepSelect')->name('statisticsSleepSelect');
  102. // //收藏 添加取消收藏
  103. // Route::resource('collect', 'CollectController');
  104. // //浏览记录 列表
  105. // Route::resource('browse_record', 'BrowseRecordController');
  106. });
  107. });
  108. //微信H5
  109. Route::group(['namespace' => 'MpUser' , 'prefix' => 'mp_user'], function(){
  110. Route::resource('access_token', 'AccessTokenController');
  111. Route::resource('mp_user', 'MpUserController'); //微信小程序登录
  112. });
  113. //微信公众号
  114. Route::group(['namespace' => 'MpService' , 'prefix' => 'mp_service'], function(){
  115. Route::resource('jsapi_sign', 'JsapiSignController');
  116. });
  117. // //专家来了
  118. // Route::group(['namespace' => 'Specialist', 'prefix' => 'specialist'], function(){
  119. // //首页 一级栏目列表 二级栏目列表 栏目详情
  120. // Route::resource('index', 'IndexController');
  121. //// Route::resource('getChapterList', 'IndexController');
  122. //// Route::get('getChapterList', 'IndexController@getChapterList')->name('getChapterList');
  123. // //详情 列表 详情
  124. // Route::resource('specialist_info', 'SpecialistInfoController');
  125. // });
  126. // Route::group(['namespace' => 'Mentality', 'prefix' => 'mentality'], function(){
  127. // //反馈意见
  128. // //量表分类 列表
  129. // Route::resource('scale_category', 'ScaleCategoryController');
  130. // //量表 列表
  131. // Route::resource('scale', 'ScaleController');
  132. // //获取数据
  133. // //开始测评
  134. // //训练分类 列表
  135. // Route::resource('drill_category', 'DrillCategoryController');
  136. // //训练 列表 详情
  137. // Route::resource('drill', 'DrillController');
  138. // Route::resource('play', 'PlayController');
  139. //
  140. // });
  141. // //专家来了
  142. // Route::group(['namespace' => 'Specialist', 'prefix' => 'specialist'], function(){
  143. // //首页 一级栏目列表 二级栏目列表 栏目详情
  144. // Route::resource('index', 'IndexController');
  145. // //详情 列表 详情
  146. // Route::resource('specialist_info', 'SpecialistInfoController');
  147. // });
  148. Route::resource('config', 'SysConfigController', ['only'=>['index']]);
  149. //banner
  150. Route::resource('banner', 'BannerController', ['only'=>['index']]);
  151. //量表分类
  152. Route::resource('scale_category', 'Mentality\ScaleCategoryController');
  153. //训练分类 列表
  154. Route::resource('drill_category', 'Mentality\DrillCategoryController');
  155. //专家来了
  156. Route::group(['namespace' => 'Specialist', 'prefix' => 'specialist'], function(){
  157. //首页 一级栏目列表 二级栏目列表 栏目详情
  158. Route::resource('index', 'IndexController');
  159. // Route::resource('getChapterList', 'IndexController');
  160. Route::get('getChapterList', 'IndexController@getChapterList')->name('getChapterList');
  161. Route::group(['middleware'=>['token']], function(){
  162. //专家来了点赞
  163. Route::get('thumbsUpNum/{id}', 'SpecialistInfoController@thumbsUpNum')->name('thumbsUpNum');
  164. //专家来了喜欢
  165. Route::get('loveNum/{id}', 'SpecialistInfoController@loveNum')->name('loveNum');
  166. //专家来了信息关联列表
  167. Route::get('specialistInfosAssociationList', 'SpecialistInfoController@specialistInfosAssociationList')->name('specialistInfosAssociationList');
  168. //专家来了留言
  169. Route::post('leaveMessage', 'SpecialistInfoController@leaveMessage')->name('leaveMessage');
  170. //详情 列表 详情
  171. Route::resource('specialist_info', 'SpecialistInfoController');
  172. });
  173. });
  174. Route::group(['namespace' => 'Mentality', 'prefix' => 'mentality', 'middleware'=>['token']], function(){
  175. //反馈意见
  176. Route::resource('feedback','FeedBackController');
  177. //量表分类 列表
  178. Route::resource('scale_category', 'ScaleCategoryController');
  179. //量表 列表
  180. Route::resource('scale', 'ScaleController');
  181. //获取数据
  182. Route::get('gettestinfo', 'ScaleController@getTestInfo')->name('getTestInfo');
  183. //开始测评
  184. // Route::get('start_test', 'ScaleController@startTest')->name('startTest');
  185. //训练分类 列表
  186. Route::resource('drill_category', 'DrillCategoryController');
  187. // 训练 列表 详情
  188. Route::resource('drill', 'DrillController');
  189. //训练点赞
  190. Route::get('drillContent/thumbsUpNum/{id}', 'DrillController@thumbsUpNum')->name('thumbsUpNum');
  191. //训练喜欢
  192. Route::get('drillContent/loveNum/{id}', 'DrillController@loveNum')->name('loveNum');
  193. //训练留言
  194. Route::post('drillContent/leaveMessage', 'DrillController@leaveMessage')->name('leaveMessage');
  195. //播放训练科目
  196. Route::get('drillContent/drillPlaySubject/{id}', 'DrillController@playSubject');
  197. // 训练扩展 详情
  198. Route::resource('play', 'PlayController');
  199. //心情记录 列表 详情 添加 修改
  200. Route::resource('mood', 'MoodController');
  201. //用户周记录 列表,详情
  202. Route::resource('week', 'WeekController');
  203. //心情等级 列表
  204. Route::resource('mood_level', 'MoodLevelController');
  205. //心情标签 列表
  206. Route::resource('mood_tag', 'MoodTagController');
  207. //睡眠等级 列表
  208. Route::resource('sleep_level', 'SleepLevelController');
  209. //睡眠 列表 添加
  210. Route::resource('sleep', 'SleepController');
  211. //给未来的信 添加
  212. Route::resource('letter', 'LetterController');
  213. //统计 心情 睡眠
  214. Route::resource('statistics', 'StatisticsController');
  215. //统计心情下拉选择
  216. Route::get('mood_select', 'StatisticsController@getMoodSelect')->name('statisticsMoodSelect');
  217. //统计睡眠下拉选择
  218. Route::get('sleep_select', 'StatisticsController@getSleepSelect')->name('statisticsSleepSelect');
  219. //收藏 添加取消收藏
  220. Route::resource('collect', 'CollectController');
  221. //浏览记录 列表
  222. Route::resource('browse_record', 'BrowseRecordController');
  223. });
  224. });
  225. });
  226. });