地图点击回到当前位置

main
Frontend-徐志烘 1 year ago
parent 46f9b1f1a0
commit 53914f088a

@ -200,8 +200,10 @@
const navindex = ref(0) const navindex = ref(0)
const isMap = ref(0) const isMap = ref(0)
const homeScro = ref(null) const homeScro = ref(null)
const longitude = uni.getStorageSync('longitude') const longitude = ref()
const latitude = uni.getStorageSync('latitude') const latitude =ref()
longitude.value=uni.getStorageSync('longitude')
latitude.value = uni.getStorageSync('latitude')
const active = ref(0) const active = ref(0)
h.getgps() h.getgps()
const scroll = (e) => { const scroll = (e) => {
@ -281,7 +283,8 @@
}) })
} }
const myGps = () => { const myGps = () => {
console.log(1); longitude.value=uni.getStorageSync('longitude')
latitude.value = uni.getStorageSync('latitude')
} }
const iiii = () => { const iiii = () => {
uni.navigateTo({ uni.navigateTo({

@ -30,8 +30,10 @@ const _sfc_main = {
const navindex = common_vendor.ref(0); const navindex = common_vendor.ref(0);
const isMap = common_vendor.ref(0); const isMap = common_vendor.ref(0);
common_vendor.ref(null); common_vendor.ref(null);
const longitude = common_vendor.index.getStorageSync("longitude"); const longitude = common_vendor.ref();
const latitude = common_vendor.index.getStorageSync("latitude"); const latitude = common_vendor.ref();
longitude.value = common_vendor.index.getStorageSync("longitude");
latitude.value = common_vendor.index.getStorageSync("latitude");
const active = common_vendor.ref(0); const active = common_vendor.ref(0);
h.getgps(); h.getgps();
const scroll = (e) => { const scroll = (e) => {
@ -110,7 +112,8 @@ const _sfc_main = {
}); });
}; };
const myGps = () => { const myGps = () => {
console.log(1); longitude.value = common_vendor.index.getStorageSync("longitude");
latitude.value = common_vendor.index.getStorageSync("latitude");
}; };
const iiii = () => { const iiii = () => {
common_vendor.index.navigateTo({ common_vendor.index.navigateTo({
@ -180,8 +183,8 @@ const _sfc_main = {
n: common_vendor.o(($event) => netWorkDetails(index), item.id) n: common_vendor.o(($event) => netWorkDetails(index), item.id)
}); });
}), }),
j: common_vendor.unref(longitude), j: longitude.value,
k: common_vendor.unref(latitude), k: latitude.value,
l: scale.value, l: scale.value,
m: common_vendor.unref(markers), m: common_vendor.unref(markers),
n: common_vendor.o(onMarkerTap), n: common_vendor.o(onMarkerTap),

Loading…
Cancel
Save