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 @@
@@ -90,8 +103,9 @@ function calcRealY(num) {
经验 +1
+ 经验 +1
+
{{ tips }}
+
+ 模拟射箭
+
@@ -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 @@
@@ -17,10 +22,8 @@ defineProps({
diff --git a/src/components/Header.vue b/src/components/Header.vue
index 38d63aa..d14ae6d 100644
--- a/src/components/Header.vue
+++ b/src/components/Header.vue
@@ -1,10 +1,5 @@
@@ -56,7 +65,7 @@ onMounted(async () => {
mode="widthFix"
/>
-
@@ -155,12 +158,12 @@ onMounted(async () => {
.container {
width: 100vw;
height: 100vh;
- background-color: #000;
+ background-color: #292929;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
- justify-content: center;
+ justify-content: flex-start;
}
.tag {
position: absolute;
@@ -199,14 +202,16 @@ onMounted(async () => {
}
.battle-winner > text:nth-child(3) {
font-size: 30px;
- margin: 10px;
+ margin-bottom: 5px;
font-weight: bold;
color: #fed847;
}
+.battle-winner > text:nth-child(4) {
+ margin-bottom: 10px;
+}
.battle-e {
width: 100%;
height: 60px;
- margin: 20px 0;
}
.battle-e > image {
position: absolute;
@@ -251,6 +256,7 @@ onMounted(async () => {
justify-content: center;
width: 100%;
margin-bottom: 30px;
+ margin-top: 25%;
}
.header-melee > view {
height: 1px;
@@ -280,6 +286,7 @@ onMounted(async () => {
background-color: #ffffff1a;
display: flex;
align-items: center;
+ box-sizing: border-box;
}
.player-bg {
position: absolute;
diff --git a/src/pages/be-vip.vue b/src/pages/be-vip.vue
index b91e3cc..123f513 100644
--- a/src/pages/be-vip.vue
+++ b/src/pages/be-vip.vue
@@ -3,12 +3,15 @@ import { ref } from "vue";
import Container from "@/components/Container.vue";
import Avatar from "@/components/Avatar.vue";
import SButton from "@/components/SButton.vue";
+import SModal from "@/components/SModal.vue";
+import Signin from "@/components/Signin.vue";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user, config } = storeToRefs(store);
const selectedVIP = ref(0);
+const showModal = ref(false);
const chooseVip = (index) => {
selectedVIP.value = index;
@@ -16,10 +19,8 @@ const chooseVip = (index) => {
const onPay = () => {
if (!user.value.id) {
- return uni.showToast({
- title: "请先登录",
- icon: "none",
- });
+ showModal.value = true;
+ } else {
}
};
@@ -29,7 +30,7 @@ const onPay = () => {
@@ -76,6 +77,9 @@ const onPay = () => {
支付
+
+
+
@@ -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",
+ });
+};
-
-
-
-
-
- (showModal = true)">
- 新来的弓箭手你好呀~
- 微信登录 >
-
-
+
@@ -141,6 +139,7 @@ onMounted(async () => {
v-for="(region, index) in ['广东', '湖南', '内蒙', '海南', '四川']"
:key="index"
class="region-item"
+ @click="comingSoon"
>
{
分
-
+
...
更多
@@ -385,16 +384,4 @@ onMounted(async () => {
line-height: 20px;
margin-bottom: 5px;
}
-.signin-btn {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: flex-start;
- margin-left: 10px;
- font-size: 14px;
-}
-.signin-btn > text:last-child {
- color: #39a8ff;
- margin-top: 2px;
-}
diff --git a/src/pages/match-detail.vue b/src/pages/match-detail.vue
index a39dac5..5aad2ba 100644
--- a/src/pages/match-detail.vue
+++ b/src/pages/match-detail.vue
@@ -4,21 +4,23 @@ import { onLoad } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue";
import BattleHeader from "@/components/BattleHeader.vue";
import Avatar from "@/components/Avatar.vue";
-import TeamResult from "@/components/TeamResult.vue";
-import MeleeResult from "@/components/MeleeResult.vue";
+// import TeamResult from "@/components/TeamResult.vue";
+// import MeleeResult from "@/components/MeleeResult.vue";
import PlayerScore from "@/components/PlayerScore.vue";
import { getGameAPI } from "@/apis";
const blueTeam = ref([]);
const redTeam = ref([]);
const roundsData = ref([]);
+const battleId = ref("");
const data = ref({
players: [],
});
-const show = ref(false);
+// const show = ref(false);
onLoad(async (options) => {
if (options.id) {
+ battleId.value = options.id;
const result = await getGameAPI(options.id);
data.value = result;
if (result.mode === 1) {
@@ -51,6 +53,18 @@ onLoad(async (options) => {
}
}
});
+
+const checkBowData = () => {
+ if (data.value.mode === 1) {
+ uni.navigateTo({
+ url: `/pages/team-bow-data?battleId=${battleId.value}`,
+ });
+ } else if (data.value.mode === 2) {
+ uni.navigateTo({
+ url: `/pages/melee-bow-data?battleId=${battleId.value}`,
+ });
+ }
+};
@@ -93,7 +107,7 @@ onLoad(async (options) => {
:style="{ border: 'none', padding: '5px 15px' }"
>
大乱斗
- (show = true)">
+
查看靶纸
@@ -114,7 +128,7 @@ onLoad(async (options) => {
>
- {
:show="show"
:onClose="() => (show = false)"
:data="data"
- />
+ /> -->
diff --git a/src/pages/melee-bow-data.vue b/src/pages/melee-bow-data.vue
new file mode 100644
index 0000000..8ab4062
--- /dev/null
+++ b/src/pages/melee-bow-data.vue
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+ onSelect(player.playerId)"
+ >
+
+
+
+ {{ index + 1 }}
+
+ 积分
+ {{
+ player.totalScore > 0
+ ? "+" + player.totalScore
+ : player.totalScore
+ }}分
+ {{ player.totalRings }}环
+
+ {{ arrow.ring }}环
+
+
+
+
+
+
+ {{ scores.length }}支箭,共{{
+ scores.reduce((last, next) => last + next.ring, 0)
+ }}环
+
+
+ {{ score.ring }}
+
+
+
+
+
+
+
diff --git a/src/pages/mine-bow-data.vue b/src/pages/mine-bow-data.vue
new file mode 100644
index 0000000..166bec8
--- /dev/null
+++ b/src/pages/mine-bow-data.vue
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+ {{ arrows.length }}
+ 支箭,共
+ {{ arrows.reduce((a, b) => a + b.ring, 0) }}
+ 环
+
+
+
+
+
+
+
diff --git a/src/pages/my-growth.vue b/src/pages/my-growth.vue
index 784a0b9..86aeadf 100644
--- a/src/pages/my-growth.vue
+++ b/src/pages/my-growth.vue
@@ -4,11 +4,7 @@ import Container from "@/components/Container.vue";
import Avatar from "@/components/Avatar.vue";
import BowData from "@/components/BowData.vue";
import ScrollList from "@/components/ScrollList.vue";
-import {
- getBattleListAPI,
- getPractiseResultListAPI,
- getPractiseAPI,
-} from "@/apis";
+import { getBattleListAPI, getPractiseResultListAPI } from "@/apis";
import { ref } from "vue";
@@ -16,8 +12,8 @@ const selectedIndex = ref(0);
const matchList = ref([]);
const battleList = ref([]);
const practiseList = ref([]);
-const showBowData = ref(false);
-const arrows = ref([]);
+// const showBowData = ref(false);
+// const arrows = ref([]);
const toMatchDetail = (id) => {
uni.navigateTo({
@@ -25,9 +21,9 @@ const toMatchDetail = (id) => {
});
};
const getPractiseDetail = async (id) => {
- const result = await getPractiseAPI(id);
- arrows.value = result.arrows;
- showBowData.value = true;
+ uni.navigateTo({
+ url: `/pages/mine-bow-data?id=${id}`,
+ });
};
const onMatchLoading = async (page) => {
const result = await getBattleListAPI(page, 2);
@@ -175,11 +171,11 @@ const onPractiseLoading = async (page) => {
-
+ /> -->
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",
+ });
+};
@@ -101,7 +111,7 @@ const toMeleeMatchPage = (gameType, teamSize) => {
- 查看我的比赛记录
+ 查看我的比赛记录
@@ -143,6 +153,7 @@ const toMeleeMatchPage = (gameType, teamSize) => {
8850分
+ 点击查看更多
@@ -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 @@
+
+
+
+
+
+
+ onClickTab(index)"
+ :class="selected === index ? 'selected-tab' : ''"
+ >
+ {{ tab }}
+
+
+
+
+
+
+
+
+ {{ ring }}
+
+
+ {{ score.ring }}
+
+
+
+
+
+
+
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"
/>
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秒)
};
/**