You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

323 lines
21 KiB

8 years ago
8 years ago
8 years ago
8 years ago
7 years ago
8 years ago
7 years ago
7 years ago
8 years ago
7 years ago
8 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
7 years ago
7 years ago
8 years ago
8 years ago
7 years ago
8 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
7 years ago
8 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Web Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register web routes for your application. These
  8. | routes are loaded by the RouteServiceProvider within a group which
  9. | contains the "web" middleware group. Now create something great!
  10. |
  11. */
  12. //wap路由,要放到最前面,否则解析不到
  13. Route::group(['domain' => env('APP_SUBDOMAIN'), 'namespace' => 'Wap'], function () {
  14. Route::get('/', 'IndexController@index')->name('wap_home');
  15. Route::get('/page404', 'IndexController@page404')->name('wap_page404'); //404页面
  16. Route::get('/tags', 'IndexController@tags')->name('wap_tags');
  17. Route::get('/search/{id}', 'IndexController@search')->name('wap_search'); //搜索页面
  18. Route::get('/p/{id}', 'IndexController@detail')->name('wap_detail'); //详情页
  19. Route::get('/cat{cat}/{page}', 'IndexController@category'); //分类页,分页
  20. Route::get('/cat{cat}', 'IndexController@category')->name('wap_category'); //分类页
  21. Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
  22. Route::get('/tag{tag}', 'IndexController@tag')->name('wap_tag'); //标签页
  23. Route::get('/page/{id}', 'IndexController@page')->name('wap_singlepage'); //单页
  24. Route::get('/goods/{id}', 'IndexController@goods')->name('wap_goods'); //商品详情页
  25. Route::get('/goodstype{cat}/{page}', 'IndexController@goodstype'); //产品分类页,分页
  26. Route::get('/goodstype{cat}', 'IndexController@goodstype')->name('wap_goodstype'); //产品分类页
  27. Route::get('/sitemap.xml', 'IndexController@sitemap')->name('wap_sitemap'); //sitemap
  28. });
  29. //前台路由
  30. Route::group(['namespace' => 'Home'], function () {
  31. Route::get('/', 'IndexController@index')->name('home');
  32. Route::get('/page404', 'IndexController@page404')->name('page404'); //404页面
  33. Route::get('/tags', 'IndexController@tags')->name('home_tags');
  34. Route::get('/search/{id}', 'IndexController@search')->name('home_search'); //搜索页面
  35. Route::get('/p/{id}', 'IndexController@detail')->name('home_detail'); //详情页
  36. Route::get('/cat{cat}/{page}', 'IndexController@category'); //分类页,分页
  37. Route::get('/cat{cat}', 'IndexController@category')->name('home_category'); //分类页
  38. Route::get('/tag{tag}/{page}', 'IndexController@tag'); //标签页,分页
  39. Route::get('/tag{tag}', 'IndexController@tag')->name('home_tag'); //标签页
  40. Route::get('/page/{id}', 'IndexController@page')->name('home_singlepage'); //单页
  41. Route::get('/goods/{id}', 'IndexController@goods')->name('home_goods'); //商品详情页
  42. Route::get('/goodstype{cat}/{page}', 'IndexController@goodstype'); //产品分类页,分页
  43. Route::get('/goodstype{cat}', 'IndexController@goodstype')->name('home_goodstype'); //产品分类页
  44. Route::get('/sitemap.xml', 'IndexController@sitemap')->name('home_sitemap');//sitemap
  45. Route::get('/test', 'IndexController@test')->name('home_test'); //测试
  46. Route::get('/aaa', function () {
  47. dd('wap');
  48. });
  49. });
  50. //微信路由
  51. Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin'], function () {
  52. Route::get('/', 'IndexController@index')->name('weixin');
  53. Route::get('/page404', 'IndexController@page404')->name('weixin_page404'); //404页面
  54. Route::get('/search', 'IndexController@search')->name('weixin_search'); //搜索页面
  55. Route::get('/p/{id}', 'ArticleController@detail')->name('weixin_article_detail'); //文章详情页
  56. Route::get('/cat{cat}', 'ArticleController@category')->name('weixin_article_category'); //分类页
  57. Route::get('/tag{tag}', 'IndexController@tag')->name('weixin_tag'); //标签页
  58. Route::get('/page/{id}', 'IndexController@page')->name('weixin_singlepage'); //单页
  59. Route::get('/goods/{id}', 'GoodsController@goodsDetail')->name('weixin_goods_detail'); //商品详情页
  60. Route::get('/goodslist', 'GoodsController@goodsList')->name('weixin_goods_list'); //产品分类页
  61. Route::any('/login', 'UserController@login')->name('weixin_login');
  62. Route::any('/register', 'UserController@register')->name('weixin_register');
  63. Route::get('/logout', 'UserController@logout')->name('weixin_user_logout'); //退出
  64. //页面跳转
  65. Route::get('/jump', 'IndexController@jump')->name('weixin_jump');
  66. Route::get('/test', 'IndexController@test')->name('weixin_test'); //测试
  67. });
  68. //微信路由,需登录,全局
  69. Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin', 'middleware' => ['web','wxlogin']], function () {
  70. Route::get('/category', 'CartController@index')->name('weixin_category');
  71. //个人中心
  72. Route::get('/user', 'UserController@index')->name('weixin_user');
  73. Route::get('/userinfo', 'UserController@userinfo')->name('weixin_userinfo');
  74. Route::get('/user_account', 'UserController@userAccount')->name('weixin_user_account');
  75. Route::get('/user_money_list', 'UserController@userMoneyList')->name('weixin_user_money_list');
  76. Route::get('/user_point_list', 'UserController@userPointList')->name('weixin_user_point_list');
  77. //优惠券、红包
  78. Route::get('/user_bonus_list', 'UserController@userBonusList')->name('weixin_user_bonus_list');
  79. //浏览记录
  80. Route::get('/user_goods_history', 'UserController@userGoodsHistory')->name('weixin_user_goods_history');
  81. Route::get('/user_goods_history_delete', 'UserController@userGoodsHistoryDelete')->name('weixin_user_goods_history_delete');
  82. Route::get('/user_goods_history_clear', 'UserController@userGoodsHistoryClear')->name('weixin_user_goods_history_clear');
  83. //商品收藏
  84. Route::get('/collect_goods', 'CollectGoodsController@index')->name('weixin_user_collect_goods');
  85. //购物车
  86. Route::get('/cart', 'CartController@index')->name('weixin_cart');
  87. //订单
  88. Route::get('/order_pay/{id}', 'OrderController@orderPay')->name('weixin_order_pay'); //订单支付
  89. //收货地址
  90. Route::get('/user_address', 'AddressController@index')->name('weixin_user_address_list');
  91. Route::get('/user_address_add', 'AddressController@userAddressAdd')->name('weixin_user_address_add');
  92. Route::get('/user_address_update', 'AddressController@userAddressUpdate')->name('weixin_user_address_update');
  93. });
  94. //无需token验证,全局
  95. Route::group(['middleware' => ['web']], function () {
  96. Route::post('/dataapi/listarc', 'Api\IndexController@listarc')->name('api_listarc');
  97. Route::post('/dataapi/customer_login', 'Api\WechatAuthController@customerLogin');
  98. Route::post('/dataapi/', 'Api\UserController@signin'); //签到
  99. });
  100. //API接口路由,无需token验证
  101. Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web']], function () {
  102. //轮播图
  103. Route::get('/slide_list', 'SlideController@slideList');
  104. //文章
  105. Route::get('/article_list', 'ArticleController@articleList');
  106. Route::get('/article_detail', 'ArticleController@articleDetail');
  107. Route::get('/arctype_list', 'ArctypeController@arctypeList');
  108. Route::get('/arctype_detail', 'ArctypeController@arctypeDetail');
  109. //商品
  110. Route::get('/goods_detail', 'GoodsController@goodsDetail'); //商品列表
  111. Route::get('/goods_list', 'GoodsController@goodsList'); //商品列表
  112. Route::get('/goodstype_list', 'GoodsTypeController@goodsTypeList'); //商品分类列表
  113. //地区,省市区
  114. Route::get('/region_list', 'RegionController@regionList');
  115. Route::get('/region_detail', 'RegionController@regionDetail');
  116. //用户
  117. Route::post('/wx_register', 'UserController@wxRegister'); //注册
  118. Route::post('/wx_login', 'UserController@wxLogin'); //登录
  119. });
  120. //API接口路由,需token验证
  121. Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web','token']], function () {
  122. //用户中心
  123. Route::post('/user_signin', 'UserController@signin'); //签到
  124. Route::get('/user_info', 'UserController@userInfo'); //用户详细信息
  125. Route::post('/user_info_update', 'UserController@userInfoUpdate'); //修改用户信息
  126. Route::post('/user_password_update', 'UserController@userPasswordUpdate'); //修改用户密码、支付密码
  127. Route::get('/user_list', 'UserController@userList'); //用户列表
  128. Route::get('/user_money_list', 'UserMoneyController@userMoneyList'); //用户余额明细
  129. Route::post('/user_money_add', 'UserMoneyController@userMoneyAdd'); //添加余额明细
  130. //浏览记录
  131. Route::get('/user_goods_history_list', 'UserGoodsHistoryController@userGoodsHistoryList'); //我的足迹列表
  132. Route::post('/user_goods_history_delete', 'UserGoodsHistoryController@userGoodsHistoryDelete'); //我的足迹删除一条
  133. Route::post('/user_goods_history_clear', 'UserGoodsHistoryController@userGoodsHistoryClear'); //我的足迹清空
  134. Route::post('/user_goods_history_add', 'UserGoodsHistoryController@userGoodsHistoryAdd'); //我的足迹添加
  135. //商品评价
  136. Route::get('/goods_comment_list', 'CommentController@goodsCommentList'); //商品评价列表
  137. Route::post('/goods_comment_add', 'CommentController@goodsCommentAdd'); //商品评价添加
  138. Route::post('/goods_comment_update', 'CommentController@goodsCommentUpdate'); //商品评价修改
  139. Route::post('/goods_comment_delete', 'CommentController@goodsCommentDelete'); //商品评价删除
  140. //商品收藏
  141. Route::get('/collect_goods_list', 'CollectGoodsController@collectGoodsList'); //收藏商品列表
  142. Route::post('/collect_goods_add', 'CollectGoodsController@collectGoodsAdd'); //收藏商品
  143. Route::post('/collect_goods_delete', 'CollectGoodsController@collectGoodsDelete'); //取消收藏商品
  144. //订单
  145. //购物车
  146. Route::get('/cart_list', 'CartController@cartList'); //购物车列表
  147. Route::post('/cart_clear', 'CartController@cartClear'); //清空购物车
  148. Route::post('/cart_add', 'CartController@cartAdd'); //添加购物车
  149. Route::post('/cart_delete', 'CartController@cartDelete'); //删除购物
  150. //分销
  151. //积分
  152. Route::get('/user_point_list', 'UserPointController@userPointList'); //用户积分列表
  153. Route::post('/user_point_add', 'UserPointController@userPointAdd');
  154. //优惠券
  155. Route::get('/user_bonus_list', 'UserBonusController@userBonusList'); //用户优惠券列表
  156. Route::post('/user_bonus_add', 'UserBonusController@userBonusAdd'); //用户获取优惠券
  157. Route::get('/bonus_list', 'BonusController@bonusList'); //可用获取的优惠券列表
  158. Route::post('/bonus_add', 'BonusController@bonusAdd'); //添加优惠券
  159. Route::post('/bonus_update', 'BonusController@bonusUpdate'); //修改优惠券
  160. Route::post('/bonus_delete', 'BonusController@bonusDelete'); //删除优惠券
  161. //微信
  162. //意见反馈
  163. Route::get('/feedback_list', 'FeedBackController@feedbackList');
  164. Route::post('/feedback_add', 'FeedBackController@feedbackAdd');
  165. //其它
  166. Route::get('/verifycode_check', 'VerifyCodeController@verifyCodeCheck'); //验证码校验
  167. Route::get('/andriod_upgrade', 'IndexController@andriodUpgrade'); //安卓升级
  168. //图片上传
  169. Route::post('/image_upload', 'ImageController@imageUpload'); //普通文件/图片上传
  170. //二维码
  171. Route::get('/create_simple_qrcode', 'QrcodeController@createSimpleQrcode');
  172. //收货地址
  173. Route::get('/user_address_list', 'UserAddressController@userAddressList');
  174. Route::get('/user_address_detail', 'UserAddressController@userAddressDetail');
  175. Route::post('/user_address_setdefault', 'UserAddressController@userAddressSetDefault');
  176. Route::post('/user_address_add', 'UserAddressController@userAddressAdd');
  177. Route::post('/user_address_update', 'UserAddressController@userAddressUpdate');
  178. Route::post('/user_address_delete', 'UserAddressController@userAddressDelete');
  179. });
  180. //后台路由
  181. Route::group(['prefix' => 'fladmin', 'namespace' => 'Admin', 'middleware' => ['web']], function () {
  182. Route::get('/', 'IndexController@index')->name('admin');
  183. Route::get('/welcome', 'IndexController@welcome')->name('admin_welcome');
  184. Route::get('/index/upconfig', 'IndexController@upconfig')->name('admin_index_upconfig'); //更新系统参数配置
  185. Route::get('/index/upcache', 'IndexController@upcache')->name('admin_index_upcache'); //更新缓存
  186. //文章
  187. Route::get('/article', 'ArticleController@index')->name('admin_article');
  188. Route::get('/article/add', 'ArticleController@add')->name('admin_article_add');
  189. Route::post('/article/doadd', 'ArticleController@doadd')->name('admin_article_doadd');
  190. Route::get('/article/edit', 'ArticleController@edit')->name('admin_article_edit');
  191. Route::post('/article/doedit', 'ArticleController@doedit')->name('admin_article_doedit');
  192. Route::get('/article/del', 'ArticleController@del')->name('admin_article_del');
  193. Route::get('/article/repetarc', 'ArticleController@repetarc')->name('admin_article_repetarc');
  194. Route::get('/article/recommendarc', 'ArticleController@recommendarc')->name('admin_article_recommendarc');
  195. Route::get('/article/articleexists', 'ArticleController@articleexists')->name('admin_article_articleexists');
  196. //栏目
  197. Route::get('/category', 'CategoryController@index')->name('admin_category');
  198. Route::get('/category/add', 'CategoryController@add')->name('admin_category_add');
  199. Route::post('/category/doadd', 'CategoryController@doadd')->name('admin_category_doadd');
  200. Route::get('/category/edit', 'CategoryController@edit')->name('admin_category_edit');
  201. Route::post('/category/doedit', 'CategoryController@doedit')->name('admin_category_doedit');
  202. Route::get('/category/del', 'CategoryController@del')->name('admin_category_del');
  203. //标签
  204. Route::get('/tag', 'TagController@index')->name('admin_tag');
  205. Route::get('/tag/add', 'TagController@add')->name('admin_tag_add');
  206. Route::post('/tag/doadd', 'TagController@doadd')->name('admin_tag_doadd');
  207. Route::get('/tag/edit', 'TagController@edit')->name('admin_tag_edit');
  208. Route::post('/tag/doedit', 'TagController@doedit')->name('admin_tag_doedit');
  209. Route::get('/tag/del', 'TagController@del')->name('admin_tag_del');
  210. //单页
  211. Route::get('/page', 'PageController@index')->name('admin_page');
  212. Route::get('/page/add', 'PageController@add')->name('admin_page_add');
  213. Route::post('/page/doadd', 'PageController@doadd')->name('admin_page_doadd');
  214. Route::get('/page/edit', 'PageController@edit')->name('admin_page_edit');
  215. Route::post('/page/doedit', 'PageController@doedit')->name('admin_page_doedit');
  216. Route::get('/page/del', 'PageController@del')->name('admin_page_del');
  217. //产品
  218. Route::get('/goods', 'GoodsController@index')->name('admin_goods');
  219. Route::get('/goods/add', 'GoodsController@add')->name('admin_goods_add');
  220. Route::post('/goods/doadd', 'GoodsController@doadd')->name('admin_goods_doadd');
  221. Route::get('/goods/edit', 'GoodsController@edit')->name('admin_goods_edit');
  222. Route::post('/goods/doedit', 'GoodsController@doedit')->name('admin_goods_doedit');
  223. Route::get('/goods/del', 'GoodsController@del')->name('admin_goods_del');
  224. Route::get('/goods/recommendarc', 'GoodsController@recommendarc')->name('admin_goods_recommendarc');
  225. Route::get('/goods/articleexists', 'GoodsController@goodsexists')->name('admin_goods_goodsexists');
  226. //产品分类
  227. Route::get('/goodstype', 'GoodsTypeController@index')->name('admin_goodstype');
  228. Route::get('/goodstype/add', 'GoodsTypeController@add')->name('admin_goodstype_add');
  229. Route::post('/goodstype/doadd', 'GoodsTypeController@doadd')->name('admin_goodstype_doadd');
  230. Route::get('/goodstype/edit', 'GoodsTypeController@edit')->name('admin_goodstype_edit');
  231. Route::post('/goodstype/doedit', 'GoodsTypeController@doedit')->name('admin_goodstype_doedit');
  232. Route::get('/goodstype/del', 'GoodsTypeController@del')->name('admin_goodstype_del');
  233. //友情链接
  234. Route::get('/friendlink', 'FriendlinkController@index')->name('admin_friendlink');
  235. Route::get('/friendlink/add', 'FriendlinkController@add')->name('admin_friendlink_add');
  236. Route::post('/friendlink/doadd', 'FriendlinkController@doadd')->name('admin_friendlink_doadd');
  237. Route::get('/friendlink/edit', 'FriendlinkController@edit')->name('admin_friendlink_edit');
  238. Route::post('/friendlink/doedit', 'FriendlinkController@doedit')->name('admin_friendlink_doedit');
  239. Route::get('/friendlink/del', 'FriendlinkController@del')->name('admin_friendlink_del');
  240. //关键词管理
  241. Route::get('/keyword', 'KeywordController@index')->name('admin_keyword');
  242. Route::get('/keyword/add', 'KeywordController@add')->name('admin_keyword_add');
  243. Route::post('/keyword/doadd', 'KeywordController@doadd')->name('admin_keyword_doadd');
  244. Route::get('/keyword/edit', 'KeywordController@edit')->name('admin_keyword_edit');
  245. Route::post('/keyword/doedit', 'KeywordController@doedit')->name('admin_keyword_doedit');
  246. Route::get('/keyword/del', 'KeywordController@del')->name('admin_keyword_del');
  247. //搜索关键词
  248. Route::get('/searchword', 'SearchwordController@index')->name('admin_searchword');
  249. Route::get('/searchword/add', 'SearchwordController@add')->name('admin_searchword_add');
  250. Route::post('/searchword/doadd', 'SearchwordController@doadd')->name('admin_searchword_doadd');
  251. Route::get('/searchword/edit', 'SearchwordController@edit')->name('admin_searchword_edit');
  252. Route::post('/searchword/doedit', 'SearchwordController@doedit')->name('admin_searchword_doedit');
  253. Route::get('/searchword/del', 'SearchwordController@del')->name('admin_searchword_del');
  254. //幻灯片
  255. Route::get('/slide', 'SlideController@index')->name('admin_slide');
  256. Route::get('/slide/add', 'SlideController@add')->name('admin_slide_add');
  257. Route::post('/slide/doadd', 'SlideController@doadd')->name('admin_slide_doadd');
  258. Route::get('/slide/edit', 'SlideController@edit')->name('admin_slide_edit');
  259. Route::post('/slide/doedit', 'SlideController@doedit')->name('admin_slide_doedit');
  260. Route::get('/slide/del', 'SlideController@del')->name('admin_slide_del');
  261. //在线留言管理
  262. Route::get('/guestbook', 'GuestbookController@index')->name('admin_guestbook');
  263. Route::get('/guestbook/del', 'GuestbookController@del')->name('admin_guestbook_del');
  264. //系统参数配置
  265. Route::get('/sysconfig', 'SysconfigController@index')->name('admin_sysconfig');
  266. Route::get('/sysconfig/add', 'SysconfigController@add')->name('admin_sysconfig_add');
  267. Route::post('/sysconfig/doadd', 'SysconfigController@doadd')->name('admin_sysconfig_doadd');
  268. Route::get('/sysconfig/edit', 'SysconfigController@edit')->name('admin_sysconfig_edit');
  269. Route::post('/sysconfig/doedit', 'SysconfigController@doedit')->name('admin_sysconfig_doedit');
  270. Route::get('/sysconfig/del', 'SysconfigController@del')->name('admin_sysconfig_del');
  271. //用户管理
  272. Route::get('/user', 'UserController@index')->name('admin_user');
  273. Route::get('/user/add', 'UserController@add')->name('admin_user_add');
  274. Route::post('/user/doadd', 'UserController@doadd')->name('admin_user_doadd');
  275. Route::get('/user/edit', 'UserController@edit')->name('admin_user_edit');
  276. Route::post('/user/doedit', 'UserController@doedit')->name('admin_user_doedit');
  277. Route::get('/user/del', 'UserController@del')->name('admin_user_del');
  278. //角色管理
  279. Route::get('/userrole', 'UserRoleController@index')->name('admin_userrole');
  280. Route::get('/userrole/add', 'UserRoleController@add')->name('admin_userrole_add');
  281. Route::post('/userrole/doadd', 'UserRoleController@doadd')->name('admin_userrole_doadd');
  282. Route::get('/userrole/edit', 'UserRoleController@edit')->name('admin_userrole_edit');
  283. Route::post('/userrole/doedit', 'UserRoleController@doedit')->name('admin_userrole_doedit');
  284. Route::get('/userrole/del', 'UserRoleController@del')->name('admin_userrole_del');
  285. Route::get('/userrole/permissions', 'UserRoleController@permissions')->name('admin_userrole_permissions'); //权限设置
  286. Route::post('/userrole/dopermissions', 'UserRoleController@dopermissions')->name('admin_userrole_dopermissions');
  287. //菜单管理
  288. Route::get('/menu', 'MenuController@index')->name('admin_menu');
  289. Route::get('/menu/add', 'MenuController@add')->name('admin_menu_add');
  290. Route::post('/menu/doadd', 'MenuController@doadd')->name('admin_menu_doadd');
  291. Route::get('/menu/edit', 'MenuController@edit')->name('admin_menu_edit');
  292. Route::post('/menu/doedit', 'MenuController@doedit')->name('admin_menu_doedit');
  293. Route::get('/menu/del', 'MenuController@del')->name('admin_menu_del');
  294. //后台登录注销
  295. Route::get('/login', 'LoginController@login')->name('admin_login');
  296. Route::post('/dologin', 'LoginController@dologin')->name('admin_dologin');
  297. Route::get('/logout', 'LoginController@logout')->name('admin_logout');
  298. Route::get('/recoverpwd', 'LoginController@recoverpwd')->name('admin_recoverpwd');
  299. //页面跳转
  300. Route::get('/jump', 'LoginController@jump')->name('admin_jump');
  301. //测试
  302. Route::get('/test', 'LoginController@test')->name('admin_test');
  303. });