打卡bug

This commit is contained in:
13684185576
2025-11-06 11:42:56 +08:00
parent 5c7efdd1e8
commit 6538af0c59
2 changed files with 10 additions and 5 deletions

View File

@ -104,10 +104,8 @@ onMounted(() => {
});
const getLocation = () => {
if ("geolocation" in navigator) {
console.log(navigator.geolocation, "navigator.geolocation");
navigator.geolocation.getCurrentPosition(
(pos) => {
console.log(pos.coords, "pos");
if (pos.coords) {
var latitude = pos.coords.latitude;
var longitude = pos.coords.longitude;