Kaynağa Gözat

fix():修改配置

geek 4 yıl önce
ebeveyn
işleme
9d1793669c

+ 3 - 3
application/api/controller/Order.php

@@ -287,11 +287,11 @@ class Order extends BaseController {
     public function notifyOrder() {
         $input = Until::getInput();
         $rule = [
-            'orderNumber|订单号' => 'require',
+            'OrderNumber|订单号' => 'require',
         ];
         Until::check($rule, $input);
-        if (md5('ef17f532-4661-b07c-5346-65dfa304c0d8'.$input['orderNumber']) === $this->request->header('searchKey')){
-            (new OrderService())->notify($input['orderNumber']);
+        if (md5('ef17f532-4661-b07c-5346-65dfa304c0d8'.$input['OrderNumber']) === $this->request->header('searchKey')){
+            (new OrderService())->notify($input['OrderNumber']);
         }
         Until::output();
     }

+ 3 - 2
application/common/until/Until.php

@@ -133,13 +133,14 @@ class Until {
         try {
             Db::table('log')->insert([
                 //                'admin_id' => self::$adminId,
-                'url'    => Request::url(),
-                'token'  => Request::header('token'),
+                'url'    => Request::server('REQUEST_SCHEME').'://'.Request::host().Request::url(),
+                'token'  => Request::header('token') ?? '',
                 'input'  => file_get_contents("php://input") ?: json_encode(Request::input()),
                 'output' => json_encode($re),
                 'time'   => time() - self::$startTime
             ]);
         } catch (\Exception $e) {
+            throw new \RuntimeException($e->getMessage());
         }
 
     }

+ 2 - 2
config/app.php

@@ -148,8 +148,8 @@ $config =  [
 
 ];
 if (GENV === 'test') {
-//    $config['domain'] = 'https://vapi.hsayi.com/';
-    $config['domain'] = 'https://oapi.shpr.top/';
+    $config['domain'] = 'https://vapi.hsayi.com/';
+//    $config['domain'] = 'https://oapi.shpr.top/';
 }
 
 return $config;