diff --git a/src/api/models/forum.ts b/src/api/models/forum.ts index 3bf7373..b1184ee 100644 --- a/src/api/models/forum.ts +++ b/src/api/models/forum.ts @@ -85,16 +85,18 @@ export interface ForumTopicBaseModel { isLocked?: boolean // Assuming the default value is handled elsewhere isPinned?: boolean // Assuming the default value is handled elsewhere isHighlighted?: boolean // Assuming the default value is handled elsewhere + isDeleted?: boolean // Assuming the default value is handled elsewhere } export interface ForumTopicModel extends ForumTopicBaseModel { isLocked?: boolean // Assuming the default value is handled elsewhere - isDeleted?: boolean // Assuming the default value is handled elsewhere isHidden?: boolean // Assuming the default value is handled elsewhere type?: ForumTopicTypes // Assuming the default value is handled elsewhere extraTypeId?: number | null // Nullable int in C# is optional or null in TS likedBy?: number[] // Assuming the default value is handled elsewhere + + isAdmin: boolean } export interface ForumCommentModel { id: number @@ -105,6 +107,8 @@ export interface ForumCommentModel { likeCount: number isLiked: boolean + + isDeleted: boolean } export interface ForumReplyModel { id: number diff --git a/src/api/user.ts b/src/api/user.ts index 28aa203..74b7e1c 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -2,7 +2,7 @@ import { QueryGetAPI } from '@/api/query' import { USER_API_URL, apiFail } from '@/data/constants' import { ref } from 'vue' import { useRoute } from 'vue-router' -import { APIRoot, UserInfo } from './api-models' +import { APIRoot, UserBasicInfo, UserInfo } from './api-models' export const USERS = ref<{ [id: string]: UserInfo }>({}) @@ -38,6 +38,10 @@ export async function useUserWithUId(id: number) { } return USERS.value[id.toString()] } +export async function getUserBasicInfo(id: string | number | undefined) { + if (!id) return undefined + return (await QueryGetAPI(`${USER_API_URL}basic/${id}`)).data +} export async function GetInfo(id: string): Promise> { return QueryGetAPI(`${USER_API_URL}info`, { diff --git a/src/components/LiveInfoContainer.vue b/src/components/LiveInfoContainer.vue index cb1b101..bee23a0 100644 --- a/src/components/LiveInfoContainer.vue +++ b/src/components/LiveInfoContainer.vue @@ -30,6 +30,7 @@ function OnClickCover() { params: { id: live.liveId }, }) } +const guartPriceStartData = new Date(Date.UTC(2024, 2, 24, 10, 0, 0)) watch( () => live, @@ -119,7 +120,7 @@ watch(
@@ -239,12 +316,34 @@ onMounted(async () => { 发送评论 - + + + +
+ - - + + +
+ + +