Commit b297a824 authored by Facius's avatar Facius

点击接单之后,立即退出,延迟的页面跳转不需要执行跳转

parent b28e7060
...@@ -273,7 +273,8 @@ ...@@ -273,7 +273,8 @@
dateItem: null, dateItem: null,
centerBtnDisabled:false, centerBtnDisabled:false,
isFromMine: false, isFromMine: false,
settlementInfo: {formatTime: '-', list: [], amount: ''} settlementInfo: {formatTime: '-', list: [], amount: ''},
unloaded: false
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -295,9 +296,11 @@ ...@@ -295,9 +296,11 @@
} }
}, },
onHide() { // onHide() {
this.closeLocationChange() // this.closeLocationChange()
},onUnload() { // },
onUnload() {
this.unloaded = true
this.closeLocationChange() this.closeLocationChange()
}, },
computed: { computed: {
...@@ -722,17 +725,15 @@ ...@@ -722,17 +725,15 @@
this.$refs.uToast.show({ this.$refs.uToast.show({
title: this.centerButtonText + '操作成功', title: this.centerButtonText + '操作成功',
type: 'success', type: 'success',
// isTab:true, duration: 1000,
// url: 'pages/order/detail',
// params: {
// id: this.order.orderId
// }
callback : function(){ callback : function(){
this.clicking = false if(self.unloaded === false) { // 如果用户一秒钟之内没有后退退出该页面才跳转
self.clicking = false
uni.redirectTo({ uni.redirectTo({
url: 'pages/order/detail?id='+self.order.orderId url: 'pages/order/detail?id='+self.order.orderId
}); });
} }
}
}) })
} else { } else {
let self = this let self = this
...@@ -741,7 +742,7 @@ ...@@ -741,7 +742,7 @@
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default' // 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type: 'warning', type: 'warning',
callback: function() { callback: function() {
this.clicking = false self.clicking = false
res.data.message==='抱歉,手快的师傅已经抢到此单!'?self.isGan():'' res.data.message==='抱歉,手快的师傅已经抢到此单!'?self.isGan():''
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment