From 9f2369dcee465fca989ed683c2298fdba2acfe47 Mon Sep 17 00:00:00 2001
From: DebugIsFalse <511418503@qq.com>
Date: Fri, 31 May 2024 00:18:13 +0800
Subject: [PATCH] =?UTF-8?q?feature:=20=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/i/library/thread.vue | 5 ++++-
composables/useCollectionRequest.js | 10 +++++-----
pages/library/[id].vue | 23 ++++++++++++++++++-----
3 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/components/i/library/thread.vue b/components/i/library/thread.vue
index b0a4735..74aa528 100644
--- a/components/i/library/thread.vue
+++ b/components/i/library/thread.vue
@@ -13,7 +13,7 @@
- 52 分钟前
+ {{formatTime}}
@@ -50,4 +50,7 @@ const props = defineProps({
function handleOpenSelect (id) {
$openLibrarySelect(id)
}
+const formatTime = computed(() => {
+ return useTime(props.item.create_time)
+})
\ No newline at end of file
diff --git a/composables/useCollectionRequest.js b/composables/useCollectionRequest.js
index a4e81a6..0558317 100644
--- a/composables/useCollectionRequest.js
+++ b/composables/useCollectionRequest.js
@@ -43,11 +43,11 @@ export default () => {
}
// 查询收藏夹会话列表
const findCollection = async (collection_id) => {
- const {data, error} = await useRequest(`/v1/collection/${collection_id}/items`, {
- method: 'post',
- body
- })
- return { data, error }
+ const {data, error} = await useRequest(`/v1/collection/${collection_id}/items`, { method: 'get' })
+ if (error.value) {
+ return []
+ }
+ return data.value.data || []
}
// 删除收藏夹会话
const deleteCollectionRecord = async (collection_id, c_id) => {
diff --git a/pages/library/[id].vue b/pages/library/[id].vue
index b4d4b90..31ff5eb 100644
--- a/pages/library/[id].vue
+++ b/pages/library/[id].vue
@@ -5,11 +5,11 @@
@@ -18,7 +18,20 @@
\ No newline at end of file
--
GitLab