Commit 945e091f authored by dragondean@qq.com's avatar dragondean@qq.com

Merge branch 'feature/phone_desensitization' into dev

parents 164b86f3 a85a14bc
......@@ -5,7 +5,7 @@
<div id="myproa">
<p style="padding-bottom:10px;font-size:16px;">
{{$t('订单号')}}{{detail.orderNo}}
&nbsp;&nbsp;&nbsp;{{$t('发货人电话')}}{{detail.consignorVO.countryCode}} {{detail.consignorVO.phone}}
&nbsp;&nbsp;&nbsp;{{$t('发货人电话')}}+{{detail.consignorVO.countryCode}} {{detail.consignorVO.phone|maskPhoneNumber}}
&nbsp;&nbsp;&nbsp;{{$t('提货地点')}}{{$l(objective, 'title')}}
<img :src="qrcode" style="margin-left: 10px;width:17mm;vertical-align:middle" />
</p>
......@@ -111,7 +111,23 @@ import {getOrderWarehouseIn, getOrderDetail} from '@/api/ecw/order'
import qrcode from 'qrcode'
import Decimal from 'decimal.js'
export default {
filters: {parseTime},
filters: {
parseTime,
maskPhoneNumber(phoneNumber) {
const length = phoneNumber.length;
if (length <= 5) {
return phoneNumber.slice(0, -3) + '*'.repeat(Math.min(3, length));
}
const mid = Math.floor(length / 2);
const offset = length % 2 === 0 ? 2 : 3;
const start = mid - offset;
const end = mid + 3;
return phoneNumber.slice(0, start) + '*'.repeat(5) + phoneNumber.slice(end);
}
},
components: { },
props:{
orderId: [String, Number]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment