2025-08-06 14:26:48 +08:00
|
|
|
<template>
|
|
|
|
|
<router-view />
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import useSettingsStore from '@/store/modules/settings'
|
|
|
|
|
import { handleThemeStyle } from '@/utils/theme'
|
2025-09-03 11:55:00 +08:00
|
|
|
import useProductStore from '@/store/modules/product'
|
2025-09-05 10:03:26 +08:00
|
|
|
import { getToken } from '@/utils/auth'
|
2025-08-06 14:26:48 +08:00
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
// 初始化主题样式
|
|
|
|
|
handleThemeStyle(useSettingsStore().theme)
|
2025-09-05 10:03:26 +08:00
|
|
|
if (getToken()) {
|
|
|
|
|
useProductStore().fetchProductMap()
|
|
|
|
|
}
|
2025-08-06 14:26:48 +08:00
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
</script>
|
2025-08-09 14:39:14 +08:00
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
/* @import "tailwindcss"; */
|
|
|
|
|
</style>
|