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

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

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