修改
This commit is contained in:
parent
dc482e65a3
commit
ab7bca88b9
@ -43,38 +43,50 @@
|
|||||||
trainingItemOrder,
|
trainingItemOrder,
|
||||||
appletTrainingOrderPay
|
appletTrainingOrderPay
|
||||||
} from '@/api/learning/index.js'
|
} from '@/api/learning/index.js'
|
||||||
|
import {
|
||||||
|
handCloseOrder
|
||||||
|
} from '@/api/Orderdetails/index.js'
|
||||||
import baseurl from '@/api/baseurl.js'
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
baseurl: undefined,
|
baseurl: undefined,
|
||||||
|
trainingOrderNo: undefined,
|
||||||
list: undefined,
|
list: undefined,
|
||||||
timestamp: 0,
|
timestamp: 0,
|
||||||
timestamp2: 0,
|
timecount: 0,
|
||||||
timer: null,
|
Timer: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
clearInterval(this.Timer); //清除该函数
|
clearInterval(this.Timer); //清除该函数
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
timestamp2() {
|
timecount() {
|
||||||
if (this.timestamp2 <= 0) {}
|
if (this.timecount <= 0) {
|
||||||
|
handCloseOrder().then(res => {
|
||||||
|
clearInterval(this.Timer); //清除该函数
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
this.trainingOrderNo = options.trainingOrderNo
|
||||||
this.baseurl = baseurl
|
this.baseurl = baseurl
|
||||||
this.list = JSON.parse(options.list)
|
this.list = JSON.parse(options.list)
|
||||||
var ordertimes = this.list.trainingOrderTime.replaceAll(/\-/gi, "/")
|
var ordertimes = this.list.trainingOrderTime.replaceAll(/\-/gi, "/")
|
||||||
var time = new Date(this.list.trainingOrderTime).getTime() / 1000 + (60 * 60 * 2)
|
var time = new Date(this.list.trainingOrderTime).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.timestamp2 = this.timestamp
|
this.timecount = this.timestamp
|
||||||
this.timer = setInterval(() => {
|
this.Timer = setInterval(() => {
|
||||||
this.timestamp2--;
|
this.timecount--;
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
info() {
|
||||||
|
|
||||||
|
},
|
||||||
//购买
|
//购买
|
||||||
tobuy() {
|
tobuy() {
|
||||||
var that = this
|
var that = this
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user