修复bug
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user