在使用uni.showLoading的时候,发现uni.showToast的提示出不来了,代码结构如下
success:(res)=>{
console.log('接单',res);
uni.showToast({
title:res.data.msg,
icon:'none',
duration:1500
}) if(res.data.code == 1){ //showLoading在这个方法里
that.getDemand();
}
}
后来研究发现,八成是顺序的问题,只需要先执行uni.showLoading再执行提示框,就不会被影响了,猜测可能是因为uni.showLoading给刷掉了
原创©本文章为王少铮原创,未经许可,禁止转载
0条评论