feat: 欢迎&登录&注册&stylist页面
This commit is contained in:
256
src/views/stylist/index.vue
Normal file
256
src/views/stylist/index.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div class="stylist-page">
|
||||
<!-- 主要内容区域 -->
|
||||
<div class="content">
|
||||
<!-- 标题 -->
|
||||
<div class="header">
|
||||
<div class="title">CHOOSE YOUR STYLIST</div>
|
||||
</div>
|
||||
|
||||
<!-- 轮播容器 -->
|
||||
<div class="carousel-container">
|
||||
<!-- 左箭头 -->
|
||||
<div class="nav-arrow left" @click="handleChangeSwiper('prev')">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path
|
||||
d="M15 18L9 12L15 6"
|
||||
stroke="white"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<van-swipe touchable ref="swiperRef">
|
||||
<van-swipe-item v-for="item in stylists" :key="item.id">
|
||||
<div class="swiper-container">
|
||||
<img :src="item.image" />
|
||||
<div class="text-container">
|
||||
<div class="name">{{ item.name }}</div>
|
||||
<div class="description">
|
||||
{{ item.description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
<div class="nav-arrow right" @click="handleChangeSwiper('next')">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path
|
||||
d="M9 18L15 12L9 6"
|
||||
stroke="white"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Continue按钮 -->
|
||||
<div class="continue-button" @click="handleContinue">Continue</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// stylist数据
|
||||
const stylists = ref([
|
||||
{
|
||||
id: 1,
|
||||
name: 'Vera Lo',
|
||||
description: 'Contemporary, Classic, Simple Silhouettes, Statement Pieces',
|
||||
image: '/src/assets/images/female.png'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'Sarah Chen',
|
||||
description: 'Modern, Edgy, Bold Colors, Street Style',
|
||||
image: '/src/assets/images/male.png'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'Emma Wilson',
|
||||
description: 'Elegant, Feminine, Vintage Inspired, Soft Tones',
|
||||
image: '/src/assets/images/female.png'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: 'Alex Johnson',
|
||||
description: 'Minimalist, Professional, Neutral Palette, Clean Lines',
|
||||
image: '/src/assets/images/male.png'
|
||||
}
|
||||
])
|
||||
|
||||
const swiperRef = ref(null)
|
||||
|
||||
const handleChangeSwiper = (type: 'next' | 'prev') => {
|
||||
if (type === 'next') {
|
||||
swiperRef.value.next()
|
||||
} else {
|
||||
swiperRef.value.prev()
|
||||
}
|
||||
}
|
||||
|
||||
const handleContinue = () => {
|
||||
// 跳转到下一个页面
|
||||
router.push('/workshop')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.stylist-page {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #fff;
|
||||
background: url('@/assets/images/stylist_bg.png') no-repeat center center;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 2rem;
|
||||
padding-top: 6rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 4rem;
|
||||
.title {
|
||||
font-size: 15rem;
|
||||
font-weight: 400;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.carousel-container {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
.nav-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
z-index: 3;
|
||||
box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2), 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1),
|
||||
inset 0 0.1rem 0.2rem rgba(255, 255, 255, 0.3);
|
||||
border: 0.1rem solid rgba(255, 255, 255, 0.2);
|
||||
|
||||
&:active {
|
||||
transform: translateY(-50%) scale(0.95);
|
||||
box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.2), inset 0 0.1rem 0.2rem rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&.left {
|
||||
left: 1rem;
|
||||
}
|
||||
|
||||
&.right {
|
||||
right: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.van-swipe {
|
||||
.van-swipe-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.swiper-container {
|
||||
width: 66rem;
|
||||
height: 100rem;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 4.25rem 0 2.65rem;
|
||||
img {
|
||||
width: 59rem;
|
||||
height: 63rem;
|
||||
object-fit: cover;
|
||||
}
|
||||
.text-container {
|
||||
padding: 0 5.25rem;
|
||||
width: 100%;
|
||||
font-weight: 400;
|
||||
.name {
|
||||
line-height: 6rem;
|
||||
font-size: 4.8rem;
|
||||
margin: 2.6rem 0 2.2rem;
|
||||
}
|
||||
.description {
|
||||
// line-height: 3rem;
|
||||
font-size: 2.8rem;
|
||||
// width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.van-swipe__indicators) {
|
||||
bottom: 2.65rem;
|
||||
background: #fff;
|
||||
border-radius: 25px;
|
||||
padding: 1rem 2rem;
|
||||
.van-swipe__indicator {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
background-color: #d9d9d9;
|
||||
opacity: 1;
|
||||
}
|
||||
.van-swipe__indicator--active {
|
||||
background-color: #000;
|
||||
opacity: 1;
|
||||
width: 3rem;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.continue-button {
|
||||
position: absolute;
|
||||
bottom: 3rem;
|
||||
right: 2rem;
|
||||
padding: 1.2rem 2.4rem;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 1rem;
|
||||
color: white;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
z-index: 3;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user