From 60ed9daa674794e7b999683cbbba13a18620c470 Mon Sep 17 00:00:00 2001 From: Hacker-00001 <335942189@qq.com> Date: Mon, 2 Jun 2025 16:49:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E7=94=A8=E6=88=B7=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E5=B8=96=E5=AD=90=E7=9A=84=E5=B1=95=E7=A4=BA=E5=92=8C?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E9=A1=B5=E7=9A=84=E5=B1=95=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E9=A6=96=E9=A1=B5=E7=9A=84=E5=B8=96=E5=AD=90=E6=9C=AA?= =?UTF-8?q?=E8=83=BD=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-local.yaml | 58 ++++++++-------- .../vue-frontend/src/stores/postdetail.js | 8 +-- .../vue-frontend/src/views/PostDetail.vue | 69 +++++++++++-------- .../vue-frontend/src/views/PostPublish.vue | 3 +- .../vue-frontend/src/views/UserPage.vue | 10 +-- 5 files changed, 79 insertions(+), 69 deletions(-) diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml index 8f563c9..0822dbe 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml @@ -1,36 +1,36 @@ -##本地开发环境 -lj: - db: - host: 192.168.59.129 - password: Forely123! - redis: - host: 192.168.59.129 - port: 6379 - password: Forely123! - rabbitmq: - host: 192.168.59.129 - port: 5672 - username: admin - password: Forely123! - minio: - endpoint: http://192.168.59.129:9000 - accessKey: forely - secretKey: Forely123! - +###本地开发环境 #lj: # db: -# host: 192.168.125.128 -# password: MySQL@5678 +# host: 192.168.59.129 +# password: Forely123! # redis: -# host: 192.168.125.128 +# host: 192.168.59.129 # port: 6379 -# password: Redis@9012 +# password: Forely123! # rabbitmq: -# host: 192.168.125.128 +# host: 192.168.59.129 # port: 5672 -# username: rabbit_admin -# password: Rabbit@3456 +# username: admin +# password: Forely123! # minio: -# endpoint: http://192.168.125.128:9000 -# accessKey: minio_admin -# secretKey: Minio@1234 +# endpoint: http://192.168.59.129:9000 +# accessKey: forely +# secretKey: Forely123! + +lj: + db: + host: 192.168.125.128 + password: MySQL@5678 + redis: + host: 192.168.125.128 + port: 6379 + password: Redis@9012 + rabbitmq: + host: 192.168.125.128 + port: 5672 + username: rabbit_admin + password: Rabbit@3456 + minio: + endpoint: http://192.168.125.128:9000 + accessKey: minio_admin + secretKey: Minio@1234 diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js index 9d19565..9501afc 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/stores/postdetail.js @@ -8,7 +8,7 @@ export const usePostDetailStore = defineStore("postDetail", { comments: [], // 评论列表 userInfo: null, // 用户信息 isLike: false, // 是否点赞 - lastVal: 0, // 用于滚动分页的时间戳 + lastVal: Date.now(), // 用于滚动分页的时间戳 offset: 0, // 偏移量 size: 5, // 每页评论数 detailLoading: false, // 加载状态 @@ -104,14 +104,12 @@ export const usePostDetailStore = defineStore("postDetail", { commentObj.repliesLoading = false; } }, + async fetchPostDetail(postId) { this.detailLoading = true; try { // 获取帖子详情 - const RequestPostDetailData = { - id: postId, - }; - const postRes = await request.get('/post/detail/', RequestPostDetailData); + const postRes = await request.get('/post/detail', { params: { id: postId } }); if (postRes.code === 200 && postRes.data) { const { id, diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue index 86b5f46..e7580f3 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/views/PostDetail.vue @@ -1,11 +1,11 @@