浏览代码

提示弹窗bug

jwyu 3 年之前
父节点
当前提交
d24a69c048
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      utils/request.js

+ 7 - 4
utils/request.js

@@ -55,10 +55,13 @@ const http=(url,params,method)=>{
 			},
 			fail(error) {
 				console.log(error);
-				uni.showToast({
-					title:'服务器错误',
-					icon:'none'
-				})
+				setTimeout(() => {
+					uni.showToast({
+						title:'服务器错误',
+						icon:'none'
+					})
+				}, 0);
+				
 			},
 			complete() {
 				// 关闭loading