diff --git a/src/App.vue b/src/App.vue
index 08b356c..b62dd14 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -258,6 +258,69 @@
text-overflow: ellipsis;
}
+ .member-nickname {
+ position: relative;
+ display: inline-flex;
+ max-width: 100%;
+ overflow: hidden;
+ }
+
+ .member-nickname__text,
+ .member-nickname__shine {
+ display: block;
+ max-width: 100%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ .member-nickname--vip .member-nickname__text {
+ color: #E7BA80;
+ }
+
+ .member-nickname--svip .member-nickname__text {
+ background: linear-gradient(90deg, #ffb86c, #ff4fd8, #7c5cff, #35d6ff);
+ -webkit-background-clip: text;
+ background-clip: text;
+ color: transparent;
+ }
+
+ .member-nickname__shine {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background: linear-gradient(
+ 110deg,
+ transparent 0%,
+ transparent 38%,
+ rgba(255, 255, 255, 0.15) 45%,
+ rgba(255, 255, 255, 1) 50%,
+ rgba(255, 255, 255, 0.15) 55%,
+ transparent 62%,
+ transparent 100%
+ );
+ background-size: 220% 100%;
+ background-position: 120% 0;
+ -webkit-background-clip: text;
+ background-clip: text;
+ color: transparent;
+ pointer-events: none;
+ animation: memberNicknameShine 3.5s infinite ease-in-out;
+ }
+
+ @keyframes memberNicknameShine {
+ 0%,
+ 50% {
+ background-position: 120% 0;
+ }
+
+ 100% {
+ background-position: -200% 0;
+ }
+ }
+
.modal {
height: 100%;
display: flex;
diff --git a/src/apis.js b/src/apis.js
index a816bf7..e8b088e 100644
--- a/src/apis.js
+++ b/src/apis.js
@@ -342,6 +342,9 @@ export const createOrderAPI = (vipId) => {
quanity: 1,
tradeType: "mini",
payType: "wxpay",
+ returnUrl: "",
+ remark: "",
+ mockTest: false,
});
};
diff --git a/src/components/AppBackground.vue b/src/components/AppBackground.vue
index 134b66e..00feb51 100644
--- a/src/components/AppBackground.vue
+++ b/src/components/AppBackground.vue
@@ -57,6 +57,12 @@ const props = defineProps({
src="https://static.shelingxingqiu.com/shootmini/static/rank/rank-bg.png"
mode="widthFix"
/>
+
diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue
index 05f2ebe..bfe2831 100644
--- a/src/components/AppFooter.vue
+++ b/src/components/AppFooter.vue
@@ -8,7 +8,7 @@ const tabs = [
function handleTabClick(index) {
if (index === 0) {
uni.navigateTo({
- url: "/pages/be-vip",
+ url: "/pages/member/be-vip",
});
}
if (index === 1) {
diff --git a/src/components/BackToGame.vue b/src/components/BackToGame.vue
index b5a509c..5297d74 100644
--- a/src/components/BackToGame.vue
+++ b/src/components/BackToGame.vue
@@ -18,12 +18,14 @@ const props = defineProps({
},
});
const loading = ref(false);
+const navigating = ref(false);
/** 统一获取当前环境 token,用于守卫:无有效 token 时不发起接口请求 */
const getToken = () =>
uni.getStorageSync(`${uni.getAccountInfoSync().miniProgram.envVersion}_token`);
onShow(async () => {
+ navigating.value = false;
if (user.value.id && getToken()) {
setTimeout(async () => {
const state = await getUserGameState();
@@ -45,28 +47,35 @@ watch(
}
);
+const navigateOnce = (url) =>
+ new Promise((resolve, reject) => {
+ navigating.value = true;
+ uni.navigateTo({
+ url,
+ success: resolve,
+ fail: (error) => {
+ navigating.value = false;
+ reject(error);
+ },
+ });
+ });
+
const onClick = debounce(async () => {
- if (loading.value) return;
+ if (loading.value || navigating.value) return;
try {
loading.value = true;
const result = await getBattleAPI();
if (result && result.matchId) {
await uni.$checkAudio();
if (result.mode <= 3) {
- uni.navigateTo({
- url: `/pages/team-battle/index?battleId=${result.matchId}`,
- });
+ await navigateOnce(`/pages/team-battle/index?battleId=${result.matchId}`);
} else {
- uni.navigateTo({
- url: `/pages/melee-battle?battleId=${result.matchId}`,
- });
+ await navigateOnce(`/pages/melee-battle?battleId=${result.matchId}`);
}
return;
}
if (game.value.roomID) {
- uni.navigateTo({
- url: "/pages/battle-room?roomNumber=" + game.value.roomID,
- });
+ await navigateOnce("/pages/battle-room?roomNumber=" + game.value.roomID);
} else {
updateGame(false, "");
}
diff --git a/src/components/BattleHeader.vue b/src/components/BattleHeader.vue
index b12d84f..1ade377 100644
--- a/src/components/BattleHeader.vue
+++ b/src/components/BattleHeader.vue
@@ -27,6 +27,14 @@ defineProps({
default: true,
},
});
+
+const getMemberNicknameClass = (player = {}) => [
+ "member-nickname",
+ player.vip === true && player.sVip !== true ? "member-nickname--vip" : "",
+ player.sVip === true ? "member-nickname--svip" : "",
+];
+
+const isMember = (player = {}) => player.vip === true || player.sVip === true;
@@ -51,7 +59,16 @@ defineProps({
}"
>
- {{ player.name }}
+
+ {{ player.name }}
+
+ {{ player.name }}
+
+
+ {{ player.name }}
- {{ player.name }}
+
+ {{ player.name }}
+
+ {{ player.name }}
+
+
+ {{ player.name }}
- {{ player.name }}
+
+ {{ player.name }}
+
+ {{ player.name }}
+
+
+ {{ player.name }}
@@ -183,6 +218,13 @@ defineProps({
text-overflow: ellipsis;
text-align: center;
}
+view.player-name {
+ justify-content: center;
+}
+.player-name .member-nickname__text,
+.player-name .member-nickname__shine {
+ font-size: 12px;
+}
.left-winner-badge {
position: absolute;
width: 50px;
diff --git a/src/components/BowData.vue b/src/components/BowData.vue
index 7854645..409f98f 100644
--- a/src/components/BowData.vue
+++ b/src/components/BowData.vue
@@ -1,4 +1,5 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue
index 1a26f5a..0c9745a 100644
--- a/src/components/BowTarget.vue
+++ b/src/components/BowTarget.vue
@@ -1,6 +1,7 @@
-
+
-
+
@@ -292,8 +417,15 @@ onBeforeUnmount(() => {
}}环
+
{
>
+
{
{{ index + 1 }}
+
-->
-
+
{{ arrows.length }}
diff --git a/src/pages/my-device.vue b/src/pages/my-device.vue
index c6313b9..6a3ec9f 100644
--- a/src/pages/my-device.vue
+++ b/src/pages/my-device.vue
@@ -1,5 +1,5 @@
@@ -51,7 +59,16 @@ defineProps({
}"
>
- {{ player.name }}
+
+ {{ player.name }}
+
+ {{ player.name }}
+
+
+ {{ player.name }}
- {{ player.name }}
+
+ {{ player.name }}
+
+ {{ player.name }}
+
+
+ {{ player.name }}
- {{ player.name }}
+
+ {{ player.name }}
+
+ {{ player.name }}
+
+
+ {{ player.name }}
@@ -183,6 +218,13 @@ defineProps({
text-overflow: ellipsis;
text-align: center;
}
+view.player-name {
+ justify-content: center;
+}
+.player-name .member-nickname__text,
+.player-name .member-nickname__shine {
+ font-size: 12px;
+}
.left-winner-badge {
position: absolute;
width: 50px;
diff --git a/src/pages/team-battle/components/BowTarget.vue b/src/pages/team-battle/components/BowTarget.vue
index 4555309..c303250 100644
--- a/src/pages/team-battle/components/BowTarget.vue
+++ b/src/pages/team-battle/components/BowTarget.vue
@@ -1,6 +1,15 @@
-
+
-
+
@@ -287,8 +471,20 @@ onBeforeUnmount(() => {
}}环
+
{
>
+
{
{{ index + 1 }}
+
+
+ {{ firstName }}
+
+ {{ firstName }}
+
+
+import { ref } from "vue";
+import { onLoad } from "@dcloudio/uni-app";
+import Container from "./components/Container.vue";
+import BowTarget from "./components/BowTarget.vue";
+import Avatar from "./components/Avatar.vue";
+import { roundsName } from "@/constants";
+import { getBattleAPI } from "@/apis";
+const selected = ref(0);
+const redScores = ref([]);
+const blueScores = ref([]);
+const redTeam = ref([]);
+const blueTeam = ref([]);
+const tabs = ref([]);
+const players = ref([]);
+const data = ref({});
+
+const loadArrows = (round) => {
+ round.shoots[1].forEach((arrow) => {
+ blueScores.value.push(arrow);
+ });
+ round.shoots[2].forEach((arrow) => {
+ redScores.value.push(arrow);
+ });
+};
+onLoad(async (options) => {
+ if (!options.battleId) return;
+ const result = await getBattleAPI(options.battleId || "57943107462893568");
+ data.value = result;
+ blueTeam.value = data.value.teams?.[1]?.players || [];
+ redTeam.value = data.value.teams?.[2]?.players || [];
+ blueTeam.value.forEach((p, index) => {
+ players.value.push(p);
+ players.value.push(redTeam.value[index]);
+ });
+ Object.values(data.value.rounds).forEach((round, index) => {
+ if (round.ifGold) tabs.value.push(`决金箭`);
+ else tabs.value.push(`第${roundsName[index + 1]}轮`);
+ });
+ selected.value = Number(options.selected || 0);
+ onClickTab(selected.value);
+});
+const onClickTab = (index) => {
+ selected.value = index;
+ redScores.value = [];
+ blueScores.value = [];
+ loadArrows(data.value.rounds[index]);
+};
+
+
+
+
+
+
+ onClickTab(index)"
+ :class="selected === index ? 'selected-tab' : ''"
+ >
+ {{ tab }}
+
+
+
+
+
+
+
+
+
+
+ {{ score.ringX ? "X" : score.ring }}
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/user.vue b/src/pages/user.vue
index e2f2fcd..f0f529e 100644
--- a/src/pages/user.vue
+++ b/src/pages/user.vue
@@ -13,7 +13,7 @@ const { updateUser } = store;
const toOrderPage = () => {
uni.navigateTo({
- url: "/pages/orders",
+ url: "/pages/member/orders",
});
};
@@ -27,7 +27,7 @@ const toFristTryPage = async () => {
};
const toBeVipPage = () => {
uni.navigateTo({
- url: "/pages/be-vip",
+ url: "/pages/member/be-vip",
});
};
const toMyGrowthPage = () => {
diff --git a/src/static/common/dialog-bg.png b/src/static/common/dialog-bg.png
new file mode 100644
index 0000000..56635f6
Binary files /dev/null and b/src/static/common/dialog-bg.png differ
diff --git a/src/static/common/dialog-icon.png b/src/static/common/dialog-icon.png
new file mode 100644
index 0000000..919e07d
Binary files /dev/null and b/src/static/common/dialog-icon.png differ
diff --git a/src/static/common/dialog-light.png b/src/static/common/dialog-light.png
new file mode 100644
index 0000000..a6ce9bf
Binary files /dev/null and b/src/static/common/dialog-light.png differ
diff --git a/src/static/vip/intro-toast.png b/src/static/vip/intro-toast.png
new file mode 100644
index 0000000..f942f6d
Binary files /dev/null and b/src/static/vip/intro-toast.png differ
diff --git a/src/static/vip/super-battle.png b/src/static/vip/super-battle.png
new file mode 100644
index 0000000..6193cbb
Binary files /dev/null and b/src/static/vip/super-battle.png differ
diff --git a/src/static/vip/super-button.png b/src/static/vip/super-button.png
new file mode 100644
index 0000000..04cceff
Binary files /dev/null and b/src/static/vip/super-button.png differ
diff --git a/src/static/vip/svip-arrow.png b/src/static/vip/svip-arrow.png
new file mode 100644
index 0000000..1d16efb
Binary files /dev/null and b/src/static/vip/svip-arrow.png differ
diff --git a/src/static/vip/svip-badge.png b/src/static/vip/svip-badge.png
new file mode 100644
index 0000000..fe78d88
Binary files /dev/null and b/src/static/vip/svip-badge.png differ
diff --git a/src/static/vip/svip-battle.png b/src/static/vip/svip-battle.png
new file mode 100644
index 0000000..18d2778
Binary files /dev/null and b/src/static/vip/svip-battle.png differ
diff --git a/src/static/vip/svip-comment.png b/src/static/vip/svip-comment.png
new file mode 100644
index 0000000..3195eb3
Binary files /dev/null and b/src/static/vip/svip-comment.png differ
diff --git a/src/static/vip/svip-hit.png b/src/static/vip/svip-hit.png
new file mode 100644
index 0000000..d80f87d
Binary files /dev/null and b/src/static/vip/svip-hit.png differ
diff --git a/src/static/vip/svip-jian.png b/src/static/vip/svip-jian.png
new file mode 100644
index 0000000..f4fb264
Binary files /dev/null and b/src/static/vip/svip-jian.png differ
diff --git a/src/static/vip/svip-lie.png b/src/static/vip/svip-lie.png
new file mode 100644
index 0000000..8fb9577
Binary files /dev/null and b/src/static/vip/svip-lie.png differ
diff --git a/src/static/vip/svip-off.png b/src/static/vip/svip-off.png
new file mode 100644
index 0000000..da413db
Binary files /dev/null and b/src/static/vip/svip-off.png differ
diff --git a/src/static/vip/svip-on.png b/src/static/vip/svip-on.png
new file mode 100644
index 0000000..610b63d
Binary files /dev/null and b/src/static/vip/svip-on.png differ
diff --git a/src/static/vip/svip-order.png b/src/static/vip/svip-order.png
new file mode 100644
index 0000000..fbd3c35
Binary files /dev/null and b/src/static/vip/svip-order.png differ
diff --git a/src/static/vip/svip-point.png b/src/static/vip/svip-point.png
new file mode 100644
index 0000000..4f4b77f
Binary files /dev/null and b/src/static/vip/svip-point.png differ
diff --git a/src/static/vip/svip-rank.png b/src/static/vip/svip-rank.png
new file mode 100644
index 0000000..79bccc0
Binary files /dev/null and b/src/static/vip/svip-rank.png differ
diff --git a/src/static/vip/svip-service.png b/src/static/vip/svip-service.png
new file mode 100644
index 0000000..3e0f0fe
Binary files /dev/null and b/src/static/vip/svip-service.png differ
diff --git a/src/static/vip/svip-xuan.png b/src/static/vip/svip-xuan.png
new file mode 100644
index 0000000..48d9b2c
Binary files /dev/null and b/src/static/vip/svip-xuan.png differ
diff --git a/src/static/vip/vip-badge.png b/src/static/vip/vip-badge.png
new file mode 100644
index 0000000..d8b7dd0
Binary files /dev/null and b/src/static/vip/vip-badge.png differ
diff --git a/src/static/vip/vip-battle.png b/src/static/vip/vip-battle.png
new file mode 100644
index 0000000..3d46318
Binary files /dev/null and b/src/static/vip/vip-battle.png differ
diff --git a/src/static/vip/vip-comment.png b/src/static/vip/vip-comment.png
new file mode 100644
index 0000000..016de68
Binary files /dev/null and b/src/static/vip/vip-comment.png differ
diff --git a/src/static/vip/vip-off.png b/src/static/vip/vip-off.png
new file mode 100644
index 0000000..d9020c7
Binary files /dev/null and b/src/static/vip/vip-off.png differ
diff --git a/src/static/vip/vip-on.png b/src/static/vip/vip-on.png
new file mode 100644
index 0000000..eae1e2f
Binary files /dev/null and b/src/static/vip/vip-on.png differ
diff --git a/src/static/vip/vip-order.png b/src/static/vip/vip-order.png
new file mode 100644
index 0000000..54962a8
Binary files /dev/null and b/src/static/vip/vip-order.png differ
diff --git a/src/static/vip/vip-rank.png b/src/static/vip/vip-rank.png
new file mode 100644
index 0000000..8aac306
Binary files /dev/null and b/src/static/vip/vip-rank.png differ
diff --git a/src/static/vip/vip-service.png b/src/static/vip/vip-service.png
new file mode 100644
index 0000000..422b8a4
Binary files /dev/null and b/src/static/vip/vip-service.png differ