提交 26f10a23 authored 作者: lihuihui's avatar lihuihui

updata

上级 57a063e3
...@@ -48,6 +48,7 @@ export default { ...@@ -48,6 +48,7 @@ export default {
} }
api.genOrder(params).then(response => { api.genOrder(params).then(response => {
this.order = response.data this.order = response.data
clearInterval(this.clearTime)
this.clearTime = setInterval(() => { this.clearTime = setInterval(() => {
this.getOrderStatus(this.order.order_no) this.getOrderStatus(this.order.order_no)
}, 1000) }, 1000)
...@@ -59,7 +60,7 @@ export default { ...@@ -59,7 +60,7 @@ export default {
api.getOrder(id).then(response => { api.getOrder(id).then(response => {
const code = parseInt(response.data.status) const code = parseInt(response.data.status)
setTimeout(() => { setTimeout(() => {
if (code !== -1) { if (code !== -1 || code !== 0) {
this.$router.go(0) this.$router.go(0)
clearInterval(this.clearTime) clearInterval(this.clearTime)
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论