Fix:4989 【商城小程序】体验券订单详情页,体验店信息缺少导航和联系客服按钮

This commit is contained in:
LinCyJang
2026-03-23 21:17:59 +08:00
parent d1413066ac
commit c941d77c3d
@@ -35,19 +35,27 @@
</view> </view>
<view class="merchant-card"> <view class="merchant-card">
<image :src="orderInfo.merchantAvatar || webUrl + '/experienceCoupon/store-placeholder.png'" class="merchant-avatar" mode="aspectFill" /> <view class="merchant-card-top">
<view class="merchant-info"> <image :src="orderInfo.merchantAvatar || webUrl + '/experienceCoupon/store-placeholder.png'" class="merchant-avatar" mode="aspectFill" />
<view class="merchant-name-large">{{ orderInfo.experienceItemInfo && orderInfo.experienceItemInfo.themeName ? orderInfo.experienceItemInfo.themeName : '' }}</view> <view class="merchant-info">
<view class="merchant-time one-t" v-if="formattedBusinessTime">营业时间{{ formattedBusinessTime }}</view> <view class="merchant-name-large">{{ orderInfo.experienceItemInfo && orderInfo.experienceItemInfo.themeName ? orderInfo.experienceItemInfo.themeName : '' }}</view>
<view class="merchant-location-wrap one-t"> <view class="merchant-location-wrap one-t v12-mb-2">
<image :src="webUrl + '/orderIcon/map.png'" class="location-icon" /> <image :src="webUrl + '/orderIcon/map.png'" class="location-icon" />
<text class="distance-text" v-if="distanceText">距该地{{ distanceText }}km</text> <text class="distance-text" v-if="distanceText">距该地{{ distanceText }}km</text>
<text class="address-text">{{ orderInfo.address }}</text> <text class="address-text">{{ orderInfo.address }}</text>
</view>
</view> </view>
</view> </view>
<view class="merchant-actions"> <view class="merchant-card-bottom">
<image :src="webUrl + '/orderIcon/nav.png'" class="action-icon" @click="openLocation" /> <view class="merchant-time" v-if="formattedBusinessTime">营业时间{{ formattedBusinessTime }}</view>
<image :src="webUrl + '/orderIcon/phone.png'" class="action-icon" @click="callMerchant" v-if="orderInfo.merchantPhone" /> <view class="merchant-actions">
<view class="action-btn" @click="openLocation">
<u-icon :name="webUrl + '/page/qianxian/icon-addr.png'" color="#fff" size="24"></u-icon>
</view>
<view class="action-btn" @click="callMerchant">
<u-icon :name="webUrl + '/page/qianxian/icon-phone.png'" color="#fff" size="24"></u-icon>
</view>
</view>
</view> </view>
</view> </view>
@@ -216,6 +224,16 @@ export default {
const d = R * c const d = R * c
this.distanceText = d.toFixed(1) this.distanceText = d.toFixed(1)
}, },
callMerchant() {
const phone = this.orderInfo.merchantPhone || this.orderInfo.merPhone || (this.orderInfo.experienceItemInfo && this.orderInfo.experienceItemInfo.phone) || this.orderInfo.companyTel;
if (phone) {
uni.makePhoneCall({
phoneNumber: phone
})
} else {
uni.showToast({ title: '暂无商家电话', icon: 'none' })
}
},
openLocation() { openLocation() {
if (this.orderInfo.latitude && this.orderInfo.longitude) { if (this.orderInfo.latitude && this.orderInfo.longitude) {
uni.openLocation({ uni.openLocation({
@@ -224,13 +242,8 @@ export default {
name: this.orderInfo.merchantName, name: this.orderInfo.merchantName,
address: this.orderInfo.address address: this.orderInfo.address
}) })
} } else {
}, uni.showToast({ title: '暂无位置信息', icon: 'none' })
callMerchant() {
if (this.orderInfo.merchantPhone) {
uni.makePhoneCall({
phoneNumber: this.orderInfo.merchantPhone
})
} }
}, },
copyVerifyCode() { copyVerifyCode() {
@@ -381,8 +394,14 @@ export default {
border-radius: 16rpx; border-radius: 16rpx;
padding: 24rpx; padding: 24rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
display: flex;
flex-direction: column;
}
.merchant-card-top {
display: flex; display: flex;
position: relative; position: relative;
margin-bottom: 24rpx;
} }
.merchant-avatar { .merchant-avatar {
@@ -408,10 +427,20 @@ export default {
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.merchant-card-bottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.merchant-time { .merchant-time {
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
margin-bottom: 8rpx; margin-bottom: 0;
line-height: 1.4;
word-break: break-all;
flex: 1;
padding-right: 24rpx;
} }
.merchant-location-wrap { .merchant-location-wrap {
@@ -443,15 +472,18 @@ export default {
.merchant-actions { .merchant-actions {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: flex-end; align-items: center;
position: absolute; flex-shrink: 0;
right: 24rpx;
bottom: 24rpx;
} }
.action-icon { .action-btn {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
border-radius: 50%;
background: #C52733;
display: flex;
align-items: center;
justify-content: center;
margin-left: 16rpx; margin-left: 16rpx;
} }