From 79088d0902622f570139a60840aaafa95a641927 Mon Sep 17 00:00:00 2001 From: chenlimao Date: Thu, 14 May 2026 15:20:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=88=86=E4=BA=AB=E5=9B=BE?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E9=9D=B6=E7=BA=B8=E5=B0=BA=E5=AF=B8=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/battle-room.vue | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/pages/battle-room.vue b/src/pages/battle-room.vue index 03de5dd..36f0b1c 100644 --- a/src/pages/battle-room.vue +++ b/src/pages/battle-room.vue @@ -263,19 +263,18 @@ const shareTitle = computed(() => { }); /** - * 根据对战类型动态返回分享封面图路径 - * battleType === 2(多人乱斗)→ melee_share.jpg - * 其余(好友约战 / 组队对战)→ contest_share.jpg + * 根据对战类型和靶纸尺寸动态返回分享封面图路径,共 4 张图: + * contest_share_20.jpg — 约战/对抗赛 + 20cm 靶 + * contest_share_40.jpg — 约战/对抗赛 + 40cm 靶 + * melee_share_20.jpg — 多人乱斗 + 20cm 靶 + * melee_share_40.jpg — 多人乱斗 + 40cm 靶 * - * 网络图片: - * https://static.shelingxingqiu.com/shootmini/static/share/melee_share.jpg - * https://static.shelingxingqiu.com/shootmini/static/share/contest_share.jpg + * 当 targetSize 未知时默认取 20cm 图。 */ const shareImage = computed(() => { - if (room.value.battleType === 2) { - return 'https://static.shelingxingqiu.com/shootmini/static/share/melee_share.jpg'; - } - return 'https://static.shelingxingqiu.com/shootmini/static/share/contest_share.jpg'; + const type = room.value.battleType === 2 ? 'melee' : 'contest'; + const size = targetSize.value === 40 ? '40' : '20'; + return `https://static.shelingxingqiu.com/shootmini/static/share/${type}_share_${size}.jpg`; }); onShareAppMessage(() => {