From 0c02f1bf5f00e6de2c379dc121047b84a5b7c153 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 29 七月 2024 17:50:46 +0800
Subject: [PATCH] ‘’

---
 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