From 89380e6260a75d1d3b94de687ebcc2f50d50659d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 03 Feb 2026 15:44:33 +0800
Subject: [PATCH] feat:环境变量配置调整
---
applications/drone-command/src/store/modules/user.js | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/applications/drone-command/src/store/modules/user.js b/applications/drone-command/src/store/modules/user.js
index 371e9e7..af8714f 100644
--- a/applications/drone-command/src/store/modules/user.js
+++ b/applications/drone-command/src/store/modules/user.js
@@ -8,6 +8,7 @@
import { setStore, getStore } from '@/utils/store';
import { validatenull } from '@/utils/validate';
import { deepClone } from '@/utils/util';
+import defaultAva from '@/assets/images/defaultava.png'
import {
loginByUsername,
loginBySocial,
@@ -273,9 +274,10 @@
dispatch('LogOut').then(()=>{
const env = import.meta.env.VITE_APP_ENV
const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
- env === 'development'
- ? window.location.href = "/drone-command/login"
- : window.location.replace(`${adminUrl}#/login`)
+ window.location.href = "/drone-command/login"
+ // env === 'development'
+ // ? window.location.href = "/drone-command/login"
+ // : window.location.replace(`${adminUrl}#/login`)
})
}
return new Promise(resolve => {
@@ -335,6 +337,9 @@
if (validatenull(userInfo.user_id) && validatenull(userInfo.account)) {
state.userInfo = { user_name: 'unauth', role_name: 'unauth' };
} else {
+ if (validatenull(userInfo.avatar)) {
+ userInfo.avatar = defaultAva;
+ }
state.userInfo = userInfo;
}
setStore({ name: 'userInfo', content: state.userInfo });
--
Gitblit v1.9.3