From 7b51c9e1abc198a501f7858599da9c116130fd6f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 27 三月 2025 16:47:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/utils/service.js | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/h5/utils/service.js b/h5/utils/service.js
index a0df64f..55d60a4 100644
--- a/h5/utils/service.js
+++ b/h5/utils/service.js
@@ -1,4 +1,4 @@
-import { baseUrl } from "./config.js"
+import { baseUrl, app_url } from "./config.js"
export const http = function (options) {
{
return new Promise((resolve, reject) => {
@@ -33,14 +33,17 @@
icon: "none",
duration: 2000
})
- })
- if (data.code === 500 || data.code === 5112) {
- uni.clearStorageSync()
- return uni.navigateTo({
- url: '/pages/login/login'
+ },500)
+ if (data.code === 500) {
+ uni.showToast({
+ 'title': '鏈嶅姟鍣ㄥ紓甯�',icon:'none'
})
}
- return
+ if (data.code === 5112) {
+ uni.clearStorageSync()
+ window.location.href = app_url
+ }
+ return resolve(data)
}
resolve(data)
// return response.data
--
Gitblit v1.9.3