|
@@ -238,7 +238,7 @@ export default {
|
|
|
} else {
|
|
|
this.status = 'opened'
|
|
|
}
|
|
|
- this.getValidity()
|
|
|
+ this.getValidity(data.data.endTimestamp)
|
|
|
this.status = 'open'
|
|
|
this.receiveAmount = data.data.receiveAmount
|
|
|
break;
|
|
@@ -281,16 +281,14 @@ export default {
|
|
|
console.log('getReceivedList', data)
|
|
|
}
|
|
|
},
|
|
|
- getValidity() {
|
|
|
+ getValidity(end_time) {
|
|
|
+
|
|
|
let _d1, _d2, _d3, _h, _m, _s
|
|
|
- if(!this.detail.postBizData.myReceived.taskEndTimestamp){
|
|
|
- return
|
|
|
- }
|
|
|
let timer = setInterval(() => {
|
|
|
let _time = new Date().getTime()
|
|
|
- _d3 = this.detail.postBizData.myReceived.taskEndTimestamp - _time
|
|
|
+ _d3 = end_time - _time
|
|
|
if (_d3 > 0) {
|
|
|
- _d1 = moment(this.detail.postBizData.myReceived.taskEndTimestamp)
|
|
|
+ _d1 = moment(end_time)
|
|
|
_d2 = moment(_time)
|
|
|
_h = moment.duration(_d1.diff(_d2)).hours()
|
|
|
_m = moment.duration(_d1.diff(_d2)).minutes()
|