feat: 欢迎&登录&注册&stylist页面

This commit is contained in:
zhangyh
2025-10-10 11:00:08 +08:00
parent 4843c9bfda
commit 312b25d287
17 changed files with 1223 additions and 116 deletions

View File

@@ -2,6 +2,22 @@
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
rules: {
// 忽略未使用的变量和参数
'@typescript-eslint/no-unused-vars': 'off',
'no-unused-vars': 'off',
// 或者设置为警告级别
// '@typescript-eslint/no-unused-vars': 'warn',
// 'no-unused-vars': 'warn',
// Vue 相关规则
'vue/multi-word-component-names': 'off',
'vue/no-unused-vars': 'off',
'vue/no-mutating-props': 'off',
'no-empty-pattern': 'off'
},
root: true,
'extends': [
'plugin:vue/vue3-essential',

82
auto-imports.d.ts vendored
View File

@@ -4,85 +4,5 @@
// Generated by unplugin-auto-import
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const createPinia: typeof import('pinia')['createPinia']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const defineStore: typeof import('pinia')['defineStore']
const effectScope: typeof import('vue')['effectScope']
const flexible: typeof import('./src/utils/flexible.js')['default']
const getActivePinia: typeof import('pinia')['getActivePinia']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const getLocal: typeof import('./src/utils/local')['getLocal']
const getMousePosition: typeof import('./src/utils/tools')['getMousePosition']
const getUniversalZoomLevel: typeof import('./src/utils/tools')['getUniversalZoomLevel']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const mapActions: typeof import('pinia')['mapActions']
const mapGetters: typeof import('pinia')['mapGetters']
const mapState: typeof import('pinia')['mapState']
const mapStores: typeof import('pinia')['mapStores']
const mapWritableState: typeof import('pinia')['mapWritableState']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const removeLocal: typeof import('./src/utils/local')['removeLocal']
const request: typeof import('./src/utils/request')['default']
const resolveComponent: typeof import('vue')['resolveComponent']
const setActivePinia: typeof import('pinia')['setActivePinia']
const setLocal: typeof import('./src/utils/local')['setLocal']
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const storeToRefs: typeof import('pinia')['storeToRefs']
const stores: typeof import('./src/stores/index')['default']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useLink: typeof import('vue-router')['useLink']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
}

10
components.d.ts vendored
View File

@@ -9,16 +9,10 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
IconDocumentation: typeof import('./src/components/icons/IconDocumentation.vue')['default']
IconEcosystem: typeof import('./src/components/icons/IconEcosystem.vue')['default']
IconSupport: typeof import('./src/components/icons/IconSupport.vue')['default']
IconTooling: typeof import('./src/components/icons/IconTooling.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default']
TheWelcome: typeof import('./src/components/TheWelcome.vue')['default']
WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
VanSwipe: typeof import('vant/es')['Swipe']
VanSwipeItem: typeof import('vant/es')['SwipeItem']
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
src/assets/images/male.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 KiB

View File

