From f2a606efca273d0329c783fd950c417eec6a1798 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期三, 11 六月 2025 14:47:51 +0800 Subject: [PATCH] 请求后端超时时间从50万毫秒(8分半钟)改为180万毫秒(30分钟) --- src/utils/request.js | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 4f0c381..d6b1ff4 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -17,7 +17,7 @@ const service = axios.create({ //baseURL: '/jeecg-boot', baseURL: apiBaseUrl, // api base_url - timeout: 500000 // 璇锋眰瓒呮椂鏃堕棿 + timeout: 1800000 // 璇锋眰瓒呮椂鏃堕棿 }) const err = (error) => { @@ -79,7 +79,8 @@ if (token) { store.dispatch('Logout').then(() => { setTimeout(() => { - window.location.reload() + router.push({ path: '/user/login' }); + // window.location.reload() }, 1500) }) } @@ -169,7 +170,10 @@ onOk: () => { store.dispatch('Logout').then(() => { Vue.ls.remove(ACCESS_TOKEN) - window.location.reload() + setTimeout(() => { + router.push({ path: '/user/login' }); + // window.location.reload() + }, 1500) }) } }) -- Gitblit v1.9.3