From deff79aa7bd3100b71c8d4d51bf9a0d8625dae86 Mon Sep 17 00:00:00 2001 From: kron Date: Sun, 8 Jun 2025 12:52:49 +0800 Subject: [PATCH] =?UTF-8?q?UI=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 30 +++ src/components/Avatar.vue | 23 ++- src/components/BattleHeader.vue | 26 ++- src/components/BowTarget.vue | 48 ++++- src/components/MeleeResult.vue | 162 ++++++++++++++++ src/components/TeamResult.vue | 134 +++++++++++++ src/components/UserHeader.vue | 40 ++-- src/pages.json | 14 +- src/pages/battle-result.vue | 20 +- src/pages/be-vip.vue | 1 + src/pages/match-detail.vue | 172 +++++++++++++++++ src/pages/{match-room.vue => melee-match.vue} | 4 - src/pages/my-growth.vue | 182 +++++++++--------- src/pages/ranking.vue | 16 +- src/pages/team-match.vue | 167 ++++++++++++++++ 15 files changed, 900 insertions(+), 139 deletions(-) create mode 100644 src/components/MeleeResult.vue create mode 100644 src/components/TeamResult.vue create mode 100644 src/pages/match-detail.vue rename src/pages/{match-room.vue => melee-match.vue} (97%) create mode 100644 src/pages/team-match.vue diff --git a/src/App.vue b/src/App.vue index c6b8680..baa5844 100644 --- a/src/App.vue +++ b/src/App.vue @@ -72,6 +72,36 @@ button.hover { color: #fed847; } +@keyframes fadeIn { + from { + transform: translateY(20px); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } +} + +.fade-in { + animation: fadeIn 0.3s ease forwards; +} + +@keyframes fadeOut { + from { + transform: translateY(0); + opacity: 1; + } + to { + transform: translateY(20px); + opacity: 0; + } +} + +.fade-out { + animation: fadeOut 0.3s ease forwards; +} + @keyframes scaleIn { from { transform: scale(0); diff --git a/src/components/Avatar.vue b/src/components/Avatar.vue index c69f52d..f21a8ef 100644 --- a/src/components/Avatar.vue +++ b/src/components/Avatar.vue @@ -20,7 +20,16 @@ defineProps({ type: Number, default: 45, }, + borderColor: { + type: Number, + default: 0, + }, }); +const borderColors = { + 0: "#fff", + 1: "#64BAFF", + 2: "#FF6767", +}; @@ -85,7 +102,7 @@ defineProps({ border-top-left-radius: 50%; border-bottom-right-radius: 50%; } -.avatar > image:last-child { +.avatar-image { border-radius: 50%; border: 1px solid #fff; } diff --git a/src/components/BattleHeader.vue b/src/components/BattleHeader.vue index d479966..75a9c5c 100644 --- a/src/components/BattleHeader.vue +++ b/src/components/BattleHeader.vue @@ -29,10 +29,20 @@ defineProps({ {{ blueTeam[0].name }} + {{ redTeam[0].name }} + @@ -47,7 +57,8 @@ defineProps({ .container > image:first-child { position: absolute; width: 100%; - top: -10px; + top: -5px; + z-index: 1; } .players { display: flex; @@ -61,8 +72,10 @@ defineProps({ justify-content: center; color: #fff9; font-size: 14px; - padding-top: 20px; + margin-top: 20px; + padding-top: 5px; overflow: hidden; + position: relative; } .players > view:first-child { background-color: #364469; @@ -70,4 +83,13 @@ defineProps({ .players > view:last-child { background-color: #692735; } +.players > view > text { + margin-top: 5px; +} +.players > view > image:last-child { + position: absolute; + width: 60px; + right: 0; + bottom: 0; +} diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue index d69b765..9ac4b0d 100644 --- a/src/components/BowTarget.vue +++ b/src/components/BowTarget.vue @@ -1,4 +1,5 @@ + + + + diff --git a/src/components/TeamResult.vue b/src/components/TeamResult.vue new file mode 100644 index 0000000..64df993 --- /dev/null +++ b/src/components/TeamResult.vue @@ -0,0 +1,134 @@ + + + + + diff --git a/src/components/UserHeader.vue b/src/components/UserHeader.vue index e231138..bed8788 100644 --- a/src/components/UserHeader.vue +++ b/src/components/UserHeader.vue @@ -39,25 +39,21 @@ const toUserPage = () => { {{ user.nickName }} - + - 钻石1级 - {{ user.lvl }} + 钻石1级 + {{ user.lvl }} - - {{ user.lvl }}/{{ user.lvlPoints }} + + {{ user.lvl }}/{{ user.lvlPoints }} - + 本赛季全国 - {{ user.points }}/{{ user.rankLvl }} + {{ user.points }}/{{ user.rankLvl }} @@ -83,7 +79,7 @@ const toUserPage = () => { margin-bottom: 5px; } -.user-name > image { +.user-name-image { margin-left: 5px; width: 20px; } @@ -97,11 +93,13 @@ const toUserPage = () => { text-align: center; line-height: 16px; } -.level-tag:first-child { + +.level-tag-first { width: 45px; background: #5f51ff; } -.level-tag:nth-child(2) { + +.level-tag-second { width: 30px; background: #09c504; } @@ -115,17 +113,17 @@ const toUserPage = () => { .rank-tag { position: relative; background-color: #00000038; - width: 56px; + width: 55px; height: 16px; } -.rank-tag > view:first-child { +.rank-tag-progress { background: #ffa711; height: 100%; border-radius: 12px; } -.rank-tag > text { +.rank-tag-text { position: absolute; top: 0; left: 5px; @@ -134,16 +132,16 @@ const toUserPage = () => { .rank-info { text-align: left; - font-size: 10px; + font-size: 12px; position: relative; color: #b3b3b3; padding-left: 8px; } -.rank-info > image { +.rank-info-image { position: absolute; - top: -8px; - left: -8px; + top: -6px; + left: -9px; width: 90px; } diff --git a/src/pages.json b/src/pages.json index d1cbb76..89dcf69 100644 --- a/src/pages.json +++ b/src/pages.json @@ -109,7 +109,19 @@ } }, { - "path": "pages/match-room", + "path": "pages/team-match", + "style": { + "navigationBarTitleText": "排位赛" + } + }, + { + "path": "pages/melee-match", + "style": { + "navigationBarTitleText": "排位赛" + } + }, + { + "path": "pages/match-detail", "style": { "navigationBarTitleText": "排位赛" } diff --git a/src/pages/battle-result.vue b/src/pages/battle-result.vue index bce569a..76c989b 100644 --- a/src/pages/battle-result.vue +++ b/src/pages/battle-result.vue @@ -2,19 +2,21 @@ import { ref, onMounted } from "vue"; import { onLoad } from "@dcloudio/uni-app"; import { getGameAPI } from "@/apis"; +import TeamResult from "@/components/TeamResult.vue"; +import MeleeResult from "@/components/MeleeResult.vue"; const battleId = ref(""); +const show = ref(true); -onLoad((options) => { - battleId.value = options.battleId; -}); +// onLoad(async (options) => { +// battleId.value = options.battleId; +// const result = await getGameAPI(options.battleId); +// console.log(1111, result); +// }); function exit() { uni.navigateBack(); } -onMounted(async () => { - const result = await getGameAPI("BATTLE-1749121128909437828-799"); - conosle.log(1111, result); -}); +onMounted(async () => {}); diff --git a/src/pages/be-vip.vue b/src/pages/be-vip.vue index 986b382..9148a8a 100644 --- a/src/pages/be-vip.vue +++ b/src/pages/be-vip.vue @@ -75,6 +75,7 @@ const chooseVip = (index) => { diff --git a/src/pages/match-room.vue b/src/pages/melee-match.vue similarity index 97% rename from src/pages/match-room.vue rename to src/pages/melee-match.vue index d09d847..d7ee6f6 100644 --- a/src/pages/match-room.vue +++ b/src/pages/melee-match.vue @@ -26,10 +26,6 @@ const tips = ref("即将开始..."); const seq = ref(0); const timerSeq = ref(0); const roundResults = ref([ - // { - // blueArrows: [{ ring: 2 }, { ring: 2 }], - // redArrows: [{ ring: 2 }, { ring: 3 }], - // }, ]); onLoad((options) => { diff --git a/src/pages/my-growth.vue b/src/pages/my-growth.vue index de54820..f3e2506 100644 --- a/src/pages/my-growth.vue +++ b/src/pages/my-growth.vue @@ -15,107 +15,98 @@ const handleSelect = async (index) => { } selectedIndex.value = index; }; + +const toMatchDetail = () => { + uni.navigateTo({ + url: "/pages/match-detail", + }); +};