data中添加isloading:false
请求方法中,例如:
edit(){
if(this.isloading) return;
this.isloading = true
let data = {
m_profile:this.m_profile
}
this.$http.api.edit(data).then(res=>{
this.isloading = false
console.log(res)
uni.showToast({
icon:"none",
title:res.msg
})
if(res.status==200){
uni.navigateBack({delta:1})
}
}).catch(err=>{
this.isloading = false
})
}