@@ -17,6 +17,14 @@ a,
}
}
.safe-area-top {
padding-top: constant(safe-area-inset-top);
padding-top: env(safe-area-inset-top);
}
.safe-area-bottom{
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
/* @media (min-width: 1024px) {
body {
display: flex;

View File

@@ -7,6 +7,7 @@ import 'normalize.css/normalize.css'
import './assets/css/style.css'
import SvgIcon from "@/components/SvgIcon/index.vue";
import "virtual:svg-icons-register";
import 'vant/lib/index.css'
import flexible from "./utils/flexible.js";

View File

@@ -1,32 +1,43 @@
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory('/'),
// history: createWebHistory(import.meta.env.VITE_APP_URL),
// history: createWebHistory(import.meta.env.VITE_APP_URL),
routes: [
{
path: '/',
redirect: "/workshop",
},
{
path: '/workshop',
name: 'Workshop',
component: () => import('../views/Workshop/index.vue'),
children: [
// {
// path: '',
// name: 'activitiesWorkshop',
// redirect: "/activities/workshop",
// },
path: '/',
redirect: '/workshop'
},
{
path: '/workshop',
name: 'Workshop',
component: () => import('../views/Workshop/index.vue'),
children: [
// {
// path: '',
// name: 'activitiesWorkshop',
// redirect: "/activities/workshop",
// },
{
path: '/workshop/selectStyle',
name: 'SelectStyle',
component: () => import('../views/Workshop/selectStyle.vue'),
},
]
},
{
path: '/workshop/selectStyle',
name: 'SelectStyle',
component: () => import('../views/Workshop/selectStyle.vue')
}
]
},
{
path: '/login',
component: () => import('@/views/login/LoginPage.vue')
},
{
path: '/signup',
component: () => import('@/views/login/SignupPage.vue')
},
{ path: '/welcome', component: () => import('@/views/login/WelcomePage.vue') },
{
path:'/stylist',
component: () => import('@/views/stylist/index.vue')
}
]
})

View File

@@ -0,0 +1,445 @@
<template>
<div class="login-page">
<!-- 主要内容区域 -->
<div class="content">
<!-- 返回按钮 -->
<div class="back-button" @click="goBack">
<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>
<!-- 标题区域 -->
<div class="header">
<h1 class="title">Log in.</h1>
<p class="subtitle">Redefine the styling experience with AI.</p>
<p class="description">Use Styling Angel to speed up your fashion journey.</p>
</div>
<!-- 登录表单容器 -->
<div class="login-container">
<form @submit.prevent="handleLogin" class="login-form">
<!-- 邮箱输入框 -->
<div class="input-group">
<input
type="email"
v-model="formData.email"
placeholder="Email"
class="input-field"
required
/>
</div>
<!-- 密码输入框 -->
<div class="input-group pwd">
<input
type="password"
v-model="formData.password"
placeholder="Your Password"
class="input-field"
required
/>
</div>
<!-- 登录按钮 -->
<button type="submit" class="login-button">Log in</button>
<!-- 忘记密码链接 -->
<div class="forgot-password" @click="handleForgotPassword">
Forgot Password?
</div>
<!-- Google登录按钮 -->
<button type="button" class="google-button" @click="handleGoogleLogin">
<div class="google-icon">
<svg width="20" height="20" viewBox="0 0 24 24">
<path
fill="#4285F4"
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
/>
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
/>
<path
fill="#FBBC05"
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
/>
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
/>
</svg>
</div>
Sign in with Google
</button>
<!-- 注册链接 -->
<div class="signup-link">
Don't have an account?
<a href="#" @click.prevent="handleSignup">Sign Up</a>
</div>
</form>
</div>
</div>
<!-- 底部版权信息 -->
<div class="footer">
<p>Powered by AiDLab for Lane Crawford</p>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, computed } from 'vue'
import { useRouter } from 'vue-router'
import { showToast } from 'vant'
const router = useRouter()
// 表单数据
const formData = reactive({
email: '',
password: ''
})
// 表单验证状态
const formErrors = reactive({
email: '',
password: ''
})
// 加载状态
const isLoading = ref(false)
// 表单验证规则
const validateEmail = (email: string) => {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
return emailRegex.test(email)
}
const validatePassword = (password: string) => {
return password.length >= 6
}
// 验证表单
const validateForm = () => {
let isValid = true
// 重置错误信息
formErrors.email = ''
formErrors.password = ''
// 验证邮箱
if (!formData.email) {
formErrors.email = '请输入邮箱地址'
isValid = false
} else if (!validateEmail(formData.email)) {
formErrors.email = '请输入有效的邮箱地址'
isValid = false
}
// 验证密码
if (!formData.password) {
formErrors.password = '请输入密码'
isValid = false
} else if (!validatePassword(formData.password)) {
formErrors.password = '密码至少需要6位字符'
isValid = false
}
return isValid
}
// 计算属性:表单是否有效
const isFormValid = computed(() => {
return (
formData.email &&
formData.password &&
validateEmail(formData.email) &&
validatePassword(formData.password)
)
})
// 返回上一页
const goBack = () => {
router.go(-1)
}
// 处理登录
const handleLogin = async () => {
if (!validateForm()) {
showToast('请检查输入信息')
return
}
isLoading.value = true
try {
// 模拟登录API调用
await new Promise((resolve) => setTimeout(resolve, 2000))
// 这里添加实际的登录API调用
// const response = await loginAPI(formData)
showToast('登录成功')
// 登录成功后跳转到主页或工作台
router.push('/workshop')
} catch (error) {
console.error('登录失败:', error)
showToast('登录失败请重试')
} finally {
isLoading.value = false
}
}
// 处理忘记密码
const handleForgotPassword = () => {
showToast('忘记密码功能开发中...')
console.log('11111111111')
// 这里可以跳转到忘记密码页面
// router.push('/forgot-password')
}
// 处理Google登录
const handleGoogleLogin = async () => {
try {
isLoading.value = true
showToast('Google登录功能开发中...')
// 这里添加Google OAuth登录逻辑
// const response = await googleLoginAPI()
} catch (error) {
console.error('Google登录失败:', error)
showToast('Google登录失败请重试')
} finally {
isLoading.value = false
}
}
// 处理注册
const handleSignup = () => {
router.push('/signup')
}
// 实时验证输入
const handleEmailInput = () => {
if (formData.email && !validateEmail(formData.email)) {
formErrors.email = '请输入有效的邮箱地址'
} else {
formErrors.email = ''
}
}
const handlePasswordInput = () => {
if (formData.password && !validatePassword(formData.password)) {
formErrors.password = '密码至少需要6位字符'
} else {
formErrors.password = ''
}
}
</script>
<style scoped lang="less">
.login-page {
position: relative;
color: #fff;
width: 100%;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
background-image: url('@/assets/images/login_bg.png');
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; /* 为状态栏留出空间 */
}
.back-button {
position: absolute;
top: 2rem;
left: 2rem;
width: 4rem;
height: 4rem;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 3;
}
.header {
margin-bottom: 4rem;
color: white;
}
.title {
font-size: 3.2rem;
font-weight: bold;
margin-bottom: 0.8rem;
color: white;
}
.subtitle {
font-size: 1.6rem;
margin-bottom: 0.4rem;
color: white;
opacity: 0.9;
}
.description {
font-size: 1.4rem;
color: white;
opacity: 0.8;
}
.login-container {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20%;
.login-form {
position: relative;
width: 100%;
/* max-width: 70rem; */
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(4rem);
border: 0.1rem solid rgba(255, 255, 255, 0.15);
border-radius: 2rem;
padding: 8rem 4rem;
box-shadow: 0 0.8rem 3.2rem rgba(0, 0, 0, 0.1);
overflow: hidden;
margin: 0 10rem;
height: 80rem;
}
.login-form::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
filter: blur(3rem);
z-index: -1;
transform: scale(1.1);
}
.input-field {
width: 100%;
padding: 16px 20px;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 25px;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 1.6rem;
outline: none;
transition: all 0.3s ease;
}
.input-field::placeholder {
color: rgba(255, 255, 255, 0.6);
}
.input-field:focus {
border-color: rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.15);
}
.input-group {
margin-bottom: 3rem;
&.pwd {
margin-bottom: 5rem;
}
}
.login-button {
width: 100%;
padding: 1.6rem;
background: #000;
color: white;
border: none;
border-radius: 25px;
font-size: 1.6rem;
margin-bottom: 1rem;
}
}
.forgot-password {
text-align: center;
text-decoration: none;
font-size: 1.6rem;
text-decoration: underline;
text-underline-offset: 0.5rem;
margin-bottom: 20rem;
}
.google-button {
width: 100%;
padding: 16px;
background: transparent;
color: #000;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 25px;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
background: rgba(255, 255, 255, 0.9);
margin-bottom: 1rem;
}
.google-icon {
width: 20px;
height: 20px;
}
.signup-link {
text-align: center;
color: rgba(255, 255, 255, 0.7);
font-size: 14px;
}
.signup-link a {
color: white;
text-decoration: none;
font-weight: 500;
}
.signup-link a:hover {
text-decoration: underline;
}
.footer {
position: relative;
z-index: 2;
text-align: center;
padding: 20px;
color: white;
font-size: 12px;
opacity: 0.8;
}
</style>

