Commit 8fe9cb76 authored by zhangyanni's avatar zhangyanni

防连点

parent 9ecb7233
......@@ -25,6 +25,7 @@
data(){
return{
intersetList:[],
disabledFlag:0,
}
},
methods:{
......@@ -62,15 +63,37 @@
},
handleConfirm(data){
api.postIntersetedDictAxios(data).then(res=>{
if(res.code==0){
this.$emit("postData");
}else{
var that = this;
if(this.disabledFlag==0){
this.disabledFlag++;
api.postIntersetedDictAxios(data).then(res=>{
if(res.code==0){
this.$emit("postData");
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
}else{
this.$toast(res.msg);
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
}
}).catch(err=>{
this.$toast(err);
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
})
}else{
setTimeout(function(){
that.disabledFlag = 0;
return false;
},500)
}
}
}).catch(err=>{
this.$toast(err);
})
},
//获取标签
......
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