From 5c3769019e6d95ee37eb272c335c63da485f46d3 Mon Sep 17 00:00:00 2001 From: YiLin <482244139@qq.com> Date: Thu, 6 Aug 2026 17:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Chat/Chat.vue | 2 +- pages/WorkSpace/WorkSpace.vue | 7 ++++- unpackage/dist/dev/app-plus/app-service.js | 30 ++++++++++++---------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/pages/Chat/Chat.vue b/pages/Chat/Chat.vue index 196557b..3be88c3 100644 --- a/pages/Chat/Chat.vue +++ b/pages/Chat/Chat.vue @@ -1694,7 +1694,7 @@ import { openFile as openFileNative, downloadAndOpen } from '@/utils/fileOpener. const aiPageNumber = ref(0) // AI 会话当前服务端页码(0-based) const hasMoreAIMessages = ref(true) // AI 会话是否还有更多消息可加载 const currentPage = ref(1) // 当前页码(如果后端支持分页) - const pageSize = 20; + const pageSize = 100; // 好友消息分页 const isFriendLoadingMore = ref(false) // 好友会话是否正在加载更多 diff --git a/pages/WorkSpace/WorkSpace.vue b/pages/WorkSpace/WorkSpace.vue index f93d98a..9699645 100644 --- a/pages/WorkSpace/WorkSpace.vue +++ b/pages/WorkSpace/WorkSpace.vue @@ -336,8 +336,13 @@ import { if (isSelectFolder.value) return; const isWyxd = folder.name && folder.name.toLowerCase().endsWith('.wyxd'); const itemList = isWyxd ? ['下载', '删除', 'WYXD查看器', 'AI修改'] : ['下载', '删除']; + // 截断过长文件名,避免撑开弹窗遮挡操作按钮 + const maxTitleLen = 40; + const title = folder.name && folder.name.length > maxTitleLen + ? folder.name.substring(0, maxTitleLen) + '...' + : folder.name; uni.showActionSheet({ - title: folder.name, + title: title, itemList: itemList, success: (res) => { if (isWyxd) { diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js index 845cd5f..ddaec89 100644 --- a/unpackage/dist/dev/app-plus/app-service.js +++ b/unpackage/dist/dev/app-plus/app-service.js @@ -5800,7 +5800,7 @@ This will fail in production.`); } }); } - const pageSize$1 = 20; + const pageSize$1 = 100; const groupSize = 100; const _sfc_main$a = { __name: "Chat", @@ -8351,8 +8351,10 @@ This will fail in production.`); return; const isWyxd = folder.name && folder.name.toLowerCase().endsWith(".wyxd"); const itemList = isWyxd ? ["下载", "删除", "WYXD查看器", "AI修改"] : ["下载", "删除"]; + const maxTitleLen = 40; + const title = folder.name && folder.name.length > maxTitleLen ? folder.name.substring(0, maxTitleLen) + "..." : folder.name; uni.showActionSheet({ - title: folder.name, + title, itemList, success: (res) => { if (isWyxd) { @@ -8410,7 +8412,7 @@ This will fail in production.`); initCurrentFolderList(); } catch (error) { uni.hideLoading(); - formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:404", "重命名失败:", error); + formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:409", "重命名失败:", error); uni.showToast({ title: typeof error === "string" ? error : "重命名失败,请重试", icon: "error" @@ -8471,7 +8473,7 @@ This will fail in production.`); }, fail: (err) => { uni.hideLoading(); - formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:479", "下载文件失败:", err); + formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:484", "下载文件失败:", err); uni.showToast({ title: "下载失败,请重试", icon: "error" @@ -8480,7 +8482,7 @@ This will fail in production.`); }); } catch (error) { uni.hideLoading(); - formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:488", "获取下载链接失败:", error); + formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:493", "获取下载链接失败:", error); uni.showToast({ title: "获取下载链接失败,请重试", icon: "error" @@ -8549,10 +8551,10 @@ This will fail in production.`); const formatDownloadTime = formatTime; const openWyxdViewer = (folder) => { const filePath = folder.path.startsWith("./") ? folder.path.slice(2) : folder.path; - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:602", "解析文件路径:", filePath); - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:603", "folder", folder); - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:604", "encode", encodeURIComponent(filePath)); - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:605", "encode", encodeURIComponent(folder.name)); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:607", "解析文件路径:", filePath); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:608", "folder", folder); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:609", "encode", encodeURIComponent(filePath)); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:610", "encode", encodeURIComponent(folder.name)); uni.navigateTo({ url: "/pages/WYXD/WYXD?workspaceId=" + encodeURIComponent(workspaceId.value) + "&filePath=" + encodeURIComponent(filePath) + "&fileName=" + encodeURIComponent(folder.name) + "&userToken=" + encodeURIComponent(UserToken.value) }); @@ -8571,7 +8573,7 @@ This will fail in production.`); if (res.confirm) { try { const filePath = `./${folder.path}`; - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:635", "删除的是:", filePath); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:640", "删除的是:", filePath); await daleteWorkspace(UserToken.value, workspaceId.value, filePath); uni.showToast({ title: "删除成功", @@ -8579,7 +8581,7 @@ This will fail in production.`); }); initCurrentFolderList(); } catch (error) { - formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:643", "删除失败:", error); + formatAppLog("error", "at pages/WorkSpace/WorkSpace.vue:648", "删除失败:", error); uni.showToast({ title: "删除失败,请重试", icon: "error" @@ -8647,7 +8649,7 @@ This will fail in production.`); const currentFolderList = vue.ref([]); const getCurrentFolderList = () => { var _a, _b; - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:724", "当前路径为:", JSON.stringify(folderStack.value)); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:729", "当前路径为:", JSON.stringify(folderStack.value)); const currentPath = folderStack.value.length > 0 ? folderStack.value[folderStack.value.length - 1].path : "."; if (currentPath === ".") { return ((_a = allFoldersData.value) == null ? void 0 : _a.children) || []; @@ -8671,7 +8673,7 @@ This will fail in production.`); const initCurrentFolderList = async () => { workspaceId.value = getWorkspaceId(); UserToken.value = getToken(); - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:751", "getWorkspaceId:", workspaceId.value); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:756", "getWorkspaceId:", workspaceId.value); allFoldersData.value = await getWorkspaceList(UserToken.value, workspaceId.value); currentFolderList.value = getCurrentFolderList(); }; @@ -8718,7 +8720,7 @@ This will fail in production.`); uni.navigateBack({ delta: 1, fail() { - formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:811", "返回失败,进入兜底跳转"); + formatAppLog("log", "at pages/WorkSpace/WorkSpace.vue:816", "返回失败,进入兜底跳转"); uni.reLaunch({ url: "/pages/Chat/Chat" });