diff --git a/subPackages/food/foodDetail.vue b/subPackages/food/foodDetail.vue index a93cfdb..2e765e3 100644 --- a/subPackages/food/foodDetail.vue +++ b/subPackages/food/foodDetail.vue @@ -50,7 +50,7 @@ 商家地址 {{info.address}} - + @@ -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() { diff --git a/subPackages/hotelHomestay/detail.vue b/subPackages/hotelHomestay/detail.vue index 33e4d2d..116e4e8 100644 --- a/subPackages/hotelHomestay/detail.vue +++ b/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 () { diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue index e000f38..1ca70a7 100644 --- a/subPackages/ticketBooking/detail.vue +++ b/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 () {