From 997036b27927bcc1e9207a40b7a69c106a10f30c Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 31 七月 2024 15:49:52 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
wechat_jiaxuan/utils/request.js | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/wechat_jiaxuan/utils/request.js b/wechat_jiaxuan/utils/request.js
index 7d2a0ea..d111b6c 100644
--- a/wechat_jiaxuan/utils/request.js
+++ b/wechat_jiaxuan/utils/request.js
@@ -1,10 +1,10 @@
import { baseUrl } from "./config"
-import { wxLoginCustomer } from '../api/index'
-
+let number = 0
export function request(options){
let loading = options.loading || '1' // 榛樿鍊�1鏄剧ず锛屽惁鍒欎笉鏄剧ず
if(loading == '1'){
wx.showLoading()
+ number ++
}
return new Promise(resolve => {
wx.request({
@@ -40,7 +40,10 @@
},
complete() {
if(loading == '1'){
- wx.hideLoading()
+ number --
+ if(number == 0){
+ wx.hideLoading()
+ }
}
}
})
--
Gitblit v1.9.3