From 62819bdc69eb0cb82206b60293e2787ca29ee520 Mon Sep 17 00:00:00 2001
From: Lansong <2095621390@qq.com>
Date: Sat, 13 Apr 2024 10:34:09 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E8=AF=84=E8=AE=BA?=
=?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=8A=9F=E8=83=BD,=E5=AE=9E=E7=8E=B0?=
=?UTF-8?q?=E5=8F=B3=E9=94=AE=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.md | 9 ++
src/components/navigation.vue | 1 +
src/store/index.ts | 3 +-
src/utils/consts.ts | 1 +
src/utils/request.ts | 1 -
src/utils/type.ts | 22 +++-
src/views/personal/drawer.vue | 11 +-
src/views/personal/fileOption.vue | 29 ++++--
src/views/personal/files.vue | 48 +++++----
src/views/personal/path.vue | 1 +
src/views/personal/personal.vue | 45 +++++---
src/views/personal/popup.vue | 32 +-----
src/views/personal/recycle-title.vue | 16 ++-
src/views/personal/recycle.vue | 5 +
src/views/personal/utils.ts | 86 ++--------------
src/views/posts/comment.vue | 147 +++++++++++++--------------
16 files changed, 221 insertions(+), 236 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e1568c5..4f9f2f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+
+## 2024-04-13
+
+### ✨ Features | 新功能
+
+* 实现评论回复功能
+
+* 实现右键部分功能
+
## 2024-04-11
### ✨ Features | 新功能
diff --git a/src/components/navigation.vue b/src/components/navigation.vue
index ef75b7b..3ca1858 100644
--- a/src/components/navigation.vue
+++ b/src/components/navigation.vue
@@ -82,6 +82,7 @@ const props = defineProps(['link'])
watch(() => props.link, (newVal) => {
if (newVal) {
fatherId.value = newVal
+ console.log("!!!")
router.push('/personal/' + newVal)
}
})
diff --git a/src/store/index.ts b/src/store/index.ts
index 413aa1e..a1dbb17 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -28,11 +28,10 @@ export const useStore = defineStore('user', {
spaceSize: "",
md5: "",
isDel: 0,
- zone: "",
- subZone: "",
description: "",
updateAt: "",
createAt: "",
+ isChoose: false,
}
}
},
diff --git a/src/utils/consts.ts b/src/utils/consts.ts
index b43f71e..4e916ea 100644
--- a/src/utils/consts.ts
+++ b/src/utils/consts.ts
@@ -120,6 +120,7 @@ export const GetSlidersUrl = "/system/getSliders"
export const GetCommentsUrl = "/comment/getComments"
export const CreateCommentUrl = "/comment/createComment"
+export const GetCommentBlocksUrl = "/comment/getCommentBlocks"
// ----------------------------------------Storage----------------------------------------------------------------------
export const StorageDoGetUser = "DoGetUser" // 是否获取过用户信息
diff --git a/src/utils/request.ts b/src/utils/request.ts
index c24da2b..5ca5d3f 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -68,7 +68,6 @@ service.interceptors.response.use(
endLoading()
const status = error.response.status
if (status === 401) {
- console.log("shuaxin")
if (localStorage.getItem(StorageAutoLogin) === "true") {//自动登录情况
const longToken = localStorage.getItem(StorageLongToken)
if (longToken) {
diff --git a/src/utils/type.ts b/src/utils/type.ts
index da834f5..663652f 100644
--- a/src/utils/type.ts
+++ b/src/utils/type.ts
@@ -121,20 +121,33 @@ export type SimpleUser = {
url: string,
}
export type Comment = {
- id: string,
+ commentId: string,
subjectId: string,
rootId: string,
fatherId: string,
count: number,
state: number,
attrs: number,
- tags: string[],
+ labels: string[],
author: SimpleUser,
atUserId: string,
content: string,
meta: string,
createTime: 0,
- like: 0
+ like: 0,
+ commentRelation: {
+ liked: boolean,
+ hated: boolean
+ }
+}
+
+export type CommentBlock = {
+ comment: Comment,
+ replyList: {
+ comments: Comment[],
+ total: number
+ token: string
+ }
}
// 文件信息
@@ -151,4 +164,5 @@ export type File = {
updateAt: string;
createAt: string;
isChoose: boolean;
-}
\ No newline at end of file
+}
+
diff --git a/src/views/personal/drawer.vue b/src/views/personal/drawer.vue
index 5e4fa62..6a02ecf 100644
--- a/src/views/personal/drawer.vue
+++ b/src/views/personal/drawer.vue
@@ -195,6 +195,8 @@ watch(selectType, (newVal) => {
}
else {
const pathList = (sessionStorage.getItem(StoragePathId) as string).split("/")
+ console.log(sessionStorage.getItem(StoragePathId) as string)
+ console.log(pathList)
router.push('/personal/' + pathList[pathList.length - 1])
emit('sendDrawerOptions', 'showFiles')
emit('sendDrawerSelectType', newVal)
@@ -205,6 +207,9 @@ watch(() => props.sendRequest, () => {
if (props.sendRequest.option === 'createFolder') {
isShowCreateFolder.value = true
}
+ else if(props.sendRequest.option === 'uploadFile') {
+ // uploadFiles($event)
+ }
})
const getSelectType = () => {
@@ -244,11 +249,10 @@ const createFolder = () => {
spaceSize: getFileSize(data.spaceSize),
md5: data.md5,
isDel: 0,
- zone: "",
- subZone: "",
description: "",
createAt: new Date().toLocaleString(),
updateAt: new Date().toLocaleString(),
+ isChoose: false,
}
isShowCreateFolder.value = false
// newFolderName.value = res.name
@@ -294,11 +298,10 @@ const uploadFiles = (event: any) => {
spaceSize: getFileSize(file.size),
md5,
isDel: 0,
- zone: "",
- subZone: "",
description: "",
createAt: new Date().toLocaleString(),
updateAt: new Date().toLocaleString(),
+ isChoose: false,
}
filesCount.value--
if (filesCount.value === 0) {
diff --git a/src/views/personal/fileOption.vue b/src/views/personal/fileOption.vue
index 4dcf9d6..e000348 100644
--- a/src/views/personal/fileOption.vue
+++ b/src/views/personal/fileOption.vue
@@ -1,22 +1,24 @@
-
新建文件夹
-
上传文件
-
上传文件夹
+
新建文件夹
+
上传文件
+
上传文件夹
全选
下载
移至回收站
-
彻底删除
+
彻底删除
-
刷新页面
+
刷新页面