|
|
@@ -39,11 +39,12 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
vueWatchRoute () {
|
|
|
+ this.btnOpenSuccess(() => this.btnLinkBack())
|
|
|
this.inQuery()
|
|
|
this.inData()
|
|
|
},
|
|
|
// 秒倒计时
|
|
|
- loopCode(num, callback) {
|
|
|
+ async loopCode(num, callback) {
|
|
|
let msg = '自动跳转'
|
|
|
clearInterval(this.codeMess.t)
|
|
|
function loopNum() {
|
|
|
@@ -57,6 +58,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)
|
|
|
@@ -117,11 +119,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
|
|
|
@@ -152,10 +154,11 @@ export default {
|
|
|
this.loading.submit = false
|
|
|
},
|
|
|
btnLinkBack() {
|
|
|
- let { go, replace } = this.$route.query
|
|
|
- replace
|
|
|
- ? this.$router.replace({ name: replace })
|
|
|
- : this.$router.go(go || -1)
|
|
|
+ clearInterval(this.codeMess.t)
|
|
|
+ // let { go, replace } = this.$route.query
|
|
|
+ // replace
|
|
|
+ // ? location.replace(replace)
|
|
|
+ // : this.$router.go(go || -1)
|
|
|
}
|
|
|
}
|
|
|
}
|