ayHaru 4 år sedan
förälder
incheckning
0318868008
1 ändrade filer med 8 tillägg och 2 borttagningar
  1. 8 2
      application/index/controller/Index.php

+ 8 - 2
application/index/controller/Index.php

@@ -1,13 +1,15 @@
 <?php
 namespace app\index\controller;
 
+use think\facade\Log;
+
 class Index
 {
     private $mAdminUrl = '';
     public function __construct()
     {
-//        $this->mAdminUrl = 'http://host.docker.internal:8080';
-        $this->mAdminUrl = 'http://docker.hostip:8080';
+        $this->mAdminUrl = 'http://host.docker.internal:8080';
+//        $this->mAdminUrl = 'http://docker.hostip:8080';
     }
 
     public function index()
@@ -19,6 +21,7 @@ class Index
         $order_sn = input('param.order_sn');
         $result = http_get($this->mAdminUrl . '/CheckOrder' ,['order_sn' => $order_sn]);
         if($result == false){
+            Log::record('CheckOrder Error:'.$result);
             json_return(5001,[],'网络错误');
         }
 
@@ -33,6 +36,7 @@ class Index
         $code = input('param.code');
         $result = http_get($this->mAdminUrl . '/CheckFcode' ,['code' => $code]);
         if($result == false){
+            Log::record('CheckFcode Error:'.$result);
             json_return(5001,[],'网络错误');
         }
         if($result['code'] != 0){
@@ -50,6 +54,7 @@ class Index
         $cabinet = input('param.cabinet');
         $result = http_get($this->mAdminUrl . '/RecordStore' ,['order_sn' => $order_sn , 'trunk' => $trunk , 'cabinet' => $cabinet]);
         if($result == false){
+            Log::record('RecordStore Error:'.$result);
             json_return(5001,[],'网络错误');
         }
         if($result['code'] != 0){
@@ -65,6 +70,7 @@ class Index
         $cabinet = input('param.cabinet');
         $result = http_get($this->mAdminUrl . '/RecordFetch' ,['trunk' => $trunk , 'cabinet' => $cabinet]);
         if($result == false){
+            Log::record('RecordFetch Error:'.$result);
             json_return(5001,[],'网络错误');
         }
         if($result['code'] != 0){