From 36b4880b267458a646fdedaef0fa873047ed4ac3 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 1 Apr 2025 17:29:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E7=BC=BA=E9=99=B7=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E5=AE=A2=E6=9C=8D=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86=E4=B8=AD=EF=BC=8C=E4=B8=8D=E7=AE=A1=E5=85=88?= =?UTF-8?q?=E7=82=B9=E8=A1=A8=E6=83=85=E8=BF=98=E6=98=AF=EF=BC=8B=E5=8F=B7?= =?UTF-8?q?~=E5=BC=B9=E8=B5=B7=E5=90=8E=EF=BC=8C=E8=A1=A8=E6=83=85?= =?UTF-8?q?=E5=92=8C=EF=BC=8B=E5=88=87=E6=8D=A2=EF=BC=8C=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=81=8F=E7=A7=BB=E4=BA=86=E6=89=BE=E4=B8=8D=E5=88=B0=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/index.vue | 16 ++++++++++++---- sheep/util/index.js | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pages/chat/index.vue b/pages/chat/index.vue index 6aaceb25..5447b437 100644 --- a/pages/chat/index.vue +++ b/pages/chat/index.vue @@ -104,13 +104,21 @@ return; } - if (!chat.toolsMode || chat.toolsMode === mode) { - chat.showTools = !chat.showTools; + // 第二次点击关闭 + if (chat.showTools && chat.toolsMode === mode){ + handleToolsClose(); + return; } - chat.toolsMode = mode; - if (!chat.showTools) { + // 切换工具栏 + if (chat.showTools && chat.toolsMode !== mode) { + chat.showTools = false; chat.toolsMode = ''; } + // 延迟打开等一下过度效果 + setTimeout(()=>{ + chat.toolsMode = mode; + chat.showTools = true; + }, 200) } function onShowSelect(mode) { diff --git a/sheep/util/index.js b/sheep/util/index.js index 7f5ba28e..ae3a56e5 100644 --- a/sheep/util/index.js +++ b/sheep/util/index.js @@ -147,7 +147,7 @@ export function jsonParse(str) { try { return JSON.parse(str); } catch (e) { - console.error(`str[${str}] 不是一个 JSON 字符串`); - return ''; + console.warn(`str[${str}] 不是一个 JSON 字符串`); + return str; } } From 336e0efb8de21b36defa092f6a89feffe0605723 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 1 Apr 2025 17:56:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E7=BC=BA=E9=99=B7=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E6=8B=BC=E5=9B=A2=E9=82=80?= =?UTF-8?q?=E8=AF=B7=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../s-share-modal/canvas-poster/poster/groupon.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sheep/components/s-share-modal/canvas-poster/poster/groupon.js b/sheep/components/s-share-modal/canvas-poster/poster/groupon.js index 4b33c8ca..8eb7bfa9 100644 --- a/sheep/components/s-share-modal/canvas-poster/poster/groupon.js +++ b/sheep/components/s-share-modal/canvas-poster/poster/groupon.js @@ -96,8 +96,8 @@ const groupon = async (poster) => { text: poster.shareInfo.link, css: { position: 'fixed', - left: width * 0.5, - top: width * 1.3, + left: width * 0.75, + top: width * 1.4, width: width * 0.2, height: width * 0.2, }, @@ -110,7 +110,7 @@ const groupon = async (poster) => { css: { position: 'fixed', left: width * 0.75, - top: width * 1.3, + top: width * 1.4, width: width * 0.2, height: width * 0.2, },