tanyanfei 5 년 전
부모
커밋
22be3c32df
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/api.js

+ 2 - 2
src/api.js

@@ -9,7 +9,7 @@ axios.interceptors.request.use(
 				config.headers.Authorization = `${token}`;   
 			} else {
 				//未登录
-				// window.location.hash = "/login";
+				window.location.hash = "/login";
 			}
 		// } 
 		return config;
@@ -39,7 +39,7 @@ axios.interceptors.response.use(function (response) {
 }, function (error) {
 	// 对响应错误做点什么
 	if (error.request.status == 403) {
-		// window.location.hash = "/login";
+		window.location.hash = "/login";
 	}
 	// console.log(Object.getOwnPropertyNames(error))
 	// console.log(error.request,error.message)