After clicking the button to send the request, the result can be returned before requesting again.

Add isloading: false to data

In the request method, for example:

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
    })
}

Guess you like

Origin blog.csdn.net/xiyan_yu/article/details/127057345