修复bug

This commit is contained in:
zhouyanli
2026-08-07 18:05:16 +08:00
parent 3851aebe66
commit 92dd39cf4b
7 changed files with 128 additions and 16 deletions

View File

@@ -1,3 +1,5 @@
import { navigateToLogin } from '@/common/checkLogin.js'
let baseUrl = '';
if (process.env.NODE_ENV === 'development') {
baseUrl = 'http://192.168.1.222:8080'; // 开发环境
@@ -42,7 +44,7 @@ export default function request(url, data = {}, method = "GET") {
if (resData.code === 401) {
if (token) {
uni.clearStorageSync('token');
uni.reLaunch({ url: '/pageSubPack/loginSub/login?mode=pwd' });
navigateToLogin({ method: 'reLaunch' });
}
reject({ msg: '登录过期', code: 401 });
return;