bug bug bug filters.js

This commit is contained in:
lb
2023-01-30 17:04:06 +08:00
parent 508bc4e434
commit 7c8f844ace
4 changed files with 17 additions and 12 deletions

View File

@@ -198,13 +198,17 @@ export default {
return this.$message.error(res.msg);
}
Cookies.set("token", res.data.token);
// 获取数据字典数据
this.$http('/sys/dict/type/all', { limit: 999, page: 1 }).then(({data: res}) => {
// console.log('[dictData] loading...', res)
// 刷新数据字典数据
this.$http("/sys/dict/type/all", { limit: 999, page: 1 }).then(({ data: res }) => {
// console.log("[dictData] loading...", res);
if (res.code === 0 && res.data) {
localStorage.setItem('dictList', JSON.stringify(res.data))
let dictList = {};
res.data.map((item) => {
Object.assign(dictList, { [item.dictType]: item.dataList });
});
localStorage.setItem("dictList", JSON.stringify(dictList));
}
})
});
// end
this.$router.replace({ name: "home" });
})