fix:登录判断优化

This commit is contained in:
Gsh
2025-06-30 16:02:39 +08:00
parent 3d22a2ef65
commit 6aefcdbed8
6 changed files with 31 additions and 11 deletions

View File

@@ -3,8 +3,10 @@
import type { GetSessionListVO } from '@/api/model/types';
import Popover from '@/components/Popover/index.vue';
import SvgIcon from '@/components/SvgIcon/index.vue';
import { useUserStore } from '@/stores';
import { useModelStore } from '@/stores/modules/model';
const userStore = useUserStore();
const modelStore = useModelStore();
onMounted(async () => {
@@ -40,9 +42,14 @@ async function showPopover() {
// 获取最新的模型列表
await modelStore.requestModelList();
}
// 用户角色
// const isUserRoleVip = computed(() => {
// const roles = userStore.userInfo?.roles ?? [];
// return roles.some(role => role.roleCode === 'YiXinAi-Vip');
// });
// 点击
function handleClick(item: GetSessionListVO) {
console.log('handleClick--', item);
modelStore.setCurrentModelInfo(item);
popoverRef.value?.hide?.();
}