|
|
@@ -76,7 +76,7 @@ export default {
|
|
|
this.inData()
|
|
|
},
|
|
|
// 秒倒计时
|
|
|
- loopCode(num, callback) {
|
|
|
+ async loopCode(num, callback) {
|
|
|
let msg = '自动跳转'
|
|
|
clearInterval(this.codeMess.t)
|
|
|
function loopNum() {
|
|
|
@@ -90,6 +90,7 @@ export default {
|
|
|
this.codeMess['disabled'] = true
|
|
|
this.codeMess['message'] = `${num}s ${msg}`
|
|
|
num = num - 1
|
|
|
+ console.log(this.codeMess['message'])
|
|
|
}
|
|
|
loopNum.call(this)
|
|
|
this.codeMess.t = setInterval(() => loopNum.call(this), 1000)
|
|
|
@@ -147,11 +148,11 @@ export default {
|
|
|
},
|
|
|
btnOpenSuccess(callback) {
|
|
|
this.show.submit = true
|
|
|
- // this.loopCode(this.codeMess.num, async () => {
|
|
|
- // this.show.submit = false
|
|
|
- // await this.$nextTick()
|
|
|
- // callback && callback()
|
|
|
- // })
|
|
|
+ this.loopCode(this.codeMess.num, async () => {
|
|
|
+ this.show.submit = false
|
|
|
+ await this.$nextTick()
|
|
|
+ callback && callback()
|
|
|
+ })
|
|
|
},
|
|
|
async btnSubmit() {
|
|
|
this.loading.submit = true
|
|
|
@@ -182,9 +183,10 @@ export default {
|
|
|
this.loading.submit = false
|
|
|
},
|
|
|
btnLinkBack() {
|
|
|
+ clearInterval(this.codeMess.t)
|
|
|
let { go, replace } = this.$route.query
|
|
|
replace
|
|
|
- ? this.$router.replace({ name: replace })
|
|
|
+ ? location.replace(replace)
|
|
|
: this.$router.go(go || -1)
|
|
|
}
|
|
|
}
|