This commit is contained in:
曹辉 2023-04-27 16:09:07 +08:00
parent 765ea63f51
commit 312d372bae
4 changed files with 30 additions and 27 deletions

View File

@ -179,12 +179,6 @@
that.patientId = value that.patientId = value
that.openid = value2 that.openid = value2
} }
this.getlist()
if (this.timecount > 0) {
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}, },
watch: { // watch: { //
timecount() { timecount() {
@ -345,7 +339,13 @@
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2) var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
var times = new Date().getTime() / 1000 var times = new Date().getTime() / 1000
this.timestamp = time - times this.timestamp = time - times
this.timecount = this.timestamp this.timecount = 10
if (this.timestamp > 0) {
this.timecount = this.timestamp
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}) })
}, },
cancelorderment() { cancelorderment() {

View File

@ -94,7 +94,7 @@
list: null, list: null,
orderNo: '', orderNo: '',
timestamp: 0, timestamp: 0,
timecount: undefined, timecount: null,
Timers: null, Timers: null,
} }
}, },
@ -103,8 +103,8 @@
}, },
onLoad(options) { onLoad(options) {
var that = this var that = this
this.baseurl = baseurl
this.orderNo = JSON.parse(options.list).orderNo this.orderNo = JSON.parse(options.list).orderNo
this.baseurl = baseurl
const value = uni.getStorageSync('patientId'); const value = uni.getStorageSync('patientId');
if (value) { if (value) {
that.patientId = value that.patientId = value
@ -113,12 +113,6 @@
if (value2) { if (value2) {
that.openid = value2 that.openid = value2
} }
this.getlist()
if (this.timecount > 0) {
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}, },
onUnload() { onUnload() {
clearInterval(this.Timers); // clearInterval(this.Timers); //
@ -212,7 +206,13 @@
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2) var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
var times = new Date().getTime() / 1000 var times = new Date().getTime() / 1000
this.timestamp = time - times this.timestamp = time - times
this.timecount = this.timestamp this.timecount = 10
if (this.timestamp > 0) {
this.timecount = this.timestamp
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}) })
}, },
} }

View File

@ -280,7 +280,13 @@
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2) var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
var times = new Date().getTime() / 1000 var times = new Date().getTime() / 1000
this.timestamp = time - times this.timestamp = time - times
this.timecount = this.timeStamp this.timecount = 10
if (this.timestamp > 0) {
this.timecount = this.timestamp
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}) })
}, },
// //
@ -292,11 +298,6 @@
}, },
onShow() { onShow() {
this.goodsOrderinfo() this.goodsOrderinfo()
if (this.timecount > 0) {
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}, },
onLoad(options) { onLoad(options) {
this.baseurl = baseurl this.baseurl = baseurl

View File

@ -180,6 +180,13 @@
var times = new Date().getTime() / 1000 var times = new Date().getTime() / 1000
this.timestamp = time - times this.timestamp = time - times
this.timecount = this.timeStamp this.timecount = this.timeStamp
this.timecount = 10
if (this.timestamp > 0) {
this.timecount = this.timestamp
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}) })
}, },
// //
@ -204,11 +211,6 @@
}, },
onShow() { onShow() {
this.goodsOrderinfo(this.goodsOrderId) this.goodsOrderinfo(this.goodsOrderId)
if (this.timecount > 0) {
this.Timers = setInterval(() => {
this.timecount--;
}, 1000)
}
}, },
} }
</script> </script>