Files
FiDA_Front/src/views/nuic/index.vue

166 lines
3.4 KiB
Vue
Raw Normal View History

2026-02-04 15:30:33 +08:00
<template>
<div class="nuic background-pink">
2026-02-06 16:23:22 +08:00
<img class="logo" src="@/assets/images/logo-2.png" />
<div class="header" v-show="!loading">
2026-02-04 15:30:33 +08:00
<div class="close" @click="onClose">
<svg-icon name="close-border" size="33" />
</div>
<div
class="item"
v-for="(v, i) in list"
:key="i"
:state="active === i ? 1 : active > i ? 0 : 2"
>
2026-02-05 13:55:37 +08:00
<img
v-show="i === active"
src="@/assets/images/nuic/nav-active.png"
draggable="false"
/>
2026-02-04 15:30:33 +08:00
</div>
</div>
2026-02-06 16:23:22 +08:00
<component v-show="!loading" class="view" :is="list[active]" @next="onNext" />
<div class="loading" v-show="loading">
<img src="@/assets/images/nuic/loading.png" />
<p class="tip">{{ $t('Nuic.loadingTip') }}</p>
</div>
2026-02-04 15:30:33 +08:00
</div>
</template>
<script setup lang="ts">
import { computed, ref, markRaw } from 'vue'
import nuic1 from './nuic-1.vue'
import nuic2 from './nuic-2.vue'
import nuic3 from './nuic-3.vue'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
const route = useRoute()
const active = computed(() => Number(route.query.index || 0))
const list = markRaw([nuic1, nuic2, nuic3])
2026-02-06 16:23:22 +08:00
const loading = ref(false)
2026-02-04 15:30:33 +08:00
const onClose = () => {
2026-02-05 15:14:50 +08:00
router.push({ name: 'mainInput' })
2026-02-04 15:30:33 +08:00
}
const onNext = () => {
const index = active.value + 1
if (index < list.length) {
router.push({ query: { index } })
} else {
2026-02-06 16:23:22 +08:00
loading.value = true
setTimeout(() => {
router.push({ name: 'mainInput' })
}, 1000)
2026-02-04 15:30:33 +08:00
}
}
</script>
<style lang="less" scoped>
.nuic {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
display: flex;
flex-direction: column;
// align-items: center;
// justify-content: center;
> .logo {
position: absolute;
2026-02-06 16:23:22 +08:00
top: 2.7rem;
left: 3.6rem;
width: auto;
height: 2.4rem;
2026-02-04 15:30:33 +08:00
}
> .header {
margin-top: 5rem;
width: 100%;
display: flex;
justify-content: center;
align-items: flex-end;
height: 11.2rem;
> * {
margin-right: 3rem;
&:last-child {
margin-right: 0;
}
}
> .close {
margin-bottom: -0.65rem;
cursor: pointer;
}
> .item {
width: 30.2rem;
&[state='1'] {
height: 100%;
}
&[state='2'],
&[state='0'] {
height: 2rem;
border-radius: 2rem;
}
&[state='0'] {
background: linear-gradient(90deg, #ff8ca2 0%, #ffa497 49.04%, #ff8d55 100%);
}
&[state='2'] {
background-color: #dfdfdf;
}
> img {
width: 100%;
height: auto;
}
}
}
2026-02-09 14:55:55 +08:00
&:deep(.view) {
2026-02-04 15:30:33 +08:00
margin-top: 5rem;
display: flex;
flex-direction: column;
align-items: center;
color: #252727;
text-align: center;
> .btns {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
> button {
width: 29.6rem;
height: 6rem;
border-radius: 6rem;
border: none;
outline: none;
font-size: 2.4rem;
font-weight: 600;
color: #252727;
cursor: pointer;
margin-right: 3.4rem;
background-color: #fff;
2026-02-05 13:55:37 +08:00
font-family: SemiBold;
2026-02-04 15:30:33 +08:00
&:last-child {
margin-right: 0;
}
&.skip {
color: #8d8d8d;
}
&:active {
opacity: 0.8;
}
}
}
}
2026-02-06 16:23:22 +08:00
> .loading {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #f8f7f5;
> .tip {
font-family: Regular;
font-size: 3rem;
color: #585858;
}
}
2026-02-04 15:30:33 +08:00
}
</style>