| | |
| | | <view class="section-title">物流信息</view> |
| | | <view class="userInfo"> |
| | | <view class="name"> |
| | | <text>姓名:</text> {{order.consigneeName}}</view> |
| | | <view class="phone"><text>联系电话:</text> {{order.consigneeMobile}}</view> |
| | | <text>姓名:</text> {{showPrivateInfo ? order.consigneeName : hideInfo(order.consigneeName)}}</view> |
| | | <view class="phone"><text>联系电话:</text> {{showPrivateInfo ? order.consigneeMobile : hidePhone(order.consigneeMobile)}}</view> |
| | | <view class="address-line"> |
| | | <view class="addresss"><text>地址:</text> {{order.consigneeAddressPath}}</view> |
| | | <u-icon |
| | | :name="showPrivateInfo ? 'eye-fill' : 'eye-off'" |
| | | size="34" |
| | | @click="togglePrivacy" |
| | | ></u-icon> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="form-item"> |
| | | <picker @change="selectLogistics" :value="logisticsIndex" :range="logisticsList" range-key="name" |
| | |
| | | getChecked, |
| | | partDelivery |
| | | } from '@/api/supplier.js' |
| | | import '@/components/uview-components/uview-ui'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | showPrivateInfo:false, |
| | | logisticsIndex: -1, |
| | | logisticsList: [], |
| | | trackingNumber: '', |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | togglePrivacy(){ |
| | | this.showPrivateInfo = !this.showPrivateInfo; |
| | | }, |
| | | hideInfo(info) { |
| | | if (!info) return ''; |
| | | // 姓名:显示第一个字,其他用*代替 |
| | | return info.length > 1 |
| | | ? info.substring(0, 1) + '*'.repeat(info.length - 1) |
| | | : '*'; |
| | | }, |
| | | hidePhone(phone) { |
| | | if (!phone) return ''; |
| | | // 手机号:显示前3位和后4位,中间用****代替 |
| | | return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); |
| | | }, |
| | | // 选择物流公司 |
| | | selectLogistics(e) { |
| | | this.logisticsIndex = e.detail.value |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* 地址和图标在同一行 */ |
| | | .address-line { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | /* 样式保持不变 */ |
| | | .container { |
| | | padding: 20rpx; |