修改兼容h5调试

This commit is contained in:
2025-12-16 17:32:54 +08:00
parent 08eaa9f438
commit 9be7e49229
8 changed files with 30 additions and 42 deletions

View File

@@ -115,6 +115,18 @@ export const productStore = defineStore("product", {
getLocation() {
return new Promise((resolve, reject) => {
console.log("获取经纬度");
// #ifdef H5
resolve({
accuracy: 65,
altitude: 0,
errMsg: "getLocation:ok",
horizontalAccuracy: 65,
latitude: 23.129163,
longitude: 113.264435,
speed: -1,
verticalAccuracy: 65,
});
// #endif
uni.getLocation({
type: "wgs84",
altitude: true,
@@ -298,11 +310,11 @@ export const productStore = defineStore("product", {
]) {
resolve(
true
);
);
} else {
reject(
false
);
);
}
},
});