瀏覽代碼

称重机路由问题

LD 4 年之前
父節點
當前提交
fa70b0350a
共有 3 個文件被更改,包括 8 次插入2 次删除
  1. 1 1
      resources/views/package/measureMonitor/index.blade.php
  2. 1 1
      routes/web.php
  3. 6 0
      tests/webApi/weight.http

+ 1 - 1
resources/views/package/measureMonitor/index.blade.php

@@ -138,7 +138,7 @@
                             },10);
                         }else {
                             window.tempTip.setDuration(3000);
-                            window.axios.post('package/weigh/measureMonitor/speech',{logistic:logistic_name})
+                            window.axios.post("{{url('package/weigh/measureMonitor/speech')}}",{logistic:logistic_name})
                                 .then(function (response) {
                                     if (response.data){
                                         _this.logisticAudioURL[logistic_name]=response.data;

+ 1 - 1
routes/web.php

@@ -21,7 +21,7 @@ Route::get('/', function () {
 Route::any('test/{method}', 'TestController@method'); //测试
 
 /** 称重广播 */
-Route::post('package/weigh/measureMonitor/speech','MeasureMonitorController@speech')->middleware("check.token");
+Route::post('package/weigh/measureMonitor/speech','MeasureMonitorController@speech');
 
 Auth::routes();
 

+ 6 - 0
tests/webApi/weight.http

@@ -11,6 +11,12 @@ Content-Type: application/json
 {"barcode":"testChannel11","weight":"5","id":"00C66186389","key":"2C7FACD3AFC3FFE547FC54CDA076A25D","time":"2020-2-26 14:17:07"}
 
 ###
+POST http://unsafe.baoshi56.com/package/measureMonitor/data
+Content-Type: application/json
+
+{"barcode":"testChannel11","weight":"5","id":"00C66186389","key":"2C7FACD3AFC3FFE547FC54CDA076A25D","time":"2020-2-26 14:17:07"}
+
+###