fix:登录判断优化
This commit is contained in:
@@ -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?.();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user