|
|
|
@ -154,48 +154,53 @@ |
|
|
|
|
mask:true, |
|
|
|
|
}); |
|
|
|
|
getLogisticsMsg(params).then(res=>{ |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
|
|
this.tracesData=res.return_data; |
|
|
|
|
this.tracesData.logisticsTraceDetails =JSON.parse(this.tracesData.logisticsTraceDetails) |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
|
|
|
|
this.tracesData.logisticsTraceDetails=this.tracesData.logisticsTraceDetails.sort((item,item2)=>{ |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
|
|
|
|
|
if(item.logisticsStatus == 'TRANSPORT'){ |
|
|
|
|
item.isMainNode=false; |
|
|
|
|
}else{ |
|
|
|
|
item.isMainNode=true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return item2.time - item.time; |
|
|
|
|
}) |
|
|
|
|
this.tracesData=res.return_data; |
|
|
|
|
this.tracesData.logisticsTraceDetails =JSON.parse(this.tracesData.logisticsTraceDetails) |
|
|
|
|
|
|
|
|
|
this.tracesData.logisticsTraceDetails=this.tracesData.logisticsTraceDetails.sort((item,item2)=>{ |
|
|
|
|
|
|
|
|
|
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))) |
|
|
|
|
if(item.logisticsStatus == 'TRANSPORT'){ |
|
|
|
|
item.isMainNode=false; |
|
|
|
|
}else{ |
|
|
|
|
item.isMainNode=true; |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
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 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 复制 |
|
|
|
|