UI细节调整
This commit is contained in:
@@ -21,15 +21,10 @@ defineProps({
|
|||||||
default: 45,
|
default: 45,
|
||||||
},
|
},
|
||||||
borderColor: {
|
borderColor: {
|
||||||
type: Number,
|
type: String,
|
||||||
default: 0,
|
default: "",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const borderColors = {
|
|
||||||
0: "#fff",
|
|
||||||
1: "#64BAFF",
|
|
||||||
2: "#FF6767",
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -70,7 +65,7 @@ const borderColors = {
|
|||||||
width: size + 'px',
|
width: size + 'px',
|
||||||
height: size + 'px',
|
height: size + 'px',
|
||||||
minHeight: size + 'px',
|
minHeight: size + 'px',
|
||||||
borderColor: borderColors[borderColor],
|
borderColor: borderColor || '#fff',
|
||||||
}"
|
}"
|
||||||
class="avatar-image"
|
class="avatar-image"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import BowPower from "@/components/BowPower.vue";
|
import BowPower from "@/components/BowPower.vue";
|
||||||
|
import StartCountdown from "@/components/StartCountdown.vue";
|
||||||
import { simulShootAPI } from "@/apis";
|
import { simulShootAPI } from "@/apis";
|
||||||
import useStore from "@/store";
|
import useStore from "@/store";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
@@ -28,10 +29,6 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
debug: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
scores: {
|
scores: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
@@ -52,12 +49,29 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
start: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const showRoundTips = ref(false);
|
const showRoundTips = ref(false);
|
||||||
|
const startCount = ref(false);
|
||||||
const prevLength = ref(0);
|
const prevLength = ref(0);
|
||||||
const timer = ref(null);
|
const timer = ref(null);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.start,
|
||||||
|
(newVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
startCount.value = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.scores,
|
() => props.scores,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
@@ -90,8 +104,7 @@ const simulShoot = async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="header" v-if="debug || totalRound > 0 || power">
|
<view class="header" v-if="totalRound > 0 || power">
|
||||||
<text v-if="debug" class="header-tips">大人,请射箭</text>
|
|
||||||
<text v-if="totalRound > 0" class="round-count">{{
|
<text v-if="totalRound > 0" class="round-count">{{
|
||||||
(currentRound > totalRound ? totalRound : currentRound) +
|
(currentRound > totalRound ? totalRound : currentRound) +
|
||||||
"/" +
|
"/" +
|
||||||
@@ -150,6 +163,7 @@ const simulShoot = async () => {
|
|||||||
<view class="simul" @click="simulShoot" :style="{ color: '#fff' }">
|
<view class="simul" @click="simulShoot" :style="{ color: '#fff' }">
|
||||||
模拟射箭
|
模拟射箭
|
||||||
</view>
|
</view>
|
||||||
|
<StartCountdown :start="startCount" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -162,7 +176,7 @@ const simulShoot = async () => {
|
|||||||
}
|
}
|
||||||
.target {
|
.target {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 5px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
.e-value {
|
.e-value {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -212,10 +226,6 @@ const simulShoot = async () => {
|
|||||||
color: #fed847;
|
color: #fed847;
|
||||||
top: 75px;
|
top: 75px;
|
||||||
}
|
}
|
||||||
.header-tips {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #fed847;
|
|
||||||
}
|
|
||||||
.footer {
|
.footer {
|
||||||
width: calc(100% - 20px);
|
width: calc(100% - 20px);
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
|
|||||||
@@ -29,7 +29,24 @@ onMounted(() => {
|
|||||||
<view class="back-btn" @click="onClick">
|
<view class="back-btn" @click="onClick">
|
||||||
<image src="../static/back.png" mode="widthFix" />
|
<image src="../static/back.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<text>{{ title }}</text>
|
<view>
|
||||||
|
<block v-if="'凹造型,感知距离,小试牛刀'.indexOf(title) === -1">
|
||||||
|
<text>{{ title }}</text>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<view class="first-try-steps">
|
||||||
|
<text :class="title === '凹造型' ? 'current-step' : ''">凹造型</text>
|
||||||
|
<text>—</text>
|
||||||
|
<text :class="title === '感知距离' ? 'current-step' : ''"
|
||||||
|
>感知距离</text
|
||||||
|
>
|
||||||
|
<text>—</text>
|
||||||
|
<text :class="title === '小试牛刀' ? 'current-step' : ''"
|
||||||
|
>小试牛刀</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -42,6 +59,8 @@ onMounted(() => {
|
|||||||
height: 60px;
|
height: 60px;
|
||||||
/* margin-top: var(--status-bar-height); */
|
/* margin-top: var(--status-bar-height); */
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.back-btn {
|
.back-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -52,7 +71,21 @@ onMounted(() => {
|
|||||||
height: 22px;
|
height: 22px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.container > text {
|
.first-try-steps {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff6;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.first-try-steps > text {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
.first-try-steps > text:nth-child(2),
|
||||||
|
.first-try-steps > text:nth-child(4) {
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
.current-step {
|
||||||
|
font-size: 16px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -57,18 +57,23 @@ watch(
|
|||||||
if (newVal === false) {
|
if (newVal === false) {
|
||||||
if (timer.value) clearInterval(timer.value);
|
if (timer.value) clearInterval(timer.value);
|
||||||
}
|
}
|
||||||
if (oldVal === false && newVal === true) {
|
if (!oldVal && newVal === true) {
|
||||||
remain.value = props.total;
|
setTimeout(() => {
|
||||||
timer.value = setInterval(() => {
|
remain.value = props.total;
|
||||||
if (remain.value > 0) {
|
timer.value = setInterval(() => {
|
||||||
remain.value--;
|
if (remain.value > 0) {
|
||||||
} else {
|
remain.value--;
|
||||||
props.onTimeIsUp();
|
} else {
|
||||||
}
|
props.onTimeIsUp();
|
||||||
}, 1000);
|
}
|
||||||
|
}, 1000);
|
||||||
|
}, 3000);
|
||||||
} else {
|
} else {
|
||||||
if (timer.value) clearInterval(timer.value);
|
if (timer.value) clearInterval(timer.value);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
onFinish: {
|
|
||||||
type: Function,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const count = ref(4);
|
const count = ref(4);
|
||||||
@@ -20,7 +16,6 @@ watch(
|
|||||||
if (timer.value) clearInterval(timer.value);
|
if (timer.value) clearInterval(timer.value);
|
||||||
timer.value = setInterval(() => {
|
timer.value = setInterval(() => {
|
||||||
if (count.value <= 1) {
|
if (count.value <= 1) {
|
||||||
props.onFinish();
|
|
||||||
clearInterval(timer.value);
|
clearInterval(timer.value);
|
||||||
}
|
}
|
||||||
count.value -= 1;
|
count.value -= 1;
|
||||||
@@ -46,8 +41,8 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.container {
|
.container {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: 120px;
|
top: calc(50% - 50px);
|
||||||
left: calc(50% - 30px);
|
left: calc(50% - 30px);
|
||||||
}
|
}
|
||||||
.number {
|
.number {
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ watch(
|
|||||||
|
|
||||||
.user-name > text:first-child {
|
.user-name > text:first-child {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
max-width: 100px;
|
max-width: 180rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@@ -176,8 +176,7 @@ watch(
|
|||||||
.rank-tag {
|
.rank-tag {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #00000038;
|
background-color: #00000038;
|
||||||
width: 50px;
|
width: 100rpx;
|
||||||
height: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-tag-progress {
|
.rank-tag-progress {
|
||||||
@@ -200,7 +199,7 @@ watch(
|
|||||||
position: relative;
|
position: relative;
|
||||||
color: #b3b3b3;
|
color: #b3b3b3;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
margin-left: 8px;
|
margin-left: 15rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ const checkBowData = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const topThreeColors = ["#FFD947 ", "#D2D2D2", "#FFA515"];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -126,7 +127,11 @@ const checkBowData = () => {
|
|||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
<view v-if="index > 2" class="view-crown">{{ index + 1 }}</view>
|
<view v-if="index > 2" class="view-crown">{{ index + 1 }}</view>
|
||||||
<Avatar :src="player.avatar" :size="36" />
|
<Avatar
|
||||||
|
:src="player.avatar"
|
||||||
|
:size="36"
|
||||||
|
:borderColor="topThreeColors[index] || ''"
|
||||||
|
/>
|
||||||
<view class="player-title">
|
<view class="player-title">
|
||||||
<text>{{ player.name }}</text>
|
<text>{{ player.name }}</text>
|
||||||
<text>钻石三级</text>
|
<text>钻石三级</text>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const onPay = () => {
|
|||||||
<Container title="会员说明">
|
<Container title="会员说明">
|
||||||
<view v-if="user.id" class="header">
|
<view v-if="user.id" class="header">
|
||||||
<view>
|
<view>
|
||||||
<Avatar :src="user.avatar" :size="35" :border="true" />
|
<Avatar :src="user.avatar" :size="35" />
|
||||||
<text class="truncate">{{ user.nickName }}</text>
|
<text class="truncate">{{ user.nickName }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text>5月5号到期</text>
|
<text>5月5号到期</text>
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ import ScorePanel from "@/components/ScorePanel.vue";
|
|||||||
import Container from "@/components/Container.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import Avatar from "@/components/Avatar.vue";
|
import Avatar from "@/components/Avatar.vue";
|
||||||
import BowPower from "@/components/BowPower.vue";
|
import BowPower from "@/components/BowPower.vue";
|
||||||
import StartCountdown from "@/components/StartCountdown.vue";
|
import { createPractiseAPI } from "@/apis";
|
||||||
import { createPractiseAPI, getHomeData } from "@/apis";
|
|
||||||
import { generateCanvasImage } from "@/util";
|
import { generateCanvasImage } from "@/util";
|
||||||
import { MESSAGETYPES } from "@/constants";
|
import { MESSAGETYPES } from "@/constants";
|
||||||
import useStore from "@/store";
|
import useStore from "@/store";
|
||||||
@@ -32,7 +31,6 @@ const stepButtonTexts = [
|
|||||||
"退出新手试炼",
|
"退出新手试炼",
|
||||||
];
|
];
|
||||||
const title = ref("新手试炼场");
|
const title = ref("新手试炼场");
|
||||||
const startCount = ref(false);
|
|
||||||
const start = ref(false);
|
const start = ref(false);
|
||||||
const practiseResult = ref({});
|
const practiseResult = ref({});
|
||||||
const power = ref(0);
|
const power = ref(0);
|
||||||
@@ -42,11 +40,6 @@ const createPractise = async (arrows) => {
|
|||||||
const result = await createPractiseAPI(arrows);
|
const result = await createPractiseAPI(arrows);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onStart = () => {
|
|
||||||
start.value = true;
|
|
||||||
scores.value = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
async function onReceiveMessage(messages = []) {
|
async function onReceiveMessage(messages = []) {
|
||||||
messages.forEach((msg) => {
|
messages.forEach((msg) => {
|
||||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
||||||
@@ -92,13 +85,11 @@ const nextStep = async () => {
|
|||||||
title.value = "小试牛刀";
|
title.value = "小试牛刀";
|
||||||
} else if (step.value === 3) {
|
} else if (step.value === 3) {
|
||||||
title.value = "新手试炼场";
|
title.value = "新手试炼场";
|
||||||
scores.value = [];
|
|
||||||
await createPractise(total);
|
await createPractise(total);
|
||||||
|
scores.value = [];
|
||||||
step.value = 4;
|
step.value = 4;
|
||||||
startCount.value = true;
|
start.value = true;
|
||||||
} else if (step.value === 5) {
|
} else if (step.value === 5) {
|
||||||
// const result = await getHomeData();
|
|
||||||
// if (result.user) updateUser(result.user);
|
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1,
|
delta: 1,
|
||||||
});
|
});
|
||||||
@@ -121,7 +112,7 @@ const onClose = () => {
|
|||||||
:type="
|
:type="
|
||||||
step === 2
|
step === 2
|
||||||
? 2
|
? 2
|
||||||
: step === 5 || (step === 1 && user.nickName.length > 6)
|
: step === 5 || (step === 0 && user.nickName.length > 6)
|
||||||
? 1
|
? 1
|
||||||
: 0
|
: 0
|
||||||
"
|
"
|
||||||
@@ -155,7 +146,6 @@ const onClose = () => {
|
|||||||
<text
|
<text
|
||||||
>反曲弓运动基本知识和射灵世界系统规则你已Get,是不是挺容易呀:)</text
|
>反曲弓运动基本知识和射灵世界系统规则你已Get,是不是挺容易呀:)</text
|
||||||
>
|
>
|
||||||
<!-- 这行是占位用的 -->
|
|
||||||
<text :style="{ opacity: 0 }">新手试炼场通关啦,优秀!</text>
|
<text :style="{ opacity: 0 }">新手试炼场通关啦,优秀!</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -193,13 +183,15 @@ const onClose = () => {
|
|||||||
:total="100"
|
:total="100"
|
||||||
:start="start"
|
:start="start"
|
||||||
/>
|
/>
|
||||||
<view class="infos" v-if="step === 4">
|
<view class="infos" v-if="step === 2 || step === 4">
|
||||||
<Avatar :src="user.avatar" :size="35" />
|
<text v-if="step === 2">大人,请射箭</text>
|
||||||
|
<Avatar v-if="step === 4" :src="user.avatar" :size="35" />
|
||||||
<BowPower :power="power" />
|
<BowPower :power="power" />
|
||||||
</view>
|
</view>
|
||||||
<BowTarget
|
<BowTarget
|
||||||
|
:start="start"
|
||||||
:avatar="step === 2 ? user.avatar : ''"
|
:avatar="step === 2 ? user.avatar : ''"
|
||||||
:power="step === 2 ? power : 0"
|
:power="step !== 2 ? power : 0"
|
||||||
:debug="step === 2"
|
:debug="step === 2"
|
||||||
v-if="step === 2 || step === 4"
|
v-if="step === 2 || step === 4"
|
||||||
:currentRound="step === 4 ? scores.length : 0"
|
:currentRound="step === 4 ? scores.length : 0"
|
||||||
@@ -228,7 +220,6 @@ const onClose = () => {
|
|||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
<StartCountdown :start="startCount" :onFinish="onStart" />
|
|
||||||
</view>
|
</view>
|
||||||
<view :style="{ marginBottom: '20px' }">
|
<view :style="{ marginBottom: '20px' }">
|
||||||
<SButton v-if="step !== 4" :onClick="nextStep" :disabled="btnDisabled">{{
|
<SButton v-if="step !== 4" :onClick="nextStep" :disabled="btnDisabled">{{
|
||||||
@@ -253,4 +244,9 @@ const onClose = () => {
|
|||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
}
|
}
|
||||||
|
.infos > text {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #fed847;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -74,10 +74,14 @@ const comingSoon = () => {
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const topThreeColors = ["#FFD947 ", "#D2D2D2", "#FFA515"];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="root-container" :style="{ paddingTop: isIos ? '45px' : '40px' }">
|
<view
|
||||||
|
class="root-container"
|
||||||
|
:style="{ paddingTop: isIos ? '86rpx' : '70rpx' }"
|
||||||
|
>
|
||||||
<AppBackground />
|
<AppBackground />
|
||||||
<UserHeader showRank :onSignin="() => (showModal = true)" />
|
<UserHeader showRank :onSignin="() => (showModal = true)" />
|
||||||
<view class="container">
|
<view class="container">
|
||||||
@@ -106,7 +110,6 @@ const comingSoon = () => {
|
|||||||
<image src="../static/a3@2x.png" mode="widthFix" />
|
<image src="../static/a3@2x.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="ranking-section">
|
<view class="ranking-section">
|
||||||
<image src="../static/a4@2x.png" mode="widthFix" />
|
<image src="../static/a4@2x.png" mode="widthFix" />
|
||||||
<button
|
<button
|
||||||
@@ -116,12 +119,16 @@ const comingSoon = () => {
|
|||||||
></button>
|
></button>
|
||||||
<view class="ranking-players">
|
<view class="ranking-players">
|
||||||
<img src="../static/juezhanbang.png" mode="widthFix" />
|
<img src="../static/juezhanbang.png" mode="widthFix" />
|
||||||
|
<view class="divide-line"></view>
|
||||||
<view class="player-avatars">
|
<view class="player-avatars">
|
||||||
<view
|
<view
|
||||||
v-for="i in 6"
|
v-for="i in 6"
|
||||||
:key="i"
|
:key="i"
|
||||||
class="player-avatar"
|
class="player-avatar"
|
||||||
:style="{ zIndex: 6 - i }"
|
:style="{
|
||||||
|
zIndex: 6 - i,
|
||||||
|
borderColor: topThreeColors[i - 1] || '#000',
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<image v-if="i === 1" src="../static/champ1.png" />
|
<image v-if="i === 1" src="../static/champ1.png" />
|
||||||
<image v-if="i === 2" src="../static/champ2.png" />
|
<image v-if="i === 2" src="../static/champ2.png" />
|
||||||
@@ -277,7 +284,7 @@ const comingSoon = () => {
|
|||||||
|
|
||||||
.ranking-players > image:first-child {
|
.ranking-players > image:first-child {
|
||||||
width: 28%;
|
width: 28%;
|
||||||
margin-right: 10px;
|
transform: translateX(-10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-avatars {
|
.player-avatars {
|
||||||
@@ -285,13 +292,20 @@ const comingSoon = () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.divide-line {
|
||||||
|
width: 1px;
|
||||||
|
height: 35px;
|
||||||
|
background-color: #80808033;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.player-avatar,
|
.player-avatar,
|
||||||
.more-players {
|
.more-players {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: -10px;
|
margin-right: -10px;
|
||||||
border: 1px solid white;
|
border: 1px solid #000;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,18 +313,18 @@ const comingSoon = () => {
|
|||||||
.player-avatar > view:first-child {
|
.player-avatar > view:first-child {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -10px;
|
top: -10px;
|
||||||
left: 10px;
|
left: 12px;
|
||||||
width: 18px;
|
width: 16px;
|
||||||
height: 18px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
.player-avatar > view:first-child {
|
.player-avatar > view:first-child {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #777777;
|
background: #777777;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 11px;
|
font-size: 10px;
|
||||||
line-height: 20px;
|
line-height: 18px;
|
||||||
width: 20px;
|
width: 18px;
|
||||||
height: 20px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
.player-avatar > image:last-child {
|
.player-avatar > image:last-child {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -320,15 +334,14 @@ const comingSoon = () => {
|
|||||||
|
|
||||||
.more-players {
|
.more-players {
|
||||||
background: rgba(255, 255, 255, 0.2);
|
background: rgba(255, 255, 255, 0.2);
|
||||||
border: none;
|
font-size: 9px;
|
||||||
font-size: 10px;
|
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
display: flex;
|
text-align: center;
|
||||||
justify-content: flex-end;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-players > text {
|
.more-players > text {
|
||||||
margin-right: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.region-stats {
|
.region-stats {
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ const checkBowData = () => {
|
|||||||
</view>
|
</view>
|
||||||
<view class="score-row">
|
<view class="score-row">
|
||||||
<view>
|
<view>
|
||||||
<Avatar :src="round.blue.avatar" :size="25" :borderColor="1" />
|
<Avatar :src="round.blue.avatar" :size="25" borderColor="#64BAFF" />
|
||||||
<text v-for="(arrow, index2) in round.blue.arrows" :key="index2">
|
<text v-for="(arrow, index2) in round.blue.arrows" :key="index2">
|
||||||
{{ arrow.ring }}环
|
{{ arrow.ring }}环
|
||||||
</text>
|
</text>
|
||||||
@@ -149,7 +149,7 @@ const checkBowData = () => {
|
|||||||
</view>
|
</view>
|
||||||
<view class="score-row">
|
<view class="score-row">
|
||||||
<view>
|
<view>
|
||||||
<Avatar :src="round.red.avatar" :size="25" :borderColor="2" />
|
<Avatar :src="round.red.avatar" :size="25" borderColor="#FF6767" />
|
||||||
<text v-for="(arrow, index2) in round.red.arrows" :key="index2">
|
<text v-for="(arrow, index2) in round.red.arrows" :key="index2">
|
||||||
{{ arrow.ring }}环
|
{{ arrow.ring }}环
|
||||||
</text>
|
</text>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import ScoreResult from "@/components/ScoreResult.vue";
|
|||||||
import SButton from "@/components/SButton.vue";
|
import SButton from "@/components/SButton.vue";
|
||||||
import Avatar from "@/components/Avatar.vue";
|
import Avatar from "@/components/Avatar.vue";
|
||||||
import BowPower from "@/components/BowPower.vue";
|
import BowPower from "@/components/BowPower.vue";
|
||||||
import StartCountdown from "@/components/StartCountdown.vue";
|
|
||||||
import { createPractiseAPI, getHomeData } from "@/apis";
|
import { createPractiseAPI, getHomeData } from "@/apis";
|
||||||
import { generateCanvasImage } from "@/util";
|
import { generateCanvasImage } from "@/util";
|
||||||
import { MESSAGETYPES, roundsName } from "@/constants";
|
import { MESSAGETYPES, roundsName } from "@/constants";
|
||||||
@@ -17,7 +16,6 @@ import { storeToRefs } from "pinia";
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const { user } = storeToRefs(store);
|
const { user } = storeToRefs(store);
|
||||||
const { updateUser } = store;
|
const { updateUser } = store;
|
||||||
const startCount = ref(false);
|
|
||||||
const start = ref(false);
|
const start = ref(false);
|
||||||
const showScore = ref(false);
|
const showScore = ref(false);
|
||||||
const scores = ref([]);
|
const scores = ref([]);
|
||||||
@@ -30,13 +28,7 @@ const onReady = async () => {
|
|||||||
await createPractiseAPI(total);
|
await createPractiseAPI(total);
|
||||||
currentRound.value = 0;
|
currentRound.value = 0;
|
||||||
scores.value = [];
|
scores.value = [];
|
||||||
startCount.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onStart = () => {
|
|
||||||
start.value = true;
|
start.value = true;
|
||||||
scores.value = [];
|
|
||||||
currentRound.value = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async function onReceiveMessage(messages = []) {
|
async function onReceiveMessage(messages = []) {
|
||||||
@@ -95,6 +87,7 @@ onUnmounted(() => {
|
|||||||
<BowPower :power="power" />
|
<BowPower :power="power" />
|
||||||
</view>
|
</view>
|
||||||
<BowTarget
|
<BowTarget
|
||||||
|
:start="start"
|
||||||
:totalRound="start ? total / 4 : 0"
|
:totalRound="start ? total / 4 : 0"
|
||||||
:currentRound="currentRound"
|
:currentRound="currentRound"
|
||||||
:scores="scores"
|
:scores="scores"
|
||||||
@@ -115,12 +108,9 @@ onUnmounted(() => {
|
|||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
<StartCountdown :start="startCount" :onFinish="onStart" />
|
|
||||||
</view>
|
</view>
|
||||||
<view :style="{ marginBottom: '20px' }">
|
<view :style="{ marginBottom: '20px' }">
|
||||||
<SButton v-if="!startCount" :onClick="onReady">
|
<SButton v-if="!start" :onClick="onReady">准备好了,直接开始</SButton>
|
||||||
准备好了,直接开始
|
|
||||||
</SButton>
|
|
||||||
</view>
|
</view>
|
||||||
</Container>
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import ScoreResult from "@/components/ScoreResult.vue";
|
|||||||
import SButton from "@/components/SButton.vue";
|
import SButton from "@/components/SButton.vue";
|
||||||
import Avatar from "@/components/Avatar.vue";
|
import Avatar from "@/components/Avatar.vue";
|
||||||
import BowPower from "@/components/BowPower.vue";
|
import BowPower from "@/components/BowPower.vue";
|
||||||
import StartCountdown from "@/components/StartCountdown.vue";
|
|
||||||
import { createPractiseAPI, getHomeData } from "@/apis";
|
import { createPractiseAPI, getHomeData } from "@/apis";
|
||||||
import { generateCanvasImage } from "@/util";
|
import { generateCanvasImage } from "@/util";
|
||||||
import { MESSAGETYPES } from "@/constants";
|
import { MESSAGETYPES } from "@/constants";
|
||||||
@@ -17,7 +16,6 @@ import { storeToRefs } from "pinia";
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const { user } = storeToRefs(store);
|
const { user } = storeToRefs(store);
|
||||||
const { updateUser } = store;
|
const { updateUser } = store;
|
||||||
const startCount = ref(false);
|
|
||||||
const start = ref(false);
|
const start = ref(false);
|
||||||
const showScore = ref(false);
|
const showScore = ref(false);
|
||||||
const scores = ref([]);
|
const scores = ref([]);
|
||||||
@@ -30,13 +28,7 @@ const onReady = async () => {
|
|||||||
await createPractiseAPI(total);
|
await createPractiseAPI(total);
|
||||||
currentRound.value = 0;
|
currentRound.value = 0;
|
||||||
scores.value = [];
|
scores.value = [];
|
||||||
startCount.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onStart = () => {
|
|
||||||
start.value = true;
|
start.value = true;
|
||||||
scores.value = [];
|
|
||||||
currentRound.value = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async function onReceiveMessage(messages = []) {
|
async function onReceiveMessage(messages = []) {
|
||||||
@@ -88,6 +80,7 @@ onUnmounted(() => {
|
|||||||
<BowPower :power="power" />
|
<BowPower :power="power" />
|
||||||
</view>
|
</view>
|
||||||
<BowTarget
|
<BowTarget
|
||||||
|
:start="start"
|
||||||
:totalRound="start ? total : 0"
|
:totalRound="start ? total : 0"
|
||||||
:currentRound="currentRound"
|
:currentRound="currentRound"
|
||||||
:scores="scores"
|
:scores="scores"
|
||||||
@@ -115,12 +108,9 @@ onUnmounted(() => {
|
|||||||
:result="practiseResult"
|
:result="practiseResult"
|
||||||
/>
|
/>
|
||||||
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
<canvas class="share-canvas" canvas-id="shareCanvas"></canvas>
|
||||||
<StartCountdown :start="startCount" :onFinish="onStart" />
|
|
||||||
</view>
|
</view>
|
||||||
<view :style="{ marginBottom: '20px' }">
|
<view :style="{ marginBottom: '20px' }">
|
||||||
<SButton v-if="!startCount" :onClick="onReady"
|
<SButton v-if="!start" :onClick="onReady">准备好了,直接开始</SButton>
|
||||||
>准备好了,直接开始</SButton
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</Container>
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -100,7 +100,9 @@ const onClickTab = (index) => {
|
|||||||
<view class="score-row" v-for="(player, index) in players" :key="index">
|
<view class="score-row" v-for="(player, index) in players" :key="index">
|
||||||
<Avatar
|
<Avatar
|
||||||
:src="player.avatar"
|
:src="player.avatar"
|
||||||
:borderColor="data.bluePlayers[player.playerId] ? 1 : 2"
|
:borderColor="
|
||||||
|
data.bluePlayers[player.playerId] ? '#64BAFF' : '#FF6767'
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
v-if="selected === 0"
|
v-if="selected === 0"
|
||||||
|
|||||||
Reference in New Issue
Block a user