chenkainan 1 year ago
parent
commit
d87135a065
  1. 22
      subPackages/food/foodDetail.vue
  2. 12
      subPackages/hotelHomestay/detail.vue
  3. 12
      subPackages/ticketBooking/detail.vue

22
subPackages/food/foodDetail.vue

@ -50,7 +50,7 @@
<text style="margin-right: 28rpx;">商家地址</text>
<text class="text-overflow" style="width: 380rpx;">{{info.address}}</text>
</view>
<image class="right-icon" :src="showImg('/uploads/20240827/5b19517f2a630f3a766ea03ac621a3be.png')" @click="openLocation(info.lat,info.lon)"></image>
<image class="right-icon" :src="showImg('/uploads/20240827/5b19517f2a630f3a766ea03ac621a3be.png')" @click="goMap(info.lat,info.lon)"></image>
</view>
</view>
</view>
@ -158,6 +158,26 @@
url: '/subPackages/food/taocanDetail'
});
},
goMap () {
if (!this.info.tengxun_map) {
uni.showToast({
title: '暂未配置地理位置',
icon: 'none'
})
return
}
uni.openLocation({
latitude: Number(this.info.tengxun_map.lat),
longitude: Number(this.info.tengxun_map.lon),
name: this.info.title,
address: this.info.address,
success: function () {
console.log('success');
}
});
},
},
onReachBottom() {

12
subPackages/hotelHomestay/detail.vue

@ -250,9 +250,17 @@
},
goMap () {
if (!this.info.tengxun_map) {
uni.showToast({
title: '暂未配置地理位置',
icon: 'none'
})
return
}
debugger
uni.openLocation({
latitude: Number(this.info.lat),
longitude: Number(this.info.lon),
latitude: Number(this.info.tengxun_map.lat),
longitude: Number(this.info.tengxun_map.lon),
name: this.info.title,
address: this.info.address,
success: function () {

12
subPackages/ticketBooking/detail.vue

@ -228,9 +228,17 @@
},
goMap () {
if (!this.info.tengxun_map) {
uni.showToast({
title: '暂未配置地理位置',
icon: 'none'
})
return
}
uni.openLocation({
latitude: Number(this.info.lat),
longitude: Number(this.info.lon),
latitude: Number(this.info.tengxun_map.lat),
longitude: Number(this.info.tengxun_map.lon),
name: this.info.title,
address: this.info.address,
success: function () {

Loading…
Cancel
Save