From 8f5681d1c103883b90d6b49d6ed4f00f8d6cac6c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 22 十月 2024 18:04:24 +0800
Subject: [PATCH] 代码初始化

---
 pda/utils/service.js |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/pda/utils/service.js b/pda/utils/service.js
index 0814f6f..0253a05 100644
--- a/pda/utils/service.js
+++ b/pda/utils/service.js
@@ -2,16 +2,18 @@
 export const http = function (options) {
 	{
 		return new Promise((resolve, reject) => {
-			let token = uni.getStorageSync('token') || ''
+			let token = uni.getStorageSync('token') || null
 			// 鍦ㄧ櫥褰曠殑鏃跺�欓渶瑕佸偍瀛� token uni.setStorageSync("authorization","杩欓噷鏄櫥褰曡幏鍙栫殑token鍊�")
 
 			// uni.showLoading({
 			// 	title:"鍔犺浇涓�..."
 			// })
-			uni.showLoading({
-				title: '鍔犺浇涓�',
-				mask: true
-			})
+			if(!options.hideLoading){
+				uni.showLoading({
+					title: '鍔犺浇涓�',
+					mask: true
+				})
+			}
 			uni.request({
 				url: baseUrl + options.url,
 				data: options.data || {},

--
Gitblit v1.9.3