🐛 修复部分角色生日数据缺失

This commit is contained in:
目棃
2024-04-11 00:58:41 +08:00
parent 98541e1b49
commit d9cdea9670
3 changed files with 38 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ type RawData = {
// 路由
const router = useRouter();
const gid = <string>useRoute().params.gid;
let type = <string | undefined>useRoute().params.type;
// loading
const loading = ref<boolean>(true);
const loadingTitle = ref<string>("正在加载");
@@ -120,6 +120,9 @@ const rawData = ref<RawData>({
onMounted(async () => {
await TGLogger.Info(`[News][${gid}][onMounted] 打开咨讯页面`);
const typeList = ["notice", "activity", "news"];
if (type != undefined) {
appStore.recentNewsType = type;
}
const curType = appStore.recentNewsType;
if (typeList.includes(curType)) {
tab.value = <NewsKey>curType;