|
|
@ -154,48 +154,53 @@ |
|
|
|
mask:true, |
|
|
|
mask:true, |
|
|
|
}); |
|
|
|
}); |
|
|
|
getLogisticsMsg(params).then(res=>{ |
|
|
|
getLogisticsMsg(params).then(res=>{ |
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.tracesData=res.return_data; |
|
|
|
setTimeout(()=>{ |
|
|
|
this.tracesData.logisticsTraceDetails =JSON.parse(this.tracesData.logisticsTraceDetails) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.tracesData.logisticsTraceDetails=this.tracesData.logisticsTraceDetails.sort((item,item2)=>{ |
|
|
|
uni.hideLoading(); |
|
|
|
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
|
|
|
|
if(item.logisticsStatus == 'TRANSPORT'){ |
|
|
|
this.tracesData=res.return_data; |
|
|
|
item.isMainNode=false; |
|
|
|
this.tracesData.logisticsTraceDetails =JSON.parse(this.tracesData.logisticsTraceDetails) |
|
|
|
}else{ |
|
|
|
|
|
|
|
item.isMainNode=true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return item2.time - item.time; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.tracesData.logisticsTraceDetails=this.tracesData.logisticsTraceDetails.sort((item,item2)=>{ |
|
|
|
|
|
|
|
|
|
|
|
let mobile = /(1[0-9]{10})|([0-9]{3,4})?[0-9]{7,8}/g; //匹配手机号或固话 |
|
|
|
if(item.logisticsStatus == 'TRANSPORT'){ |
|
|
|
let phone = []; |
|
|
|
item.isMainNode=false; |
|
|
|
this.tracesData.logisticsTraceDetails.map(item=>{ |
|
|
|
}else{ |
|
|
|
// 提取电话号码 |
|
|
|
item.isMainNode=true; |
|
|
|
// if(item.logisticsStatus == 'SIGN'||item.logisticsStatus == 'DELIVERING'){ |
|
|
|
|
|
|
|
let num = item.desc.replace(/\s|[(]|[)]|[(]|[)]|[-]*/g, ''); //去除字符串中所有空格、小括号和横杠 |
|
|
|
|
|
|
|
if(num.match(mobile)){ |
|
|
|
|
|
|
|
phone.push((num.match(mobile))) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
return item2.time - item.time; |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.phoneNumber =phone.flat(Infinity); |
|
|
|
|
|
|
|
// console.log(this.phoneNumber, phone) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let mobile = /(1[0-9]{10})|([0-9]{3,4})?[0-9]{7,8}/g; //匹配手机号或固话 |
|
|
|
|
|
|
|
let phone = []; |
|
|
|
|
|
|
|
this.tracesData.logisticsTraceDetails.map(item=>{ |
|
|
|
|
|
|
|
// 提取电话号码 |
|
|
|
|
|
|
|
// if(item.logisticsStatus == 'SIGN'||item.logisticsStatus == 'DELIVERING'){ |
|
|
|
|
|
|
|
let num = item.desc.replace(/\s|[(]|[)]|[(]|[)]|[-]*/g, ''); //去除字符串中所有空格、小括号和横杠 |
|
|
|
|
|
|
|
if(num.match(mobile)){ |
|
|
|
|
|
|
|
phone.push((num.match(mobile))) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.phoneNumber =phone.flat(Infinity); |
|
|
|
|
|
|
|
// console.log(this.phoneNumber, phone) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
},100) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: res.return_msg, |
|
|
|
|
|
|
|
icon: 'none', |
|
|
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 复制 |
|
|
|
// 复制 |
|
|
|