From c507a40aad1b65ea98edcd198945b717753129da Mon Sep 17 00:00:00 2001 From: kron Date: Tue, 24 Jun 2025 13:18:03 +0800 Subject: [PATCH] =?UTF-8?q?UI=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 6 + src/components/AppFooter.vue | 2 +- src/components/BowData.vue | 2 + src/components/BowTarget.vue | 30 ++++- src/components/Guide.vue | 19 +-- src/components/Header.vue | 16 --- src/components/MeleeResult.vue | 9 +- src/components/PlayerScore.vue | 5 +- src/components/ScorePanel.vue | 16 ++- src/components/ScoreResult.vue | 6 +- src/components/ShootProgress.vue | 1 + src/components/Signin.vue | 2 +- src/components/TeamResult.vue | 18 +++ src/components/UserHeader.vue | 124 ++++++++++++++------ src/pages.json | 9 ++ src/pages/battle-result.vue | 57 +++++---- src/pages/be-vip.vue | 16 ++- src/pages/first-try.vue | 8 +- src/pages/index.vue | 33 ++---- src/pages/match-detail.vue | 28 +++-- src/pages/melee-bow-data.vue | 187 ++++++++++++++++++++++++++++++ src/pages/mine-bow-data.vue | 102 ++++++++++++++++ src/pages/my-growth.vue | 20 ++-- src/pages/rank-list.vue | 2 +- src/pages/ranking.vue | 23 +++- src/pages/team-bow-data.vue | 180 ++++++++++++++++++++++++++++ src/pages/team-match.vue | 6 +- src/static/long-bubble-middle.png | Bin 0 -> 2175 bytes src/static/user-icon.png | Bin 0 -> 981 bytes src/util.js | 16 +-- src/websocket.js | 4 +- 31 files changed, 780 insertions(+), 167 deletions(-) create mode 100644 src/pages/melee-bow-data.vue create mode 100644 src/pages/mine-bow-data.vue create mode 100644 src/pages/team-bow-data.vue create mode 100644 src/static/long-bubble-middle.png create mode 100644 src/static/user-icon.png diff --git a/src/App.vue b/src/App.vue index c9158ea..cfc3a90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -194,4 +194,10 @@ button::after { font-size: 14px; margin-bottom: 10px; } +.truncate { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: center; +} diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue index deddac7..7557b61 100644 --- a/src/components/AppFooter.vue +++ b/src/components/AppFooter.vue @@ -18,7 +18,7 @@ const tabs = [ ]; function handleTabClick(index) { - if (index !== 0 && !user.value.id) return props.signin(); + if (index === 1 && !user.value.id) return props.signin(); if (index === 0) { uni.navigateTo({ url: "/pages/be-vip", diff --git a/src/components/BowData.vue b/src/components/BowData.vue index 1b25aff..d8d15bd 100644 --- a/src/components/BowData.vue +++ b/src/components/BowData.vue @@ -52,6 +52,8 @@ const props = defineProps({ :rowCount="arrows.length === 12 ? 6 : 9" :total="arrows.length" :scores="arrows.map((a) => a.ring)" + :margin="arrows.length === 12 ? 4 : 1" + :fontSize="arrows.length === 12 ? 25 : 22" /> diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue index 7cea6de..33e8d50 100644 --- a/src/components/BowTarget.vue +++ b/src/components/BowTarget.vue @@ -1,6 +1,12 @@ @@ -141,9 +158,11 @@ function calcRealY(num) { width: calc(100% - 30px); padding: 15px; /* overflow: hidden; */ + position: relative; } .target { position: relative; + padding: 5px; } .e-value { position: absolute; @@ -166,7 +185,7 @@ function calcRealY(num) { z-index: 2; } .round-tip > text { - font-size: 18px; + font-size: 24px; margin-left: 5px; } .target > image:last-child { @@ -217,4 +236,11 @@ function calcRealY(num) { display: block; margin-top: 20px; } +.simul { + position: absolute; + bottom: 20px; + right: 20px; + color: #fff; + margin-left: 20px; +} diff --git a/src/components/Guide.vue b/src/components/Guide.vue index ac9eb93..88bb49b 100644 --- a/src/components/Guide.vue +++ b/src/components/Guide.vue @@ -1,14 +1,19 @@ @@ -97,6 +101,8 @@ const onPay = () => { } .header > view > text:last-child { margin-left: 10px; + width: 120px; + text-align: left; } .header > text:nth-child(2) { color: #fed847; diff --git a/src/pages/first-try.vue b/src/pages/first-try.vue index 9035666..1b90180 100644 --- a/src/pages/first-try.vue +++ b/src/pages/first-try.vue @@ -118,8 +118,12 @@ const onClose = () => { 6) + ? 1 + : 0 " > diff --git a/src/pages/index.vue b/src/pages/index.vue index 79dca27..a68f874 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -67,21 +67,19 @@ onMounted(async () => { console.error("获取配置失败:", error); } }); + +const comingSoon = () => { + uni.showToast({ + title: "敬请期待", + icon: "none", + }); +}; diff --git a/src/pages/rank-list.vue b/src/pages/rank-list.vue index 0aa10a9..1d0cc38 100644 --- a/src/pages/rank-list.vue +++ b/src/pages/rank-list.vue @@ -48,7 +48,7 @@ const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"]; {{ subTitles[selectedIndex] }} { + uni.navigateTo({ + url: "/pages/rank-list", + }); +}; @@ -160,6 +171,8 @@ const toMeleeMatchPage = (gameType, teamSize) => { border: 1px solid #54431d; border-radius: 10px; margin: 0 15px; +} +.ranking-my-data { margin-bottom: 15px; } .ranking-my-data { @@ -318,4 +331,12 @@ const toMeleeMatchPage = (gameType, teamSize) => { font-size: 13px; margin-left: 3px; } +.see-more { + color: #39a8ff; + font-size: 14px; + text-align: center; + width: 100%; + margin-top: 10px; + margin-bottom: 20px; +} diff --git a/src/pages/team-bow-data.vue b/src/pages/team-bow-data.vue new file mode 100644 index 0000000..a1cfed0 --- /dev/null +++ b/src/pages/team-bow-data.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/pages/team-match.vue b/src/pages/team-match.vue index 89a5b68..74ddf96 100644 --- a/src/pages/team-match.vue +++ b/src/pages/team-match.vue @@ -150,7 +150,7 @@ onUnmounted(() => { :redTeam="redTeam" :blueTeam="blueTeam" /> - + 请预先射几箭测试 @@ -159,7 +159,7 @@ onUnmounted(() => { - + { :redTeam="redTeam" /> % zV0B<@CoTrG9+jSJKnD&ZINE}$KkQ!wfy7Z*JB%C2`+MP;%zgIzdhiDZFtq>_}9DB#23(o4U}mw4H_X-tWHR2n#3(Cav*mRBWLWAWPShCRI5 z#w_8Yf76LbJi{&0BeIa#V`R0p5Lo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8 z@+jEqOkcl+OG#!gFvF0Uz5)(|X7&=j$7FJBe?$BO?F259kMp>k00000NkvXXu0mjf DtYFM< literal 0 HcmV?d00001 diff --git a/src/util.js b/src/util.js index 7641238..1e21d74 100644 --- a/src/util.js +++ b/src/util.js @@ -33,7 +33,7 @@ export function renderScores(ctx, arrows = []) { item.ring, 18, "#fed847", - 30 + (i % 9) * 30, + 29.5 + (i % 9) * 30, 310 + Math.ceil((i + 1) / 9) * 30, "center" ); @@ -171,22 +171,22 @@ export function generateCanvasImage(canvasId, type, user, data) { } else if (type == 3) { titleImage = "../static/practise-two-title.png"; } - ctx.drawImage(titleImage, (width - 160) / 2 - 5, 160, 160, 40); + ctx.drawImage(titleImage, (width - 160) / 2, 160, 160, 40); const subTitleWidth = ctx.measureText(subTitle).width; renderText( ctx, subTitle, 18, "#fff", - width / 2 - subTitleWidth - (type > 1 ? 15 : 13), + width / 2 - subTitleWidth - (type > 1 ? 15 : 9), 220 ); - renderText(ctx, "共", 14, "#fff", 124, 300); + renderText(ctx, "共", 14, "#fff", 122, 300); const totalRing = data.arrows.reduce((last, next) => last + next.ring, 0); - renderText(ctx, totalRing, 14, "#fed847", 150, 300, "center"); - renderText(ctx, "环", 14, "#fff", 163, 300); - renderLine(ctx, 80); - renderLine(ctx, 187); + renderText(ctx, totalRing, 14, "#fed847", 148, 300, "center"); + renderText(ctx, "环", 14, "#fff", 161, 300); + renderLine(ctx, 77); + renderLine(ctx, 185); renderScores(ctx, data.arrows); ctx.drawImage( "../static/device-icon.png", diff --git a/src/websocket.js b/src/websocket.js index d7d2afc..284d1fa 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -5,9 +5,9 @@ let reconnectTimer = null; // 重连配置 const RECONNECT_CONFIG = { - MAX_COUNT: 10, // 最大重连次数 + MAX_COUNT: 999, // 最大重连次数 INITIAL_DELAY: 2000, // 初始重连延迟(2秒) - MAX_DELAY: 60000, // 最大重连延迟(1分钟) + MAX_DELAY: 5000, // 最大重连延迟(5秒) }; /**