update:新手教程新增vip特效

This commit is contained in:
2026-07-01 11:52:03 +08:00
parent 02290615e8
commit 3e99bb8ad9
+5
View File
@@ -29,6 +29,7 @@ import { storeToRefs } from "pinia";
const store = useStore(); const store = useStore();
const { user } = storeToRefs(store); const { user } = storeToRefs(store);
const scores = ref([]); const scores = ref([]);
const isSvip = ref(false);
const step = ref(0); const step = ref(0);
const total = 12; const total = 12;
const stepButtonTexts = [ const stepButtonTexts = [
@@ -114,6 +115,7 @@ const onOver = async () => {
async function onReceiveMessage(msg) { async function onReceiveMessage(msg) {
if (msg.type === MESSAGETYPESV2.ShootResult) { if (msg.type === MESSAGETYPESV2.ShootResult) {
isSvip.value = msg.sVip === true;
scores.value = msg.details; scores.value = msg.details;
} else if (msg.type === MESSAGETYPESV2.BattleEnd) { } else if (msg.type === MESSAGETYPESV2.BattleEnd) {
setTimeout(onOver, 1500); setTimeout(onOver, 1500);
@@ -204,6 +206,7 @@ const nextStep = async () => {
title.value = "小试牛刀"; title.value = "小试牛刀";
await startPractiseAPI(); await startPractiseAPI();
scores.value = []; scores.value = [];
isSvip.value = false;
step.value = 5; step.value = 5;
start.value = true; start.value = true;
setTimeout(() => { setTimeout(() => {
@@ -230,6 +233,7 @@ const onClose = async () => {
practiseResult.value = {}; practiseResult.value = {};
start.value = false; start.value = false;
scores.value = []; scores.value = [];
isSvip.value = false;
step.value = 4; step.value = 4;
const result = await createPractiseAPI(total, 120); const result = await createPractiseAPI(total, 120);
if (result) practiseId.value = result.id; if (result) practiseId.value = result.id;
@@ -343,6 +347,7 @@ const onClose = async () => {
:currentRound="step === 5 ? scores.length : 0" :currentRound="step === 5 ? scores.length : 0"
:totalRound="step === 5 ? total : 0" :totalRound="step === 5 ? total : 0"
:scores="scores" :scores="scores"
:isSvip="isSvip"
/> />
<ScorePanel <ScorePanel
v-if="step === 5" v-if="step === 5"