main
Jing Li 2024-05-01 15:31:56 +08:00
parent 5c30004bd1
commit 25b12f09d5
1 changed files with 4 additions and 7 deletions

View File

@ -65,10 +65,10 @@ class SignController extends Controller
$data = [ $data = [
'time' => $time, 'time' => $time,
'enable' => true, 'enable' => false,
'type' => SignType::Normal, 'type' => SignType::Normal,
'distance' => null, 'distance' => null,
'description' => '已进入考勤范围: ' . $store->title, 'description' => '请打开手机定位, 并给予APP获取位置信息权限',
'maxDistance' => $maxDistance, 'maxDistance' => $maxDistance,
]; ];
@ -84,21 +84,18 @@ class SignController extends Controller
if ($maxDistance > 0 && $distance > $maxDistance) { if ($maxDistance > 0 && $distance > $maxDistance) {
$data = array_merge($data, [ $data = array_merge($data, [
'enable' => true,
'type' => SignType::Outside, 'type' => SignType::Outside,
'distance' => $distance, 'distance' => $distance,
'description' => '当前位置不在考勤范围内, 请选择外勤打卡', 'description' => '当前位置不在考勤范围内, 请选择外勤打卡',
]); ]);
} else { } else {
$data = array_merge($data, [ $data = array_merge($data, [
'enable' => true,
'distance' => $distance, 'distance' => $distance,
'description' => '已进入考勤范围: ' . $store->title, 'description' => '已进入考勤范围: ' . $store->title,
]); ]);
} }
} else {
$data = array_merge($data, [
'enable' => false,
'description' => '请打开手机定位, 并给予APP获取位置信息权限',
]);
} }
return $data; return $data;