View File

@@ -0,0 +1,397 @@
<template>
<div class="login-page">
<div class="content">
<div class="back-button" @click="goBack">
<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>
<div class="header">
<h1 class="title">Sign up.</h1>
<p class="subtitle">Redefine the styling experience with AI.</p>
<p class="description">Use Styling Angel to speed up your fashion journey.</p>
</div>
<div class="login-container">
<form @submit.prevent="handleSignup" class="login-form">
<div class="input-group">
<input
type="email"
v-model="formData.email"
placeholder="Email"
class="input-field"
required
/>
</div>
<div class="input-group">
<input
type="text"
v-model="formData.name"
placeholder="Name"
class="input-field"
required
/>
</div>
<div class="input-group pwd">
<input
type="password"
v-model="formData.password"
placeholder="Your Password"
class="input-field"
required
/>
</div>
<button type="submit" class="signup-btn">Sign up</button>
<button type="button" class="google-button" @click="handleGoogleLogin">
<div class="google-icon">
<svg width="20" height="20" viewBox="0 0 24 24">
<path
fill="#4285F4"
d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
/>
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
/>
<path
fill="#FBBC05"
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
/>
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
/>
</svg>
</div>
Sign up with Google
</button>
</form>
</div>
</div>
<div class="footer">
<p>Powered by AiDLab for Lane Crawford</p>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, reactive, computed } from 'vue'
import { useRouter } from 'vue-router'
import { showToast } from 'vant'
const router = useRouter()
// 表单数据
const formData = reactive({
email: '',
password: '',
name:''
})
// 表单验证状态
const formErrors = reactive({
email: '',
password: ''
})
// 加载状态
const isLoading = ref(false)
// 表单验证规则
const validateEmail = (email: string) => {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
return emailRegex.test(email)
}
const validatePassword = (password: string) => {
return password.length >= 6
}
// 验证表单
const validateForm = () => {
let isValid = true
// 重置错误信息
formErrors.email = ''
formErrors.password = ''
formErrors.name = ''
if (!formData.name) {
formErrors.name = '请输入姓名'
isValid = false
}
// 验证邮箱
if (!formData.email) {
formErrors.email = '请输入邮箱地址'
isValid = false
} else if (!validateEmail(formData.email)) {
formErrors.email = '请输入有效的邮箱地址'
isValid = false
}
// 验证密码
if (!formData.password) {
formErrors.password = '请输入密码'
isValid = false
} else if (!validatePassword(formData.password)) {
formErrors.password = '密码至少需要6位字符'
isValid = false
}
return isValid
}
// 计算属性:表单是否有效
const isFormValid = computed(() => {
return (
formData.name &&
formData.email &&
formData.password &&
validateEmail(formData.email) &&
validatePassword(formData.password)
)
})
// 返回上一页
const goBack = () => {
router.go(-1)
}
// 处理登录
const handleSignup = async () => {
if (!validateForm()) {
showToast('请检查输入信息')
return
}
isLoading.value = true
try {
// 模拟登录API调用
await new Promise((resolve) => setTimeout(resolve, 2000))
// 这里添加实际的登录API调用
// const response = await loginAPI(formData)
showToast('注册成功')
// 登录成功后跳转到主页或工作台
router.push('/workshop')
} catch (error) {
console.error('注册失败:', error)
showToast('注册失败,请重试')
} finally {
isLoading.value = false
}
}
// 处理Google登录
const handleGoogleLogin = async () => {
try {
isLoading.value = true
showToast('Google注册功能开发中...')
// 这里添加Google OAuth登录逻辑
// const response = await googleLoginAPI()
} catch (error) {
console.error('Google注册失败:', error)
showToast('Google注册失败请重试')
} finally {
isLoading.value = false
}
}
// 实时验证输入
const handleEmailInput = () => {
if (formData.email && !validateEmail(formData.email)) {
formErrors.email = '请输入有效的邮箱地址'
} else {
formErrors.email = ''
}
}
const handlePasswordInput = () => {
if (formData.password && !validatePassword(formData.password)) {
formErrors.password = '密码至少需要6位字符'
} else {
formErrors.password = ''
}
}
</script>
<style scoped lang="less">
.login-page {
position: relative;
color: #fff;
width: 100%;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
background-image: url('@/assets/images/sginup_bg.png');
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; /* 为状态栏留出空间 */
}
.back-button {
position: absolute;
top: 2rem;
left: 2rem;
width: 4rem;
height: 4rem;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 3;
}
.header {
margin-bottom: 4rem;
color: white;
}
.title {
font-size: 3.2rem;
font-weight: bold;
margin-bottom: 0.8rem;
color: white;
}
.subtitle {
font-size: 1.6rem;
margin-bottom: 0.4rem;
color: white;
opacity: 0.9;
}
.description {
font-size: 1.4rem;
color: white;
opacity: 0.8;
}
.login-container {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30%;
.login-form {
position: relative;
width: 100%;
/* max-width: 70rem; */
background: rgba(255, 255, 255, 0.03);
backdrop-filter: blur(30px);
border: 0.1rem solid rgba(255, 255, 255, 0.1);
border-radius: 2rem;
padding: 10rem 4rem;
box-shadow: 0 0.8rem 3.2rem rgba(0, 0, 0, 0.1);
overflow: hidden;
margin: 0 10rem;
height: 115rem;
}
.input-field {
width: 100%;
padding: 16px 20px;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 25px;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 1.6rem;
outline: none;
transition: all 0.3s ease;
}
.input-field::placeholder {
color: rgba(255, 255, 255, 0.6);
}
.input-field:focus {
border-color: rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.15);
}
.input-group {
margin-bottom: 5rem;
}
.signup-btn {
width: 100%;
padding: 1.6rem;
background: #000;
color: white;
border: none;
border-radius: 25px;
font-size: 1.6rem;
margin-bottom: 37rem;
}
}
.google-button {
width: 100%;
padding: 16px;
background: transparent;
color: #000;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 25px;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
background: rgba(255, 255, 255, 0.9);
margin-bottom: 1rem;
}
.google-icon {
width: 20px;
height: 20px;
}
.signup-link {
text-align: center;
color: rgba(255, 255, 255, 0.7);
font-size: 14px;
}
.signup-link a {
color: white;
text-decoration: none;
font-weight: 500;
}
.signup-link a:hover {
text-decoration: underline;
}
.footer {
position: relative;
z-index: 2;
text-align: center;
padding: 20px;
color: white;
font-size: 12px;
opacity: 0.8;
}
</style>

