2025-05-01 21:38:35 +08:00
|
|
|
<script setup>
|
2025-07-23 11:18:47 +08:00
|
|
|
import { ref, onMounted, onUnmounted } from "vue";
|
2025-06-15 22:01:06 +08:00
|
|
|
const isIos = ref(true);
|
2025-06-08 13:55:09 +08:00
|
|
|
|
2025-06-17 16:42:53 +08:00
|
|
|
const props = defineProps({
|
2025-05-01 21:38:35 +08:00
|
|
|
title: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: "",
|
|
|
|
|
},
|
2025-06-17 16:42:53 +08:00
|
|
|
onBack: {
|
|
|
|
|
type: Function,
|
|
|
|
|
default: null,
|
|
|
|
|
},
|
2025-05-01 21:38:35 +08:00
|
|
|
});
|
2025-06-08 13:55:09 +08:00
|
|
|
|
2025-06-17 16:42:53 +08:00
|
|
|
const onClick = () => {
|
|
|
|
|
if (props.onBack) props.onBack();
|
|
|
|
|
else uni.navigateBack();
|
|
|
|
|
};
|
|
|
|
|
|
2025-07-23 11:18:47 +08:00
|
|
|
const loading = ref(false);
|
|
|
|
|
const showLoader = ref(false);
|
|
|
|
|
const updateLoading = (value) => {
|
|
|
|
|
loading.value = value;
|
|
|
|
|
};
|
|
|
|
|
|
2025-06-15 22:01:06 +08:00
|
|
|
onMounted(() => {
|
|
|
|
|
const deviceInfo = uni.getDeviceInfo();
|
|
|
|
|
isIos.value = deviceInfo.osName === "ios";
|
2025-07-23 11:18:47 +08:00
|
|
|
const pages = getCurrentPages();
|
|
|
|
|
const currentPage = pages[pages.length - 1];
|
|
|
|
|
if (
|
|
|
|
|
currentPage.route === "pages/battle-room" ||
|
|
|
|
|
currentPage.route === "pages/team-match" ||
|
|
|
|
|
currentPage.route === "pages/melee-match"
|
|
|
|
|
) {
|
|
|
|
|
showLoader.value = true;
|
|
|
|
|
}
|
|
|
|
|
uni.$on("update-header-loading", updateLoading);
|
|
|
|
|
});
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
uni.$off("update-header-loading", updateLoading);
|
2025-06-15 22:01:06 +08:00
|
|
|
});
|
2025-05-01 21:38:35 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-07-18 10:14:13 +08:00
|
|
|
<view class="container" :style="{ paddingTop: isIos ? '80rpx' : '50rpx' }">
|
2025-06-17 16:42:53 +08:00
|
|
|
<view class="back-btn" @click="onClick">
|
2025-05-01 21:38:35 +08:00
|
|
|
<image src="../static/back.png" mode="widthFix" />
|
2025-06-17 16:42:53 +08:00
|
|
|
</view>
|
2025-06-25 00:09:53 +08:00
|
|
|
<view>
|
2025-07-11 00:47:34 +08:00
|
|
|
<block
|
|
|
|
|
v-if="
|
|
|
|
|
'-凹造型-感知距离-小试牛刀'.indexOf(title) === -1 ||
|
|
|
|
|
'-凹造型-感知距离-小试牛刀'.indexOf(title) === 10
|
|
|
|
|
"
|
|
|
|
|
>
|
2025-06-25 00:09:53 +08:00
|
|
|
<text>{{ title }}</text>
|
|
|
|
|
</block>
|
2025-07-11 00:47:34 +08:00
|
|
|
<block
|
|
|
|
|
v-if="
|
|
|
|
|
title &&
|
|
|
|
|
'-凹造型-感知距离-小试牛刀'.indexOf(title) !== -1 &&
|
|
|
|
|
'-凹造型-感知距离-小试牛刀'.indexOf(title) !== 10
|
|
|
|
|
"
|
|
|
|
|
>
|
2025-06-25 00:09:53 +08:00
|
|
|
<view class="first-try-steps">
|
2025-07-11 00:47:34 +08:00
|
|
|
<text :class="title === '-凹造型' ? 'current-step' : ''">凹造型</text>
|
2025-06-28 12:03:33 +08:00
|
|
|
<text>-</text>
|
2025-07-11 00:47:34 +08:00
|
|
|
<text :class="title === '-感知距离' ? 'current-step' : ''"
|
2025-06-25 00:09:53 +08:00
|
|
|
>感知距离</text
|
|
|
|
|
>
|
2025-06-28 12:03:33 +08:00
|
|
|
<text>-</text>
|
2025-07-11 00:47:34 +08:00
|
|
|
<text :class="title === '-小试牛刀' ? 'current-step' : ''"
|
2025-06-25 00:09:53 +08:00
|
|
|
>小试牛刀</text
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
2025-07-23 11:18:47 +08:00
|
|
|
<image
|
|
|
|
|
:style="{ opacity: showLoader && loading ? 1 : 0 }"
|
|
|
|
|
src="../static/btn-loading.png"
|
|
|
|
|
mode="widthFix"
|
|
|
|
|
class="loading"
|
|
|
|
|
/>
|
2025-05-01 21:38:35 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.container {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 72vw;
|
2025-07-23 18:24:26 +08:00
|
|
|
height: 100rpx;
|
2025-06-21 03:34:10 +08:00
|
|
|
/* margin-top: var(--status-bar-height); */
|
2025-05-01 21:38:35 +08:00
|
|
|
padding-left: 15px;
|
2025-06-25 00:09:53 +08:00
|
|
|
color: #fff;
|
|
|
|
|
font-size: 16px;
|
2025-07-11 22:21:34 +08:00
|
|
|
font-weight: bold;
|
2025-05-01 21:38:35 +08:00
|
|
|
}
|
|
|
|
|
.back-btn {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
.back-btn > image {
|
2025-07-25 09:59:54 +08:00
|
|
|
width: 18px;
|
|
|
|
|
height: 18px;
|
2025-05-01 21:38:35 +08:00
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
2025-06-25 00:09:53 +08:00
|
|
|
.first-try-steps {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
color: #fff6;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
.first-try-steps > text {
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
.first-try-steps > text:nth-child(2),
|
|
|
|
|
.first-try-steps > text:nth-child(4) {
|
|
|
|
|
margin: 0 5px;
|
|
|
|
|
}
|
|
|
|
|
.current-step {
|
|
|
|
|
font-size: 16px;
|
2025-05-01 21:38:35 +08:00
|
|
|
color: #fff;
|
|
|
|
|
}
|
2025-07-23 11:18:47 +08:00
|
|
|
.loading {
|
|
|
|
|
width: 20px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
background-blend-mode: darken;
|
|
|
|
|
animation: rotate 2s linear infinite;
|
|
|
|
|
}
|
2025-05-01 21:38:35 +08:00
|
|
|
</style>
|