Commit 8e85b477 authored by 刘用法's avatar 刘用法

详情页面防止弹出提示的3秒再次点击按钮

parent cc8f6f40
......@@ -555,6 +555,7 @@
}
},
handleBtn() {
console.log('click button')
if(!this.submitType){
return;
}
......@@ -606,7 +607,7 @@
this.clicking = true
this.$u.api[this.submitType](data, this.order.orderId).then(res => {
let self = this
this.clicking = false
if ((res.data.code!==undefined && res.data.code === 200)
|| (res.code!==undefined && res.code === 200) ) {
this.$refs.uToast.show({
......@@ -618,6 +619,7 @@
// id: this.order.orderId
// }
callback : function(){
this.clicking = false
uni.redirectTo({
url: 'pages/order/detail?id='+self.order.orderId
});
......@@ -628,7 +630,10 @@
title: res.data.message!==undefined ? res.data.message:res.message,
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
type: 'warning',
callback: res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.isGan():''
callback: function() {
this.clicking = false
res.data.message==='抱歉,手快的师傅已经抢到此单!'?this.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