From c9fee634584e1513a7ca1917a16a64a1808c7501 Mon Sep 17 00:00:00 2001 From: PeterAlbus Date: Tue, 29 Mar 2022 15:16:43 +0800 Subject: [PATCH] fix some bug --- src/components/Comment.vue | 166 +++++++++++++++++++----- src/views/About.vue | 259 ++++++++++++++++++++++++++++++------- src/views/Blog.vue | 8 +- src/views/EditBlog.vue | 2 +- 4 files changed, 346 insertions(+), 89 deletions(-) diff --git a/src/components/Comment.vue b/src/components/Comment.vue index 1057734..af00078 100644 --- a/src/components/Comment.vue +++ b/src/components/Comment.vue @@ -9,7 +9,7 @@ type="textarea" placeholder="请友善交流,文明用语" /> -
+
匿名 发布
- -
+ +
- {{item.userUsername}}{{ userIdentity(item.userIdentity) }} + {{item.userUsername}} + {{ userIdentity(item.userIdentity) }}
{{item.commentContent}}
- +
{{item.gmtCreate}}
+
{{item.index+1}}楼
+
回复
+
+ 删除 +
-
-
-
{{ i.userUsername }} {{i.commentContent}}
-
- + +
+
+
{{ i.userUsername }} {{i.commentContent}}
+
+
回复
+
+ 删除 +
+
-
+ + +
+
+ +
@@ -52,7 +73,7 @@ type="textarea" placeholder="请友善交流,文明用语" /> -
+
匿名 + + diff --git a/src/views/Blog.vue b/src/views/Blog.vue index 5055f8c..6cc054c 100644 --- a/src/views/Blog.vue +++ b/src/views/Blog.vue @@ -35,7 +35,7 @@
- +

分享本页面

@@ -90,8 +90,6 @@ let blog=ref({ isTop:1 }) -let blogId:string='-1' - const getBlog=()=>{ if(blog.value.blogId!==undefined) { @@ -158,10 +156,6 @@ const getFriendLinkList=function () { } onMounted(()=>{ - if(route.query.id!=null) - { - blogId=route.query.id.toString() - } getBlog() getFriendLinkList() }) diff --git a/src/views/EditBlog.vue b/src/views/EditBlog.vue index cedb76f..63b8a96 100644 --- a/src/views/EditBlog.vue +++ b/src/views/EditBlog.vue @@ -197,7 +197,7 @@ const onSubmit= async (formEl: FormInstance | undefined) => { else { ElMessage.success('发布成功'); - router.push('/blog?id='+blog.value.blogId) + router.push('/') } }) }