更新
This commit is contained in:
parent
da2f0b5130
commit
e44a0c0951
@ -208,6 +208,7 @@ class RemoteController extends BaseApiController
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 计算两点之间的距离
|
* 计算两点之间的距离
|
||||||
|
* 返回米
|
||||||
*/
|
*/
|
||||||
function calculateDistance($longitude1, $latitude1, $longitude2, $latitude2)
|
function calculateDistance($longitude1, $latitude1, $longitude2, $latitude2)
|
||||||
{
|
{
|
||||||
@ -220,7 +221,6 @@ class RemoteController extends BaseApiController
|
|||||||
cos(deg2rad($latitude1)) * cos(deg2rad($latitude2)) *
|
cos(deg2rad($latitude1)) * cos(deg2rad($latitude2)) *
|
||||||
sin($dLon / 2) * sin($dLon / 2);
|
sin($dLon / 2) * sin($dLon / 2);
|
||||||
$c = 2 * asin(sqrt($a));
|
$c = 2 * asin(sqrt($a));
|
||||||
|
return round($earthRadius * $c*1000) ;
|
||||||
return $earthRadius * $c * 100;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ class TaskController extends BaseApiController
|
|||||||
Task::where('id', $parmas['id'])->update($data);
|
Task::where('id', $parmas['id'])->update($data);
|
||||||
return $this->success('更新成功');
|
return $this->success('更新成功');
|
||||||
}
|
}
|
||||||
return $this->fail('定位坐标大于100米,请重新打卡');
|
return $this->fail('定位坐标大于100米,请重新打卡。'.$res.'米');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function informationg_list()
|
public function informationg_list()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user