|
@ -39,7 +39,10 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="base-value-wrap"> |
|
|
<view class="base-value-wrap"> |
|
|
<text class="base-value">{{ item.value }}</text> |
|
|
<text class="base-value">{{ item.value }}</text> |
|
|
<text v-if="item.copy" class="copy-btn" @tap="copyText(item.value)">复制</text> |
|
|
|
|
|
|
|
|
<view class="base-actions"> |
|
|
|
|
|
<text v-if="item.viewLogistics" class="view-logistics-btn" @tap="viewLogistics(item.value, item.expressCompany)">查看物流</text> |
|
|
|
|
|
<text v-if="item.copy" class="copy-btn" @tap="copyText(item.value)">复制</text> |
|
|
|
|
|
</view> |
|
|
<uni-icons v-if="item.arrow" type="right" size="18" color="#bbb" /> |
|
|
<uni-icons v-if="item.arrow" type="right" size="18" color="#bbb" /> |
|
|
</view> |
|
|
</view> |
|
|
<view v-if="i < baseInfo.length-1" class="divider"></view> |
|
|
<view v-if="i < baseInfo.length-1" class="divider"></view> |
|
@ -231,7 +234,7 @@ export default { |
|
|
// 基础信息 |
|
|
// 基础信息 |
|
|
this.baseInfo = [ |
|
|
this.baseInfo = [ |
|
|
{ label: '订单编号', value: data.ordeNo || data.id, copy: true }, |
|
|
{ label: '订单编号', value: data.ordeNo || data.id, copy: true }, |
|
|
...(data.wliuNo ? [{ label: '快递单号', value: data.wliuNo, copy: true }] : []), |
|
|
|
|
|
|
|
|
...(data.wliuNo && data.wliu ? [{ label: '快递单号', value: data.wliuNo, copy: true, viewLogistics: true, expressCompany: data.wliu }] : []), |
|
|
{ label: '用户名', value: data.name, arrow: true }, |
|
|
{ label: '用户名', value: data.name, arrow: true }, |
|
|
{ label: '取件地址', value: (data.address || '') + (data.addressDetail || '') }, |
|
|
{ label: '取件地址', value: (data.address || '') + (data.addressDetail || '') }, |
|
|
{ label: '预约时间', value: data.goTime || data.createTime } |
|
|
{ label: '预约时间', value: data.goTime || data.createTime } |
|
@ -265,6 +268,15 @@ export default { |
|
|
copyText(text) { |
|
|
copyText(text) { |
|
|
uni.setClipboardData({ data: text }) |
|
|
uni.setClipboardData({ data: text }) |
|
|
}, |
|
|
}, |
|
|
|
|
|
viewLogistics(expressNumber, expressCompany) { |
|
|
|
|
|
if (!expressNumber) { |
|
|
|
|
|
uni.showToast({ title: '暂无快递单号', icon: 'none' }); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: `/pages/subcomponent/logistics?wliuNo=${expressNumber}&expressCompany=${expressCompany || ''}` |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
maskPhone(phone) { |
|
|
maskPhone(phone) { |
|
|
if (!phone) return ''; |
|
|
if (!phone) return ''; |
|
|
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); |
|
|
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); |
|
@ -594,7 +606,10 @@ $order-card-padding: 40px 28px; |
|
|
.base-label-wrap { min-width: 80px; text-align: left; color: #8b8b8b; font-size: 13px;} |
|
|
.base-label-wrap { min-width: 80px; text-align: left; color: #8b8b8b; font-size: 13px;} |
|
|
.base-value-wrap { display: flex; align-items: center; flex: 1; justify-content: flex-end; } |
|
|
.base-value-wrap { display: flex; align-items: center; flex: 1; justify-content: flex-end; } |
|
|
.base-value { color: #222; font-size: 15px; font-weight: 600; word-break: break-all; text-align: right; } |
|
|
.base-value { color: #222; font-size: 15px; font-weight: 600; word-break: break-all; text-align: right; } |
|
|
.copy-btn { color: #ffb400; font-size: 13px; margin-left: 6px; font-weight: 400; padding: 1px 6px; border-radius: 6px; transition: background 0.2s; } |
|
|
|
|
|
|
|
|
.base-actions { display: flex; align-items: center; gap: 8px; } |
|
|
|
|
|
.view-logistics-btn { color: #2a9cfb; font-size: 13px; font-weight: 400; padding: 1px 6px; border-radius: 6px; transition: background 0.2s; } |
|
|
|
|
|
.view-logistics-btn:active { background: #eaf6ff; } |
|
|
|
|
|
.copy-btn { color: #ffb400; font-size: 13px; font-weight: 400; padding: 1px 6px; border-radius: 6px; transition: background 0.2s; } |
|
|
.copy-btn:active { background: #fff7e6; } |
|
|
.copy-btn:active { background: #fff7e6; } |
|
|
.divider { position: absolute; left: 16px; right: 16px; bottom: -1px; height: 1px; background: #f0f0f0; } |
|
|
.divider { position: absolute; left: 16px; right: 16px; bottom: -1px; height: 1px; background: #f0f0f0; } |
|
|
uni-icons { margin-left: 6px; } |
|
|
uni-icons { margin-left: 6px; } |
|
|