细节调整

This commit is contained in:
kron
2025-07-11 00:47:34 +08:00
parent e764160633
commit 566f07080a
17 changed files with 113 additions and 110 deletions

View File

@@ -305,6 +305,14 @@ const setClipboardData = () => {
});
};
const onBack = () => {
if (battleId.value) {
uni.$showHint(2);
} else {
showModal.value = true;
}
};
onMounted(() => {
uni.$on("socket-inbox", onReceiveMessage);
});
@@ -318,11 +326,7 @@ onUnmounted(() => {
</script>
<template>
<Container
title="对战"
:onBack="() => (showModal = true)"
:bgType="battleId ? 1 : 0"
>
<Container title="对战" :onBack="onBack" :bgType="battleId ? 1 : 0">
<view class="standby-phase" v-if="step === 1">
<Guide>
<view class="battle-guide">

View File

@@ -83,16 +83,16 @@ onUnmounted(() => {
const nextStep = async () => {
if (step.value === 0) {
step.value = 1;
title.value = "凹造型";
title.value = "-凹造型";
} else if (step.value === 1) {
// btnDisabled.value = true;
step.value = 2;
title.value = "感知距离";
title.value = "-感知距离";
} else if (step.value === 2) {
step.value = 3;
title.value = "小试牛刀";
title.value = "-小试牛刀";
} else if (step.value === 3) {
title.value = "新手试炼场";
title.value = "小试牛刀";
await createPractise(total);
scores.value = [];
step.value = 4;
@@ -208,7 +208,7 @@ const onClose = () => {
/>
<TestDistance v-if="step === 2" :guide="false" />
<view
class="infos"
class="user-row"
v-if="step === 4"
:style="{ marginBottom: step === 2 ? '40px' : '0' }"
>
@@ -256,15 +256,4 @@ const onClose = () => {
width: calc(100% - 20px);
margin: 0 10px;
}
.infos {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
padding-top: 20px;
}
.infos > text {
font-size: 20px;
color: #fed847;
}
</style>

View File

@@ -152,7 +152,9 @@ const comingSoon = () => {
<image v-if="i === 3" src="../static/champ3.png" />
<view v-if="i > 3">{{ i }}</view>
<image
:src="rankData.rank[i - 1].avatar"
:src="
rankData.rank[i - 1].avatar || '../static/user-icon.png'
"
mode="aspectFill"
/>
</view>

View File

@@ -12,7 +12,6 @@ import SButton from "@/components/SButton.vue";
import Avatar from "@/components/Avatar.vue";
import ScreenHint from "@/components/ScreenHint.vue";
import Matching from "@/components/Matching.vue";
import SModal from "@/components/SModal.vue";
import TestDistance from "@/components/TestDistance.vue";
import { matchGameAPI, readyGameAPI } from "@/apis";
import { MESSAGETYPES, getMessageTypeName } from "@/constants";
@@ -36,7 +35,6 @@ const players = ref([]);
const playersScores = ref({});
const halfTimeTip = ref(false);
const onComplete = ref(null);
const showModal = ref(false);
onLoad(async (options) => {
if (options.battleId) {
@@ -143,7 +141,7 @@ async function onReceiveMessage(messages = []) {
}
const onBack = () => {
if (battleId.value) {
showModal.value = true;
uni.$showHint(2);
} else {
uni.navigateBack();
}
@@ -176,7 +174,7 @@ onUnmounted(() => {
:tips="tips"
:total="countDown"
/>
<view v-if="start" class="infos">
<view v-if="start" class="user-row">
<Avatar :src="user.avatar" :size="35" />
<BowPower :power="power" />
</view>
@@ -219,13 +217,6 @@ onUnmounted(() => {
:onComplete="onComplete"
/>
</block>
<SModal :show="showModal" :onClose="() => (showModal = false)">
<view class="modal">
<view class="modal" :style="{ color: '#fff9' }"
>排位赛进行过程无法退出</view
>
</view>
</SModal>
</view>
<view :style="{ marginBottom: '20px' }">
<SButton v-if="battleId && !start" :onClick="readyToGo">准备完毕</SButton>
@@ -238,13 +229,6 @@ onUnmounted(() => {
width: 100%;
height: 100%;
}
.infos {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
padding-top: 15px;
}
.half-time-tip {
width: 100%;
display: flex;

View File

@@ -95,7 +95,7 @@ onUnmounted(() => {
:start="start"
:total="120"
/>
<view class="infos">
<view class="user-row">
<Avatar :src="user.avatar" :size="35" />
<BowPower :power="power" />
</view>
@@ -126,11 +126,4 @@ onUnmounted(() => {
</template>
<style scoped>
.infos {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
padding-top: 15px;
}
</style>

View File

@@ -93,7 +93,7 @@ onUnmounted(() => {
:tips="`请连续射箭${total}支`"
:total="120"
/>
<view class="infos">
<view class="user-row">
<Avatar :src="user.avatar" :size="35" />
<BowPower :power="power" />
</view>
@@ -131,11 +131,4 @@ onUnmounted(() => {
</template>
<style scoped>
.infos {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
padding-top: 15px;
}
</style>

View File

@@ -39,7 +39,6 @@ const handleSelect = (index) => {
const onScrollView = (e) => {
headerColor.value = e.detail.scrollTop > 100 ? "orange" : "";
console.log(1111, e.detail);
};
const subTitles = ["排位赛积分", "本周MVP次数", "本周十环次数"];

View File

@@ -262,7 +262,7 @@ const toRankListPage = () => {
/>
<view v-if="index > 2">{{ index + 1 }}</view>
<image
:src="item.avatar"
:src="item.avatar || '../static/user-icon.png'"
mode="widthFix"
:style="{ borderColor: index < 3 ? topThreeColors[index] : '' }"
/>

View File

@@ -12,7 +12,6 @@ import BattleFooter from "@/components/BattleFooter.vue";
import ScreenHint from "@/components/ScreenHint.vue";
import SButton from "@/components/SButton.vue";
import Matching from "@/components/Matching.vue";
import SModal from "@/components/SModal.vue";
import RoundEndTip from "@/components/RoundEndTip.vue";
import TestDistance from "@/components/TestDistance.vue";
import { matchGameAPI, readyGameAPI } from "@/apis";
@@ -43,7 +42,6 @@ const redPoints = ref(0);
const bluePoints = ref(0);
const showRoundTip = ref(false);
const onComplete = ref(null);
const showModal = ref(false);
const isFinalShoot = ref(false);
onLoad(async (options) => {
@@ -172,7 +170,7 @@ async function onReceiveMessage(messages = []) {
}
const onBack = () => {
if (battleId.value) {
showModal.value = true;
uni.$showHint(2);
} else {
uni.navigateBack();
}
@@ -248,11 +246,6 @@ onUnmounted(() => {
:onComplete="onComplete"
/>
</block>
<SModal :show="showModal" :onClose="() => (showModal = false)">
<view class="modal" :style="{ color: '#fff9' }"
>排位赛进行过程无法退出</view
>
</SModal>
</view>
<view :style="{ marginBottom: '20px' }">
<SButton v-if="battleId && !start" :onClick="readyToGo">准备完毕</SButton>