|
@@ -17,13 +17,14 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({ name: 'personal-layout-index' })
|
|
defineOptions({ name: 'personal-layout-index' })
|
|
-import { onMounted } from 'vue'
|
|
|
|
|
|
+import { onMounted, watch } from 'vue'
|
|
import NavBar from './personal/navBar.vue'
|
|
import NavBar from './personal/navBar.vue'
|
|
import Footers from './personal/footer.vue'
|
|
import Footers from './personal/footer.vue'
|
|
import Slider from './personal/slider.vue'
|
|
import Slider from './personal/slider.vue'
|
|
import { useSharedState } from '@/store/sharedState'
|
|
import { useSharedState } from '@/store/sharedState'
|
|
-import { useRouter } from 'vue-router'
|
|
|
|
|
|
+import { useRouter, useRoute } from 'vue-router'
|
|
import { useMallStore } from '@/store/mall'
|
|
import { useMallStore } from '@/store/mall'
|
|
|
|
+import { useUserStore } from '@/store/user'
|
|
|
|
|
|
// 不展示侧边栏名单
|
|
// 不展示侧边栏名单
|
|
const whiteList = ['/login', '/privacyPolicy', '/userAgreement', '/register', '/recruit/personal/advertisement/introduce']
|
|
const whiteList = ['/login', '/privacyPolicy', '/userAgreement', '/register', '/recruit/personal/advertisement/introduce']
|
|
@@ -38,8 +39,9 @@ const footerWhiteList = [
|
|
'/recruit/personal/resume/analysis',
|
|
'/recruit/personal/resume/analysis',
|
|
'/mall/pointExchange/records'
|
|
'/mall/pointExchange/records'
|
|
]
|
|
]
|
|
|
|
+const route = useRoute()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
-
|
|
|
|
|
|
+const user = useUserStore()
|
|
const sharedState = useSharedState()
|
|
const sharedState = useSharedState()
|
|
|
|
|
|
const layoutClick = () => {
|
|
const layoutClick = () => {
|
|
@@ -49,6 +51,15 @@ const layoutClick = () => {
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
await useMallStore().getMallDiyTemplate()
|
|
await useMallStore().getMallDiyTemplate()
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+watch(
|
|
|
|
+ () => route.matched,
|
|
|
|
+ async () => {
|
|
|
|
+ await user.getUserAccountInfo()
|
|
|
|
+ },
|
|
|
|
+ { immediate: true },
|
|
|
|
+ { deep: true }
|
|
|
|
+)
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|