diff --git a/pages/orderDetail/orderDetail.vue b/pages/orderDetail/orderDetail.vue index 838f458..f756c49 100644 --- a/pages/orderDetail/orderDetail.vue +++ b/pages/orderDetail/orderDetail.vue @@ -105,6 +105,7 @@ }, onUnload() { // this.cancelOrder(); + this.clearQueryInterval() }, computed: { errClass() { @@ -132,6 +133,7 @@ cancelOrder(that.orderDetail.orderInfo.orderNumber) .then((res) => { uni.hideLoading(); + this.clearQueryInterval() uni.showToast({ icon: 'none', title: '已取消', @@ -160,6 +162,7 @@ } this.interval = setInterval(() => { getOrder(that.orderDetail.orderInfo.belongingPayOrderId).then((response) => { + console.log('response',response) // 已支付 if (response.data.status === 10) { that.clearQueryInterval(); @@ -174,6 +177,7 @@ }; printTicket(ob) .then((ress) => { + const datas = JSON.stringify(that.orderDetail.orderInfo .ticketList); // console.log(data) @@ -224,7 +228,6 @@ id: that.orderDetail.orderInfo.belongingPayOrderId, returnUrl: '' }; - debugger submitOrder(obj).then((res) => { console.log('支付结果', res) const data = res.data; @@ -235,7 +238,7 @@ title: '支付中...', mask: true }); - this.createQueryInterval(); + that.createQueryInterval(); // that.clearQueryInterval(); @@ -314,10 +317,12 @@ let that = this; cancelOrder(that.orderDetail.orderInfo.orderNumber) .then((res) => { + this.clearQueryInterval() console.log(res); }) .catch((err) => { console.log(err); + this.clearQueryInterval() }); uni.navigateBack({ delta: 1