From a41a29d5810b9c85df0fb2ff8df43a3b67be5eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=BB=E5=8B=87=E7=A5=A5?= <237899745@qq.com> Date: Fri, 14 Nov 2025 20:59:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=86=E4=BA=AB=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E6=98=BE=E7=A4=BA=E5=88=B0=E6=9C=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: - 分享列表中显示的到期时间正确 - 但点进分享详情页时,到期时间只显示"永久有效" 原因: - /api/share/:code/verify 接口返回的 share 对象中缺少 expires_at 字段 - 前端 shareInfo.expires_at 为 undefined,导致始终显示"永久有效" 修复: - 在 server.js:1650 添加 expires_at 到响应数据中 - 现在分享详情页能正确显示到期时间 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/server.js b/backend/server.js index 1fc94af..9954903 100644 --- a/backend/server.js +++ b/backend/server.js @@ -1646,7 +1646,8 @@ app.post('/api/share/:code/verify', shareRateLimitMiddleware, async (req, res) = share_path: share.share_path, share_type: share.share_type, username: share.username, - created_at: share.created_at + created_at: share.created_at, + expires_at: share.expires_at // 添加到期时间 } };