Commit b297a824 authored by Facius's avatar Facius

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

parent b28e7060
......@@ -273,7 +273,8 @@
dateItem: null,
centerBtnDisabled:false,
isFromMine: false,
settlementInfo: {formatTime: '-', list: [], amount: ''}
settlementInfo: {formatTime: '-', list: [], amount: ''},
unloaded: false
}
},
onLoad(option) {
......@@ -295,9 +296,11 @@
}
},
onHide() {
this.closeLocationChange()
},onUnload() {
// onHide() {
// this.closeLocationChange()
// },
onUnload() {
this.unloaded = true
this.closeLocationChange()
},
computed: {
......@@ -722,16 +725,14 @@
this.$refs.uToast.show({
title: this.centerButtonText + '操作成功',
type: 'success',
// isTab:true,
// url: 'pages/order/detail',
// params: {
// id: this.order.orderId
// }
duration: 1000,
callback : function(){
this.clicking = false
uni.redirectTo({
url: 'pages/order/detail?id='+self.order.orderId
});
if(self.unloaded === false) { // 如果用户一秒钟之内没有后退退出该页面才跳转
self.clicking = false
uni.redirectTo({
url: 'pages/order/detail?id='+self.order.orderId
});
}
}
})
} else {
......@@ -741,7 +742,7 @@
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type: 'warning',
callback: function() {
this.clicking = false
self.clicking = false
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