refactor(navbar): 优化企业项点击处理逻辑并引入初始化方法
This commit is contained in:
@ -59,6 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div v-for="(item, index) in enterprises" :key="index">
|
<div v-for="(item, index) in enterprises" :key="index">
|
||||||
|
<!--非申请企业信息-->
|
||||||
<MenuItem
|
<MenuItem
|
||||||
class="rounded-8px hover:bg-#F2F3F5"
|
class="rounded-8px hover:bg-#F2F3F5"
|
||||||
@click="onEnterpriseItemClick(item)"
|
@click="onEnterpriseItemClick(item)"
|
||||||
@ -149,6 +150,7 @@ import { useEnterpriseStore } from '@/stores/modules/enterprise';
|
|||||||
import { useSidebarStore } from '@/stores/modules/side-bar';
|
import { useSidebarStore } from '@/stores/modules/side-bar';
|
||||||
import { useUserStore } from '@/stores';
|
import { useUserStore } from '@/stores';
|
||||||
import { handleUserHome } from '@/utils/user';
|
import { handleUserHome } from '@/utils/user';
|
||||||
|
import { initApp } from '@/utils/user';
|
||||||
|
|
||||||
import ExitAccountModal from '../exit-account-modal';
|
import ExitAccountModal from '../exit-account-modal';
|
||||||
import DownloadCenterModal from '../task-center-modal';
|
import DownloadCenterModal from '../task-center-modal';
|
||||||
@ -197,7 +199,11 @@ const openDownloadCenter = () => {
|
|||||||
};
|
};
|
||||||
const onEnterpriseItemClick = async (item) => {
|
const onEnterpriseItemClick = async (item) => {
|
||||||
enterpriseStore.setEnterpriseInfo(item);
|
enterpriseStore.setEnterpriseInfo(item);
|
||||||
window.location.reload();
|
|
||||||
|
if (route.name === 'Trial') {
|
||||||
|
router.push({ name: 'Home' });
|
||||||
|
}
|
||||||
|
initApp();
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickExit = async () => {
|
const clickExit = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user