一、manifest.json里面可以设置请求超时的时间,networkTimeout

"networkTimeout":{
"request":60000
},
二、再在请求的封装uni.request里添加提示
fail: (err)=> {
uni.hideLoading();
uni.showModal({
title: '提示',
showCancel: false,
content: '请求超时'
})
}
网友评论