3 Commits
Author SHA1 Message Date
zhangyi 7093d3e4e5 update:替换网络图片 2026-09-22 10:00:26 +08:00
zhangyi e98e5129d2 update:优化特效 2026-09-22 09:37:37 +08:00
zhangyi 01e8f6c6da update:优化ota状态共享 2026-09-21 16:22:05 +08:00
94 changed files with 1088 additions and 624 deletions
+10 -13
View File
@@ -451,7 +451,7 @@ export const generateShareImage = async (canvasId, data) => {
hasPoint ? 756 : 402 hasPoint ? 756 : 402
); );
renderText(ctx, "扫码打卡", 13, "#FFA118", 142, hasPoint ? 777 : 422); renderText(ctx, "扫码打卡", 13, "#FFA118", 142, hasPoint ? 777 : 422);
const pointImg = await loadCanvasImage(canvas, "../static/point.png"); const pointImg = await loadCanvasImage(canvas, "https://static.shelingxingqiu.com/shootmini/static/point.png");
ctx.drawImage(pointImg, 120, hasPoint ? 765 : 410, 18, 14); ctx.drawImage(pointImg, 120, hasPoint ? 765 : 410, 18, 14);
// 2D 即时绘制,无需 ctx.draw() // 2D 即时绘制,无需 ctx.draw()
} catch (e) { } catch (e) {
@@ -635,7 +635,7 @@ export function renderScores(ctx, arrows = [], bgImg) {
); );
} else { } else {
ctx.drawImage( ctx.drawImage(
"/static/score-bg.png", "https://static.shelingxingqiu.com/shootmini/static/score-bg.png",
16 + (i % 9) * 30, 16 + (i % 9) * 30,
290 + Math.ceil((i + 1) / 9) * 30, 290 + Math.ceil((i + 1) / 9) * 30,
27, 27,
@@ -657,7 +657,7 @@ export function renderScores(ctx, arrows = [], bgImg) {
ctx.drawImage(bgImg, 24 + rowIndex * 42, i > 5 ? 362 : 320, 38, 38); ctx.drawImage(bgImg, 24 + rowIndex * 42, i > 5 ? 362 : 320, 38, 38);
} else { } else {
ctx.drawImage( ctx.drawImage(
"/static/score-bg.png", "https://static.shelingxingqiu.com/shootmini/static/score-bg.png",
24 + rowIndex * 42, 24 + rowIndex * 42,
i > 5 ? 362 : 320, i > 5 ? 362 : 320,
38, 38,
@@ -708,10 +708,7 @@ export async function sharePractiseData(canvasId, type, user, data) {
// 头像与段位框属于装饰图片,缺失时使用兜底或跳过,避免阻断分享。 // 头像与段位框属于装饰图片,缺失时使用兜底或跳过,避免阻断分享。
const loadProfileImage = async (src, fallbackSrc = "", label = "") => { const loadProfileImage = async (src, fallbackSrc = "", label = "") => {
const normalizedSrc = const normalizedSrc = typeof src === "string" ? src : "";
typeof src === "string" && src.startsWith("../static/")
? src.slice(2)
: src;
if (normalizedSrc) { if (normalizedSrc) {
try { try {
const path = await loadImage(normalizedSrc); const path = await loadImage(normalizedSrc);
@@ -725,20 +722,20 @@ export async function sharePractiseData(canvasId, type, user, data) {
const avatarImgPromise = loadProfileImage( const avatarImgPromise = loadProfileImage(
user?.avatar, user?.avatar,
"/static/user-icon.png", "https://static.shelingxingqiu.com/shootmini/static/user-icon.png",
"avatar" "avatar"
); );
const lvlImgPromise = loadProfileImage(user?.lvlImage, "", "level"); const lvlImgPromise = loadProfileImage(user?.lvlImage, "", "level");
let titleImageSrc = "/static/first-try-title.png"; let titleImageSrc = "https://static.shelingxingqiu.com/shootmini/static/first-try-title.png";
if (type == 2) { if (type == 2) {
titleImageSrc = "/static/practise-one-title.png"; titleImageSrc = "https://static.shelingxingqiu.com/shootmini/static/practise-one-title.png";
} else if (type == 3) { } else if (type == 3) {
titleImageSrc = "/static/practise-two-title.png"; titleImageSrc = "https://static.shelingxingqiu.com/shootmini/static/practise-two-title.png";
} }
const titleImgPromise = loadCanvasImage(canvas, titleImageSrc); const titleImgPromise = loadCanvasImage(canvas, titleImageSrc);
const scoreBgImgPromise = loadCanvasImage(canvas, "/static/score-bg.png"); const scoreBgImgPromise = loadCanvasImage(canvas, "https://static.shelingxingqiu.com/shootmini/static/score-bg.png");
const qrCodeImgPromise = loadCanvasImage(canvas, "/static/qr-code.png"); const qrCodeImgPromise = loadCanvasImage(canvas, "https://static.shelingxingqiu.com/shootmini/static/qr-code.png");
const [avatarImg, lvlImg, titleImg, scoreBgImg, qrCodeImg] = const [avatarImg, lvlImg, titleImg, scoreBgImg, qrCodeImg] =
await Promise.all([ await Promise.all([
+1 -1
View File
@@ -85,7 +85,7 @@ const props = defineProps({
<image <image
class="bg-image" class="bg-image"
v-if="type === 12" v-if="type === 12"
src="../static/device-assets/my-device-unbound-background.png" src="https://static.shelingxingqiu.com/shootmini/static/device-assets/my-device-unbound-background.png"
mode="widthFix" mode="widthFix"
/> />
<image <image
+1 -1
View File
@@ -1,6 +1,6 @@
<script setup> <script setup>
const tabs = [ const tabs = [
{ image: "../static/tab-vip.png" }, { image: "https://static.shelingxingqiu.com/shootmini/static/tab-vip.png" },
{ image: "https://static.shelingxingqiu.com/shootmini/static/tab-point-book.png" }, { image: "https://static.shelingxingqiu.com/shootmini/static/tab-point-book.png" },
{ image: "https://static.shelingxingqiu.com/shootmini/static/tab-mall.png" }, { image: "https://static.shelingxingqiu.com/shootmini/static/tab-mall.png" },
]; ];
+4 -4
View File
@@ -77,25 +77,25 @@ watch(
/> />
<image <image
v-if="rank === 1" v-if="rank === 1"
src="../static/champ1.png" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<image <image
v-if="rank === 2" v-if="rank === 2"
src="../static/champ2.png" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<image <image
v-if="rank === 3" v-if="rank === 3"
src="../static/champ3.png" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<view v-if="rank > 3" class="rank-view">{{ rank }}</view> <view v-if="rank > 3" class="rank-view">{{ rank }}</view>
<image <image
:src="src || '../static/user-icon.png'" :src="src || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
:mode="imageMode" :mode="imageMode"
:style="avatarImageStyle" :style="avatarImageStyle"
class="avatar-image" class="avatar-image"
+1 -1
View File
@@ -104,7 +104,7 @@ onBeforeUnmount(() => {
<block v-else-if="game.roomID"> <block v-else-if="game.roomID">
<text>返回房间</text> <text>返回房间</text>
</block> </block>
<image src="../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
</template> </template>
+2 -2
View File
@@ -72,7 +72,7 @@ const isMember = (player = {}) => player.vip === true || player.sVip === true;
</view> </view>
<image <image
v-if="winner === 1" v-if="winner === 1"
src="../static/winner-badge.png" src="https://static.shelingxingqiu.com/shootmini/static/winner-badge.png"
mode="widthFix" mode="widthFix"
class="left-winner-badge" class="left-winner-badge"
/> />
@@ -100,7 +100,7 @@ const isMember = (player = {}) => player.vip === true || player.sVip === true;
</view> </view>
<image <image
v-if="winner === 2" v-if="winner === 2"
src="../static/winner-badge.png" src="https://static.shelingxingqiu.com/shootmini/static/winner-badge.png"
mode="widthFix" mode="widthFix"
class="right-winner-badge" class="right-winner-badge"
/> />
+1 -1
View File
@@ -58,7 +58,7 @@ const props = defineProps({
</view> </view>
</view> </view>
<view @click="onClose"> <view @click="onClose">
<image src="../static/close-white.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-white.png" mode="widthFix" />
</view> </view>
</view> </view>
<view :style="{ width: '100%', marginBottom: '20px' }"> <view :style="{ width: '100%', marginBottom: '20px' }">
+1 -1
View File
@@ -8,7 +8,7 @@ const { deviceBattery: power } = storeToRefs(store);
<template> <template>
<view class="container"> <view class="container">
<image src="../static/b-power.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/b-power.png" mode="widthFix" />
<view>{{ power === null ? "电量--" : `电量${power}%` }}</view> <view>{{ power === null ? "电量--" : `电量${power}%` }}</view>
</view> </view>
</template> </template>
+3 -3
View File
@@ -527,7 +527,7 @@ onBeforeUnmount(() => {
<view :class="['target', { 'target--shake': targetShaking }]"> <view :class="['target', { 'target--shake': targetShaking }]">
<view v-if="angle !== null" class="arrow-dir" :style="arrowStyle"> <view v-if="angle !== null" class="arrow-dir" :style="arrowStyle">
<view :style="{ background: circleColor }"> <view :style="{ background: circleColor }">
<image src="../static/dot-circle.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/dot-circle.png" mode="widthFix" />
</view> </view>
</view> </view>
<view v-if="stop" class="stop-sign">中场休息</view> <view v-if="stop" class="stop-sign">中场休息</view>
@@ -565,7 +565,7 @@ onBeforeUnmount(() => {
<image <image
v-if="pMode && isSvip && bow.ring > 0 && !shouldHideRedHit(index)" v-if="pMode && isSvip && bow.ring > 0 && !shouldHideRedHit(index)"
class="svip-hit-bg" class="svip-hit-bg"
src="../static/vip/svip-xuan.png" src="https://static.shelingxingqiu.com/shootmini/static/vip/svip-xuan.png"
:style="getSvipHitBgStyle(bow)" :style="getSvipHitBgStyle(bow)"
mode="aspectFit" mode="aspectFit"
/> />
@@ -585,7 +585,7 @@ onBeforeUnmount(() => {
<image <image
v-if="pMode && isSvip && bow.ring > 0 && !shouldHideBlueHit(index)" v-if="pMode && isSvip && bow.ring > 0 && !shouldHideBlueHit(index)"
class="svip-hit-bg" class="svip-hit-bg"
src="../static/vip/svip-xuan.png" src="https://static.shelingxingqiu.com/shootmini/static/vip/svip-xuan.png"
:style="getSvipHitBgStyle(bow)" :style="getSvipHitBgStyle(bow)"
mode="aspectFit" mode="aspectFit"
/> />
+3 -3
View File
@@ -266,16 +266,16 @@ onBeforeUnmount(() => {
@touchstart.stop="confirmAdd" @touchstart.stop="confirmAdd"
:style="{ ...getNewPos() }" :style="{ ...getNewPos() }"
> >
<image src="../static/arrow-edit-save.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/arrow-edit-save.png" mode="widthFix" />
</view> </view>
<view class="edit-btn delete-btn" @touchstart.stop="deleteArrow"> <view class="edit-btn delete-btn" @touchstart.stop="deleteArrow">
<image src="../static/arrow-edit-delete.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/arrow-edit-delete.png" mode="widthFix" />
</view> </view>
<view <view
class="edit-btn drag-btn" class="edit-btn drag-btn"
@touchstart.stop="startDrag($event)" @touchstart.stop="startDrag($event)"
> >
<image src="../static/arrow-edit-move.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/arrow-edit-move.png" mode="widthFix" />
</view> </view>
</view> </view>
</view> </view>
+4 -4
View File
@@ -29,14 +29,14 @@ const props = defineProps({
font-size: 24rpx; font-size: 24rpx;
} }
.normal { .normal {
background-image: url("../static/bubble-tip.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip.png");
width: 157rpx; width: 157rpx;
height: 105rpx; height: 105rpx;
padding-top: 10px; padding-top: 10px;
padding-left: 30rpx; padding-left: 30rpx;
} }
.normal2 { .normal2 {
background-image: url("../static/bubble-tip4.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip4.png");
width: 190rpx; width: 190rpx;
height: 105rpx; height: 105rpx;
padding-top: 10px; padding-top: 10px;
@@ -46,14 +46,14 @@ const props = defineProps({
z-index: 1; z-index: 1;
} }
.long { .long {
background-image: url("../static/bubble-tip2.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip2.png");
width: 370rpx; width: 370rpx;
height: 70rpx; height: 70rpx;
top: -50%; top: -50%;
left: 49%; left: 49%;
} }
.short { .short {
background-image: url("../static/bubble-tip3.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip3.png");
width: 300rpx; width: 300rpx;
height: 70rpx; height: 70rpx;
top: -50%; top: -50%;
+399
View File
@@ -0,0 +1,399 @@
<script setup>
import { computed } from "vue";
const props = defineProps({
variant: {
type: String,
default: "home",
validator: (value) => ["home", "detail"].includes(value),
},
});
// 固定粒子分布营造随机感,避免每次进入页面时因运行时随机数产生位置跳变。
const sparkSeeds = [
[1, "dot", 18, 98, -28, 5, 5, 2.3, 0.4],
[2, "streak", 23, 90, -38, 4, 18, 2, 1.1, true],
[3, "dot", 28, 112, -17, 6, 6, 2.8, 1.9, true],
[4, "dot", 32, 104, -12, 12, 12, 2.6, 0.7, true, true],
[5, "dot", 36, 88, -24, 4, 4, 1.8, 1.4],
[6, "streak", 40, 116, -8, 4, 20, 2.4, 2.2, true],
[7, "dot", 44, 96, -16, 7, 7, 2.1, 0.2],
[8, "dot", 48, 120, -4, 5, 5, 2.9, 1.3, true],
[9, "dot", 51, 110, 3, 14, 14, 3, 2.7, true, true],
[10, "streak", 54, 92, 8, 4, 22, 1.9, 0.8],
[11, "dot", 58, 105, 14, 6, 6, 2.5, 1.6, true],
[12, "dot", 62, 86, 21, 4, 4, 2, 0.5],
[13, "dot", 66, 114, 10, 7, 7, 2.7, 2.1, true],
[14, "streak", 70, 96, 28, 4, 18, 2.2, 1],
[15, "dot", 74, 108, 20, 11, 11, 2.8, 2.4, true, true],
[16, "dot", 80, 90, 35, 5, 5, 2.3, 0.3, true],
[17, "dot", 21, 118, -8, 4, 4, 2.6, 1.7],
[18, "streak", 27, 84, -31, 3, 16, 1.8, 0.6, true],
[19, "dot", 34, 122, -3, 6, 6, 2.9, 2.3, true],
[20, "dot", 42, 102, 5, 5, 5, 2.2, 0.9],
[21, "dot", 47, 88, -10, 13, 13, 2.7, 1.5, true, true],
[22, "streak", 56, 120, 16, 4, 21, 2.5, 2.6, true],
[23, "dot", 64, 100, 24, 7, 7, 2.4, 0.1],
[24, "dot", 72, 84, 38, 5, 5, 2, 1.2, true],
[25, "dot", 82, 116, 12, 4, 4, 2.8, 2],
[26, "dot", 68, 124, 7, 10, 10, 3.1, 2.9, true, true],
[27, "streak", 77, 98, 33, 4, 19, 2.1, 0.7, true],
[28, "dot", 29, 94, -20, 7, 7, 2.5, 1.4],
[29, "dot", 53, 126, 0, 5, 5, 2.3, 2.2, true],
[30, "dot", 60, 108, 18, 6, 6, 2.6, 0.4],
];
const deviceSparks = computed(() => {
const isDetail = props.variant === "detail";
const sizeScale = isDetail ? 1.25 : 1;
const bottomOffset = isDetail ? 120 : 0;
return sparkSeeds.map(([
id,
type,
left,
bottom,
angle,
width,
height,
duration,
delay,
long = false,
large = false,
]) => ({
id,
type,
long,
large,
trackStyle: {
left: `${left}%`,
bottom: `${bottom + bottomOffset}rpx`,
transform: `rotate(${angle}deg)`,
},
sparkStyle: {
width: `${width * sizeScale}rpx`,
height: `${height * sizeScale}rpx`,
marginLeft: `${-(width * sizeScale) / 2}rpx`,
animationDuration: `${duration}s`,
animationDelay: `-${delay}s`,
},
}));
});
</script>
<template>
<view
class="device-online-effects"
:class="`device-online-effects--${variant}`"
>
<view class="device-online-rays-stage">
<view class="device-online-rays-orbit">
<view class="device-online-ray device-online-ray--1" />
<view class="device-online-ray device-online-ray--2" />
<view class="device-online-ray device-online-ray--3" />
<view class="device-online-ray device-online-ray--4" />
<view class="device-online-ray device-online-ray--5" />
<view class="device-online-ray device-online-ray--6" />
<view class="device-online-ray device-online-ray--7" />
</view>
</view>
<view class="device-online-particles">
<view
v-for="spark in deviceSparks"
:key="spark.id"
class="device-online-spark-track"
:style="spark.trackStyle"
>
<view
class="device-online-spark"
:class="[
`device-online-spark--${spark.type}`,
{
'device-online-spark--long': spark.long,
'device-online-spark--large': spark.large,
}
]"
:style="spark.sparkStyle"
/>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.device-online-effects {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 3;
overflow: hidden;
pointer-events: none;
}
/* 光束沿底座椭圆轨迹扫动,用位移、明暗和横向缩放表达前后纵深。 */
.device-online-rays-stage {
position: absolute;
left: 0;
bottom: 112rpx;
width: 100%;
height: 140rpx;
overflow: hidden;
transform-origin: 50% 100%;
}
.device-online-rays-orbit {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform-origin: 50% 100%;
animation: device-rays-rotate 6s ease-in-out infinite;
}
.device-online-ray {
position: absolute;
bottom: 0;
left: 50%;
width: 48rpx;
height: 132rpx;
margin-left: -24rpx;
transform-origin: 50% 100%;
border-radius: 50% 50% 12% 12%;
background: linear-gradient(
180deg,
rgba(255, 255, 244, 0) 0%,
rgba(255, 254, 239, 0.1) 36%,
rgba(255, 248, 215, 0.22) 72%,
rgba(255, 232, 151, 0.36) 100%
);
}
.device-online-ray--1 {
opacity: 0.55;
transform: rotate(-55deg);
}
.device-online-ray--2 {
width: 68rpx;
margin-left: -34rpx;
opacity: 0.72;
transform: rotate(-36deg);
}
.device-online-ray--3 {
width: 42rpx;
margin-left: -21rpx;
opacity: 0.6;
transform: rotate(-18deg);
}
.device-online-ray--4 {
width: 76rpx;
margin-left: -38rpx;
opacity: 0.82;
}
.device-online-ray--5 {
width: 46rpx;
margin-left: -23rpx;
opacity: 0.64;
transform: rotate(19deg);
}
.device-online-ray--6 {
width: 64rpx;
margin-left: -32rpx;
opacity: 0.7;
transform: rotate(38deg);
}
.device-online-ray--7 {
width: 44rpx;
margin-left: -22rpx;
opacity: 0.56;
transform: rotate(56deg);
}
.device-online-particles {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.device-online-spark-track {
position: absolute;
width: 0;
height: 0;
transform-origin: center bottom;
}
.device-online-spark {
position: absolute;
bottom: 0;
left: 0;
background: #fff6bd;
box-shadow: 0 0 6rpx rgba(255, 225, 112, 0.65);
animation: device-spark-rise 2.4s linear infinite;
}
.device-online-spark--dot {
border-radius: 50%;
}
.device-online-spark--streak {
border-radius: 50%;
background: linear-gradient(
180deg,
rgba(255, 255, 235, 0) 0%,
rgba(255, 250, 205, 0.75) 45%,
#ffe379 100%
);
}
.device-online-spark--long {
animation-name: device-spark-rise-long;
}
.device-online-spark--large {
background: #fffbdc;
box-shadow:
0 0 10rpx rgba(255, 243, 174, 0.95),
0 0 20rpx rgba(255, 207, 74, 0.72);
}
.device-online-effects--detail .device-online-rays-stage {
bottom: 215rpx;
height: 190rpx;
transform: scaleX(1.35);
}
.device-online-effects--detail .device-online-ray {
height: 180rpx;
}
.device-online-effects--detail .device-online-rays-orbit {
animation-name: device-rays-rotate-detail;
}
.device-online-effects--detail .device-online-spark {
animation-name: device-spark-rise-detail;
}
.device-online-effects--detail .device-online-spark--long {
animation-name: device-spark-rise-detail-long;
}
@keyframes device-spark-rise {
0% {
opacity: 0;
transform: translateY(8rpx) scale(0.45);
}
16% {
opacity: 1;
}
72% {
opacity: 0.62;
}
100% {
opacity: 0;
transform: translateY(-148rpx) scale(1);
}
}
@keyframes device-spark-rise-long {
0% {
opacity: 0;
transform: translateY(8rpx) scale(0.4);
}
16% {
opacity: 1;
}
72% {
opacity: 0.55;
}
100% {
opacity: 0;
transform: translateY(-176rpx) scale(1);
}
}
@keyframes device-spark-rise-detail {
0% {
opacity: 0;
transform: translateY(12rpx) scale(0.45);
}
16% {
opacity: 1;
}
72% {
opacity: 0.62;
}
100% {
opacity: 0;
transform: translateY(-225rpx) scale(1);
}
}
@keyframes device-spark-rise-detail-long {
0% {
opacity: 0;
transform: translateY(12rpx) scale(0.4);
}
16% {
opacity: 1;
}
72% {
opacity: 0.55;
}
100% {
opacity: 0;
transform: translateY(-270rpx) scale(1);
}
}
@keyframes device-rays-rotate {
0%,
100% {
opacity: 0.48;
transform: translate(-42rpx, 4rpx) skewX(-8deg) scaleX(0.82);
}
25% {
opacity: 0.88;
transform: translate(0, 0) skewX(0deg) scaleX(1.05);
}
50% {
opacity: 0.48;
transform: translate(42rpx, 4rpx) skewX(8deg) scaleX(0.82);
}
75% {
opacity: 0.24;
transform: translate(0, 10rpx) skewX(0deg) scaleX(0.68);
}
}
@keyframes device-rays-rotate-detail {
0%,
100% {
opacity: 0.48;
transform: translate(-62rpx, 6rpx) skewX(-8deg) scaleX(0.82);
}
25% {
opacity: 0.88;
transform: translate(0, 0) skewX(0deg) scaleX(1.05);
}
50% {
opacity: 0.48;
transform: translate(62rpx, 6rpx) skewX(8deg) scaleX(0.82);
}
75% {
opacity: 0.24;
transform: translate(0, 14rpx) skewX(0deg) scaleX(0.68);
}
}
</style>
+1 -1
View File
@@ -203,7 +203,7 @@ onMounted(async () => {
<button hover-class="none"> <button hover-class="none">
<image <image
v-if="!noArrow" v-if="!noArrow"
src="../static/arrow-grey.png" src="https://static.shelingxingqiu.com/shootmini/static/arrow-grey.png"
mode="widthFix" mode="widthFix"
:style="{ transform: expand ? 'rotateX(180deg)' : 'rotateX(0deg)' }" :style="{ transform: expand ? 'rotateX(180deg)' : 'rotateX(0deg)' }"
/> />
+2 -2
View File
@@ -10,8 +10,8 @@ defineProps({
}, },
}); });
const bubbleTypes = [ const bubbleTypes = [
"../static/long-bubble.png", "https://static.shelingxingqiu.com/shootmini/static/long-bubble.png",
"../static/long-bubble-middle.png", "https://static.shelingxingqiu.com/shootmini/static/long-bubble-middle.png",
"https://static.shelingxingqiu.com/shootmini/static/long-bubble-tall.png", "https://static.shelingxingqiu.com/shootmini/static/long-bubble-tall.png",
]; ];
</script> </script>
+5 -5
View File
@@ -115,10 +115,10 @@ onBeforeUnmount(() => {
<template> <template>
<view class="container"> <view class="container">
<view class="back-btn" @click="onClick"> <view class="back-btn" @click="onClick">
<image v-if="whiteBackArrow" src="../static/back.png" mode="widthFix" /> <image v-if="whiteBackArrow" src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
<image <image
v-if="!whiteBackArrow" v-if="!whiteBackArrow"
src="../static/back-black.png" src="https://static.shelingxingqiu.com/shootmini/static/back-black.png"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
@@ -156,12 +156,12 @@ onBeforeUnmount(() => {
<text v-else class="truncate">{{ user.nickName }}</text> <text v-else class="truncate">{{ user.nickName }}</text>
<image <image
v-if="heat" v-if="heat"
:src="`../static/hot${heat}.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/hot${heat}.png`"
mode="widthFix" mode="widthFix"
/> />
</block> </block>
<block v-else> <block v-else>
<image src="../static/user-icon.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/user-icon.png" mode="widthFix" />
<text>新来的弓箭手你好呀~</text> <text>新来的弓箭手你好呀~</text>
</block> </block>
</view> </view>
@@ -229,7 +229,7 @@ onBeforeUnmount(() => {
:style="battleRoomBtnStyle" :style="battleRoomBtnStyle"
> >
<text class="battle-room-number__text">房号: {{ game.roomNumber }}</text> <text class="battle-room-number__text">房号: {{ game.roomNumber }}</text>
<image src="../static/share2.png" mode="widthFix" class="battle-room-number__icon" /> <image src="https://static.shelingxingqiu.com/shootmini/static/share2.png" mode="widthFix" class="battle-room-number__icon" />
</button> </button>
</view> </view>
</template> </template>
+1 -1
View File
@@ -146,7 +146,7 @@ onBeforeUnmount(() => {
<text>{{ (tips || "").replace(/你/g, "").replace(/重回/g, "") }}</text> <text>{{ (tips || "").replace(/你/g, "").replace(/重回/g, "") }}</text>
<text v-if="totalShot > 0"> ({{ currentShot }}/{{ totalShot }}) </text> <text v-if="totalShot > 0"> ({{ currentShot }}/{{ totalShot }}) </text>
<button v-if="!!tips" hover-class="none" @click="updateSound"> <button v-if="!!tips" hover-class="none" @click="updateSound">
<image :src="`../static/sound${sound ? '' : '-off'}-yellow.png`" mode="widthFix" /> <image :src="`https://static.shelingxingqiu.com/shootmini/static/sound${sound ? '' : '-off'}-yellow.png`" mode="widthFix" />
</button> </button>
</view> </view>
</template> </template>
+1 -1
View File
@@ -118,7 +118,7 @@ const handleClose = () => {
</view> </view>
<view v-if="showClose" class="dialog-close"> <view v-if="showClose" class="dialog-close">
<IconButton <IconButton
src="../static/close-gold-outline.png" src="https://static.shelingxingqiu.com/shootmini/static/close-gold-outline.png"
:width="30" :width="30"
:onClick="handleClose" :onClick="handleClose"
/> />
+10 -1
View File
@@ -158,6 +158,7 @@ const handleUpdateClick = () => {
<view class="progress-track"> <view class="progress-track">
<view class="progress-fill" :style="{ width: `${progressValue}%` }"></view> <view class="progress-fill" :style="{ width: `${progressValue}%` }"></view>
</view> </view>
<text class="progress-warning">请勿离开当前页面!</text>
</view> </view>
</block> </block>
@@ -184,7 +185,7 @@ const handleUpdateClick = () => {
class="ota-close-below" class="ota-close-below"
@click="emit('close')" @click="emit('close')"
> >
<image src="../static/sicon/close.png" mode="aspectFit" style="width: 56rpx; height: 56rpx;" /> <image src="https://static.shelingxingqiu.com/shootmini/static/sicon/close.png" mode="aspectFit" style="width: 56rpx; height: 56rpx;" />
</view> </view>
</view> </view>
</template> </template>
@@ -439,6 +440,14 @@ const handleUpdateClick = () => {
background-color: #FED847; background-color: #FED847;
border-radius: 999rpx; border-radius: 999rpx;
} }
.progress-warning {
display: block;
margin-top: 16rpx;
color: rgba(255, 255, 255, 0.88);
font-size: 22rpx;
line-height: 32rpx;
text-align: center;
}
/* 关闭按钮(位于弹窗下方) */ /* 关闭按钮(位于弹窗下方) */
.ota-close-below { .ota-close-below {
+2 -2
View File
@@ -40,10 +40,10 @@ const getMemberNicknameClass = (player = {}) => [
opacity: opacity:
(scores[0] || []).length + (scores[1] || []).length === 12 ? 1 : 0, (scores[0] || []).length + (scores[1] || []).length === 12 ? 1 : 0,
}" }"
src="../static/checked-green.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green.png"
mode="widthFix" mode="widthFix"
/> />
<image :src="player.avatar || '../static/user-icon.png'" mode="widthFix" /> <image :src="player.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'" mode="widthFix" />
<view <view
v-if="isMember(player)" v-if="isMember(player)"
:class="['player-score-name', ...getMemberNicknameClass(player)]" :class="['player-score-name', ...getMemberNicknameClass(player)]"
+4 -4
View File
@@ -30,25 +30,25 @@ const rowCount = new Array(6).fill(0);
<view> <view>
<image <image
v-if="rank === 1" v-if="rank === 1"
src="../static/champ1.png" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<image <image
v-if="rank === 2" v-if="rank === 2"
src="../static/champ2.png" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<image <image
v-if="rank === 3" v-if="rank === 3"
src="../static/champ3.png" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<view v-if="rank > 3" class="rank-view">{{ rank }}</view> <view v-if="rank > 3" class="rank-view">{{ rank }}</view>
<image <image
:src="avatar || '../static/user-icon.png'" :src="avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
mode="widthFix" mode="widthFix"
:style="{ borderColor: topThreeColors[rank - 1] || '#fff' }" :style="{ borderColor: topThreeColors[rank - 1] || '#fff' }"
/> />
+4 -4
View File
@@ -38,7 +38,7 @@ const seats = new Array(props.total).fill(1);
<image src="https://static.shelingxingqiu.com/shootmini/static/player-bg.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/player-bg.png" mode="widthFix" />
<view v-if="players[index] && players[index].name" class="avatar"> <view v-if="players[index] && players[index].name" class="avatar">
<Avatar <Avatar
:src="players[index].avatar || '../static/user-icon.png'" :src="players[index].avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
:size="40" :size="40"
/> />
<text <text
@@ -47,7 +47,7 @@ const seats = new Array(props.total).fill(1);
> >
</view> </view>
<view v-else class="player-unknow"> <view v-else class="player-unknow">
<image src="../static/question-mark.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/question-mark.png" mode="widthFix" />
</view> </view>
<view <view
v-if="players[index] && players[index].name && isMember(players[index])" v-if="players[index] && players[index].name && isMember(players[index])"
@@ -72,7 +72,7 @@ const seats = new Array(props.total).fill(1);
</text> </text>
<view v-if="index === 0" class="founder">管理员</view> <view v-if="index === 0" class="founder">管理员</view>
<!-- <image <!-- <image
:src="`../static/player-${index + 1}.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/player-${index + 1}.png`"
mode="widthFix" mode="widthFix"
class="player-bg" class="player-bg"
/> --> /> -->
@@ -83,7 +83,7 @@ const seats = new Array(props.total).fill(1);
class="remove-player" class="remove-player"
@click="() => removePlayer(players[index])" @click="() => removePlayer(players[index])"
> >
<image src="../static/close-white.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-white.png" mode="widthFix" />
</button> </button>
</view> </view>
</view> </view>
+5 -5
View File
@@ -55,12 +55,12 @@ const onClick = async () => {
<template> <template>
<view class="rank-item" :style="{ borderWidth: borderWidth + 'rpx' }"> <view class="rank-item" :style="{ borderWidth: borderWidth + 'rpx' }">
<image v-if="data.rank === 1" src="../static/point-no1.png" /> <image v-if="data.rank === 1" src="https://static.shelingxingqiu.com/shootmini/static/point-no1.png" />
<image v-else-if="data.rank === 2" src="../static/point-no2.png" /> <image v-else-if="data.rank === 2" src="https://static.shelingxingqiu.com/shootmini/static/point-no2.png" />
<image v-else-if="data.rank === 3" src="../static/point-no3.png" /> <image v-else-if="data.rank === 3" src="https://static.shelingxingqiu.com/shootmini/static/point-no3.png" />
<text v-else>{{ data.rank || "" }}</text> <text v-else>{{ data.rank || "" }}</text>
<view> <view>
<Avatar :src="data.avatar || '../static/user-icon.png'" :size="36" /> <Avatar :src="data.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'" :size="36" />
<view> <view>
<view v-if="isMember(data)" :class="getMemberNicknameClass(data)"> <view v-if="isMember(data)" :class="getMemberNicknameClass(data)">
<text class="member-nickname__text">{{ data.name }}</text> <text class="member-nickname__text">{{ data.name }}</text>
@@ -87,7 +87,7 @@ const onClick = async () => {
<button hover-class="none" @click="onClick"> <button hover-class="none" @click="onClick">
<text>{{ likeCount }}</text> <text>{{ likeCount }}</text>
<image <image
:src="`../static/like-${like ? 'on' : 'off'}.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/like-${like ? 'on' : 'off'}.png`"
mode="widthFix" mode="widthFix"
/> />
</button> </button>
+1 -1
View File
@@ -113,7 +113,7 @@ onMounted(async () => {
@click="checked = !checked" @click="checked = !checked"
:style="{ marginBottom: !checked ? '20rpx' : '0' }" :style="{ marginBottom: !checked ? '20rpx' : '0' }"
> >
<image v-if="checked" src="../static/checked.png" mode="widthFix" /> <image v-if="checked" src="https://static.shelingxingqiu.com/shootmini/static/checked.png" mode="widthFix" />
<view v-else></view> <view v-else></view>
<text>我想给建议(选填)</text> <text>我想给建议(选填)</text>
</view> </view>
+1 -1
View File
@@ -69,7 +69,7 @@ const onBtnClick = debounce(async () => {
<slot /> <slot />
</block> </block>
<block v-else> <block v-else>
<image src="../static/btn-loading.png" mode="widthFix" class="loading" /> <image src="https://static.shelingxingqiu.com/shootmini/static/btn-loading.png" mode="widthFix" class="loading" />
</block> </block>
</button> </button>
</template> </template>
+1 -1
View File
@@ -60,7 +60,7 @@ watch(
mode="widthFix" mode="widthFix"
/> />
<view class="close-btn" @click="onClose" v-if="!noBg"> <view class="close-btn" @click="onClose" v-if="!noBg">
<image src="../static/close-yellow.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-yellow.png" mode="widthFix" />
</view> </view>
<slot></slot> <slot></slot>
</view> </view>
+2 -2
View File
@@ -71,7 +71,7 @@ watch(
margin: 100 / (total * 2) + 'px', margin: 100 / (total * 2) + 'px',
}" }"
> >
<image src="../static/score-bg.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/score-bg.png" mode="widthFix" />
<text <text
:style="{ fontWeight: arrows[index] !== undefined ? 'bold' : 'normal' }" :style="{ fontWeight: arrows[index] !== undefined ? 'bold' : 'normal' }"
>{{ >{{
@@ -93,7 +93,7 @@ watch(
padding: 1vw 0; padding: 1vw 0;
} }
.score-item { .score-item {
/* background-image: url("../static/score-bg.png"); /* background-image: url("https://static.shelingxingqiu.com/shootmini/static/score-bg.png");
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; */ background-position: center; */
+3 -3
View File
@@ -100,7 +100,7 @@ const openCoachComment = () => {
<button @click="() => (showBowData = true)"> <button @click="() => (showBowData = true)">
<text>查看靶纸</text> <text>查看靶纸</text>
<image <image
src="../static/enter-arrow-blue.png" src="https://static.shelingxingqiu.com/shootmini/static/enter-arrow-blue.png"
mode="widthFix" mode="widthFix"
:style="{ width: '20px' }" :style="{ width: '20px' }"
/> />
@@ -116,13 +116,13 @@ const openCoachComment = () => {
<block v-if="validArrows === total"> <block v-if="validArrows === total">
<IconButton <IconButton
name="分享" name="分享"
src="../static/share.png" src="https://static.shelingxingqiu.com/shootmini/static/share.png"
:onClick="onClickShare" :onClick="onClickShare"
/> />
<IconButton <IconButton
v-if="isMember" v-if="isMember"
name="教练点评" name="教练点评"
src="../static/review.png" src="https://static.shelingxingqiu.com/shootmini/static/review.png"
:onClick="openCoachComment" :onClick="openCoachComment"
/> />
</block> </block>
+1 -1
View File
@@ -49,7 +49,7 @@ const getContentHeight = () => {
</view> </view>
<IconButton <IconButton
v-if="!!onClose" v-if="!!onClose"
src="../static/close-gold-outline.png" src="https://static.shelingxingqiu.com/shootmini/static/close-gold-outline.png"
:width="30" :width="30"
:onClick="onClose" :onClick="onClose"
/> />
+1 -1
View File
@@ -25,7 +25,7 @@ const props = defineProps({
</view> </view>
<IconButton <IconButton
v-if="!!onClose" v-if="!!onClose"
src="../static/close-white-outline.png" src="https://static.shelingxingqiu.com/shootmini/static/close-white-outline.png"
:width="30" :width="30"
:onClick="onClose" :onClick="onClose"
/> />
+1 -1
View File
@@ -207,7 +207,7 @@ onBeforeUnmount(() => {
<text>{{ tipContent }}</text> <text>{{ tipContent }}</text>
<button hover-class="none" @click="updateSound"> <button hover-class="none" @click="updateSound">
<image <image
:src="`../static/sound${sound ? '' : '-off'}-yellow.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/sound${sound ? '' : '-off'}-yellow.png`"
mode="widthFix" mode="widthFix"
/> />
</button> </button>
+4 -4
View File
@@ -178,7 +178,7 @@ onShow(() => {
<text v-else :style="{ color: noBg ? '#666' : '#fff9' }" <text v-else :style="{ color: noBg ? '#666' : '#fff9' }"
>点击获取</text >点击获取</text
> >
<image src="../static/enter.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/enter.png" mode="widthFix" />
</button> </button>
</view> </view>
<view class="avatar" :style="{ borderColor: noBg ? '#E3E3E3' : '#fff3' }"> <view class="avatar" :style="{ borderColor: noBg ? '#E3E3E3' : '#fff3' }">
@@ -193,7 +193,7 @@ onShow(() => {
<text v-else :style="{ color: noBg ? '#666' : '#fff9' }" <text v-else :style="{ color: noBg ? '#666' : '#fff9' }"
>点击获取</text >点击获取</text
> >
<image src="../static/enter.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/enter.png" mode="widthFix" />
</button> </button>
</view> </view>
<view <view
@@ -217,7 +217,7 @@ onShow(() => {
</block> </block>
<block v-else> <block v-else>
<image <image
src="../static/btn-loading.png" src="https://static.shelingxingqiu.com/shootmini/static/btn-loading.png"
mode="widthFix" mode="widthFix"
class="loading" class="loading"
/> />
@@ -228,7 +228,7 @@ onShow(() => {
v-if="!agree" v-if="!agree"
:style="{ borderColor: noBg ? '#E3E3E3' : '#fff' }" :style="{ borderColor: noBg ? '#E3E3E3' : '#fff' }"
/> />
<image v-if="agree" src="../static/checked.png" mode="widthFix" /> <image v-if="agree" src="https://static.shelingxingqiu.com/shootmini/static/checked.png" mode="widthFix" />
<view> <view>
<text>已同意并阅读</text> <text>已同意并阅读</text>
<view <view
+1 -1
View File
@@ -81,7 +81,7 @@ const handleConfirm = () => {
<view class="header-title-line-right"></view> <view class="header-title-line-right"></view>
</view> </view>
<view class="close-btn" @click="onClose"> <view class="close-btn" @click="onClose">
<image src="../static/close-yellow.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-yellow.png" mode="widthFix" />
</view> </view>
</view> </view>
<view class="target-options"> <view class="target-options">
+2 -2
View File
@@ -65,7 +65,7 @@ watch(
<template> <template>
<view class="container"> <view class="container">
<image <image
:src="isRed ? '../static/flag-red.png' : '../static/flag-blue.png'" :src="isRed ? 'https://static.shelingxingqiu.com/shootmini/static/flag-red.png' : 'https://static.shelingxingqiu.com/shootmini/static/flag-blue.png'"
class="flag" class="flag"
:style="{ :style="{
[isRed ? 'left' : 'right']: '10rpx', [isRed ? 'left' : 'right']: '10rpx',
@@ -86,7 +86,7 @@ watch(
[isRed ? 'left' : 'right']: getPos(item.id) + 'rpx', [isRed ? 'left' : 'right']: getPos(item.id) + 'rpx',
}" }"
> >
<image :src="item.avatar || '../static/user-icon.png'" mode="widthFix" /> <image :src="item.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'" mode="widthFix" />
<text <text
v-if="isFirst(item.id)" v-if="isFirst(item.id)"
:style="{ backgroundColor: isRed ? '#ff6060' : '#5fadff' }" :style="{ backgroundColor: isRed ? '#ff6060' : '#5fadff' }"
+4 -4
View File
@@ -95,7 +95,7 @@ watch(
</view> </view>
<!-- <image <!-- <image
class="user-name-image" class="user-name-image"
src="../static/vip1.png" src="https://static.shelingxingqiu.com/shootmini/static/vip1.png"
mode="widthFix" mode="widthFix"
/> --> /> -->
</view> </view>
@@ -117,7 +117,7 @@ watch(
<view v-if="showRank === true" class="rank-info" @click="toRankListPage"> <view v-if="showRank === true" class="rank-info" @click="toRankListPage">
<image <image
class="rank-info-image" class="rank-info-image"
src="../static/global-rank.png" src="https://static.shelingxingqiu.com/shootmini/static/global-rank.png"
mode="widthFix" mode="widthFix"
/> />
<block v-if="user.ranking > 0 && rankData.rank.length"> <block v-if="user.ranking > 0 && rankData.rank.length">
@@ -136,12 +136,12 @@ watch(
</block> </block>
<block v-else> <block v-else>
<view class="signin" @click="onSignin"> <view class="signin" @click="onSignin">
<image src="../static/user-icon.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/user-icon.png" mode="widthFix" />
<view> <view>
<text>新来的弓箭手你好呀~</text> <text>新来的弓箭手你好呀~</text>
<view> <view>
<text>登录</text> <text>登录</text>
<image src="../static/enter-arrow-blue.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/enter-arrow-blue.png" mode="widthFix" />
</view> </view>
</view> </view>
</view> </view>
+1 -1
View File
@@ -25,7 +25,7 @@ defineProps({
<view> <view>
<slot></slot> <slot></slot>
<view v-if="onClick !== null"> <view v-if="onClick !== null">
<image src="../static/enter.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/enter.png" mode="widthFix" />
</view> </view>
</view> </view>
</view> </view>
+2 -2
View File
@@ -52,7 +52,7 @@ onBeforeUnmount(() => {
<template> <template>
<view class="content" :style="{ display: show ? 'flex' : 'none' }"> <view class="content" :style="{ display: show ? 'flex' : 'none' }">
<view v-if="showRank" class="up-rank"> <view v-if="showRank" class="up-rank">
<image :src="user.avatar || '../static/user-icon.png'" mode="widthFix" /> <image :src="user.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'" mode="widthFix" />
<image :src="nextRankImage" mode="widthFix" /> <image :src="nextRankImage" mode="widthFix" />
<image class="bg-effect" src="https://static.shelingxingqiu.com/shootmini/static/shining-bg.png" mode="widthFix" /> <image class="bg-effect" src="https://static.shelingxingqiu.com/shootmini/static/shining-bg.png" mode="widthFix" />
<image <image
@@ -75,7 +75,7 @@ onBeforeUnmount(() => {
/> />
</view> </view>
<view class="text-content"> <view class="text-content">
<image src="../static/update-text-bg.png" /> <image src="https://static.shelingxingqiu.com/shootmini/static/update-text-bg.png" />
<text>恭喜你升级到</text> <text>恭喜你升级到</text>
<text>{{ showRank ? nextRankTitle : `射灵${lvl}级` }}</text> <text>{{ showRank ? nextRankTitle : `射灵${lvl}级` }}</text>
<text>!</text> <text>!</text>
+227
View File
@@ -0,0 +1,227 @@
import { computed, ref } from "vue";
import { sendHardwareBoxUpdateAPI } from "@/apis";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const OTA_PROGRESS_EVENT = "/addons/shoot/otaProgress";
const OTA_RESULT_EVENT = "/addons/shoot/otaResult";
const UPDATE_TIMEOUT = 10 * 60 * 1000;
const phaseTextMap = {
started: "正在准备固件更新",
downloading: "正在下载固件",
installing: "正在安装固件",
};
// OTA 状态由首页、WiFi 设置页和我的设备页共享,页面切换后仍可继续接收进度。
const updating = ref(false);
const progress = ref(0);
const phase = ref("started");
const resultVisible = ref(false);
const resultStatus = ref("");
const resultReason = ref("");
let deviceRef = null;
let updateRunId = 0;
let targetVersion = "";
let lastFinishedVersion = "";
let timeoutTimer = null;
let successCallback = null;
let socketListening = false;
const phaseText = computed(
() => phaseTextMap[phase.value] || "正在进行固件更新"
);
const resultTitle = computed(() =>
resultStatus.value === "success" ? "固件更新完成" : "固件更新失败"
);
const resultContent = computed(() => {
if (resultStatus.value === "success") return "固件更新已完成";
return resultReason.value || "更新失败,请检查设备及网络后重试";
});
const clearTimers = () => {
clearTimeout(timeoutTimer);
timeoutTimer = null;
};
const resetActiveUpdate = () => {
clearTimers();
successCallback = null;
};
const finishUpdate = (status, reason = "", runId = updateRunId) => {
if (runId !== updateRunId || !updating.value) return;
const onSuccess = successCallback;
resetActiveUpdate();
updating.value = false;
resultStatus.value = status;
resultReason.value = reason;
lastFinishedVersion = targetVersion;
if (status === "success") {
progress.value = 100;
phase.value = "installing";
onSuccess?.();
}
resultVisible.value = true;
};
const isCurrentDeviceMessage = (data) => {
const messageDeviceId = String(data?.deviceId || "");
const currentDeviceId = String(deviceRef?.value?.deviceId || "");
return !messageDeviceId || !currentDeviceId || messageDeviceId === currentDeviceId;
};
const isCurrentVersionMessage = (data) => {
const messageVersion = String(data?.versionNumber || "");
return !messageVersion || !targetVersion || messageVersion === targetVersion;
};
// 页面切换导致弹窗关闭后,使用下一条进度消息恢复当前 OTA 会话。
const recoverUpdateFromMessage = (data) => {
updateRunId += 1;
const runId = updateRunId;
targetVersion = String(data?.versionNumber || "");
lastFinishedVersion = "";
successCallback = null;
resultVisible.value = false;
resultStatus.value = "";
resultReason.value = "";
progress.value = 0;
phase.value = "started";
updating.value = true;
clearTimers();
timeoutTimer = setTimeout(() => {
finishUpdate("failed", "固件更新超时,请稍后重试", runId);
}, UPDATE_TIMEOUT);
};
function handleSocketMessage(message) {
if (Number(message?.code ?? 0) !== 0) return;
if (![OTA_PROGRESS_EVENT, OTA_RESULT_EVENT].includes(message?.event)) return;
if (!isCurrentDeviceMessage(message.data)) return;
const messageVersion = String(message.data?.versionNumber || "");
if (message.event === OTA_PROGRESS_EVENT) {
if (!updating.value) {
if (
lastFinishedVersion &&
(!messageVersion || messageVersion === lastFinishedVersion)
) {
return;
}
recoverUpdateFromMessage(message.data);
} else if (!isCurrentVersionMessage(message.data)) {
return;
}
const nextProgress = Math.min(
100,
Math.max(0, Number(message.data?.progress) || 0)
);
progress.value = Math.max(progress.value, nextProgress);
if (phaseTextMap[message.data?.phase]) {
phase.value = message.data.phase;
}
return;
}
if (!updating.value) {
if (
lastFinishedVersion &&
(!messageVersion || messageVersion === lastFinishedVersion)
) {
return;
}
recoverUpdateFromMessage(message.data);
} else if (!isCurrentVersionMessage(message.data)) {
return;
}
if (message.data?.status === "success") {
finishUpdate("success");
} else if (message.data?.status === "failed") {
finishUpdate("failed", message.data?.reason || "");
}
}
const startSocketListening = () => {
if (socketListening) return;
uni.$on("socket-inbox", handleSocketMessage);
socketListening = true;
};
export const useOtaUpdate = () => {
const store = useStore();
const { device } = storeToRefs(store);
deviceRef = device;
startSocketListening();
const startUpdate = async ({
versionNumber,
resourceUrl,
wifiSsid = "",
wifiPassword = "",
onSuccess,
}) => {
if (updating.value) return false;
updateRunId += 1;
const runId = updateRunId;
targetVersion = String(versionNumber || "");
lastFinishedVersion = "";
successCallback = onSuccess || null;
resultVisible.value = false;
resultStatus.value = "";
resultReason.value = "";
progress.value = 0;
phase.value = "started";
updating.value = true;
clearTimers();
timeoutTimer = setTimeout(() => {
finishUpdate("failed", "固件更新超时,请稍后重试", runId);
}, UPDATE_TIMEOUT);
try {
const updateResult = await sendHardwareBoxUpdateAPI({
versionNumber: targetVersion,
wifiSsid,
wifiPassword,
resourceUrl,
});
if (runId !== updateRunId || !updating.value) return false;
if (!updateResult?.taskId) {
finishUpdate("failed", "固件更新任务创建失败,请稍后重试", runId);
return false;
}
return true;
} catch (error) {
if (runId === updateRunId) {
finishUpdate(
"failed",
error?.message || "固件更新请求失败,请稍后重试",
runId
);
}
return false;
}
};
const closeResult = () => {
resultVisible.value = false;
};
return {
updating,
progress,
phase,
phaseText,
resultVisible,
resultStatus,
resultTitle,
resultContent,
startUpdate,
closeResult,
};
};
+7 -7
View File
@@ -156,7 +156,7 @@ const checkBowData = () => {
<view class="battle-winner"> <view class="battle-winner">
<image src="https://static.shelingxingqiu.com/shootmini/static/shining-bg.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/shining-bg.png" mode="widthFix" />
<image <image
:src="ifWin ? '../static/you-win.png' : '../static/you-lost.png'" :src="ifWin ? 'https://static.shelingxingqiu.com/shootmini/static/you-win.png' : 'https://static.shelingxingqiu.com/shootmini/static/you-lost.png'"
mode="widthFix" mode="widthFix"
class="scale-in" class="scale-in"
/> />
@@ -193,37 +193,37 @@ const checkBowData = () => {
<image <image
v-if="player.rank === 1" v-if="player.rank === 1"
class="player-bg" class="player-bg"
src="../static/melee-player-bg1.png" src="https://static.shelingxingqiu.com/shootmini/static/melee-player-bg1.png"
mode="aspectFill" mode="aspectFill"
/> />
<image <image
v-if="player.rank === 2" v-if="player.rank === 2"
class="player-bg" class="player-bg"
src="../static/melee-player-bg2.png" src="https://static.shelingxingqiu.com/shootmini/static/melee-player-bg2.png"
mode="aspectFill" mode="aspectFill"
/> />
<image <image
v-if="player.rank === 3" v-if="player.rank === 3"
class="player-bg" class="player-bg"
src="../static/melee-player-bg3.png" src="https://static.shelingxingqiu.com/shootmini/static/melee-player-bg3.png"
mode="aspectFill" mode="aspectFill"
/> />
<image <image
v-if="player.rank === 1" v-if="player.rank === 1"
class="player-crown" class="player-crown"
src="../static/champ1.png" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png"
mode="widthFix" mode="widthFix"
/> />
<image <image
v-if="player.rank === 2" v-if="player.rank === 2"
class="player-crown" class="player-crown"
src="../static/champ2.png" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png"
mode="widthFix" mode="widthFix"
/> />
<image <image
v-if="player.rank === 3" v-if="player.rank === 3"
class="player-crown" class="player-crown"
src="../static/champ3.png" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png"
mode="widthFix" mode="widthFix"
/> />
<view v-if="player.rank > 3" class="view-crown">{{ <view v-if="player.rank > 3" class="view-crown">{{
+8 -8
View File
@@ -587,7 +587,7 @@ onBeforeUnmount(() => {
<text v-else class="room-player-name">{{ owner.name }}</text> <text v-else class="room-player-name">{{ owner.name }}</text>
</view> </view>
<view v-else class="no-player" :style="{ transform: 'translateY(-60px)' }"> <view v-else class="no-player" :style="{ transform: 'translateY(-60px)' }">
<image src="../static/question-mark.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/question-mark.png" mode="widthFix" />
</view> </view>
<image src="https://static.shelingxingqiu.com/shootmini/static/versus.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/versus.png" mode="widthFix" />
<view v-if="opponent.id" class="player" :style="{ transform: 'translateY(60px)' }"> <view v-if="opponent.id" class="player" :style="{ transform: 'translateY(60px)' }">
@@ -607,11 +607,11 @@ onBeforeUnmount(() => {
<text v-else class="room-player-name">{{ opponent.name }}</text> <text v-else class="room-player-name">{{ opponent.name }}</text>
<button v-if="owner.id === user.id" hover-class="none" class="remove-player" <button v-if="owner.id === user.id" hover-class="none" class="remove-player"
@click="() => removePlayer(opponent)"> @click="() => removePlayer(opponent)">
<image src="../static/close-white.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-white.png" mode="widthFix" />
</button> </button>
</view> </view>
<view class="no-player" v-else> <view class="no-player" v-else>
<image src="../static/question-mark.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/question-mark.png" mode="widthFix" />
</view> </view>
</view> </view>
</view> </view>
@@ -627,7 +627,7 @@ onBeforeUnmount(() => {
<!-- 仅房主可见踢人按钮,且不能踢自己 --> <!-- 仅房主可见踢人按钮,且不能踢自己 -->
<button v-if="owner.id !== item.id && item.id && owner.id === user.id" hover-class="none" class="remove-player" <button v-if="owner.id !== item.id && item.id && owner.id === user.id" hover-class="none" class="remove-player"
@click="() => removePlayer(item)" :style="{ top: '-10rpx', right: '-10rpx' }"> @click="() => removePlayer(item)" :style="{ top: '-10rpx', right: '-10rpx' }">
<image src="../static/close-white.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-white.png" mode="widthFix" />
</button> </button>
</view> </view>
</view> </view>
@@ -636,7 +636,7 @@ onBeforeUnmount(() => {
<view> <view>
<view v-for="(item, index) in redTeam" :key="index" class="choose-side-left-item"> <view v-for="(item, index) in redTeam" :key="index" class="choose-side-left-item">
<button hover-class="none" v-if="item.id === user.id" @click="chooseTeam(0)"> <button hover-class="none" v-if="item.id === user.id" @click="chooseTeam(0)">
<image src="../static/close-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-grey.png" mode="widthFix" />
</button> </button>
<view <view
v-if="item.id && isMember(item)" v-if="item.id && isMember(item)"
@@ -653,7 +653,7 @@ onBeforeUnmount(() => {
<text :style="{ opacity: !!item.state ? 1 : 0 }">已准备</text> <text :style="{ opacity: !!item.state ? 1 : 0 }">已准备</text>
</view> </view>
<button v-else hover-class="none" @click="chooseTeam(2)"> <button v-else hover-class="none" @click="chooseTeam(2)">
<image src="../static/add-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/add-grey.png" mode="widthFix" />
</button> </button>
</view> </view>
</view> </view>
@@ -664,7 +664,7 @@ onBeforeUnmount(() => {
<text :style="{ opacity: !!item.state ? 1 : 0 }">已准备</text> <text :style="{ opacity: !!item.state ? 1 : 0 }">已准备</text>
</view> </view>
<button v-else hover-class="none" @click="chooseTeam(1)"> <button v-else hover-class="none" @click="chooseTeam(1)">
<image src="../static/add-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/add-grey.png" mode="widthFix" />
</button> </button>
<view <view
v-if="item.id && isMember(item)" v-if="item.id && isMember(item)"
@@ -677,7 +677,7 @@ onBeforeUnmount(() => {
</view> </view>
<text v-else class="truncate">{{ item.name || "我要加入" }}</text> <text v-else class="truncate">{{ item.name || "我要加入" }}</text>
<button hover-class="none" v-if="item.id === user.id" @click="chooseTeam(0)"> <button hover-class="none" v-if="item.id === user.id" @click="chooseTeam(0)">
<image src="../static/close-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-grey.png" mode="widthFix" />
</button> </button>
</view> </view>
</view> </view>
@@ -1,188 +0,0 @@
import { computed, onUnmounted, ref } from "vue";
import { sendHardwareBoxUpdateAPI } from "@/apis";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const OTA_PROGRESS_EVENT = "/addons/shoot/otaProgress";
const OTA_RESULT_EVENT = "/addons/shoot/otaResult";
const UPDATE_TIMEOUT = 10 * 60 * 1000;
const phaseTextMap = {
started: "正在准备固件更新",
downloading: "正在下载固件",
installing: "正在安装固件",
};
export const useOtaUpdate = () => {
const store = useStore();
const { device } = storeToRefs(store);
const updating = ref(false);
const progress = ref(0);
const phase = ref("started");
const resultVisible = ref(false);
const resultStatus = ref("");
const resultReason = ref("");
let updateRunId = 0;
let targetVersion = "";
let timeoutTimer = null;
let successCallback = null;
let socketListening = false;
const phaseText = computed(
() => phaseTextMap[phase.value] || "正在进行固件更新"
);
const resultTitle = computed(() =>
resultStatus.value === "success" ? "固件更新完成" : "固件更新失败"
);
const resultContent = computed(() => {
if (resultStatus.value === "success") return "固件更新已完成";
return resultReason.value || "更新失败,请检查设备及网络后重试";
});
const clearTimers = () => {
clearTimeout(timeoutTimer);
timeoutTimer = null;
};
const stopSocketListening = () => {
if (!socketListening) return;
uni.$off("socket-inbox", handleSocketMessage);
socketListening = false;
};
const resetActiveUpdate = () => {
clearTimers();
stopSocketListening();
successCallback = null;
};
const finishUpdate = (status, reason = "", runId = updateRunId) => {
if (runId !== updateRunId || !updating.value) return;
const onSuccess = successCallback;
resetActiveUpdate();
updating.value = false;
resultStatus.value = status;
resultReason.value = reason;
if (status === "success") {
progress.value = 100;
phase.value = "installing";
onSuccess?.();
}
resultVisible.value = true;
};
const isCurrentUpdateMessage = (data) => {
const messageDeviceId = String(data?.deviceId || "");
const currentDeviceId = String(device.value?.deviceId || "");
if (messageDeviceId && currentDeviceId && messageDeviceId !== currentDeviceId) {
return false;
}
const messageVersion = String(data?.versionNumber || "");
return !messageVersion || !targetVersion || messageVersion === targetVersion;
};
function handleSocketMessage(message) {
if (!updating.value || Number(message?.code ?? 0) !== 0) return;
if (![OTA_PROGRESS_EVENT, OTA_RESULT_EVENT].includes(message?.event)) return;
if (!isCurrentUpdateMessage(message.data)) return;
if (message.event === OTA_PROGRESS_EVENT) {
const nextProgress = Math.min(
100,
Math.max(0, Number(message.data?.progress) || 0)
);
progress.value = Math.max(progress.value, nextProgress);
if (phaseTextMap[message.data?.phase]) {
phase.value = message.data.phase;
}
return;
}
if (message.data?.status === "success") {
finishUpdate("success");
return;
}
if (message.data?.status === "failed") {
finishUpdate("failed", message.data?.reason || "");
}
}
const startSocketListening = () => {
if (socketListening) return;
uni.$on("socket-inbox", handleSocketMessage);
socketListening = true;
};
const startUpdate = async ({
versionNumber,
resourceUrl,
wifiSsid = "",
wifiPassword = "",
onSuccess,
}) => {
if (updating.value) return false;
updateRunId += 1;
const runId = updateRunId;
targetVersion = String(versionNumber || "");
successCallback = onSuccess || null;
resultVisible.value = false;
resultStatus.value = "";
resultReason.value = "";
progress.value = 0;
phase.value = "started";
updating.value = true;
startSocketListening();
timeoutTimer = setTimeout(() => {
finishUpdate("failed", "固件更新超时,请稍后重试", runId);
}, UPDATE_TIMEOUT);
try {
const updateResult = await sendHardwareBoxUpdateAPI({
versionNumber: targetVersion,
wifiSsid,
wifiPassword,
resourceUrl,
});
if (runId !== updateRunId || !updating.value) return false;
if (!updateResult?.taskId) {
finishUpdate("failed", "固件更新任务创建失败,请稍后重试", runId);
return false;
}
return true;
} catch (error) {
if (runId === updateRunId) {
finishUpdate(
"failed",
error?.message || "固件更新请求失败,请稍后重试",
runId
);
}
return false;
}
};
const closeResult = () => {
resultVisible.value = false;
};
onUnmounted(() => {
updateRunId += 1;
resetActiveUpdate();
});
return {
updating,
progress,
phase,
phaseText,
resultVisible,
resultStatus,
resultTitle,
resultContent,
startUpdate,
closeResult,
};
};
+1 -1
View File
@@ -41,7 +41,7 @@ const retryScan = () => {
<view class="bind-failure-hero-shadow"></view> <view class="bind-failure-hero-shadow"></view>
<image <image
class="bind-failure-hero" class="bind-failure-hero"
src="../../static/device-assets/device-bind-failure-hero.png" src="https://static.shelingxingqiu.com/shootmini/static/device-assets/device-bind-failure-hero.png"
mode="aspectFit" mode="aspectFit"
/> />
</view> </view>
+5 -5
View File
@@ -11,8 +11,8 @@ const bindResult = ref({
const bindSuccessHero = computed(() => const bindSuccessHero = computed(() =>
bindResult.value.isFirstBind bindResult.value.isFirstBind
? "../../static/device-assets/device-bind-success-hero-first.png" ? "https://static.shelingxingqiu.com/shootmini/static/device-assets/device-bind-success-hero-first.png"
: "../../static/device-assets/device-bind-success-hero-nonfirst.png" : "https://static.shelingxingqiu.com/shootmini/static/device-assets/device-bind-success-hero-nonfirst.png"
); );
const bindRewardExpireDate = computed(() => bindResult.value.expireDate); const bindRewardExpireDate = computed(() => bindResult.value.expireDate);
@@ -93,19 +93,19 @@ onLoad((options = {}) => {
> >
<image <image
class="bind-success-confetti" class="bind-success-confetti"
src="../../static/device-assets/device-bind-success-confetti.png" src="https://static.shelingxingqiu.com/shootmini/static/device-assets/device-bind-success-confetti.png"
mode="aspectFit" mode="aspectFit"
/> />
<image class="bind-success-hero" :src="bindSuccessHero" mode="aspectFit" /> <image class="bind-success-hero" :src="bindSuccessHero" mode="aspectFit" />
<image <image
class="bind-success-title-image" class="bind-success-title-image"
src="../../static/device-assets/device-bind-success-title.png" src="https://static.shelingxingqiu.com/shootmini/static/device-assets/device-bind-success-title.png"
mode="aspectFit" mode="aspectFit"
/> />
<view v-if="bindResult.isFirstBind" class="bind-reward-card"> <view v-if="bindResult.isFirstBind" class="bind-reward-card">
<image <image
class="bind-reward-gift" class="bind-reward-gift"
src="../../static/device-assets/device-bind-success-reward-gift.png" src="https://static.shelingxingqiu.com/shootmini/static/device-assets/device-bind-success-reward-gift.png"
mode="aspectFit" mode="aspectFit"
/> />
<text class="bind-reward-text"> <text class="bind-reward-text">
+1 -1
View File
@@ -38,7 +38,7 @@ const onScrollView = (e) => {
mode="widthFix" mode="widthFix"
/> />
<navigator open-type="navigateBack"> <navigator open-type="navigateBack">
<image class="header-back" src="../../static/back.png" mode="widthFix" /> <image class="header-back" src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</navigator> </navigator>
<text <text
:style="{ opacity: addBg ? 1 : 0, color: '#fff', fontWeight: 'bold' }" :style="{ opacity: addBg ? 1 : 0, color: '#fff', fontWeight: 'bold' }"
+32 -18
View File
@@ -2,6 +2,7 @@
import { computed, onMounted, onUnmounted, ref, watch } from "vue"; import { computed, onMounted, onUnmounted, ref, watch } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app"; import { onLoad, onShow } from "@dcloudio/uni-app";
import Container from "@/components/Container.vue"; import Container from "@/components/Container.vue";
import DeviceOnlineEffects from "@/components/DeviceOnlineEffects.vue";
import Header from "@/components/Header.vue"; import Header from "@/components/Header.vue";
import ScreenHint from "@/components/ScreenHint.vue"; import ScreenHint from "@/components/ScreenHint.vue";
import ModalDialog from "@/components/ModalDialog.vue"; import ModalDialog from "@/components/ModalDialog.vue";
@@ -18,7 +19,7 @@ import {
DEVICE_NAME_STORAGE_KEY, DEVICE_NAME_STORAGE_KEY,
useDeviceStatus, useDeviceStatus,
} from "./composables/useDeviceStatus"; } from "./composables/useDeviceStatus";
import { useOtaUpdate } from "./composables/useOtaUpdate"; import { useOtaUpdate } from "@/composables/useOtaUpdate";
const store = useStore(); const store = useStore();
const { updateDevice, clearDevice } = store; const { updateDevice, clearDevice } = store;
@@ -478,7 +479,7 @@ onShow(async () => {
<view v-if="!device.deviceId" class="scan-code"> <view v-if="!device.deviceId" class="scan-code">
<view class="unbound-content"> <view class="unbound-content">
<button class="scan-entry" hover-class="none" @click="$clickSound(handleScan)"> <button class="scan-entry" hover-class="none" @click="$clickSound(handleScan)">
<image src="../../static/device-assets/my-device-unbound-scan.png" mode="aspectFit" /> <image src="https://static.shelingxingqiu.com/shootmini/static/device-assets/my-device-unbound-scan.png" mode="aspectFit" />
</button> </button>
<view class="scan-title"> <view class="scan-title">
<text>请扫描</text> <text>请扫描</text>
@@ -507,13 +508,20 @@ onShow(async () => {
> >
<image <image
class="device-stage" class="device-stage"
src="../../static/home-device/device-platform.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-platform.png"
mode="widthFix" mode="widthFix"
/> />
<DeviceOnlineEffects
v-if="isDeviceOnline"
variant="detail"
/>
<image <image
class="device-bow" class="device-bow"
src="../../static/home-device/device-bow.png" :class="{ 'device-bow--online': isDeviceOnline }"
mode="widthFix" :src="isDeviceOnline
? 'https://static.shelingxingqiu.com/shootmini/static/home-device/device-bow--online.png'
: 'https://static.shelingxingqiu.com/shootmini/static/home-device/device-bow.png'"
:mode="isDeviceOnline ? 'aspectFit' : 'widthFix'"
/> />
</view> </view>
@@ -524,7 +532,7 @@ onShow(async () => {
<view class="device-title-row"> <view class="device-title-row">
<text class="device-name">{{ device.deviceName || "打弓佬" }}</text> <text class="device-name">{{ device.deviceName || "打弓佬" }}</text>
<view class="edit-name" @click="openNameEditor"> <view class="edit-name" @click="openNameEditor">
<image src="../../static/home-device/device-edit.png" mode="aspectFit" /> <image src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-edit.png" mode="aspectFit" />
</view> </view>
</view> </view>
<view class="device-id-row"> <view class="device-id-row">
@@ -533,8 +541,8 @@ onShow(async () => {
<image <image
class="device-id-eye" class="device-id-eye"
:src="showDeviceId :src="showDeviceId
? '../../static/home-device/device-id-visible.png' ? 'https://static.shelingxingqiu.com/shootmini/static/home-device/device-id-visible.png'
: '../../static/home-device/device-id-hidden.png'" : 'https://static.shelingxingqiu.com/shootmini/static/home-device/device-id-hidden.png'"
mode="aspectFit" mode="aspectFit"
/> />
</view> </view>
@@ -559,19 +567,19 @@ onShow(async () => {
<view class="device-actions"> <view class="device-actions">
<view class="action-item" @click="toDeviceIntroPage"> <view class="action-item" @click="toDeviceIntroPage">
<view class="action-icon"> <view class="action-icon">
<image src="../../static/home-device/device-action-intro.png" mode="aspectFit" /> <image src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-intro.png" mode="aspectFit" />
</view> </view>
<text>设备介绍</text> <text>设备介绍</text>
</view> </view>
<view class="action-item" @click="goCalibration"> <view class="action-item" @click="goCalibration">
<view class="action-icon"> <view class="action-icon">
<image src="../../static/home-device/device-action-calibration.png" mode="aspectFit" /> <image src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-calibration.png" mode="aspectFit" />
</view> </view>
<text>弓箭调瞄</text> <text>弓箭调瞄</text>
</view> </view>
<view class="action-item" @click="goFirmwareUpdate"> <view class="action-item" @click="goFirmwareUpdate">
<view class="action-icon"> <view class="action-icon">
<image src="../../static/home-device/device-action-firmware.png" mode="aspectFit" /> <image src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-firmware.png" mode="aspectFit" />
</view> </view>
<view class="action-label-wrap"> <view class="action-label-wrap">
<text>固件更新</text> <text>固件更新</text>
@@ -583,7 +591,7 @@ onShow(async () => {
</view> </view>
<view class="action-item" @click="joinWifi"> <view class="action-item" @click="joinWifi">
<view class="action-icon"> <view class="action-icon">
<image src="../../static/home-device/device-action-wifi.png" mode="aspectFit" /> <image src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-wifi.png" mode="aspectFit" />
</view> </view>
<view class="action-label-wrap"> <view class="action-label-wrap">
<text>WIFI设置</text> <text>WIFI设置</text>
@@ -603,7 +611,7 @@ onShow(async () => {
</view> </view>
<view class="action-item" @click="openQr"> <view class="action-item" @click="openQr">
<view class="action-icon"> <view class="action-icon">
<image src="../../static/home-device/device-action-qrcode.png" mode="aspectFit" /> <image src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-qrcode.png" mode="aspectFit" />
</view> </view>
<text>设备二维码</text> <text>设备二维码</text>
</view> </view>
@@ -612,7 +620,7 @@ onShow(async () => {
<view class="unbind-entry" @click="openUnbindDialog"> <view class="unbind-entry" @click="openUnbindDialog">
<image <image
class="unbind-icon" class="unbind-icon"
src="../../static/home-device/device-unbind.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-unbind.png"
mode="aspectFit" mode="aspectFit"
/> />
<text>解除绑定</text> <text>解除绑定</text>
@@ -636,7 +644,7 @@ onShow(async () => {
<text class="scan-tips-subtitle">配套令牌样例</text> <text class="scan-tips-subtitle">配套令牌样例</text>
<image <image
class="scan-tips-qr" class="scan-tips-qr"
src="../../static/device-assets/my-device-unbound-qr-sample.png" src="https://static.shelingxingqiu.com/shootmini/static/device-assets/my-device-unbound-qr-sample.png"
mode="widthFix" mode="widthFix"
/> />
<text class="scan-tips-note">【注】已被绑定的弓箭无法再次绑定。</text> <text class="scan-tips-note">【注】已被绑定的弓箭无法再次绑定。</text>
@@ -727,7 +735,7 @@ onShow(async () => {
<view class="name-panel" @click.stop> <view class="name-panel" @click.stop>
<image <image
class="name-mascot" class="name-mascot"
src="../../static/home-device/device-name-mascot.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-name-mascot.png"
mode="aspectFit" mode="aspectFit"
/> />
<view class="name-sheet"> <view class="name-sheet">
@@ -751,7 +759,7 @@ onShow(async () => {
> >
<image <image
class="name-confirm-image" class="name-confirm-image"
src="../../static/home-device/device-name-confirm.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-name-confirm.png"
mode="aspectFit" mode="aspectFit"
/> />
</view> </view>
@@ -948,7 +956,7 @@ onShow(async () => {
transform: translateY(0); transform: translateY(0);
} }
50% { 50% {
transform: translateY(-10rpx); transform: translateY(-20rpx);
} }
} }
@@ -956,6 +964,7 @@ onShow(async () => {
position: absolute; position: absolute;
top: 214rpx; top: 214rpx;
left: 50%; left: 50%;
z-index: 1;
width: 750rpx; width: 750rpx;
transform: translateX(-50%); transform: translateX(-50%);
} }
@@ -964,10 +973,15 @@ onShow(async () => {
position: absolute; position: absolute;
top: 0; top: 0;
left: 50%; left: 50%;
z-index: 4;
width: 562rpx; width: 562rpx;
transform: translateX(-50%); transform: translateX(-50%);
} }
.device-bow--online {
height: 466rpx;
}
.device-heading { .device-heading {
position: relative; position: relative;
z-index: 2; z-index: 2;
+15 -15
View File
@@ -9,7 +9,7 @@ import {
connectDeviceWifiAPI, connectDeviceWifiAPI,
getHardwareBoxVersionAPI, getHardwareBoxVersionAPI,
} from "@/apis"; } from "@/apis";
import { useOtaUpdate } from "./composables/useOtaUpdate"; import { useOtaUpdate } from "@/composables/useOtaUpdate";
const STATES = { const STATES = {
SCANNING: "SCANNING", SCANNING: "SCANNING",
@@ -467,16 +467,16 @@ onUnmounted(() => {
</view> </view>
<view v-if="currentState === 'CONNECTED'" class="wifi-list-card connected-wifi-card"> <view v-if="currentState === 'CONNECTED'" class="wifi-list-card connected-wifi-card">
<view class="wifi-item connected-wifi-item"> <view class="wifi-item connected-wifi-item">
<image class="check-icon" src="../../static/sicon/check.png" mode="aspectFit" /> <image class="check-icon" src="https://static.shelingxingqiu.com/shootmini/static/sicon/check.png" mode="aspectFit" />
<text class="wifi-ssid connected-wifi-ssid">{{ connectedWifi?.SSID }}</text> <text class="wifi-ssid connected-wifi-ssid">{{ connectedWifi?.SSID }}</text>
<view class="wifi-icons connected-wifi-icons"> <view class="wifi-icons connected-wifi-icons">
<image <image
v-if="connectedWifi?.secure" v-if="connectedWifi?.secure"
class="security-icon" class="security-icon"
src="../../static/sicon/pwd.png" src="https://static.shelingxingqiu.com/shootmini/static/sicon/pwd.png"
mode="aspectFit" mode="aspectFit"
/> />
<image class="signal-icon" src="../../static/sicon/wifi.png" mode="aspectFit" /> <image class="signal-icon" src="https://static.shelingxingqiu.com/shootmini/static/sicon/wifi.png" mode="aspectFit" />
</view> </view>
</view> </view>
</view> </view>
@@ -485,7 +485,7 @@ onUnmounted(() => {
<view class="section-label-row"> <view class="section-label-row">
<text class="section-label">网络</text> <text class="section-label">网络</text>
<image <image
src="../../static/sicon/refresh.png" src="https://static.shelingxingqiu.com/shootmini/static/sicon/refresh.png"
mode="aspectFit" mode="aspectFit"
:style="{ width: '34rpx', height: '34rpx', marginLeft: '8rpx', opacity: isRefreshing ? 0.3 : 0.7 }" :style="{ width: '34rpx', height: '34rpx', marginLeft: '8rpx', opacity: isRefreshing ? 0.3 : 0.7 }"
@click="startScanning" @click="startScanning"
@@ -516,10 +516,10 @@ onUnmounted(() => {
<image <image
v-if="wifi.secure" v-if="wifi.secure"
class="security-icon" class="security-icon"
src="../../static/sicon/pwd.png" src="https://static.shelingxingqiu.com/shootmini/static/sicon/pwd.png"
mode="aspectFit" mode="aspectFit"
/> />
<image class="signal-icon" src="../../static/sicon/wifi.png" mode="aspectFit" /> <image class="signal-icon" src="https://static.shelingxingqiu.com/shootmini/static/sicon/wifi.png" mode="aspectFit" />
</view> </view>
</view> </view>
<view class="wifi-item" @click="selectOther"> <view class="wifi-item" @click="selectOther">
@@ -540,7 +540,7 @@ onUnmounted(() => {
<block v-if="connectMode === 'secure'"> <block v-if="connectMode === 'secure'">
<view class="sheet-header"> <view class="sheet-header">
<view class="sheet-nav-btn" @click="closeConnectSheet"> <view class="sheet-nav-btn" @click="closeConnectSheet">
<image src="../../static/sicon/arrow-left.png" mode="aspectFit" style="width: 40rpx; height: 40rpx;" /> <image src="https://static.shelingxingqiu.com/shootmini/static/sicon/arrow-left.png" mode="aspectFit" style="width: 40rpx; height: 40rpx;" />
</view> </view>
<text class="sheet-title">加入"{{ connectInput.ssid }}"</text> <text class="sheet-title">加入"{{ connectInput.ssid }}"</text>
<view <view
@@ -548,7 +548,7 @@ onUnmounted(() => {
:class="{ 'nav-disabled': joinDisabled }" :class="{ 'nav-disabled': joinDisabled }"
@click="joinNetwork" @click="joinNetwork"
> >
<image src="../../static/sicon/check.png" mode="aspectFit" style="width: 28rpx; height: 24rpx;" /> <image src="https://static.shelingxingqiu.com/shootmini/static/sicon/check.png" mode="aspectFit" style="width: 28rpx; height: 24rpx;" />
</view> </view>
</view> </view>
<view class="input-row-card"> <view class="input-row-card">
@@ -566,7 +566,7 @@ onUnmounted(() => {
<!-- 密码显示/隐藏切换按钮 --> <!-- 密码显示/隐藏切换按钮 -->
<view class="pwd-eye-btn" @click="togglePasswordVisibility"> <view class="pwd-eye-btn" @click="togglePasswordVisibility">
<image <image
:src="showPassword ? '../../static/sicon/eye-on.png' : '../../static/sicon/eye-off.png'" :src="showPassword ? 'https://static.shelingxingqiu.com/shootmini/static/sicon/eye-on.png' : 'https://static.shelingxingqiu.com/shootmini/static/sicon/eye-off.png'"
mode="aspectFit" mode="aspectFit"
style="width: 40rpx; height: 40rpx;" style="width: 40rpx; height: 40rpx;"
/> />
@@ -580,11 +580,11 @@ onUnmounted(() => {
<block v-else-if="connectMode === 'open'"> <block v-else-if="connectMode === 'open'">
<view class="sheet-header"> <view class="sheet-header">
<view class="sheet-nav-btn" @click="closeConnectSheet"> <view class="sheet-nav-btn" @click="closeConnectSheet">
<image src="../../static/sicon/arrow-left.png" mode="aspectFit" style="width: 40rpx; height: 40rpx;" /> <image src="https://static.shelingxingqiu.com/shootmini/static/sicon/arrow-left.png" mode="aspectFit" style="width: 40rpx; height: 40rpx;" />
</view> </view>
<text class="sheet-title">加入"{{ connectInput.ssid }}"</text> <text class="sheet-title">加入"{{ connectInput.ssid }}"</text>
<view class="sheet-nav-btn" @click="joinNetwork"> <view class="sheet-nav-btn" @click="joinNetwork">
<image src="../../static/sicon/check.png" mode="aspectFit" style="width: 28rpx; height: 24rpx;" /> <image src="https://static.shelingxingqiu.com/shootmini/static/sicon/check.png" mode="aspectFit" style="width: 28rpx; height: 24rpx;" />
</view> </view>
</view> </view>
<text v-if="connectStatusText" class="connect-status">{{ connectStatusText }}</text> <text v-if="connectStatusText" class="connect-status">{{ connectStatusText }}</text>
@@ -596,7 +596,7 @@ onUnmounted(() => {
<block v-else-if="connectMode === 'manual'"> <block v-else-if="connectMode === 'manual'">
<view class="sheet-header"> <view class="sheet-header">
<view class="sheet-nav-btn" @click="closeConnectSheet"> <view class="sheet-nav-btn" @click="closeConnectSheet">
<image src="../../static/sicon/arrow-left.png" mode="aspectFit" style="width: 40rpx; height: 40rpx;" /> <image src="https://static.shelingxingqiu.com/shootmini/static/sicon/arrow-left.png" mode="aspectFit" style="width: 40rpx; height: 40rpx;" />
</view> </view>
<text class="sheet-title">加入无线网络</text> <text class="sheet-title">加入无线网络</text>
<view <view
@@ -604,7 +604,7 @@ onUnmounted(() => {
:class="{ 'nav-disabled': joinDisabled }" :class="{ 'nav-disabled': joinDisabled }"
@click="joinNetwork" @click="joinNetwork"
> >
<image src="../../static/sicon/check.png" mode="aspectFit" style="width: 28rpx; height: 24rpx;" /> <image src="https://static.shelingxingqiu.com/shootmini/static/sicon/check.png" mode="aspectFit" style="width: 28rpx; height: 24rpx;" />
</view> </view>
</view> </view>
<view class="input-row-card"> <view class="input-row-card">
@@ -631,7 +631,7 @@ onUnmounted(() => {
<!-- 密码显示/隐藏切换按钮 --> <!-- 密码显示/隐藏切换按钮 -->
<view class="pwd-eye-btn" @click="togglePasswordVisibility"> <view class="pwd-eye-btn" @click="togglePasswordVisibility">
<image <image
:src="showPassword ? '../../static/sicon/eye-on.png' : '../../static/sicon/eye-off.png'" :src="showPassword ? 'https://static.shelingxingqiu.com/shootmini/static/sicon/eye-on.png' : 'https://static.shelingxingqiu.com/shootmini/static/sicon/eye-off.png'"
mode="aspectFit" mode="aspectFit"
style="width: 40rpx; height: 40rpx;" style="width: 40rpx; height: 40rpx;"
/> />
+2 -2
View File
@@ -168,7 +168,7 @@ const meleeRankList = computed(() => {
*/ */
function getMeleeRankBgSrc(rank) { function getMeleeRankBgSrc(rank) {
const names = ["one", "two", "three"]; const names = ["one", "two", "three"];
return `../static/friend-battle-result/rank-${names[rank - 1]}.svg`; return `https://static.shelingxingqiu.com/shootmini/static/friend-battle-result/rank-${names[rank - 1]}.svg`;
} }
/** /**
@@ -485,7 +485,7 @@ function goBack() {
<image <image
v-if="item.rank <= 3" v-if="item.rank <= 3"
class="rank-badge-img" class="rank-badge-img"
:src="`../static/champ${item.rank}.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/champ${item.rank}.png`"
mode="aspectFit" mode="aspectFit"
/> />
<view v-else class="rank-badge-default"> <view v-else class="rank-badge-default">
+5 -5
View File
@@ -190,10 +190,10 @@ onLoad(async (options) => {
<view> <view>
<view class="stars"> <view class="stars">
<block v-for="i in 5" :key="i"> <block v-for="i in 5" :key="i">
<image v-if="data.totalWinningRate >= i * 0.2" src="../static/star-full.png" mode="widthFix" /> <image v-if="data.totalWinningRate >= i * 0.2" src="https://static.shelingxingqiu.com/shootmini/static/star-full.png" mode="widthFix" />
<image v-else-if="data.totalWinningRate >= (i - 1) * 0.2 + 0.1" src="../static/star-half.png" <image v-else-if="data.totalWinningRate >= (i - 1) * 0.2 + 0.1" src="https://static.shelingxingqiu.com/shootmini/static/star-half.png"
mode="widthFix" /> mode="widthFix" />
<image v-else src="../static/star-empty.png" mode="widthFix" /> <image v-else src="https://static.shelingxingqiu.com/shootmini/static/star-empty.png" mode="widthFix" />
</block> </block>
</view> </view>
<text>挑战难度</text> <text>挑战难度</text>
@@ -201,7 +201,7 @@ onLoad(async (options) => {
</view> </view>
</view> </view>
<view class="founded-room"> <view class="founded-room">
<image src="../static/founded-room.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/founded-room.png" mode="widthFix" />
<view> <view>
<input placeholder="输入房间号" v-model="roomNumber" placeholder-style="color: #ccc" /> <input placeholder="输入房间号" v-model="roomNumber" placeholder-style="color: #ccc" />
<view @click="$clickSound(() => enterRoom(roomNumber))">进入房间</view> <view @click="$clickSound(() => enterRoom(roomNumber))">进入房间</view>
@@ -214,7 +214,7 @@ onLoad(async (options) => {
<image :src="user.avatar" mode="widthFix" /> <image :src="user.avatar" mode="widthFix" />
<image src="https://static.shelingxingqiu.com/shootmini/static/versus.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/versus.png" mode="widthFix" />
<view> <view>
<image src="../static/question-mark.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/question-mark.png" mode="widthFix" />
</view> </view>
</view> </view>
<view> <view>
+167 -161
View File
@@ -1,11 +1,12 @@
<script setup> <script setup>
import {computed, onMounted, onUnmounted, ref, watch} from "vue"; import {computed, onMounted, ref, watch} from "vue";
import {onShareAppMessage, onShareTimeline, onShow} from "@dcloudio/uni-app"; import {onShareAppMessage, onShareTimeline, onShow} from "@dcloudio/uni-app";
import Container from "@/components/Container.vue"; import Container from "@/components/Container.vue";
import AppFooter from "@/components/AppFooter.vue"; import AppFooter from "@/components/AppFooter.vue";
import UserHeader from "@/components/UserHeader.vue"; import UserHeader from "@/components/UserHeader.vue";
import Signin from "@/components/Signin.vue"; import Signin from "@/components/Signin.vue";
import BubbleTip from "@/components/BubbleTip.vue"; import BubbleTip from "@/components/BubbleTip.vue";
import DeviceOnlineEffects from "@/components/DeviceOnlineEffects.vue";
import ModalDialog from "@/components/ModalDialog.vue"; import ModalDialog from "@/components/ModalDialog.vue";
import OtaModal from "@/components/OtaModal.vue"; import OtaModal from "@/components/OtaModal.vue";
@@ -16,10 +17,10 @@ import {
getHomeData, getHomeData,
getMyDevicesAPI, getMyDevicesAPI,
getScoreRankList, getScoreRankList,
sendHardwareBoxUpdateAPI,
silentLoginAPI, silentLoginAPI,
} from "@/apis"; } from "@/apis";
import {topThreeColors} from "@/constants"; import {topThreeColors} from "@/constants";
import {useOtaUpdate} from "@/composables/useOtaUpdate";
import useStore from "@/store"; import useStore from "@/store";
import {storeToRefs} from "pinia"; import {storeToRefs} from "pinia";
@@ -49,19 +50,20 @@ const deviceCardState = computed(() => {
const deviceCardAssets = { const deviceCardAssets = {
unbound: { unbound: {
bow: "../static/home-device/device-bow--unbound.png", bow: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-bow--unbound.png",
background: "../static/home-device/device-card-bg--unbound.png", background: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-card-bg--unbound.png",
actionBackground: "../static/home-device/device-action-bg--bind.png", actionBackground: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-bg--bind.png",
}, },
offline: { offline: {
bow: "../static/home-device/device-bow--offline.png", bow: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-bow--offline.png",
background: "../static/home-device/device-card-bg--bound.png", background: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-card-bg--bound.png",
actionBackground: "../static/home-device/device-action-bg--device.png", actionBackground: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-bg--device.png",
}, },
online: { online: {
bow: "../static/home-device/device-bow--online.png", bow: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-bow--online.png",
background: "../static/home-device/device-card-bg--bound.png", platform: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-platform-glow--online.png",
actionBackground: "../static/home-device/device-action-bg--device.png", background: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-card-bg--bound.png",
actionBackground: "https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-bg--device.png",
}, },
}; };
@@ -70,9 +72,6 @@ const deviceCardAsset = computed(() => deviceCardAssets[deviceCardState.value]);
// OTA 相关 // OTA 相关
const otaVisible = ref(false); const otaVisible = ref(false);
const wifiRequiredVisible = ref(false); const wifiRequiredVisible = ref(false);
const otaState = ref("new_version");
const otaProgress = ref(0);
const otaPhase = ref("started");
const otaInfo = ref({ const otaInfo = ref({
versionNumber: "", versionNumber: "",
versionInfo: "", versionInfo: "",
@@ -83,26 +82,16 @@ const otaInfo = ref({
const isStartingOta = ref(false); const isStartingOta = ref(false);
let isCheckingOta = false; let isCheckingOta = false;
let otaCheckQueuedForOnline = false; let otaCheckQueuedForOnline = false;
let otaTimeoutTimer = null;
let otaUpdateRunId = 0;
const OTA_UPDATE_TIMEOUT = 10 * 60 * 1000;
const OTA_PROGRESS_EVENT = "/addons/shoot/otaProgress";
const OTA_RESULT_EVENT = "/addons/shoot/otaResult";
// 清理首页 OTA 更新超时计时器。 const {
const clearOtaUpdateTimers = () => { updating: otaUpdating,
clearTimeout(otaTimeoutTimer); progress: otaProgress,
otaTimeoutTimer = null; phase: otaPhase,
}; resultVisible: otaResultVisible,
resultStatus: otaResultStatus,
// 使当前 OTA 运行失效,确保旧请求返回后不会覆盖新状态。 startUpdate: startOtaUpdate,
const invalidateOtaUpdateRun = () => { closeResult: closeOtaResult,
otaUpdateRunId += 1; } = useOtaUpdate();
clearOtaUpdateTimers();
};
const isOtaUpdateRunActive = (runId) =>
runId === otaUpdateRunId && otaState.value === "update_progress";
// 获取并保存后端返回的 OTA 版本信息,供弹窗展示和更新接口使用。 // 获取并保存后端返回的 OTA 版本信息,供弹窗展示和更新接口使用。
const applyOtaVersionInfo = (versionInfo) => { const applyOtaVersionInfo = (versionInfo) => {
@@ -118,11 +107,21 @@ const applyOtaVersionInfo = (versionInfo) => {
// 检查当前设备盒子是否存在可升级版本。 // 检查当前设备盒子是否存在可升级版本。
const checkOtaUpdate = async () => { const checkOtaUpdate = async () => {
if (isCheckingOta || otaVisible.value) return; if (
isCheckingOta ||
otaVisible.value ||
otaUpdating.value ||
otaResultVisible.value
) return;
isCheckingOta = true; isCheckingOta = true;
try { try {
if (online.value !== true || otaVisible.value) return; if (
online.value !== true ||
otaVisible.value ||
otaUpdating.value ||
otaResultVisible.value
) return;
let versionInfo; let versionInfo;
try { try {
@@ -130,20 +129,24 @@ const checkOtaUpdate = async () => {
} catch (err) { } catch (err) {
return; return;
} }
if (otaVisible.value) return; if (otaVisible.value || otaUpdating.value || otaResultVisible.value) return;
applyOtaVersionInfo(versionInfo); applyOtaVersionInfo(versionInfo);
if (!otaInfo.value.needUpdate) return; if (!otaInfo.value.needUpdate) return;
const dismissedAt = uni.getStorageSync("ota_dismissed_at"); const dismissedAt = uni.getStorageSync("ota_dismissed_at");
const now = Date.now(); const now = Date.now();
if (!otaInfo.value.forceUpdate && dismissedAt && now - dismissedAt < 24 * 60 * 60 * 1000) return; if (!otaInfo.value.forceUpdate && dismissedAt && now - dismissedAt < 24 * 60 * 60 * 1000) return;
otaState.value = "new_version";
otaVisible.value = true; otaVisible.value = true;
} finally { } finally {
isCheckingOta = false; isCheckingOta = false;
const shouldRecheckForOnline = otaCheckQueuedForOnline; const shouldRecheckForOnline = otaCheckQueuedForOnline;
otaCheckQueuedForOnline = false; otaCheckQueuedForOnline = false;
if (shouldRecheckForOnline && !otaVisible.value) { if (
shouldRecheckForOnline &&
!otaVisible.value &&
!otaUpdating.value &&
!otaResultVisible.value
) {
void checkOtaUpdate(); void checkOtaUpdate();
} }
} }
@@ -151,7 +154,13 @@ const checkOtaUpdate = async () => {
// 设备由 WS 通知上线时补查 OTA;已显示任何 OTA 弹窗时保留当前流程和结果。 // 设备由 WS 通知上线时补查 OTA;已显示任何 OTA 弹窗时保留当前流程和结果。
watch(online, (nextOnline, previousOnline) => { watch(online, (nextOnline, previousOnline) => {
if (previousOnline !== false || nextOnline !== true || otaVisible.value) return; if (
previousOnline !== false ||
nextOnline !== true ||
otaVisible.value ||
otaUpdating.value ||
otaResultVisible.value
) return;
if (isCheckingOta) { if (isCheckingOta) {
otaCheckQueuedForOnline = true; otaCheckQueuedForOnline = true;
return; return;
@@ -159,6 +168,13 @@ watch(online, (nextOnline, previousOnline) => {
void checkOtaUpdate(); void checkOtaUpdate();
}); });
// 任一页面发起或恢复 OTA 后,关闭首页的版本发现弹窗,避免两层弹窗重叠。
watch([otaUpdating, otaResultVisible], ([updating, resultVisible]) => {
if (!updating && !resultVisible) return;
otaVisible.value = false;
isStartingOta.value = false;
});
// 拼接 OTA WiFi 页参数,让未连 WiFi 的设备继续使用同一份版本信息。 // 拼接 OTA WiFi 页参数,让未连 WiFi 的设备继续使用同一份版本信息。
const getOtaWifiUrl = () => { const getOtaWifiUrl = () => {
const { versionNumber, resourceUrl } = otaInfo.value; const { versionNumber, resourceUrl } = otaInfo.value;
@@ -177,89 +193,17 @@ const handleOtaDismiss = () => {
otaVisible.value = false; otaVisible.value = false;
}; };
// 将首页 OTA 直连更新流程标记为失败。 // 设备盒子已连 WiFi 时,通过共享 OTA 状态发起更新。
const failHomeOtaUpdate = (runId) => {
if (!isOtaUpdateRunActive(runId)) return;
invalidateOtaUpdateRun();
isStartingOta.value = false;
otaState.value = "update_failure";
otaVisible.value = true;
};
// 将首页 OTA 直连更新流程标记为成功。
const completeHomeOtaUpdate = (runId) => {
if (!isOtaUpdateRunActive(runId)) return;
invalidateOtaUpdateRun();
isStartingOta.value = false;
otaInfo.value = {...otaInfo.value, needUpdate: false};
otaProgress.value = 100;
otaPhase.value = "installing";
otaState.value = "update_success";
otaVisible.value = true;
};
// 首页只处理当前设备、当前目标版本的 OTA WebSocket 消息。
const handleHomeOtaSocketMessage = (message) => {
const runId = otaUpdateRunId;
if (!isOtaUpdateRunActive(runId) || Number(message?.code ?? 0) !== 0) return;
if (![OTA_PROGRESS_EVENT, OTA_RESULT_EVENT].includes(message?.event)) return;
const messageDeviceId = String(message.data?.deviceId || "");
const currentDeviceId = String(device.value?.deviceId || "");
if (messageDeviceId && currentDeviceId && messageDeviceId !== currentDeviceId) return;
const messageVersion = String(message.data?.versionNumber || "");
const currentVersion = String(otaInfo.value.versionNumber || "");
if (messageVersion && currentVersion && messageVersion !== currentVersion) return;
if (message.event === OTA_PROGRESS_EVENT) {
const nextProgress = Math.min(
100,
Math.max(0, Number(message.data?.progress) || 0)
);
otaProgress.value = Math.max(otaProgress.value, nextProgress);
if (["started", "downloading", "installing"].includes(message.data?.phase)) {
otaPhase.value = message.data.phase;
}
return;
}
if (message.data?.status === "success") {
completeHomeOtaUpdate(runId);
} else if (message.data?.status === "failed") {
failHomeOtaUpdate(runId);
}
};
// 设备盒子已连 WiFi 时,从首页直接传空 WiFi 信息发起 OTA 更新。
const startHomeOtaUpdate = async () => { const startHomeOtaUpdate = async () => {
invalidateOtaUpdateRun(); otaVisible.value = false;
const runId = otaUpdateRunId; await startOtaUpdate({
otaState.value = "update_progress";
otaVisible.value = true;
otaProgress.value = 0;
otaPhase.value = "started";
otaTimeoutTimer = setTimeout(() => {
if (!isOtaUpdateRunActive(runId)) return;
failHomeOtaUpdate(runId);
}, OTA_UPDATE_TIMEOUT);
try {
const updateResult = await sendHardwareBoxUpdateAPI({
versionNumber: otaInfo.value.versionNumber, versionNumber: otaInfo.value.versionNumber,
wifiSsid: "",
wifiPassword: "",
resourceUrl: otaInfo.value.resourceUrl, resourceUrl: otaInfo.value.resourceUrl,
onSuccess: () => {
otaInfo.value = {...otaInfo.value, needUpdate: false};
},
}); });
if (!isOtaUpdateRunActive(runId)) return; isStartingOta.value = false;
if (!updateResult?.taskId) {
failHomeOtaUpdate(runId);
return;
}
} catch (err) {
if (!isOtaUpdateRunActive(runId)) return;
failHomeOtaUpdate(runId);
}
}; };
// 点击立即更新时先判断设备是否在线并已通过 WiFi 联网,未联网时先展示连接引导。 // 点击立即更新时先判断设备是否在线并已通过 WiFi 联网,未联网时先展示连接引导。
@@ -305,15 +249,25 @@ const goWifiForOtaUpdate = () => {
uni.navigateTo({ url: getOtaWifiUrl() }); uni.navigateTo({ url: getOtaWifiUrl() });
}; };
// 处理 OTA 更新成功后的完成按钮,关闭结果弹窗。 // 处理 OTA 更新成功后的完成按钮,关闭共享结果弹窗。
const handleOtaDone = () => { const handleOtaDone = () => {
otaVisible.value = false; closeOtaResult();
}; };
// 处理 OTA 更新失败后的重试按钮,重新走立即更新判断流程。 // 处理共享 OTA 更新失败后的重试,先刷新版本参数再重新判断网络状态。
const handleOtaRetry = () => { const handleOtaRetry = async () => {
invalidateOtaUpdateRun(); closeOtaResult();
handleOtaUpdate(); try {
const versionInfo = await getHardwareBoxVersionAPI();
applyOtaVersionInfo(versionInfo);
if (!otaInfo.value.needUpdate) return;
await handleOtaUpdate();
} catch (error) {
uni.showToast({
title: "获取更新版本失败,请重试",
icon: "none",
});
}
}; };
// 提取积分榜接口返回的榜单数组,兼容数组和对象两种返回格式。 // 提取积分榜接口返回的榜单数组,兼容数组和对象两种返回格式。
@@ -383,18 +337,11 @@ const syncHomeDevice = async () => {
}; };
onShow(async (options) => { onShow(async () => {
const env = uni.getAccountInfoSync().miniProgram.envVersion; const env = uni.getAccountInfoSync().miniProgram.envVersion;
const token = uni.getStorageSync(`${env}_token`); const token = uni.getStorageSync(`${env}_token`);
// 检查是否从 OTA 更新页面返回 if (token || user.value.id) {
if (options && options.updateResult) {
otaState.value = options.updateResult;
if (options.updateResult === "update_success") {
otaInfo.value = {...otaInfo.value, needUpdate: false};
}
otaVisible.value = true;
} else if (token || user.value.id) {
await checkOtaUpdate(); await checkOtaUpdate();
} }
@@ -455,17 +402,11 @@ onShow(async (options) => {
}); });
onMounted(async () => { onMounted(async () => {
uni.$on("socket-inbox", handleHomeOtaSocketMessage);
const config = await getAppConfig(); const config = await getAppConfig();
updateConfig(config); updateConfig(config);
console.log("全局配置:", config); console.log("全局配置:", config);
}); });
onUnmounted(() => {
uni.$off("socket-inbox", handleHomeOtaSocketMessage);
invalidateOtaUpdateRun();
});
onShareAppMessage(() => { onShareAppMessage(() => {
return { return {
title: "智能真弓:实时捕捉+毫秒级同步,弓箭选手全球竞技!", // 分享卡片的标题 title: "智能真弓:实时捕捉+毫秒级同步,弓箭选手全球竞技!", // 分享卡片的标题
@@ -486,21 +427,34 @@ onShareTimeline(() => {
<template> <template>
<Container :isHome="true" :showBackToGame="true"> <Container :isHome="true" :showBackToGame="true">
<!-- OTA 升级弹窗:使用 visible 控制显隐,description 为副标题,changelog 为详细说明 --> <!-- 首页版本发现弹窗仅负责触发更新,执行状态由三个页面共享。 -->
<OtaModal <OtaModal
:visible="otaVisible" :visible="otaVisible && !otaUpdating && !otaResultVisible"
:state="otaState" state="new_version"
:version="otaInfo.versionNumber" :version="otaInfo.versionNumber"
:progress="otaProgress"
:phase="otaPhase"
:description="''" :description="''"
:changelog="otaInfo.versionInfo" :changelog="otaInfo.versionInfo"
:forceUpdate="otaInfo.forceUpdate" :forceUpdate="otaInfo.forceUpdate"
@update="handleOtaUpdate" @update="handleOtaUpdate"
@skip="handleOtaDismiss" @skip="handleOtaDismiss"
@close="handleOtaDismiss" @close="handleOtaDismiss"
/>
<OtaModal
:visible="otaUpdating"
state="update_progress"
:progress="otaProgress"
:phase="otaPhase"
/>
<OtaModal
:visible="otaResultVisible && otaResultStatus === 'success'"
state="update_success"
@done="handleOtaDone" @done="handleOtaDone"
/>
<OtaModal
:visible="otaResultVisible && otaResultStatus === 'failed'"
state="update_failure"
@retry="handleOtaRetry" @retry="handleOtaRetry"
@close="closeOtaResult"
/> />
<ModalDialog <ModalDialog
:show="wifiRequiredVisible" :show="wifiRequiredVisible"
@@ -531,8 +485,28 @@ onShareTimeline(() => {
mode="scaleToFill" mode="scaleToFill"
/> />
<image <image
v-if="deviceCardState === 'online'"
class="device-visual-platform-glow"
:src="deviceCardAsset.platform"
mode="scaleToFill"
/>
<DeviceOnlineEffects
v-if="deviceCardState === 'online'"
variant="home"
/>
<view
v-if="deviceCardState === 'online'"
class="device-visual-float-group"
>
<image
class="device-visual-bow device-visual-bow--online"
:src="deviceCardAsset.bow"
mode="scaleToFill"
/>
</view>
<image
v-else
class="device-visual-bow" class="device-visual-bow"
:class="{ 'device-visual-bow--floating': deviceCardState === 'online' }"
:src="deviceCardAsset.bow" :src="deviceCardAsset.bow"
mode="scaleToFill" mode="scaleToFill"
/> />
@@ -543,7 +517,7 @@ onShareTimeline(() => {
> >
<image <image
class="device-status-icon" class="device-status-icon"
src="../static/home-device/device-state-dot--offline.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-state-dot--offline.png"
mode="scaleToFill" mode="scaleToFill"
/> />
<text>未连接</text> <text>未连接</text>
@@ -556,20 +530,20 @@ onShareTimeline(() => {
<image <image
v-if="otaInfo.needUpdate" v-if="otaInfo.needUpdate"
class="device-status-refresh" class="device-status-refresh"
src="../static/home-device/device-state-refresh.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-state-refresh.png"
mode="scaleToFill" mode="scaleToFill"
/> />
<view class="device-battery-value"> <view class="device-battery-value">
<image <image
class="device-battery-frame" class="device-battery-frame"
src="../static/home-device/device-state-battery.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-state-battery.png"
mode="scaleToFill" mode="scaleToFill"
/> />
<text class="device-battery-text">{{ deviceBattery === null ? "--" : deviceBattery }}</text> <text class="device-battery-text">{{ deviceBattery === null ? "--" : deviceBattery }}</text>
</view> </view>
<image <image
class="device-status-icon device-status-icon--online" class="device-status-icon device-status-icon--online"
src="../static/home-device/device-state-dot--online.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-state-dot--online.png"
mode="scaleToFill" mode="scaleToFill"
/> />
</view> </view>
@@ -586,7 +560,7 @@ onShareTimeline(() => {
<image <image
v-if="deviceCardState === 'unbound'" v-if="deviceCardState === 'unbound'"
class="device-action-bind-icon" class="device-action-bind-icon"
src="../static/home-device/device-action-bind-icon.png" src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-action-bind-icon.png"
mode="scaleToFill" mode="scaleToFill"
/> />
<text <text
@@ -644,15 +618,15 @@ onShareTimeline(() => {
: '#000', : '#000',
}" }"
> >
<image v-if="i === 1" src="../static/champ1.png"/> <image v-if="i === 1" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png"/>
<image v-if="i === 2" src="../static/champ2.png"/> <image v-if="i === 2" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png"/>
<image v-if="i === 3" src="../static/champ3.png"/> <image v-if="i === 3" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png"/>
<view v-if="i > 3">{{ i }}</view> <view v-if="i > 3">{{ i }}</view>
<image <image
:src=" :src="
scoreRankList[i - 1] scoreRankList[i - 1]
? (scoreRankList[i - 1].avatar || '../static/user-icon.png') ? (scoreRankList[i - 1].avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png')
: '../static/user-icon-dark.png' : 'https://static.shelingxingqiu.com/shootmini/static/user-icon-dark.png'
" "
mode="aspectFill" mode="aspectFill"
/> />
@@ -734,6 +708,8 @@ onShareTimeline(() => {
} }
.device-visual-background, .device-visual-background,
.device-visual-platform-glow,
.device-visual-float-group,
.device-visual-bow { .device-visual-bow {
display: flex; display: flex;
position: absolute; position: absolute;
@@ -745,6 +721,26 @@ onShareTimeline(() => {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 0;
}
.device-visual-platform-glow {
left: 0;
bottom: 0;
z-index: 2;
width: 100%;
height: 100%;
transform-origin: center bottom;
animation: device-platform-glow 3.6s ease-in-out -1.1s infinite;
}
.device-visual-float-group {
top: 0;
left: 0;
z-index: 5;
width: 100%;
height: 388rpx;
animation: device-bow-float 3s ease-in-out infinite;
} }
.device-visual-bow { .device-visual-bow {
@@ -754,17 +750,27 @@ onShareTimeline(() => {
height: 388rpx; height: 388rpx;
} }
.device-visual-bow--floating { .device-visual-bow--online {
animation: device-bow-float 3s ease-in-out infinite; z-index: 1;
} }
@keyframes device-bow-float { @keyframes device-bow-float {
0%, 0%,
100% { 100% {
transform: translateY(0) rotate(-0.5deg); transform: translateY(0);
} }
50% { 50% {
transform: translateY(-10rpx) rotate(0.5deg); transform: translateY(-20rpx);
}
}
@keyframes device-platform-glow {
0%,
100% {
opacity: 0.92;
}
50% {
opacity: 1;
} }
} }
@@ -778,7 +784,7 @@ onShareTimeline(() => {
position: absolute; position: absolute;
top: 10rpx; top: 10rpx;
right: 14rpx; right: 14rpx;
z-index: 2; z-index: 6;
height: 34rpx; height: 34rpx;
color: #ffffff; color: #ffffff;
font-family: Inter-Regular, sans-serif; font-family: Inter-Regular, sans-serif;
@@ -850,7 +856,7 @@ onShareTimeline(() => {
position: absolute; position: absolute;
bottom: 28rpx; bottom: 28rpx;
left: 50%; left: 50%;
z-index: 2; z-index: 6;
width: 218rpx; width: 218rpx;
height: 56rpx; height: 56rpx;
justify-content: center; justify-content: center;
+3 -3
View File
@@ -132,7 +132,7 @@ const checkBowData = (selected) => {
<text>大乱斗</text> <text>大乱斗</text>
<view @click="checkBowData"> <view @click="checkBowData">
<text>查看靶纸</text> <text>查看靶纸</text>
<image src="../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
</view> </view>
<PlayerScore2 <PlayerScore2
@@ -155,7 +155,7 @@ const checkBowData = (selected) => {
<text>{{ round.ifGold ? "决金箭" : `第${index + 1}轮` }}</text> <text>{{ round.ifGold ? "决金箭" : `第${index + 1}轮` }}</text>
<view @click="() => checkBowData(index)"> <view @click="() => checkBowData(index)">
<text>查看靶纸</text> <text>查看靶纸</text>
<image src="../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
</view> </view>
<view <view
@@ -171,7 +171,7 @@ const checkBowData = (selected) => {
borderColor: '#64BAFF', borderColor: '#64BAFF',
transform: `translateX(-${index * 15}px)`, transform: `translateX(-${index * 15}px)`,
}" }"
:src="p.avatar || '../static/user-icon.png'" :src="p.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
:key="index" :key="index"
mode="widthFix" mode="widthFix"
/> />
+2 -2
View File
@@ -81,7 +81,7 @@ onLoad(async (options) => {
> >
<image <image
v-if="player.userId === currentUser.userId" v-if="player.userId === currentUser.userId"
src="../static/player-bg2.png" src="https://static.shelingxingqiu.com/shootmini/static/player-bg2.png"
:style="{ :style="{
width: `${Math.max(100 / players.length, 18)}vw`, width: `${Math.max(100 / players.length, 18)}vw`,
}" }"
@@ -203,7 +203,7 @@ onLoad(async (options) => {
flex-wrap: wrap; flex-wrap: wrap;
} }
.score-item { .score-item {
background-image: url("../static/score-bg.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/score-bg.png");
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
+18 -18
View File
@@ -31,15 +31,15 @@ const memberTypes = [
themeClass: "vip-page--normal", themeClass: "vip-page--normal",
heroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-title.png", heroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-title.png",
activeHeroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-title2.png", activeHeroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-title2.png",
orderIcon: "../../static/vip/vip-order.png", orderIcon: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-order.png",
heroBadge: "../../static/vip/normal-hero-badge.png", heroBadge: "https://static.shelingxingqiu.com/shootmini/static/vip/normal-hero-badge.png",
buttonClass: "activate-btn--normal", buttonClass: "activate-btn--normal",
benefits: [ benefits: [
{ label: "黄金昵称", icon: "../../static/vip/vip-badge.png" }, { label: "黄金昵称", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-badge.png" },
{ label: "教练点评", icon: "../../static/vip/vip-comment.png" }, { label: "教练点评", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-comment.png" },
{ label: "专享VIP客服", icon: "../../static/vip/vip-service.png" }, { label: "专享VIP客服", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-service.png" },
{ label: "排位赛\n每日+20次", icon: "../../static/vip/vip-rank.png" }, { label: "排位赛\n每日+20次", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-rank.png" },
{ label: "约战\n每日+20次", icon: "../../static/vip/vip-battle.png" }, { label: "约战\n每日+20次", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/vip-battle.png" },
], ],
}, },
{ {
@@ -52,18 +52,18 @@ const memberTypes = [
themeClass: "vip-page--super", themeClass: "vip-page--super",
heroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-title.png", heroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-title.png",
activeHeroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-title2.png", activeHeroCard: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-title2.png",
orderIcon: "../../static/vip/svip-order.png", orderIcon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-order.png",
heroBadge: "../../static/vip/super-hero-badge.png", heroBadge: "https://static.shelingxingqiu.com/shootmini/static/vip/super-hero-badge.png",
buttonClass: "activate-btn--super", buttonClass: "activate-btn--super",
benefits: [ benefits: [
{ label: "专属落点标识", icon: "../../static/vip/svip-point.png" }, { label: "专属落点标识", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-point.png" },
{ label: "专属命中效果", icon: "../../static/vip/svip-hit.png" }, { label: "专属命中效果", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-hit.png" },
{ label: "专属射箭效果", icon: "../../static/vip/svip-arrow.png" }, { label: "专属射箭效果", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-arrow.png" },
{ label: "炫彩昵称", icon: "../../static/vip/svip-badge.png" }, { label: "炫彩昵称", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-badge.png" },
{ label: "教练点评", icon: "../../static/vip/svip-comment.png" }, { label: "教练点评", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-comment.png" },
{ label: "约战无限制", icon: "../../static/vip/svip-battle.png" }, { label: "约战无限制", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-battle.png" },
{ label: "排位赛无限制", icon: "../../static/vip/svip-rank.png" }, { label: "排位赛无限制", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-rank.png" },
{ label: "专享SVIP客服", icon: "../../static/vip/svip-service.png" }, { label: "专享SVIP客服", icon: "https://static.shelingxingqiu.com/shootmini/static/vip/svip-service.png" },
], ],
}, },
]; ];
@@ -446,7 +446,7 @@ onShow(loadVipConfig);
<text>套餐说明</text> <text>套餐说明</text>
<image <image
class="package-header__icon" class="package-header__icon"
src="../../static/enter.png" src="https://static.shelingxingqiu.com/shootmini/static/enter.png"
mode="aspectFit" mode="aspectFit"
/> />
</view> </view>
+1 -1
View File
@@ -31,7 +31,7 @@ import Container from "@/components/Container.vue";
<view class="table-wrap"> <view class="table-wrap">
<view class="intro-toast"> <view class="intro-toast">
<image class="intro-toast__bg" src="../../static/vip/intro-toast.png" mode="scaleToFill" /> <image class="intro-toast__bg" src="https://static.shelingxingqiu.com/shootmini/static/vip/intro-toast.png" mode="scaleToFill" />
<text class="intro-toast__text">初次绑定设备赠送6个月</text> <text class="intro-toast__text">初次绑定设备赠送6个月</text>
</view> </view>
<view class="benefit-table"> <view class="benefit-table">
+3 -3
View File
@@ -116,7 +116,7 @@ onLoad((options) => {
<view class="contest-header"> <view class="contest-header">
<text>{{ getName(item) }}</text> <text>{{ getName(item) }}</text>
<text>{{ item.createTime }}</text> <text>{{ item.createTime }}</text>
<image src="../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
<BattleHeader <BattleHeader
:players="item.teams[0] ? item.teams[0].players : []" :players="item.teams[0] ? item.teams[0].players : []"
@@ -139,7 +139,7 @@ onLoad((options) => {
<view class="contest-header"> <view class="contest-header">
<text>{{ getName(item) }}</text> <text>{{ getName(item) }}</text>
<text>{{ item.createTime }}</text> <text>{{ item.createTime }}</text>
<image src="../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
<BattleHeader <BattleHeader
:players="item.teams[0] ? item.teams[0].players : []" :players="item.teams[0] ? item.teams[0].players : []"
@@ -164,7 +164,7 @@ onLoad((options) => {
>{{ item.trainingTypeText }} >{{ item.trainingTypeText }}
{{ formatPractiseTime(item.createTime) }}</text {{ formatPractiseTime(item.createTime) }}</text
> >
<image src="../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
</ScrollList> </ScrollList>
</swiper-item> </swiper-item>
+2 -2
View File
@@ -130,7 +130,7 @@ onLoad((options) => {
<view v-else-if="status === 'login'" class="state login-state"> <view v-else-if="status === 'login'" class="state login-state">
<image <image
class="login-icon" class="login-icon"
src="../static/org-bind/login-icon.png" src="https://static.shelingxingqiu.com/shootmini/static/org-bind/login-icon.png"
mode="aspectFit" mode="aspectFit"
/> />
<text class="login-title">{{ <text class="login-title">{{
@@ -151,7 +151,7 @@ onLoad((options) => {
/> />
<image <image
class="success-badge" class="success-badge"
src="../static/org-bind/green-gou.png" src="https://static.shelingxingqiu.com/shootmini/static/org-bind/green-gou.png"
mode="aspectFit" mode="aspectFit"
/> />
</view> </view>
+3 -3
View File
@@ -115,7 +115,7 @@ const targetTypeName = computed(() => {
/> />
<view class="header"> <view class="header">
<image <image
:src="record.user.avatar || '../static/user-icon.png'" :src="record.user.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
mode="widthFix" mode="widthFix"
class="avatar" class="avatar"
/> />
@@ -136,7 +136,7 @@ const targetTypeName = computed(() => {
> >
<text>落点稳定性</text> <text>落点稳定性</text>
<image <image
src="../static/s-question-mark.png" src="https://static.shelingxingqiu.com/shootmini/static/s-question-mark.png"
mode="widthFix" mode="widthFix"
class="question-mark" class="question-mark"
/> />
@@ -165,7 +165,7 @@ const targetTypeName = computed(() => {
<text>落点分布</text> <text>落点分布</text>
<!-- <button hover-class="none" @click="() => openTip(2)"> <!-- <button hover-class="none" @click="() => openTip(2)">
<image <image
src="../static/s-question-mark.png" src="https://static.shelingxingqiu.com/shootmini/static/s-question-mark.png"
mode="widthFix" mode="widthFix"
class="question-mark" class="question-mark"
/> />
+3 -3
View File
@@ -203,7 +203,7 @@ onShareTimeline(async () => {
> >
<text>落点稳定性</text> <text>落点稳定性</text>
<image <image
src="../static/s-question-mark.png" src="https://static.shelingxingqiu.com/shootmini/static/s-question-mark.png"
mode="widthFix" mode="widthFix"
class="question-mark" class="question-mark"
/> />
@@ -232,7 +232,7 @@ onShareTimeline(async () => {
v-if="user.id === record.user.id" v-if="user.id === record.user.id"
> >
<image <image
:src="`../static/${notes ? 'has' : 'add'}-note.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/${notes ? 'has' : 'add'}-note.png`"
mode="widthFix" mode="widthFix"
/> />
<text>{{ notes ? "我的备注" : "添加备注" }}</text> <text>{{ notes ? "我的备注" : "添加备注" }}</text>
@@ -243,7 +243,7 @@ onShareTimeline(async () => {
<text>落点分布</text> <text>落点分布</text>
<!-- <button hover-class="none" @click="() => openTip(2)"> <!-- <button hover-class="none" @click="() => openTip(2)">
<image <image
src="../static/s-question-mark.png" src="https://static.shelingxingqiu.com/shootmini/static/s-question-mark.png"
mode="widthFix" mode="widthFix"
class="question-mark" class="question-mark"
/> />
+1 -1
View File
@@ -146,7 +146,7 @@ onLoad((options) => {
<text>第 {{ currentGroup }} 组</text> <text>第 {{ currentGroup }} 组</text>
</view> </view>
<view @click="deleteArrow"> <view @click="deleteArrow">
<image src="../static/delete.png" /> <image src="https://static.shelingxingqiu.com/shootmini/static/delete.png" />
<text>删除</text> <text>删除</text>
</view> </view>
</view> </view>
+8 -8
View File
@@ -97,19 +97,19 @@ onShow(() => {
<text :style="{ color: bowType.name ? '#000' : '#999' }">{{ <text :style="{ color: bowType.name ? '#000' : '#999' }">{{
bowType.name || "请选择" bowType.name || "请选择"
}}</text> }}</text>
<image src="../static/arrow-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/arrow-grey.png" mode="widthFix" />
</view> </view>
<view @click="() => openSelector(1)"> <view @click="() => openSelector(1)">
<text :style="{ color: distance ? '#000' : '#999' }">{{ <text :style="{ color: distance ? '#000' : '#999' }">{{
distance ? distance + " 米" : "请选择" distance ? distance + " 米" : "请选择"
}}</text> }}</text>
<image src="../static/arrow-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/arrow-grey.png" mode="widthFix" />
</view> </view>
<view @click="() => openSelector(2)"> <view @click="() => openSelector(2)">
<text :style="{ color: bowtargetType.name ? '#000' : '#999' }">{{ <text :style="{ color: bowtargetType.name ? '#000' : '#999' }">{{
bowtargetType.name || "请选择" bowtargetType.name || "请选择"
}}</text> }}</text>
<image src="../static/arrow-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/arrow-grey.png" mode="widthFix" />
</view> </view>
</view> </view>
<view class="point-records"> <view class="point-records">
@@ -121,7 +121,7 @@ onShow(() => {
<view class="swipe-right" @click="onRemoveDraft"> <view class="swipe-right" @click="onRemoveDraft">
<image <image
class="swipe-icon" class="swipe-icon"
src="../static/delete-white.png" src="https://static.shelingxingqiu.com/shootmini/static/delete-white.png"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
@@ -131,11 +131,11 @@ onShow(() => {
<text>{{ pointDraft.distance }}米</text> <text>{{ pointDraft.distance }}米</text>
<text>{{ pointDraft.bowtargetType.name }}</text> <text>{{ pointDraft.bowtargetType.name }}</text>
<view> <view>
<image src="../static/draft-icon.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/draft-icon.png" mode="widthFix" />
<text>本地草稿</text> <text>本地草稿</text>
<view> <view>
<text>计分待完成</text> <text>计分待完成</text>
<image src="../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
</view> </view>
</view> </view>
@@ -148,7 +148,7 @@ onShow(() => {
<view class="swipe-right" @click="onRemoveRecord(item)"> <view class="swipe-right" @click="onRemoveRecord(item)">
<image <image
class="swipe-icon" class="swipe-icon"
src="../static/delete-white.png" src="https://static.shelingxingqiu.com/shootmini/static/delete-white.png"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
@@ -172,7 +172,7 @@ onShow(() => {
> >
<view class="selector"> <view class="selector">
<button hover-class="none" @click="() => (showModal = false)"> <button hover-class="none" @click="() => (showModal = false)">
<image src="../static/close-grey.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-grey.png" mode="widthFix" />
</button> </button>
<EditOption <EditOption
v-show="selectorIndex === 0" v-show="selectorIndex === 0"
+1 -1
View File
@@ -78,7 +78,7 @@ onMounted(async () => {
@click="shareImage" @click="shareImage"
v-if="user.id" v-if="user.id"
> >
<image src="../static/share-icon.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/share-icon.png" mode="widthFix" />
</button> </button>
<canvas <canvas
class="share-canvas" class="share-canvas"
+13 -13
View File
@@ -215,12 +215,12 @@ onShareTimeline(() => {
<view class="container"> <view class="container">
<view class="daily-signin"> <view class="daily-signin">
<view> <view>
<image src="../static/week-check.png" /> <image src="https://static.shelingxingqiu.com/shootmini/static/week-check.png" />
</view> </view>
<view :class="data.weeksCheckIn[0] ? 'checked' : ''"> <view :class="data.weeksCheckIn[0] ? 'checked' : ''">
<image <image
v-if="data.weeksCheckIn[0]" v-if="data.weeksCheckIn[0]"
src="../static/checked-green2.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green2.png"
mode="widthFix" mode="widthFix"
/> />
<view v-else></view> <view v-else></view>
@@ -229,7 +229,7 @@ onShareTimeline(() => {
<view :class="data.weeksCheckIn[1] ? 'checked' : ''"> <view :class="data.weeksCheckIn[1] ? 'checked' : ''">
<image <image
v-if="data.weeksCheckIn[1]" v-if="data.weeksCheckIn[1]"
src="../static/checked-green2.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green2.png"
mode="widthFix" mode="widthFix"
/> />
<view v-else></view> <view v-else></view>
@@ -238,7 +238,7 @@ onShareTimeline(() => {
<view :class="data.weeksCheckIn[2] ? 'checked' : ''"> <view :class="data.weeksCheckIn[2] ? 'checked' : ''">
<image <image
v-if="data.weeksCheckIn[2]" v-if="data.weeksCheckIn[2]"
src="../static/checked-green2.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green2.png"
mode="widthFix" mode="widthFix"
/> />
<view v-else></view> <view v-else></view>
@@ -247,7 +247,7 @@ onShareTimeline(() => {
<view :class="data.weeksCheckIn[3] ? 'checked' : ''"> <view :class="data.weeksCheckIn[3] ? 'checked' : ''">
<image <image
v-if="data.weeksCheckIn[3]" v-if="data.weeksCheckIn[3]"
src="../static/checked-green2.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green2.png"
mode="widthFix" mode="widthFix"
/> />
<view v-else></view> <view v-else></view>
@@ -256,7 +256,7 @@ onShareTimeline(() => {
<view :class="data.weeksCheckIn[4] ? 'checked' : ''"> <view :class="data.weeksCheckIn[4] ? 'checked' : ''">
<image <image
v-if="data.weeksCheckIn[4]" v-if="data.weeksCheckIn[4]"
src="../static/checked-green2.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green2.png"
mode="widthFix" mode="widthFix"
/> />
<view v-else></view> <view v-else></view>
@@ -265,7 +265,7 @@ onShareTimeline(() => {
<view :class="data.weeksCheckIn[5] ? 'checked' : ''"> <view :class="data.weeksCheckIn[5] ? 'checked' : ''">
<image <image
v-if="data.weeksCheckIn[5]" v-if="data.weeksCheckIn[5]"
src="../static/checked-green2.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green2.png"
mode="widthFix" mode="widthFix"
/> />
<view v-else></view> <view v-else></view>
@@ -274,7 +274,7 @@ onShareTimeline(() => {
<view :class="data.weeksCheckIn[6] ? 'checked' : ''"> <view :class="data.weeksCheckIn[6] ? 'checked' : ''">
<image <image
v-if="data.weeksCheckIn[6]" v-if="data.weeksCheckIn[6]"
src="../static/checked-green2.png" src="https://static.shelingxingqiu.com/shootmini/static/checked-green2.png"
mode="widthFix" mode="widthFix"
/> />
<view v-else></view> <view v-else></view>
@@ -330,16 +330,16 @@ onShareTimeline(() => {
</view> </view>
<view> <view>
<button hover-class="none" @click="$clickSound(toRecordPage)" class="image-btn"> <button hover-class="none" @click="$clickSound(toRecordPage)" class="image-btn">
<image src="../static/record-btn.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/record-btn.png" mode="widthFix" />
</button> </button>
<button hover-class="none" @click="$clickSound(startScoring)" class="image-btn"> <button hover-class="none" @click="$clickSound(startScoring)" class="image-btn">
<image src="../static/start-scoring.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/start-scoring.png" mode="widthFix" />
</button> </button>
</view> </view>
</view> </view>
</view> </view>
<view class="title" :style="{ marginBottom: 0 }"> <view class="title" :style="{ marginBottom: 0 }">
<image src="../static/point-book-title1.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/point-book-title1.png" mode="widthFix" />
</view> </view>
<image <image
src="https://static.shelingxingqiu.com/attachment/2025-12-31/dfc9dxrpyf4exh4rhd.png" src="https://static.shelingxingqiu.com/attachment/2025-12-31/dfc9dxrpyf4exh4rhd.png"
@@ -379,7 +379,7 @@ onShareTimeline(() => {
</view> </view>
<RingBarChart :data="data.ringRate" v-if="user.id" /> <RingBarChart :data="data.ringRate" v-if="user.id" />
<view class="title" v-if="user.id"> <view class="title" v-if="user.id">
<image src="../static/point-book-title2.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/point-book-title2.png" mode="widthFix" />
</view> </view>
<view class="top-list"> <view class="top-list">
<view class="rank-title-bar"> <view class="rank-title-bar">
@@ -397,7 +397,7 @@ onShareTimeline(() => {
:style="{ marginBottom: isIOS ? '10rpx' : 0 }" :style="{ marginBottom: isIOS ? '10rpx' : 0 }"
> >
<text>查看完整榜单</text> <text>查看完整榜单</text>
<image src="../static/enter-arrow-blue.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/enter-arrow-blue.png" mode="widthFix" />
</view> </view>
</view> </view>
<Signin <Signin
+7 -7
View File
@@ -356,7 +356,7 @@ const measureTabsMetrics = () => {
mode="widthFix" mode="widthFix"
/> />
<navigator open-type="navigateBack"> <navigator open-type="navigateBack">
<image class="header-back" src="../static/back.png" mode="widthFix" /> <image class="header-back" src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</navigator> </navigator>
<text :style="{ opacity: addBg ? 1 : 0 }">本赛季排行榜</text> <text :style="{ opacity: addBg ? 1 : 0 }">本赛季排行榜</text>
</view> </view>
@@ -415,37 +415,37 @@ const measureTabsMetrics = () => {
<image <image
v-if="index === 0" v-if="index === 0"
class="player-bg" class="player-bg"
src="../static/melee-player-bg1.png" src="https://static.shelingxingqiu.com/shootmini/static/melee-player-bg1.png"
mode="aspectFill" mode="aspectFill"
/> />
<image <image
v-if="index === 1" v-if="index === 1"
class="player-bg" class="player-bg"
src="../static/melee-player-bg2.png" src="https://static.shelingxingqiu.com/shootmini/static/melee-player-bg2.png"
mode="aspectFill" mode="aspectFill"
/> />
<image <image
v-if="index === 2" v-if="index === 2"
class="player-bg" class="player-bg"
src="../static/melee-player-bg3.png" src="https://static.shelingxingqiu.com/shootmini/static/melee-player-bg3.png"
mode="aspectFill" mode="aspectFill"
/> />
<image <image
v-if="index === 0" v-if="index === 0"
class="player-crown" class="player-crown"
src="../static/champ1.png" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png"
mode="widthFix" mode="widthFix"
/> />
<image <image
v-if="index === 1" v-if="index === 1"
class="player-crown" class="player-crown"
src="../static/champ2.png" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png"
mode="widthFix" mode="widthFix"
/> />
<image <image
v-if="index === 2" v-if="index === 2"
class="player-crown" class="player-crown"
src="../static/champ3.png" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png"
mode="widthFix" mode="widthFix"
/> />
<view v-if="index > 2" class="view-crown"> <view v-if="index > 2" class="view-crown">
+21 -21
View File
@@ -331,27 +331,27 @@ onShow(async () => {
<image class="star" src="https://static.shelingxingqiu.com/shootmini/static/rank/star.png" mode="widthFix" /> <image class="star" src="https://static.shelingxingqiu.com/shootmini/static/rank/star.png" mode="widthFix" />
</view> </view>
<image <image
src="../static/rank/battle1v1.svg" src="https://static.shelingxingqiu.com/shootmini/static/rank/battle1v1.svg"
mode="widthFix" mode="widthFix"
@click.stop="$clickSound(() => toMatchPage(1, 2))" @click.stop="$clickSound(() => toMatchPage(1, 2))"
/> />
<image <image
src="../static/rank/battle2v2.svg" src="https://static.shelingxingqiu.com/shootmini/static/rank/battle2v2.svg"
mode="widthFix" mode="widthFix"
@click.stop="$clickSound(() => toMatchPage(2, 4))" @click.stop="$clickSound(() => toMatchPage(2, 4))"
/> />
<image <image
src="../static/rank/battle3v3.svg" src="https://static.shelingxingqiu.com/shootmini/static/rank/battle3v3.svg"
mode="widthFix" mode="widthFix"
@click.stop="$clickSound(() => toMatchPage(3, 6))" @click.stop="$clickSound(() => toMatchPage(3, 6))"
/> />
<image <image
src="../static/rank/battle5.svg" src="https://static.shelingxingqiu.com/shootmini/static/rank/battle5.svg"
mode="widthFix" mode="widthFix"
@click.stop="$clickSound(() => toMatchPage(4, 5))" @click.stop="$clickSound(() => toMatchPage(4, 5))"
/> />
<image <image
src="../static/rank/battle10.svg" src="https://static.shelingxingqiu.com/shootmini/static/rank/battle10.svg"
mode="widthFix" mode="widthFix"
@click.stop="$clickSound(() => toMatchPage(5, 10))" @click.stop="$clickSound(() => toMatchPage(5, 10))"
/> />
@@ -390,7 +390,7 @@ onShow(async () => {
<image <image
class="triangle-icon" class="triangle-icon"
v-show="seasonData.length > 1" v-show="seasonData.length > 1"
src="../static/rank/triangle.png" src="https://static.shelingxingqiu.com/shootmini/static/rank/triangle.png"
mode="widthFix" mode="widthFix"
/> />
<view class="season-list" v-if="showSeasonList"> <view class="season-list" v-if="showSeasonList">
@@ -410,7 +410,7 @@ onShow(async () => {
</text> </text>
<image <image
v-if="item.seasonName === seasonName" v-if="item.seasonName === seasonName"
src="../static/rank/triangle.png" src="https://static.shelingxingqiu.com/shootmini/static/rank/triangle.png"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
@@ -437,7 +437,7 @@ onShow(async () => {
</text> </text>
</view> </view>
<view class="my-rank-score"> <view class="my-rank-score">
<image src="../static/rank/bubble-tip.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/rank/bubble-tip.png" mode="widthFix" />
<text>积分:{{ seasonStats.score }}</text> <text>积分:{{ seasonStats.score }}</text>
</view> </view>
</view> </view>
@@ -500,7 +500,7 @@ onShow(async () => {
查看我的比赛记录 查看我的比赛记录
<image <image
style="width: 30rpx; vertical-align: -2px" style="width: 30rpx; vertical-align: -2px"
src="../static/enter.png" src="https://static.shelingxingqiu.com/shootmini/static/enter.png"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
@@ -531,12 +531,12 @@ onShow(async () => {
:style="{ backgroundColor: index % 2 === 0 ? '#9898981f' : 'transparent' }" :style="{ backgroundColor: index % 2 === 0 ? '#9898981f' : 'transparent' }"
class="rank-item" class="rank-item"
> >
<image v-if="index === 0" src="../static/champ1.png" mode="widthFix" /> <image v-if="index === 0" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png" mode="widthFix" />
<image v-if="index === 1" src="../static/champ2.png" mode="widthFix" /> <image v-if="index === 1" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png" mode="widthFix" />
<image v-if="index === 2" src="../static/champ3.png" mode="widthFix" /> <image v-if="index === 2" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png" mode="widthFix" />
<view v-if="index > 2">{{ index + 1 }}</view> <view v-if="index > 2">{{ index + 1 }}</view>
<image <image
:src="item.avatar || '../static/user-icon.png'" :src="item.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
mode="widthFix" mode="widthFix"
:style="{ borderColor: index < 3 ? topThreeColors[index] : '' }" :style="{ borderColor: index < 3 ? topThreeColors[index] : '' }"
/> />
@@ -560,12 +560,12 @@ onShow(async () => {
:style="{ backgroundColor: index % 2 === 0 ? '#9898981f' : 'transparent' }" :style="{ backgroundColor: index % 2 === 0 ? '#9898981f' : 'transparent' }"
class="rank-item" class="rank-item"
> >
<image v-if="index === 0" src="../static/champ1.png" mode="widthFix" /> <image v-if="index === 0" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png" mode="widthFix" />
<image v-if="index === 1" src="../static/champ2.png" mode="widthFix" /> <image v-if="index === 1" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png" mode="widthFix" />
<image v-if="index === 2" src="../static/champ3.png" mode="widthFix" /> <image v-if="index === 2" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png" mode="widthFix" />
<view v-if="index > 2">{{ index + 1 }}</view> <view v-if="index > 2">{{ index + 1 }}</view>
<image <image
:src="item.avatar || '../static/user-icon.png'" :src="item.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
mode="widthFix" mode="widthFix"
:style="{ borderColor: index < 3 ? topThreeColors[index] : '' }" :style="{ borderColor: index < 3 ? topThreeColors[index] : '' }"
/> />
@@ -589,12 +589,12 @@ onShow(async () => {
:style="{ backgroundColor: index % 2 === 0 ? '#9898981f' : 'transparent' }" :style="{ backgroundColor: index % 2 === 0 ? '#9898981f' : 'transparent' }"
class="rank-item" class="rank-item"
> >
<image v-if="index === 0" src="../static/champ1.png" mode="widthFix" /> <image v-if="index === 0" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png" mode="widthFix" />
<image v-if="index === 1" src="../static/champ2.png" mode="widthFix" /> <image v-if="index === 1" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png" mode="widthFix" />
<image v-if="index === 2" src="../static/champ3.png" mode="widthFix" /> <image v-if="index === 2" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png" mode="widthFix" />
<view v-if="index > 2">{{ index + 1 }}</view> <view v-if="index > 2">{{ index + 1 }}</view>
<image <image
:src="item.avatar || '../static/user-icon.png'" :src="item.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
mode="widthFix" mode="widthFix"
:style="{ borderColor: index < 3 ? topThreeColors[index] : '' }" :style="{ borderColor: index < 3 ? topThreeColors[index] : '' }"
/> />
+4 -4
View File
@@ -59,25 +59,25 @@ watch(
/> />
<image <image
v-if="rank === 1" v-if="rank === 1"
src="../../../static/champ1.png" src="https://static.shelingxingqiu.com/shootmini/static/champ1.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<image <image
v-if="rank === 2" v-if="rank === 2"
src="../../../static/champ2.png" src="https://static.shelingxingqiu.com/shootmini/static/champ2.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<image <image
v-if="rank === 3" v-if="rank === 3"
src="../../../static/champ3.png" src="https://static.shelingxingqiu.com/shootmini/static/champ3.png"
mode="widthFix" mode="widthFix"
class="avatar-rank" class="avatar-rank"
/> />
<view v-if="rank > 3" class="rank-view">{{ rank }}</view> <view v-if="rank > 3" class="rank-view">{{ rank }}</view>
<image <image
:src="src || '../../../static/user-icon.png'" :src="src || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'"
mode="widthFix" mode="widthFix"
:style="{ :style="{
width: size + 'px', width: size + 'px',
@@ -104,7 +104,7 @@ onBeforeUnmount(() => {
<block v-else-if="game.roomID"> <block v-else-if="game.roomID">
<text>返回房间</text> <text>返回房间</text>
</block> </block>
<image src="../../../static/back.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
</view> </view>
</template> </template>
@@ -72,7 +72,7 @@ const isMember = (player = {}) => player.vip === true || player.sVip === true;
</view> </view>
<image <image
v-if="winner === 1" v-if="winner === 1"
src="../../../static/winner-badge.png" src="https://static.shelingxingqiu.com/shootmini/static/winner-badge.png"
mode="widthFix" mode="widthFix"
class="left-winner-badge" class="left-winner-badge"
/> />
@@ -100,7 +100,7 @@ const isMember = (player = {}) => player.vip === true || player.sVip === true;
</view> </view>
<image <image
v-if="winner === 2" v-if="winner === 2"
src="../../../static/winner-badge.png" src="https://static.shelingxingqiu.com/shootmini/static/winner-badge.png"
mode="widthFix" mode="widthFix"
class="right-winner-badge" class="right-winner-badge"
/> />
@@ -8,7 +8,7 @@ const { deviceBattery: power } = storeToRefs(store);
<template> <template>
<view class="container"> <view class="container">
<image src="../../../static/b-power.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/b-power.png" mode="widthFix" />
<view>{{ power === null ? "电量--" : `电量${power}%` }}</view> <view>{{ power === null ? "电量--" : `电量${power}%` }}</view>
</view> </view>
</template> </template>
@@ -523,7 +523,7 @@ onBeforeUnmount(() => {
<view :class="['target', { 'target--shake': targetShaking }]"> <view :class="['target', { 'target--shake': targetShaking }]">
<view v-if="angle !== null" class="arrow-dir" :style="arrowStyle"> <view v-if="angle !== null" class="arrow-dir" :style="arrowStyle">
<view :style="{ background: circleColor }"> <view :style="{ background: circleColor }">
<image src="../../../static/dot-circle.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/dot-circle.png" mode="widthFix" />
</view> </view>
</view> </view>
<view v-if="stop" class="stop-sign">中场休息</view> <view v-if="stop" class="stop-sign">中场休息</view>
@@ -568,7 +568,7 @@ onBeforeUnmount(() => {
!shouldHideRedHit(index) !shouldHideRedHit(index)
" "
class="svip-hit-bg" class="svip-hit-bg"
src="../../../static/vip/svip-xuan.png" src="https://static.shelingxingqiu.com/shootmini/static/vip/svip-xuan.png"
:style="getSvipHitBgStyle(bow)" :style="getSvipHitBgStyle(bow)"
mode="aspectFit" mode="aspectFit"
/> />
@@ -593,7 +593,7 @@ onBeforeUnmount(() => {
!shouldHideBlueHit(index) !shouldHideBlueHit(index)
" "
class="svip-hit-bg" class="svip-hit-bg"
src="../../../static/vip/svip-xuan.png" src="https://static.shelingxingqiu.com/shootmini/static/vip/svip-xuan.png"
:style="getSvipHitBgStyle(bow)" :style="getSvipHitBgStyle(bow)"
mode="aspectFit" mode="aspectFit"
/> />
+2 -2
View File
@@ -10,8 +10,8 @@ defineProps({
}, },
}); });
const bubbleTypes = [ const bubbleTypes = [
"../../../static/long-bubble.png", "https://static.shelingxingqiu.com/shootmini/static/long-bubble.png",
"../../../static/long-bubble-middle.png", "https://static.shelingxingqiu.com/shootmini/static/long-bubble-middle.png",
"https://static.shelingxingqiu.com/shootmini/static/long-bubble-tall.png", "https://static.shelingxingqiu.com/shootmini/static/long-bubble-tall.png",
]; ];
</script> </script>
+5 -5
View File
@@ -108,10 +108,10 @@ onBeforeUnmount(() => {
<template> <template>
<view class="container"> <view class="container">
<view class="back-btn" @click="onClick"> <view class="back-btn" @click="onClick">
<image v-if="whiteBackArrow" src="../../../static/back.png" mode="widthFix" /> <image v-if="whiteBackArrow" src="https://static.shelingxingqiu.com/shootmini/static/back.png" mode="widthFix" />
<image <image
v-if="!whiteBackArrow" v-if="!whiteBackArrow"
src="../../../static/back-black.png" src="https://static.shelingxingqiu.com/shootmini/static/back-black.png"
mode="widthFix" mode="widthFix"
/> />
</view> </view>
@@ -131,12 +131,12 @@ onBeforeUnmount(() => {
<text class="truncate">{{ user.nickName }}</text> <text class="truncate">{{ user.nickName }}</text>
<image <image
v-if="heat" v-if="heat"
:src="`../../../static/hot${heat}.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/hot${heat}.png`"
mode="widthFix" mode="widthFix"
/> />
</block> </block>
<block v-else> <block v-else>
<image src="../../../static/user-icon.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/user-icon.png" mode="widthFix" />
<text>新来的弓箭手你好呀~</text> <text>新来的弓箭手你好呀~</text>
</block> </block>
</view> </view>
@@ -203,7 +203,7 @@ onBeforeUnmount(() => {
:style="battleRoomBtnStyle" :style="battleRoomBtnStyle"
> >
<text class="battle-room-number__text">房号: {{ game.roomNumber }}</text> <text class="battle-room-number__text">房号: {{ game.roomNumber }}</text>
<image src="../../../static/share2.png" mode="widthFix" class="battle-room-number__icon" /> <image src="https://static.shelingxingqiu.com/shootmini/static/share2.png" mode="widthFix" class="battle-room-number__icon" />
</button> </button>
</view> </view>
</template> </template>
@@ -56,7 +56,7 @@ onBeforeUnmount(() => {
<text>{{ (tips || "").replace(/你/g, "").replace(/重回/g, "") }}</text> <text>{{ (tips || "").replace(/你/g, "").replace(/重回/g, "") }}</text>
<text v-if="totalShot > 0"> ({{ currentShot }}/{{ totalShot }}) </text> <text v-if="totalShot > 0"> ({{ currentShot }}/{{ totalShot }}) </text>
<button v-if="!!tips" hover-class="none" @click="updateSound"> <button v-if="!!tips" hover-class="none" @click="updateSound">
<image :src="`../../../static/sound${sound ? '' : '-off'}-yellow.png`" mode="widthFix" /> <image :src="`https://static.shelingxingqiu.com/shootmini/static/sound${sound ? '' : '-off'}-yellow.png`" mode="widthFix" />
</button> </button>
</view> </view>
</template> </template>
+1 -1
View File
@@ -69,7 +69,7 @@ const onBtnClick = debounce(async () => {
<slot /> <slot />
</block> </block>
<block v-else> <block v-else>
<image src="../../../static/btn-loading.png" mode="widthFix" class="loading" /> <image src="https://static.shelingxingqiu.com/shootmini/static/btn-loading.png" mode="widthFix" class="loading" />
</block> </block>
</button> </button>
</template> </template>
+1 -1
View File
@@ -60,7 +60,7 @@ watch(
mode="widthFix" mode="widthFix"
/> />
<view class="close-btn" @click="onClose" v-if="!noBg"> <view class="close-btn" @click="onClose" v-if="!noBg">
<image src="../../../static/close-yellow.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-yellow.png" mode="widthFix" />
</view> </view>
<slot></slot> <slot></slot>
</view> </view>
@@ -49,7 +49,7 @@ const getContentHeight = () => {
</view> </view>
<IconButton <IconButton
v-if="!!onClose" v-if="!!onClose"
src="../../../static/close-gold-outline.png" src="https://static.shelingxingqiu.com/shootmini/static/close-gold-outline.png"
:width="30" :width="30"
:onClick="onClose" :onClick="onClose"
/> />
@@ -80,7 +80,7 @@ watch(
<template> <template>
<view class="container"> <view class="container">
<image <image
:src="isRed ? '../../../static/flag-red.png' : '../../../static/flag-blue.png'" :src="isRed ? 'https://static.shelingxingqiu.com/shootmini/static/flag-red.png' : 'https://static.shelingxingqiu.com/shootmini/static/flag-blue.png'"
class="flag" class="flag"
:style="{ :style="{
[isRed ? 'left' : 'right']: '10rpx', [isRed ? 'left' : 'right']: '10rpx',
@@ -101,7 +101,7 @@ watch(
[isRed ? 'left' : 'right']: getPos(item.id) + 'rpx', [isRed ? 'left' : 'right']: getPos(item.id) + 'rpx',
}" }"
> >
<image :src="item.avatar || '../../../static/user-icon.png'" mode="widthFix" /> <image :src="item.avatar || 'https://static.shelingxingqiu.com/shootmini/static/user-icon.png'" mode="widthFix" />
<text <text
v-if="isFirst(item.id)" v-if="isFirst(item.id)"
:style="{ backgroundColor: isRed ? '#ff6060' : '#5fadff' }" :style="{ backgroundColor: isRed ? '#ff6060' : '#5fadff' }"
+1 -1
View File
@@ -151,7 +151,7 @@ const onClickTab = (index) => {
min-width: 26%; min-width: 26%;
} }
.score-item { .score-item {
background-image: url("../../static/score-bg.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/score-bg.png");
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
+1 -1
View File
@@ -141,7 +141,7 @@ const onClickTab = (index) => {
min-width: 26%; min-width: 26%;
} }
.score-item { .score-item {
background-image: url("../static/score-bg.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/score-bg.png");
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
+1 -1
View File
@@ -59,7 +59,7 @@ const props = defineProps({
</view> </view>
</view> </view>
<view @click="onClose"> <view @click="onClose">
<image src="/static/close-white.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/close-white.png" mode="widthFix" />
</view> </view>
</view> </view>
<view :style="{ width: '100%', marginBottom: '20px' }"> <view :style="{ width: '100%', marginBottom: '20px' }">
+1 -1
View File
@@ -604,7 +604,7 @@ onBeforeUnmount(() => {
!shouldHideLatestHit(entry.index) !shouldHideLatestHit(entry.index)
" "
class="svip-hit-bg" class="svip-hit-bg"
src="../../../static/vip/svip-xuan.png" src="https://static.shelingxingqiu.com/shootmini/static/vip/svip-xuan.png"
:style="getSvipHitBgStyle(entry.shot)" :style="getSvipHitBgStyle(entry.shot)"
mode="aspectFit" mode="aspectFit"
/> />
+4 -4
View File
@@ -29,14 +29,14 @@ const props = defineProps({
font-size: 24rpx; font-size: 24rpx;
} }
.normal { .normal {
background-image: url("../static/bubble-tip.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip.png");
width: 157rpx; width: 157rpx;
height: 105rpx; height: 105rpx;
padding-top: 10px; padding-top: 10px;
padding-left: 30rpx; padding-left: 30rpx;
} }
.normal2 { .normal2 {
background-image: url("../static/bubble-tip4.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip4.png");
width: 190rpx; width: 190rpx;
height: 105rpx; height: 105rpx;
padding-top: 10px; padding-top: 10px;
@@ -46,14 +46,14 @@ const props = defineProps({
z-index: 1; z-index: 1;
} }
.long { .long {
background-image: url("../static/bubble-tip2.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip2.png");
width: 370rpx; width: 370rpx;
height: 70rpx; height: 70rpx;
top: -50%; top: -50%;
left: 49%; left: 49%;
} }
.short { .short {
background-image: url("../static/bubble-tip3.png"); background-image: url("https://static.shelingxingqiu.com/shootmini/static/bubble-tip3.png");
width: 300rpx; width: 300rpx;
height: 70rpx; height: 70rpx;
top: -50%; top: -50%;
+2 -2
View File
@@ -28,8 +28,8 @@ const props = defineProps({
}); });
const items = ref(new Array(props.total).fill(9)); const items = ref(new Array(props.total).fill(9));
const bgImages = [ const bgImages = [
"../static/complete-light1.png", "https://static.shelingxingqiu.com/shootmini/static/complete-light1.png",
"../static/complete-light2.png", "https://static.shelingxingqiu.com/shootmini/static/complete-light2.png",
]; ];
const getDisplayText = (arrow) => { const getDisplayText = (arrow) => {
if (!arrow) return "-"; if (!arrow) return "-";
@@ -239,7 +239,7 @@ const displayName = computed(() => {
}); });
const avatarSrc = computed(() => { const avatarSrc = computed(() => {
return user.value?.avatar || "/static/shooter2.png"; return user.value?.avatar || "https://static.shelingxingqiu.com/shootmini/static/shooter2.png";
}); });
watch( watch(
@@ -638,7 +638,7 @@ onBeforeUnmount(() => {
<!-- <button class="progress-card__sound" hover-class="none" @click="updateSound"> <!-- <button class="progress-card__sound" hover-class="none" @click="updateSound">
<image <image
class="progress-card__sound-icon" class="progress-card__sound-icon"
:src="`/static/sound${sound ? '' : '-off'}-yellow.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/sound${sound ? '' : '-off'}-yellow.png`"
mode="aspectFit" mode="aspectFit"
/> />
</button> --> </button> -->
@@ -162,7 +162,7 @@ onBeforeUnmount(() => {
</view> </view>
</view> </view>
<view v-if="isBattle" class="ready-timer"> <view v-if="isBattle" class="ready-timer">
<image src="../../../static/test-tip.png" mode="widthFix" /> <image src="https://static.shelingxingqiu.com/shootmini/static/test-tip.png" mode="widthFix" />
<view v-if="count >= 0"> <view v-if="count >= 0">
<text>距离正式比赛还有</text> <text>距离正式比赛还有</text>
<text>{{ count }}</text> <text>{{ count }}</text>
+1 -1
View File
@@ -1844,7 +1844,7 @@ onBeforeUnmount(() => {
<button class="sound-btn" hover-class="none" @click="updateSound"> <button class="sound-btn" hover-class="none" @click="updateSound">
<image <image
class="sound-icon" class="sound-icon"
:src="`/static/sound${sound ? '' : '-off'}-yellow.png`" :src="`https://static.shelingxingqiu.com/shootmini/static/sound${sound ? '' : '-off'}-yellow.png`"
mode="aspectFit" mode="aspectFit"
/> />
</button> </button>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 45 KiB

+1 -1
View File
@@ -5,7 +5,7 @@ const PERSISTED_STORE_KEY = "store";
const defaultUser = { const defaultUser = {
id: "", id: "",
nickName: "", nickName: "",
avatar: "../static/user-icon.png", avatar: "https://static.shelingxingqiu.com/shootmini/static/user-icon.png",
trio: 0, // 大于1表示完成了新手引导 trio: 0, // 大于1表示完成了新手引导
lvlName: "", lvlName: "",
}; };