处理正式环境不显示坐标的bug

main
yanzai 1 year ago
parent 0cd2216454
commit 42aed0dd54

@ -98,7 +98,7 @@
} }
return a.long - b.long return a.long - b.long
}) })
const hospital_id = $store.save.hospital let hospital_id = $store.save.hospital
if (!!hospital_id) { if (!!hospital_id) {
hospital_id = '' hospital_id = ''
for (let i in list) { for (let i in list) {
@ -151,6 +151,7 @@
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: (res) => { success: (res) => {
console.log(res)
lola.value = { lola.value = {
longitude: res.longitude, longitude: res.longitude,
latitude: res.latitude latitude: res.latitude
@ -204,6 +205,25 @@
}; };
onShow(() => { onShow(() => {
uni.getLocation({
type: 'wgs84',
success: (res) => {
console.log(res)
lola.value = {
longitude: res.longitude,
latitude: res.latitude
}
},
fail: (e) => {
console.log(e)
lola.value = {
longitude: 0,
latitude: 0
}
}
});
if (!!user_box_ref.value) { if (!!user_box_ref.value) {
getLong() getLong()
} }
@ -261,7 +281,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">10151056</view> <view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">10151416</view>
</view> </view>
</view> </view>
</template> </template>

Loading…
Cancel
Save