优化
This commit is contained in:
+2
-1
@@ -1,7 +1,7 @@
|
||||
import { useUserStore } from '@/store'
|
||||
|
||||
// TODO: 替换为实际的 API 地址
|
||||
export const baseUrl = 'https://sggl.sedin.com.cn/sgglapi/api/'
|
||||
export const baseUrl = 'https://lygcgs.com.cn:8078/shjapi/api/'
|
||||
|
||||
// ===== 防止重复请求 =====
|
||||
const pendingRequests = new Map()
|
||||
@@ -129,6 +129,7 @@ export function request(options) {
|
||||
},
|
||||
fail: (err) => {
|
||||
removePending(finalConfig) // 网络失败也要清理标识
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: '网络连接失败', icon: 'none' })
|
||||
reject(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user