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