This commit is contained in:
kron
2025-06-16 11:26:57 +08:00
parent e4c49a3772
commit 4e522cf300
5 changed files with 46 additions and 11 deletions

View File

@@ -26,6 +26,7 @@ const stepButtonTexts = [
"",
"退出新手试炼",
];
const title = ref("新手试炼场");
const start = ref(false);
const practiseResult = ref({});
const power = ref(0);
@@ -68,12 +69,16 @@ onUnmounted(() => {
const nextStep = async () => {
if (step.value === 0) {
step.value = 1;
title.value = "凹造型";
} else if (step.value === 1) {
btnDisabled.value = true;
step.value = 2;
title.value = "感知距离";
} else if (step.value === 2) {
step.value = 3;
title.value = "小试牛刀";
} else if (step.value === 3) {
title.value = "新手试炼场";
scores.value = [];
await createPractise(total);
step.value = 4;
@@ -96,9 +101,14 @@ const onClose = () => {
</script>
<template>
<Container :bgType="1" title="新手试炼场">
<Container :bgType="1" :title="title">
<view class="container">
<Guide v-if="step !== 4" :tall="step === 2 || step === 5">
<Guide
v-if="step !== 4"
:tall="
(step === 1 && user.nickName.length > 6) || step === 2 || step === 5
"
>
<text v-if="step === 0">
hi<text :style="{ color: '#fed847' }">{{ user.nickName }}</text>
这是新人必刷小任务0基础小白也能快速掌握弓箭技巧和游戏规则哦~

View File

@@ -192,6 +192,7 @@ const backToHome = () => {
width: 40%;
color: #fff;
font-size: 14px;
margin: 35% 0;
}
.scan-code > view:first-child > image {
width: 100%;
@@ -270,6 +271,13 @@ const backToHome = () => {
margin-bottom: 5px;
border-radius: 10px;
}
.device-binded > view > text {
width: 120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
}
.device-binded > image {
width: 16vw;
margin: 0 20px;

View File

@@ -7,7 +7,7 @@ import Avatar from "@/components/Avatar.vue";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const { user, device } = storeToRefs(store);
const { updateUser } = store;
const toOrderPage = () => {
@@ -17,6 +17,12 @@ const toOrderPage = () => {
};
const toFristTryPage = () => {
if (!device.value.deviceId) {
return uni.showToast({
title: "请先绑定设备",
icon: "none",
});
}
uni.navigateTo({
url: "/pages/first-try",
});