😎优化修改系统配置刷新逻辑
This commit is contained in:
parent
87b9dde5ec
commit
b2dcbbc2ca
@ -166,9 +166,6 @@ onMounted(async () => {
|
|||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 若配置为空则刷新页面
|
|
||||||
if (themeConfig.value.captcha == undefined) window.location.reload();
|
|
||||||
|
|
||||||
// 获取登录配置
|
// 获取登录配置
|
||||||
state.secondVerEnabled = themeConfig.value.secondVer ?? false;
|
state.secondVerEnabled = themeConfig.value.secondVer ?? false;
|
||||||
state.captchaEnabled = themeConfig.value.captcha ?? true;
|
state.captchaEnabled = themeConfig.value.captcha ?? true;
|
||||||
|
|||||||
@ -193,7 +193,7 @@
|
|||||||
import { nextTick, onMounted, reactive, ref } from 'vue';
|
import { nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
import { ElMessage, ElMessageBox, UploadInstance } from 'element-plus';
|
import { ElMessage, ElMessageBox, UploadInstance } from 'element-plus';
|
||||||
import { fileToBase64 } from '/@/utils/base64Conver';
|
import { fileToBase64 } from '/@/utils/base64Conver';
|
||||||
import { Local, Session } from '/@/utils/storage';
|
import { loadSysInfo } from '/@/utils/sysInfo';
|
||||||
import chineseColors from '/@/layout/navBars/topBar/colors.json';
|
import chineseColors from '/@/layout/navBars/topBar/colors.json';
|
||||||
|
|
||||||
import { getAPI } from '/@/utils/axios-utils';
|
import { getAPI } from '/@/utils/axios-utils';
|
||||||
@ -239,9 +239,8 @@ const saveSysInfo = async () => {
|
|||||||
state.logoFile = undefined;
|
state.logoFile = undefined;
|
||||||
ElMessage.success('保存成功');
|
ElMessage.success('保存成功');
|
||||||
|
|
||||||
// 清理浏览器缓存
|
// 更新系统信息
|
||||||
Local.clear();
|
await loadSysInfo(state.sysInfo.tenantId);
|
||||||
Session.clear();
|
|
||||||
} finally {
|
} finally {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
state.isLoading = false;
|
state.isLoading = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user