lh 3 yıl önce
ebeveyn
işleme
9d82990373

+ 0 - 1
src/Controllers/CompanyAuth/AppController.php

@@ -185,7 +185,6 @@ class AppController extends Controller
      * @apiSuccess {String}      push_msg_id 推送消息id,标记用[custom_开头是客服消息,template_开头是模板消息,下划线后是id]
      * @apiSuccess {String}      ip 订单创建IP地址
      * @apiSuccess {Int}         activity_id 活动ID
-     * @apiSuccessExample {json} Success-Response:
      *     HTTP/1.1 200 OK
      *   {
      *       "code": 0,

+ 5 - 1
src/Middleware/CompanyAuth.php

@@ -16,8 +16,12 @@ class CompanyAuth
 
     public function handle(Request $request, Closure $next)
     {
-        $app_id = $request->get('app_id', '');
         $service = new ConfigService;
+        $params = $request->except('_url');
+        $config = $service->findCompanyAuthConfig($params['app_id']);
+        $this->setGlobalConfig($config);
+        return $next($request);
+        $app_id = $request->get('app_id', '');
         $validate = new CompanyAuthRequest($request);
         $validate->validate();
         $client_ip = CommonHelper::GetClientIp();