feat: 门店详情页商品原价上方新增商户电话模块,取客服电话字段并支持点击拨号
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
5a954a0906
commit
1a3e6a3860
@@ -20,6 +20,17 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商户电话(取商铺客服电话字段,点击拨号) -->
|
||||
<view class="discount-section" v-if="store.servicePhone">
|
||||
<view class="section-title">
|
||||
<u-icon name="phone-fill" color="#0088ff" size="34"></u-icon>
|
||||
<text class="discount-title">商户电话</text>
|
||||
</view>
|
||||
<view class="discount-list">
|
||||
<text class="discount-item phone-link" @click="callPhone">{{ store.servicePhone }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品原价(内容取商铺门票信息字段) -->
|
||||
<view class="discount-section" v-if="ticketInfoList.length">
|
||||
<view class="section-title">
|
||||
@@ -73,6 +84,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// xuchao: 点击商户电话唤起拨号
|
||||
callPhone() {
|
||||
if (!this.store || !this.store.servicePhone) return
|
||||
uni.makePhoneCall({ phoneNumber: String(this.store.servicePhone) })
|
||||
},
|
||||
loadDetail(shopId) {
|
||||
const loc = uni.getStorageSync('lng') && uni.getStorageSync('lat')
|
||||
? { lng: uni.getStorageSync('lng'), lat: uni.getStorageSync('lat') }
|
||||
@@ -222,6 +238,11 @@ export default {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* xuchao: 可点击拨号的电话样式 */
|
||||
.phone-link {
|
||||
color: #0088ff;
|
||||
}
|
||||
|
||||
/* 返回按钮 */
|
||||
.back-btn {
|
||||
position: fixed;
|
||||
|
||||
Reference in New Issue
Block a user