fix(修复登录界面验证码关闭issue): 🐛 https://gitee.com/huge-dream/django-vue3-admin/issues/I6OS75

This commit is contained in:
H0nGzA1
2023-03-22 19:56:54 +08:00
parent b5f50bdf30
commit 5ab2aaa066
3 changed files with 12 additions and 20 deletions

View File

@@ -1,8 +1,7 @@
import { defineStore } from 'pinia';
import { ConfigStates } from './interface';
import { request } from '../utils/service';
export const urlPrefix = '/api/system/system_config/';
export const urlPrefix = '/api/init/settings/';
/**
* 系统配置数据
@@ -19,15 +18,7 @@ export const SystemConfigStore = defineStore('SystemConfig', {
method: 'get',
}).then((ret: { data: [] }) => {
// 转换数据格式并保存到pinia
let dataList = ret.data;
dataList.forEach((item: any) => {
let childrens = item.children;
if (childrens.length > 1) {
this.systemConfig[item.key] = childrens;
} else {
this.systemConfig[item.key] = item.value;
}
});
this.systemConfig = JSON.parse(JSON.stringify(ret.data));
});
},
},