diff --git a/src/api/request.js b/src/api/request.js
index 50c54b6..5f71e8f 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -4,8 +4,8 @@ import { MessagePlugin } from "tdesign-vue-next"
import { useRouter } from 'vue-router';
function get_api_url() {
- if (process.env.NODE_ENV === 'development' || (process.env.NODE_ENV === 'production' && window.location.host.indexOf('localhost') > -1)) {
- return process.env.VUE_APP_API_BASEURL
+ if (import.meta.env.MODE === 'development' || (import.meta.env.MODE === 'production' && window.location.host.indexOf('localhost') > -1)) {
+ return import.meta.env.VITE_API_BASEURL
}
return 'http://' + window.location.host + '/api'
}
@@ -39,14 +39,10 @@ instance.interceptors.response.use(
},
error => {
let err_msg = "请求错误";
+ console.log(error)
if (error.response) {
switch (error.response.status) {
case 401:
- if (error.response.data?.err_code == 'no_active_account') {
- err_msg = "账户密码错误或已禁用"
- } else {
- err_msg = "认证失败,请重新登录"
- }
if (authToken.access) { authToken.access = null }
if (authToken.refresh) { authToken.refresh = null }
if (error.config.url.indexOf('/login') == -1) {
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index fbf512b..8e82646 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -30,8 +30,9 @@