搜索结果列表页面开发
This commit is contained in:
40
src/views/Homepage/index.vue
Normal file
40
src/views/Homepage/index.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<!-- 用户主页 -->
|
||||
<UserLayout v-if="globalStore.namespaceType === 0 && username">
|
||||
<template #content>
|
||||
<UserMobilePage v-if="isPhone()" />
|
||||
<UserPage v-else/>
|
||||
<!-- <RouterView /> -->
|
||||
<!-- <micro-app name="user-center" :url="url" iframe baseroute="/"></micro-app> -->
|
||||
</template>
|
||||
</UserLayout>
|
||||
<!-- 组织主页 -->
|
||||
<OrgLayout v-if="globalStore.namespaceType === 1 && orgStore.orgInfo.id">
|
||||
<template #content>
|
||||
<OrgMobilePage v-if="isPhone()" />
|
||||
<OrgPage v-else />
|
||||
</template>
|
||||
</OrgLayout>
|
||||
</template>
|
||||
|
||||
<!-- 用户主页 or 组织首页 -->
|
||||
<script setup lang="ts">
|
||||
import isPhone from '@/utils/isPhone';
|
||||
import UserLayout from '@/layouts/UserLayout/index.vue';
|
||||
import UserPage from '../User/index.vue';
|
||||
import UserMobilePage from '@/views/Mobile/User/index.vue';
|
||||
import OrgLayout from '@/layouts/OrgLayout/index.vue';
|
||||
import OrgPage from '@/views/Org/index.vue';
|
||||
import OrgMobilePage from '@/views/Mobile/Org/index.vue';
|
||||
import { useGlobalInfoStore } from '@/stores/Global';
|
||||
import { orgInfoStore } from '@/stores/Org/index';
|
||||
import { otherAccountStore } from '@/stores/user';
|
||||
import { watch, computed } from 'vue';
|
||||
|
||||
const globalStore = useGlobalInfoStore();
|
||||
const orgStore = orgInfoStore();
|
||||
const otherStore = otherAccountStore();
|
||||
const username = computed(() => { // 切换用户主页和组织主页时,刷新渲染
|
||||
return otherStore.accountInfo.username || 'unknown';
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user