Zhouzhendong 6 лет назад
Родитель
Сommit
d9c4992d0e

+ 1 - 0
app/Http/Controllers/api/thirdPart/weight/PackageController.php

@@ -152,6 +152,7 @@ class PackageController extends Controller
                 $measuringMachine->touch();
                 MeasuringMachineQueue::dispatch($measuringMachine)->delay(\Carbon\Carbon::now()->addMinutes(30));
                 WeightQueue::dispatch($createPackage)->delay(Carbon::now()->addMinutes(1440));
+                event(new WeightEvent($createPackage));
                 $response=["msg"=>"保存成功",
                     "code"=>200,
                     "data"=>true,

+ 3 - 0
laravel-echo-server.lock

@@ -0,0 +1,3 @@
+{
+	"process": 2924
+}

+ 1 - 0
resources/views/weight/measureMonitor/index.blade.php

@@ -102,6 +102,7 @@
                     let audio=document.getElementById('audio');
                     if (package){
                         if (package.id===_this.package.id){
+                            _this.package.measuringMachine_status=package.measuringMachine_status;
                             tempTip.setDuration(4000);
                             tempTip.showSuccess('暂无新数据');
                         }else {

+ 1 - 1
tests/webApi/test.http

@@ -8,7 +8,7 @@
 POST http://bswas/api/thirdPart/weight/new
 Content-Type: application/json
 
-{"barcode":"test1","weight":"5","id":"00C94707266","key":"2C7FACD3AFC3FFE547FC54CDA076A25D","time":"2020-2-26 14:17:07"}
+{"barcode":"test4","weight":"5","id":"00C94707266","key":"2C7FACD3AFC3FFE547FC54CDA076A25D","time":"2020-2-26 14:17:07"}
 
 ###