|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-05-09 14:41:37
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-05-16 11:46:05
|
|
|
|
|
* @LastEditTime: 2022-05-16 16:40:50
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -46,7 +46,7 @@ export default {
|
|
|
|
|
// 已支付
|
|
|
|
|
'3' : {name:'等待发货', tips:'您的包裹整装待发'},
|
|
|
|
|
// 已发货
|
|
|
|
|
'4' : {name:'已发货', tips:'您的包裹正向您飞来'},
|
|
|
|
|
'4' : {name:'待收货', tips:'您的包裹正向您飞来'},
|
|
|
|
|
// 已收货
|
|
|
|
|
'5' : {name:'已收货'},
|
|
|
|
|
// 已完成
|
|
|
|
@ -62,7 +62,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
watch : {
|
|
|
|
|
orderInfo(nVal){
|
|
|
|
|
const {orderStatus} = this.orderInfo;
|
|
|
|
|
const {orderStatus, autoReceiveTime, serverTime} = this.orderInfo;
|
|
|
|
|
this.ctxCon = this.ctxData[orderStatus];
|
|
|
|
|
|
|
|
|
|
if(orderStatus === 1){
|
|
|
|
@ -73,14 +73,25 @@ export default {
|
|
|
|
|
this.calcTimerStartSecondNum();
|
|
|
|
|
this.timer();
|
|
|
|
|
|
|
|
|
|
}else if(orderStatus === 4){
|
|
|
|
|
const receiveTime = (new Date(autoReceiveTime.replace(/-/g,'/'))).getTime();
|
|
|
|
|
const curTime = (new Date(serverTime.replace(/-/g,'/'))).getTime();
|
|
|
|
|
const minute = parseInt((receiveTime - curTime) / 60000);
|
|
|
|
|
const day = parseInt(Math.floor(minute / 1440));
|
|
|
|
|
const hour = parseInt(Math.floor((minute - day * 1440) / 60));
|
|
|
|
|
const m = parseInt(Math.floor(minute - ((day * 24 + hour) * 60)));
|
|
|
|
|
let str = `${day ? `${day}天${hour}时${m}分` : (hour ? `${hour}时${m}分` : ( m ? `${m}分` : '1分'))}`;
|
|
|
|
|
this.ctxCon.tips = `${str}后,将自动确认收货`
|
|
|
|
|
|
|
|
|
|
}else if(orderStatus === 2){
|
|
|
|
|
this.ctxCon.tips = this.orderInfo.cancelReason;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 计算倒计时开始秒数
|
|
|
|
|
* 计算待支付倒计时开始秒数
|
|
|
|
|
*/
|
|
|
|
|
calcTimerStartSecondNum(){
|
|
|
|
|
let expireTime = (new Date(this.orderInfo.expireTime.replace(/-/g,'/'))).getTime(),
|
|
|
|
|