[\App\Middleware\Auth\ApiMiddleware::class]]); Router::addGroup('/wechat/',function () { Router::post('notify/wxminionline', 'App\Controller\NotifyController@wxminiOnline'); Router::post('notify/wxminioffline', 'App\Controller\NotifyController@wxminiOffline'); Router::post('notify/wxpayrefund', 'App\Controller\NotifyPayRefundController@wxPayRefund'); }); // 不需要登录的路由 Router::addGroup('/v3/', function () { Router::post('location/getNearestMarket', 'App\Controller\v3\LocationController@getNearestMarket'); Router::post('home/appletIndex', 'App\Controller\v3\HomeController@appletIndex'); Router::post('goods/detail', 'App\Controller\v3\GoodsController@detail'); Router::post('goodsRecommend/getByTabsForAppletIndex', 'App\Controller\v3\GoodsRecommendController@getByTabsForAppletIndex'); Router::post('onlineOrder/detail', 'App\Controller\v3\OnlineOrderController@detail'); Router::post('distributionPrice/get', 'App\Controller\v3\DistributionPriceController@get'); Router::post('category/all', 'App\Controller\v3\CategoryController@all'); Router::post('updateShopCart/update', 'App\Controller\v3\UpdateShopCartController@update'); Router::post('shopCart/detail', 'App\Controller\v3\ShopCartController@detail'); Router::post('login/wxLogin', 'App\Controller\v3\LoginController@wxLogin'); },['middleware' => [\App\Middleware\Auth\ApiMiddleware::class]]); // 需要登录的路由 Router::addGroup('/v3/', function () { Router::post('sms/getVerifyCode', 'App\Controller\v3\SmsController@getVerifyCode'); Router::post('user/bindTel', 'App\Controller\v3\UserController@bindTel'); Router::post('user/updateInfo', 'App\Controller\v3\UserController@updateInfo'); },['middleware' => [\App\Middleware\Auth\ApiMiddleware::class, \App\Middleware\Auth\UserMiddleware::class]]);