From 744c16a15432461394e1e2dbdfaea34a766fcc6b Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 01 八月 2024 08:53:29 +0800
Subject: [PATCH] ‘’

---
 wechat_jiaxuan/utils/request.js |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/wechat_jiaxuan/utils/request.js b/wechat_jiaxuan/utils/request.js
index 7d2a0ea..ff29781 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()
+    wx.showLoading({mask: true})
+    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