tongshanglei 2 years ago
parent
commit
8e2b363176
1 changed files with 12 additions and 1 deletions
  1. 12 1
      catch/screen/controller/Preview.php

+ 12 - 1
catch/screen/controller/Preview.php

@@ -47,7 +47,8 @@ class Preview extends CatchController
         // var_dump($deviceList);
         $addrList=array();
         $addrList1=array();
-        for($i=0;$i<20;$i++){
+        $addrList2=array();
+        for($i=0;$i<15;$i++){
             $a=mt_rand();
             $b=mt_getrandmax();
             $c=$a/$b;
@@ -67,6 +68,15 @@ class Preview extends CatchController
             // var_dump($lat);
             $item=array('value'=>[$lng, $lat],'name'=>"测试风场".$i,'address'=>'风场位置'.$i,'number'=>mt_rand(0, 20));
             array_push($addrList1,$item);
+            $a=mt_rand();
+            $b=mt_getrandmax();
+            $c=$a/$b;
+            $lng=mt_rand(100, 118)+$c;
+            $lat=mt_rand(25, 35)+$c;
+            // var_dump($lng);
+            // var_dump($lat);
+            $item=array('value'=>[$lng, $lat],'name'=>"测试风场".$i,'address'=>'风场位置'.$i,'number'=>mt_rand(0, 20));
+            array_push($addrList2,$item);
         }
         // foreach($deviceList as $val){
         //     $item=array('value'=>[$val['point_y'], $val['point_x']],'name'=>$val['addr']);
@@ -74,6 +84,7 @@ class Preview extends CatchController
         // }
         $res['addrList']=$addrList;
         $res['addrList1']=$addrList1;
+        $res['addrList2']=$addrList2;
         // $res['total']=$this->deviceModel->dataRange()->count();
         $res['total']=80;
         return CatchResponse::success($res);