fly 4 years ago
parent
commit
964196b867
1 changed files with 33 additions and 25 deletions
  1. 33 25
      app/Providers/RouteServiceProvider.php

+ 33 - 25
app/Providers/RouteServiceProvider.php

@@ -37,18 +37,18 @@ class RouteServiceProvider extends ServiceProvider
      */
      */
     public function map(Router $router)
     public function map(Router $router)
     {
     {
-//         $this->mapFinanceRoutes($router);
-//         $this->mapBookRoutes($router);
-//         $this->mapUserRoutes($router);
-//         $this->mapSendOrderRoutes($router);
-//         $this->mapBadInfoRoutes($router);//敏感词
-//         $this->mapTradeRoutes($router);
+        //         $this->mapFinanceRoutes($router);
+        //         $this->mapBookRoutes($router);
+        //         $this->mapUserRoutes($router);
+        //         $this->mapSendOrderRoutes($router);
+        //         $this->mapBadInfoRoutes($router);//敏感词
+        //         $this->mapTradeRoutes($router);
         $this->mapOfficialAccountRoutes($router);
         $this->mapOfficialAccountRoutes($router);
 
 
-//         $this->mapChannelOfficialAccountRoutes($router);
-//         $this->mapUserAndUserOrderRoutes($router);
-//         $this->mapWebRoutes($router);
-
+        //         $this->mapChannelOfficialAccountRoutes($router);
+        //         $this->mapUserAndUserOrderRoutes($router);
+        //         $this->mapWebRoutes($router);
+        $this->mapCommonRoutes($router);
     }
     }
 
 
 
 
@@ -113,12 +113,12 @@ class RouteServiceProvider extends ServiceProvider
 
 
     protected function mapOfficialAccountRoutes(Router $router)
     protected function mapOfficialAccountRoutes(Router $router)
     {
     {
-//         $router->group([
-//             'middleware' => 'web',
-//         ], function ($router) {
-//             require app_path('Http/Routes/Wap/OfficialAccountRoutes.php');
-//             require app_path('Http/Routes/Manage/OfficialAccountRoutes.php');
-//         });
+        //         $router->group([
+        //             'middleware' => 'web',
+        //         ], function ($router) {
+        //             require app_path('Http/Routes/Wap/OfficialAccountRoutes.php');
+        //             require app_path('Http/Routes/Manage/OfficialAccountRoutes.php');
+        //         });
         $router->group([
         $router->group([
             'middleware' => 'wap',
             'middleware' => 'wap',
         ], function ($router) {
         ], function ($router) {
@@ -171,18 +171,17 @@ class RouteServiceProvider extends ServiceProvider
 
 
             require app_path('Http/Routes/Channel/UserRoutes.php');
             require app_path('Http/Routes/Channel/UserRoutes.php');
             require app_path('Http/Routes/Channel/OrderRoutes.php');
             require app_path('Http/Routes/Channel/OrderRoutes.php');
-
         });
         });
     }
     }
 
 
     //分销支付宝路由
     //分销支付宝路由
     public function mapAliRoutes(Router $router)
     public function mapAliRoutes(Router $router)
     {
     {
-    	$router->group([
-    			'middleware' => 'web',
-    			], function ($router) {
-    		require app_path('Http/Routes/Channel/AliRoutes.php');
-    	});
+        $router->group([
+            'middleware' => 'web',
+        ], function ($router) {
+            require app_path('Http/Routes/Channel/AliRoutes.php');
+        });
     }
     }
     //分销小程序路由
     //分销小程序路由
     public function mapXcxRoutes(Router $router)
     public function mapXcxRoutes(Router $router)
@@ -224,7 +223,16 @@ class RouteServiceProvider extends ServiceProvider
             require app_path('Http/Routes/Taowj/TaowjRoutes.php');
             require app_path('Http/Routes/Taowj/TaowjRoutes.php');
         });
         });
     }
     }
-
-
-
+    /**
+     * 公共接口
+     */
+    public function mapCommonRoutes(Router $router)
+    {
+        $router->group([
+            'middleware' => 'api',
+            'prefix' => 'api',
+        ], function ($router) {
+            require app_path('Http/Routes/Common/CommonRoute.php');
+        });
+    }
 }
 }