From 9b80c42df73cb99b37d95b5c0a186ceec5e45a27 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期二, 07 一月 2025 17:23:31 +0800 Subject: [PATCH] ll --- h5/utils/service.js | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/h5/utils/service.js b/h5/utils/service.js index 1ecf79c..4a85322 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) => { @@ -34,12 +34,15 @@ duration: 2000 }) }) - if (data.code === 500 || data.code === 5112) { - uni.clearStorageSync() - return uni.navigateTo({ - url: '/pages/login/login' + if (data.code === 500) { + uni.showToast({ + 'title': '鏈嶅姟鍣ㄥ紓甯�',icon:'none' }) } + if (data.code === 5112) { + uni.clearStorageSync() + window.location.href = app_url + } return resolve(data) } resolve(data) -- Gitblit v1.9.3