From c8751bab03209de5528ed253b5542b1d3c5ff169 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期二, 13 一月 2026 10:39:24 +0800
Subject: [PATCH] #

---
 common/request.js |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/common/request.js b/common/request.js
index d0bc13c..11c481a 100644
--- a/common/request.js
+++ b/common/request.js
@@ -26,14 +26,21 @@
 			},
 			method: method, //'GET','POST'
 			dataType: 'json',
+			timeout: 30000, // 30绉掕秴鏃�
 			success: (res) => {
 				!hideLoading && uni.hideLoading()
 				resolve(res.data)
 
 			},
 			fail: (res) => {
-				// !hideLoading && toast("缃戠粶涓嶇粰鍔涳紝璇风◢鍚庡啀璇晘")
-				//wx.hideLoading()
+				!hideLoading && uni.hideLoading()
+				// 鍒ゆ柇鏄惁涓鸿秴鏃堕敊璇�
+				const isTimeout = res.errMsg && (res.errMsg.includes('timeout') || res.errMsg.includes('瓒呮椂'))
+				uni.showToast({
+					title: isTimeout ? '缃戠粶璇锋眰瓒呮椂锛岃妫�鏌ョ綉缁滆繛鎺�' : '缃戠粶璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯',
+					icon: 'none',
+					duration: 3000
+				})
 				reject(res)
 			}
 		})

--
Gitblit v1.9.1