修改兼容h5调试
This commit is contained in:
@@ -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
|
||||
);
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user