From 9e47e0ece28c6145638aecca5bdf86857c049cf9 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 31 五月 2024 18:23:34 +0800
Subject: [PATCH] ‘’
---
h5/utils/service.js | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/h5/utils/service.js b/h5/utils/service.js
index b26180f..4131187 100644
--- a/h5/utils/service.js
+++ b/h5/utils/service.js
@@ -26,16 +26,18 @@
// 鎺у埗鍙版樉绀烘暟鎹俊鎭�
uni.hideLoading()
// 鐧诲綍杩囨湡
- if (data.code === 401) {
+ if (data.code !== 200) {
+ setTimeout(() => {
+ uni.showToast({
+ title: data.message,
+ icon: "none",
+ duration: 2000
+ })
+ })
+ }
+ if (data.code === 5112) {
uni.navigateTo({
url: '/pages/staffLogin/login'
- });
- }
- if (data.code !== 200) {
- uni.showToast({
- title: data.message,
- icon: "none",
- duration: 2000
})
}
resolve(data)
@@ -46,7 +48,7 @@
uni.showToast({
title: '璇锋眰鎺ュ彛澶辫触'
})
-
+
// 杩斿洖閿欒娑堟伅
reject(err)
uni.hideLoading()
--
Gitblit v1.9.3