diff --git a/src/apis.js b/src/apis.js
index 801f502..92e892c 100644
--- a/src/apis.js
+++ b/src/apis.js
@@ -157,8 +157,9 @@ export const getGameAPI = async (battleId) => {
data.players.push({
...item.playerBattleStats,
arrowHistory: item.roundRecords[0].arrowHistory,
- })
+ });
});
+ data.players = data.players.sort((a, b) => b.totalScore - a.totalScore);
}
console.log("game result:", result);
console.log("format data:", data);
diff --git a/src/components/BattleHeader.vue b/src/components/BattleHeader.vue
index 20482f6..26a2737 100644
--- a/src/components/BattleHeader.vue
+++ b/src/components/BattleHeader.vue
@@ -1,9 +1,9 @@
-
-
+
+
+
+ {{ player.name }}
+
-
+
- {{ blueTeam[0].name }}
+ {{ blueTeam[0].name }}
image:first-child {
position: absolute;
@@ -69,17 +78,17 @@ defineProps({
}
.players > view {
width: 50%;
- height: 80px;
+ height: 85px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff9;
font-size: 14px;
- margin-top: 20px;
- padding-top: 5px;
+ margin-top: 15px;
overflow: hidden;
position: relative;
+ padding-top: 5px;
}
.players > view:first-child {
background-color: #364469;
@@ -87,13 +96,35 @@ 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;
}
+.players-melee {
+ display: flex;
+ height: 85px;
+ width: 100%;
+ background-color: #364469;
+ margin-top: 15px;
+}
+.players-melee > view {
+ width: 20%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ color: #fff9;
+ font-size: 14px;
+ padding-top: 5px;
+}
+.player-name {
+ margin-top: 5px;
+ width: 80%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ text-align: center;
+}
diff --git a/src/components/MeleeResult.vue b/src/components/MeleeResult.vue
index 2eebb4c..fecc6df 100644
--- a/src/components/MeleeResult.vue
+++ b/src/components/MeleeResult.vue
@@ -89,7 +89,7 @@ watch(
position: fixed;
top: 0;
left: 0;
- background-color: rgba(0, 0, 0, 0.8);
+ background-color: #232323;
flex-direction: column;
justify-content: center;
align-items: center;
diff --git a/src/components/PlayerScore.vue b/src/components/PlayerScore.vue
index a532d0a..7e0bc02 100644
--- a/src/components/PlayerScore.vue
+++ b/src/components/PlayerScore.vue
@@ -63,6 +63,7 @@ const rowCount = new Array(6).fill(0);
border-radius: 50%;
margin-right: 10px;
margin-left: -30px;
+ flex: 0 0 auto;
}
.container > text:nth-child(2) {
font-size: 14px;
diff --git a/src/components/TeamResult.vue b/src/components/TeamResult.vue
index 9472905..615071d 100644
--- a/src/components/TeamResult.vue
+++ b/src/components/TeamResult.vue
@@ -104,7 +104,7 @@ watch(
position: fixed;
top: 0;
left: 0;
- background-color: rgba(0, 0, 0, 0.8);
+ background-color: #232323;
flex-direction: column;
justify-content: center;
align-items: center;
diff --git a/src/manifest.json b/src/manifest.json
index 43e6715..f9f59b4 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -56,14 +56,7 @@
"usingComponents": true,
"darkmode": true,
"themeLocation": "theme.json",
- "permission": {
- "scope.userInfo": {
- "desc": "用于完善用户资料"
- },
- "scope.camera": {
- "desc": "用于扫描二维码"
- }
- }
+ "permission": {}
},
"mp-alipay": {
"usingComponents": true
diff --git a/src/pages/battle-result.vue b/src/pages/battle-result.vue
index 601a943..88cf3e8 100644
--- a/src/pages/battle-result.vue
+++ b/src/pages/battle-result.vue
@@ -31,6 +31,10 @@ onLoad(async (options) => {
totalPoints.value = result.redTotal;
ifWin.value = result.winner === 1;
}
+ if (result.mode === 2) {
+ const mine = result.players.find((p) => p.playerId === user.value.id);
+ if (mine) totalPoints.value = mine.totalScore;
+ }
});
function exit() {
uni.navigateBack();
@@ -151,7 +155,6 @@ onMounted(async () => {});
flex-direction: column;
align-items: center;
justify-content: center;
- /* z-index: -1; */
}
.tag {
position: absolute;
@@ -253,7 +256,7 @@ onMounted(async () => {});
margin: 0 20px;
}
.players {
- color: #fff3;
+ color: #fff6;
display: flex;
flex-direction: column;
align-items: center;
@@ -284,9 +287,9 @@ onMounted(async () => {});
width: 100%;
top: 0;
left: 0;
- z-index: -1;
}
.player-crown {
+ position: relative;
width: 27px;
margin: 0 15px;
}
@@ -299,8 +302,10 @@ onMounted(async () => {});
margin: 0 15px;
color: #fff;
background-color: #676767;
+ position: relative;
}
.player-title {
+ position: relative;
display: flex;
flex-direction: column;
margin-left: 15px;
diff --git a/src/pages/melee-match.vue b/src/pages/melee-match.vue
index acd6f11..435918d 100644
--- a/src/pages/melee-match.vue
+++ b/src/pages/melee-match.vue
@@ -4,7 +4,8 @@ import { onLoad } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue";
import BowTarget from "@/components/BowTarget.vue";
import ShootProgress from "@/components/ShootProgress.vue";
-import PlayersRow from "@/components/PlayersRow.vue";
+import Guide from "@/components/Guide.vue";
+import BattleHeader from "@/components/BattleHeader.vue";
import Timer from "@/components/Timer.vue";
import PlayerScore from "@/components/PlayerScore.vue";
import SButton from "@/components/SButton.vue";
@@ -114,13 +115,17 @@ onUnmounted(() => {
+
+
+
+
+ 请预先射几箭测试
+ 请确保射击距离只有5米
+
+
+
+
-