fix(修复登录界面验证码关闭issue): 🐛 https://gitee.com/huge-dream/django-vue3-admin/issues/I6OS75
This commit is contained in:
@@ -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));
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user