View File

@@ -0,0 +1,63 @@
<template>
<div class="welcome-page safe-area-top safe-area-bottom">
<div class="content">
<div class="title">AI STYLING <br/> ASSISTANT</div>
<p class="subtitle">Redefine the styling experience with AI.</p>
<div class="sign-btn" @click="goToSignup">Sign up</div>
</div>
</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()
const goToSignup = () => {
router.push('/login')
}
</script>
<style scoped lang="less">
.welcome-page {
width: 100%;
height: 100%;
background: url('/src/assets/images/entry_bg.png') no-repeat center center;
background-size: cover;
padding-left: 10rem;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
.content {
letter-spacing: 0;
position: relative;
// flex: 1;
font-size: 8rem;
color: #fff;
font-weight: 400;
padding-bottom: 20rem;
.title{
font-family: Boska;
line-height: 7.55rem;
}
.subtitle{
font-size: 3rem;
font-family: Satoshi;
margin: 2rem 0;
}
.sign-btn{
background: transparent;
color: #fff;
width: 25rem;
font-size: 3rem;
height: 5rem;
line-height: 5rem;
border: 1px solid #fff;
text-align: center;
// padding: 2rem 1.3rem;
box-sizing: content-box;
}
}
</style>

256
src/views/stylist/index.vue Normal file
View 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>

View File

@@ -19,13 +19,9 @@ export default defineConfig({
// ...
AutoImport({
resolvers: [VantResolver()],
imports: ['vue', 'vue-router', 'pinia'],
dts: true,
dirs: ['src/stores', 'src/utils']
}),
Components({
resolvers: [VantResolver()],
dts: false
}),
createSvgIconsPlugin({
// 指定需要缓存的图标文件夹