更新:loading加载时机问题

This commit is contained in:
2025-11-28 16:16:22 +08:00
parent 8edf719431
commit 3d20683d76
4 changed files with 160 additions and 156 deletions

View File

@@ -23,7 +23,7 @@ export function createRequestClient(cfg: ICreateClientConfig) {
const intercepted = requestInterceptor(final as IRequestOptions);
// 全局处理请求 loading
const loading = !cfg.loading ? true : cfg.loading // 接口请求参数不传loading默认显示loading
const loading = cfg.loading ?? true // 接口请求参数不传loading默认显示loading
if (loading) {
uni.showLoading({ mask: true })
reqCount++