mod: time

This commit is contained in:
KUN1007 2023-08-27 14:45:48 +08:00
parent 602db0fc1e
commit 3bb85916bc
7 changed files with 47 additions and 91 deletions

View file

@ -1,7 +1,7 @@
export interface CreateTopicRequestData {
title: string
content: string
time: string
time: number
tags: string
category: string
uid: string
@ -15,7 +15,7 @@ export interface KUNGalgameTopic {
// tags: Array<string>
// category: Array<string>
// rid: Array<number>
// time: string
// time: number
// popularity: number
// upvotes: number
// views: number

View file

@ -13,7 +13,7 @@ export interface HotTopic {
export interface NewTopic {
tid: number
title: string
time: string
time: number
}
export interface HomeTopicRequestData {
@ -32,7 +32,7 @@ export interface HomeTopic {
likes: number
replies: number
comments: number
time: string
time: number
content: string
upvotes: number
tags: Array<string>

View file

@ -1,91 +1,44 @@
// 发帖人,评论人的数据接口
export interface KUNGalgameAuthor {
// 头像
avatar: string
// 名字
// 话题主,回复主的信息
export interface UserInfo {
uid: number
name: string
// 萌萌点
moemoePoints: number
avatar: string
moemoepoint: number
}
// 话题评论接口
export interface KUNGalgameTopicComment {
// 评论 ID
commentId: number
// 评论者的头像
commenterAvatar: string
// 评论者的名字
commenterName: string
// 评论给谁
commentedTo: string
// 评论的点赞数
commentUpvotes: number
// 评论的踩
commentDislikes: number
// 评论的内容
commentContent: string
// 被回复的用户信息
export interface ToUserInfo {
uid: number
name: string
}
// 话题回复接口
export interface KUNGalgameTopicReply {
// 回复的 ID
replyId: number
// 回复者的个人信息
replier: KUNGalgameAuthor
// 回复给谁
repliedTo: string
// 是否重新编辑
isEdited: boolean
// 重新编辑的时间戳
editedTimestamp: number
// 回复的时间戳
replyTime: number
// 回复内容
replyContent: string
// 回复的被推数
replyUpvotes: number
// 回复的点赞数
replyLikes: number
// 回复的点踩数
replyDislikes: number
// 回复的评论
replyComments: KUNGalgameTopicComment[]
// 回复的数量
replyCount: number
// 话题的返回数据
export interface TopicDetail {
tid: number
title: string
views: number
likes: number
dislikes: number
replies: number
time: number
content: string
upvotes: number
tags: string[]
edited: string
user: UserInfo
rid: number[]
}
// 单个话题信息接口
export interface KUNGalgameTopic {
// 话题 ID
topicId: number
// 话题标题
topicTitle: string
// 话题的楼层数
topicFloorCount: number
// 话题的内容
topicContent: string
// 话题的发布时间
topicPublishTime: number
// 话题的热度值
topicPopularity: number
// 话题的标签
topicTags: string[]
// 话题的被推数
topicUpvotes: number
// 话题的点击数
topicViews: number
// 话题的点赞数
topicLikes: number
// 话题的点踩数
topicDislikes: number
// 话题的回复数
topicReplyCount: 1
// 话题的分区
topicCategory: string[]
// 话题的状态
topicStatus: number
// 话题是否被重新编辑
topicIsEdited: false
// 话题的发布者
topicAuthor: KUNGalgameAuthor
// 回复的数据
export interface TopicReply {
rid: number
tid: number
r_user: UserInfo
to_user: ToUserInfo
edited: string
content: string
likes: number
dislikes: number
tags: string
cid: number[]
}

View file

@ -3,7 +3,7 @@ export interface KUNGalgameUpdateLog {
// 更新描述
description: string
// 更新发布时间
time: string
time: number
// 更新排序 ID
upid: number
// 更新版本

View file

@ -49,7 +49,7 @@ const plainText = getPlainText(props.data.content)
<div class="topic-post-date">
<span>{{
formatTimeDifference(
parseInt(props.data.time),
props.data.time,
settingsStore.showKUNGalgameLanguage.value
)
}}</span>

View file

@ -60,7 +60,7 @@ onMounted(async () => {
<Icon icon="svg-spinners:clock" />
<span>{{
formatTimeDifference(
parseInt(kun.time),
kun.time,
settingsStore.showKUNGalgameLanguage.value
)
}}</span>

View file

@ -6,13 +6,16 @@
页面被拆成 3 个大组件这是话题部分
-->
<script setup lang="ts">
import { onMounted } from 'vue'
import Master from './components/Master.vue'
import Reply from './components/Reply.vue'
onMounted(() => {})
</script>
<template>
<div class="content-right-part">
<Master />
<!-- <Reply /> -->
<Reply />
</div>
</template>
<style scoped>