Fix:4988 【商城小程序】待使用体验券订单详情页,核销码以及订单号缺少复制按钮

This commit is contained in:
LinCyJang
2026-03-23 21:26:36 +08:00
parent c941d77c3d
commit 20cea6ead7
@@ -67,7 +67,10 @@
</view>
<view class="info-row">
<text class="label">订单号</text>
<text class="value">{{ orderInfo.orderId || '' }}</text>
<view class="value with-copy">
<text>{{ orderInfo.orderId || '' }}</text>
<image :src="webUrl + '/orderIcon/copy.png'" class="copy-icon" @click="copyOrderId" v-if="orderInfo.orderId" />
</view>
</view>
<view class="info-row">
<text class="label">订单类型</text>
@@ -259,6 +262,20 @@ export default {
})
}
})
},
copyOrderId() {
if (!this.orderInfo.orderId) {
return
}
uni.setClipboardData({
data: this.orderInfo.orderId,
success: () => {
uni.showToast({
title: '已复制订单号',
icon: 'none'
})
}
})
}
}
}
@@ -522,6 +539,15 @@ export default {
flex: 1;
}
.info-row .value.with-copy {
display: flex;
align-items: center;
}
.info-row .value.with-copy .copy-icon {
margin-left: 16rpx;
}
.notice-section {
background: #fff;
border-radius: 16rpx;