From 4fdeaf287bcd6026d17507c957eafa74803efbd8 Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Sun, 16 Feb 2025 23:16:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=9A=E5=AE=A2=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tonecn/src/views/Blog.vue | 10 ++++++---- tonecn/src/views/BlogContent.vue | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tonecn/src/views/Blog.vue b/tonecn/src/views/Blog.vue index 4ea43d1..2daacfa 100644 --- a/tonecn/src/views/Blog.vue +++ b/tonecn/src/views/Blog.vue @@ -8,7 +8,7 @@ const blogList: any[] = reactive([]); onMounted(async () => { try { - const blogListRes:BaseResponseData = await request.get('/blogList'); + const blogListRes: BaseResponseData = await request.get('/blogList'); if (blogListRes.code == 0) { blogList.push(...blogListRes.data); loadStatus.value = 1; @@ -29,12 +29,14 @@ onMounted(async () => {
加载中,请稍后...
- + {{ item.title }} - 受密码保护 + 受密码保护
{{ item.description }}
-
{{ timestampToString(+item.publish_time) }} · +
{{ new Date(item.created_at).toLocaleString() }} · {{ formateTimes(item.visit_count) }} 次访问
diff --git a/tonecn/src/views/BlogContent.vue b/tonecn/src/views/BlogContent.vue index 4e446f6..efba115 100644 --- a/tonecn/src/views/BlogContent.vue +++ b/tonecn/src/views/BlogContent.vue @@ -12,7 +12,7 @@ import BlogComment from '@/components/Blog/BlogComment.vue'; type BlogInfo = { visit_count: number, title: string, - publish_time: string, + created_at: string, like_count: number, description: string } @@ -23,7 +23,7 @@ const blogContent = ref(''); const blogInfo: Ref = ref({ visit_count: 0, title: '', - publish_time: '', + created_at: '', like_count: 0, description: '' }); @@ -93,7 +93,7 @@ onUnmounted(() => {

{{ blogInfo.title }}

发布于 {{ - timestampToString(blogInfo.publish_time) }} | {{ blogInfo.like_count }} 点赞

+ new Date(blogInfo.created_at).toLocaleString() }} | {{ blogInfo.like_count }} 点赞