mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 19:07:25 +08:00
feat: 添加主题色设置功能
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
|
||||
<script>
|
||||
import storage from "@/plugins/storage";
|
||||
import { getBaseSite } from "@/api/common.js";
|
||||
import { getBaseSite, getThemeSetting } from "@/api/common.js";
|
||||
import { fetchAndApplyTheme } from "@/utils/theme";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
mounted() {
|
||||
@@ -42,6 +44,7 @@ export default {
|
||||
});
|
||||
}
|
||||
this.getSite();
|
||||
this.getTheme();
|
||||
},
|
||||
getSite() {
|
||||
getBaseSite().then((res) => {
|
||||
@@ -55,6 +58,9 @@ export default {
|
||||
}
|
||||
}).catch(() => {});
|
||||
},
|
||||
getTheme() {
|
||||
fetchAndApplyTheme(getThemeSetting).catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user