|
@@ -33,7 +33,18 @@ class Wind extends CatchController
|
|
|
*/
|
|
|
public function getWindList(Request $request) : \think\Response
|
|
|
{
|
|
|
- return CatchResponse::success($this->windModel->getWindList());
|
|
|
+ $list=$this->windModel->getWindList();
|
|
|
+ foreach($list as $val){
|
|
|
+ if($val['wind_shape']=='circle'){
|
|
|
+ $val['center_lng']=$val['wind_info']['center']['lng'];
|
|
|
+ $val['center_lat']=$val['wind_info']['center']['lat'];
|
|
|
+ }
|
|
|
+ if($val['wind_shape']=='polygon'){
|
|
|
+ $val['center_lng']=$val['wind_info'][0]['lng'];
|
|
|
+ $val['center_lat']=$val['wind_info'][0]['lat'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return CatchResponse::success($list);
|
|
|
}
|
|
|
/**
|
|
|
* 保存信息
|