tongshanglei 2 vuotta sitten
vanhempi
commit
de5f50107d
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      catch/device/controller/Station.php

+ 7 - 1
catch/device/controller/Station.php

@@ -217,6 +217,12 @@ class Station extends CatchController
         return CatchResponse::success($this->stationModel->getAllList());
     }
     public function getAllListForTrans(Request $request) {
-        return CatchResponse::success($this->stationModel->getAllList());
+        $list=$this->stationModel->getAllList();
+        $rows=[];
+        foreach($list as $val){
+            $item=['key'=>$val['mac'],'label'=>$val['name'] ];
+            $rows[]=$item;
+        }
+        return CatchResponse::success($rows);
     }
 }