Fix:2641 【地标好物】服务--导航和客服按钮无效

This commit is contained in:
modendeveloper
2024-11-24 15:27:25 +08:00
parent 82b8e53aee
commit a8bdcd5495
+29 -6
View File
@@ -10,18 +10,18 @@
</view>
<view class="v12-mt-3 info-wrap">
<view>
<view class="v12-font-32 v12-font-bold v12-mb-2">{{ info.name }}</view>
<view class="v12-font-24 v12-mb-1 v12-dark1-text">办公时间:{{ info.officeTime }}</view>
<view class="v12-font-24 v12-mb-1 v12-dark1-text">{{ info.address }}</view>
<view class="v12-font-32 v12-font-bold v12-mb-2">{{ info.name || '' }}</view>
<view class="v12-font-24 v12-mb-1 v12-dark1-text">办公时间:{{ info.officeTime || '' }}</view>
<view class="v12-font-24 v12-mb-1 v12-dark1-text">{{ info.address || '' }}</view>
</view>
<view class="action-wrap">
<view>
<view @click="showLocation">
<view>
<image :src="webUrl + '/page/qianxian/icon-addr.png'" class="img" />
</view>
<view class="text-center">导航</view>
</view>
<view>
<view @click="call">
<view>
<image :src="webUrl + '/page/qianxian/icon-phone.png'" class="img" />
</view>
@@ -35,7 +35,7 @@
简介
</view>
<view class="intro-text">
{{ info.intro }}
{{ info.intro || '' }}
</view>
</view>
</view>
@@ -56,6 +56,29 @@ export default {
mounted() {
console.log(this.info);
},
methods: {
showLocation() {
console.log(this.info);
if (!this.info.latitude || !this.info.longitude) {
this.$dialog.error('暂无位置信息')
} else {
uni.openLocation({
latitude: this.info.latitude,
longitude: this.info.longitude
})
}
},
call() {
if (this.info.tel) {
uni.makePhoneCall({
phoneNumber: this.info.tel
})
} else {
this.$dialog.error('电话为空')
}
},
}
}
</script>