WapRoutes.php 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <?php
  2. /**
  3. * 图书路由文件
  4. * by zhanyang
  5. *
  6. * 2017-12-05
  7. */
  8. Route::group(['domain'=>env('PAY_WAP_DOMAIN'),'namespace'=>'App\Http\Controllers\Wap'],function(){
  9. //支付
  10. Route::get('/goToPay','Pay\OrdersController@wxindex');
  11. //支付会掉
  12. Route::any('pay/wcback_allinpay','Pay\OrdersController@wcback_allinpay');
  13. Route::any('pay/wcback_official','Pay\OrdersController@wcback_official');
  14. Route::any('pay/wcback_lianlianpay','Pay\OrdersController@wcback_lianlianpay');
  15. Route::any('pay/wcback_palmpay','Pay\OrdersController@wcback_palmpay');
  16. Route::post('pay/reportError','Pay\OrdersController@reportError');
  17. });
  18. Route::group(['domain'=>env('OFFICIAL_AUTH_FOMAIN'),'namespace'=>'App\Http\Controllers\Wap'],function(){
  19. Route::any('/user_oauth','Oauth\UsersController@user_oauth');
  20. Route::get('/wxAuthCallBack','Oauth\UsersController@wcCallbackParse');
  21. Route::any('/user_oauth_v2','Oauth\UsersV2Controller@user_oauth');
  22. Route::get('/wxAuthCallBackv2','Oauth\UsersV2Controller@wcCallbackParse');
  23. Route::get('/wxAuthCallBack2v2','Oauth\UsersV2Controller@wcCallbackParse2');
  24. });
  25. Route::group(['domain'=>env('HELP_DOMAIN'),'namespace'=>'App\Http\Controllers\Wap\Help'],function(){
  26. Route::get('/','HelpController@index');
  27. Route::get('/{id}','HelpController@helpDetail');
  28. Route::get('/help/getLinkByAppid','HelpController@getLinkByAppid');
  29. });
  30. Route::group(['domain'=>env('WAP_DOMAIN'),'namespace'=>'App\Http\Controllers\Wap','middleware'=>'EnableCross'],function(){
  31. Route::any('help','Web\RedirectController@help');
  32. Route::any('testLogin','Web\RedirectController@testLogin');
  33. Route::get('pay/wait','Pay\OrdersController@waitPage');
  34. Route::get('pay/waitv2','Pay\OrdersController@waitPageV2');
  35. //链接强关跳转地址
  36. Route::get('subscribeauth','Subscribe\LinkSubscribeController@index');
  37. //枪关链接回调地址
  38. Route::get('subauthback','Subscribe\LinkSubscribeController@wxAuthCallBack');
  39. //用户行为
  40. Route::any('api/userBehavior','User\UserbehaviorController@collectionBehavior');
  41. Route::any('subscribe/qrcode','Subscribe\LinkSubscribeController@subscribeView');
  42. //web 接口
  43. Route::group(['prefix'=>'api'],function () {
  44. //图书详情
  45. Route::get('book/{bid}','Book\BookController@index');
  46. Route::get('bookFromWhere/{bid}','Book\BookController@index');
  47. //首页
  48. Route::get('books/{sex}/index','Book\BookController@getBookLists');
  49. //书库
  50. Route::get('books/library','Book\BookController@library');
  51. //相似推荐
  52. Route::get('books/similar','Book\BookController@similarRecom');
  53. //阅读完后的推荐
  54. Route::get('books/readOverRecommend','Book\BookController@readOverRecommend');
  55. //h5书籍智能推荐
  56. Route::get('books/H5SmartRecommendBooks','Book\BookController@H5SmartRecommendBooks');
  57. //排行榜
  58. Route::get('books/rank','Book\BookController@rank');
  59. //分类列表
  60. Route::get('books/getCategory','Book\BookCategoryController@getCategory');
  61. //目录不分页
  62. Route::get('books/{bid}/allcatalog','Book\ChapterController@getCatalog');
  63. //Route::get('books/{bid}/allcatalog/{aa}',function ($tt,$bid,$aa){return $bid.'---'.$aa;});
  64. //目录分页
  65. Route::get('books/{bid}/catalog','Book\ChapterController@getCatalogPerPage');
  66. //章节详情
  67. Route::get('books/{bid}/chapters/{cid}','Book\ChapterController@index')->where('cid','\d+');
  68. //余额订购
  69. Route::get('books/{bid}/balance/chapterOrders/{cid}','Book\ChapterController@pay');
  70. //Route::get('books/search','Book\BookController@bookSearch');
  71. //充值列表
  72. Route::get('order/chargeList','Order\OrdersController@chargeList');
  73. //章节订购列表
  74. Route::get('order/chapterOrderList','Order\OrdersController@chapterOrderList');
  75. //单本订购列表
  76. Route::get('order/bookOrderList','Order\OrdersController@bookOrderList');
  77. //充值记录
  78. Route::get('order/chargeRecordLists','Order\OrdersController@chargeRecordLists');
  79. Route::get('order/issuccess','Order\OrdersController@isSuccess');
  80. //代付列表
  81. Route::get('order/substitutePayChargeList','Order\OrdersController@substitutePayChargeList');
  82. //代付按钮
  83. Route::get('order/substitutePay','Order\OrdersController@substitutePay');
  84. //用户信息
  85. Route::get('userinfo','User\UserController@index');
  86. //签到记录
  87. Route::get('user/sign_record','User\UserController@signRecord');
  88. Route::get('user/sign','User\UserController@sign');
  89. //催更
  90. Route::get('user/urgeUpdate','User\UserController@urgeUpdate');
  91. // 测试登录
  92. // Route::any('user/test_add_user_login_cookie','User\UserController@test_add_user_login_cookie');
  93. // // 用户免费分享
  94. // Route::any('user/FreeShare','User\UserFreeShareController@FreeShare');
  95. // // 用户免费分享统计
  96. // Route::any('user/add_free_share_visitstat','User\UserFreeShareController@add_free_share_visitstat');
  97. //书架
  98. Route::get('userShelfBooks','User\UserShelfBooksController@index');
  99. //添加书架
  100. Route::post('userShelfBooks','User\UserShelfBooksController@addShelf');
  101. //删除书架
  102. Route::get('userShelfBooks/delete','User\UserShelfBooksController@delShelf');
  103. Route::get('userShelfBooks/isonshelf','User\UserShelfBooksController@isOnshelf');
  104. //阅读器用户分享统计
  105. Route::get('user/recordShare','User\UserController@recordShare');
  106. //广告统计
  107. Route::post('user/advisitstat','User\UserController@adVisitStat');
  108. //阅读记录
  109. Route::get('readrecord','User\ReadRecordController@index');
  110. //添加阅读记录
  111. Route::post('readrecord','User\ReadRecordController@addReadRecord');
  112. //删除阅读记录
  113. Route::get('readrecord/delete','User\ReadRecordController@delReadRecord');
  114. //获取强关二维码
  115. Route::get('subscribe/qrcode','Subscribe\SubscribeController@getSubscribeQrcode');
  116. Route::post('error/undefinedCollect','Other\ErrorCollectionController@undefinedCollect');
  117. Route::post('activity/getCoupons','User\UserController@getCoupons');
  118. //章节评论
  119. Route::post('chapter/comment','Book\ChapterController@commentChapter');
  120. Route::get('chapter/getComment','Book\ChapterController@getChapterComment');
  121. //书籍送礼
  122. Route::get('gift/getGiftsList','Book\BooksGiftController@getAllGifts');
  123. Route::post('gift/sendGifts','Book\BooksGiftController@sendGifts');
  124. Route::get('gift/getUserSendGiftsRecord','Book\BooksGiftController@getUserSendGiftsRecordV2');
  125. Route::get('gift/getUserGiftsConsumeRecord','Book\BooksGiftController@getSendGiftsForConsumeRecord');
  126. //分享签名
  127. Route::get('chapter/getWechatJsConfig','Book\ChapterController@getWechatJsConfig');
  128. });
  129. //授权回掉
  130. Route::get('/oauthCallBack','Oauth\UsersController@wcback');
  131. Route::get('/oauthCallBackV2','Oauth\UsersController@wcbackV2');
  132. Route::get('/oauthCallBacktest','Oauth\UsersController@wcbackTest');
  133. Route::get('/testauth','Web\RedirectController@testauth');
  134. //退出 测试
  135. Route::get('logout','User\UserController@logout');
  136. Route::get('clearcookie','Web\RedirectController@clearCookie');
  137. //需要微信授权
  138. Route::group(['middleware'=>'ReadOauth'],function (){
  139. //推广链接
  140. Route::get('yun/{param}','Web\RedirectController@index')->where('param','\d+');
  141. //活动推送
  142. Route::get('push/activity','Web\WelcomeController@activity');
  143. Route::get('sale/activity','Web\WelcomeController@channelActivity');
  144. Route::get('sale/springactivity','Web\WelcomeController@springActivity');
  145. Route::get('sale/womenactivity','Web\WelcomeController@womenActivity');
  146. Route::get('sale/newUserActivity','Web\WelcomeController@newUserActivity');
  147. Route::get('sale/channelsalenine','Web\WelcomeController@channelActivityNine');
  148. Route::get('sale/channelsalesixty','Web\WelcomeController@channelActivitySixtyEight');
  149. Route::get('sale/channelsaleforty','Web\WelcomeController@channelActivityFortyEight');
  150. Route::get('sale/qingMingActivity','Web\WelcomeController@qingMingActivity');
  151. Route::get('sale/readDayActivity','Web\WelcomeController@readDayActivity');
  152. Route::get('sale/laborDayActivity','Web\WelcomeController@readDayActivity');
  153. Route::get('sale/yearActivity','Web\WelcomeController@yearActivity');
  154. Route::get('sale','Web\WelcomeController@commonActivity');
  155. Route::get('sale/summer','Web\WelcomeController@summerActivity');
  156. Route::get('sale/newUserSale','Web\WelcomeController@newUserSale');
  157. Route::get('sale/nationday','Web\WelcomeController@nationalDayActivity');
  158. Route::get('sale/chongyang','Web\WelcomeController@cYactivity');
  159. Route::get('sale/newUserForeverActivity','Web\WelcomeController@newUserForeverActivity');
  160. Route::get('sale/tempC','Web\WelcomeController@tempC');
  161. Route::get('sale/seYearActivity','Web\WelcomeController@otherYearActivity');
  162. Route::get('sale/shoppingDayActivity','Web\WelcomeController@shoppingDayActivity');
  163. Route::get('sale/thanksGivingDayActivity','Web\WelcomeController@thanksGivingDayActivity');
  164. Route::get('sale/greatcold','Web\WelcomeController@greatColdActivity');
  165. Route::get('sale/customvip','Web\WelcomeController@channelYearActivity');
  166. //继续阅读
  167. Route::get('continue','User\ReadRecordController@latestRead');
  168. //用户强关信息页
  169. Route::any('subscribe/getFromUser','Subscribe\SubscribeController@getFromUser');
  170. Route::any('{slug}','Web\WelcomeController@index')->where('slug', '(.*)?');
  171. });
  172. });