Merge branch 'master' of https://gitee.com/lvYeJu/lane-crawford-3
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,7 +6,8 @@ yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
components.d.ts*
|
||||
auto-imports.d.ts*
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
|
||||
8
auto-imports.d.ts
vendored
8
auto-imports.d.ts
vendored
@@ -1,8 +0,0 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
}
|
||||
18
components.d.ts
vendored
18
components.d.ts
vendored
@@ -1,18 +0,0 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
HeaderTitle: typeof import('./src/components/HeaderTitle.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SelectItem: typeof import('./src/components/selectStyle/selectItem.vue')['default']
|
||||
SvgIcon: typeof import('./src/components/SvgIcon/index.vue')['default']
|
||||
}
|
||||
}
|
||||
1
src/assets/base64/index.ts
Normal file
1
src/assets/base64/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const google:string = `data:image/svg+xml,%3csvg%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_537_3867)'%3e%3cmask%20id='mask0_537_3867'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='50'%20height='50'%3e%3cpath%20d='M50%200H0V50H50V0Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_537_3867)'%3e%3cpath%20d='M10.4143%2025.186C10.4143%2023.552%2010.689%2021.9857%2011.1769%2020.5169L2.61091%2014.0449C0.887829%2017.5063%20-0.00607483%2021.3202%203.10708e-05%2025.186C3.10708e-05%2029.1896%200.937897%2032.9657%202.60603%2036.3185L11.1696%2029.8355C10.6695%2028.3363%2010.4155%2026.7663%2010.4143%2025.186Z'%20fill='%23FBBC05'/%3e%3c/g%3e%3cpath%20d='M25.4614%2010.3262C28.874%2010.3195%2032.1846%2011.4894%2034.834%2013.6388L42.2405%206.32383C37.7276%202.43915%2031.9416%200.0366211%2025.4614%200.0366211C15.4001%200.0366211%206.75174%205.72914%202.61133%2014.045L11.1834%2020.517C13.1568%2014.5884%2018.784%2010.3256%2025.4639%2010.3256'%20fill='%23EA4335'/%3e%3cpath%20d='M25.5704%2039.7145C18.8551%2039.7145%2013.2004%2035.4785%2011.2148%2029.5859L2.60547%2036.0189C6.76603%2044.2835%2015.4566%2049.9382%2025.5704%2049.9382C31.8094%2049.9382%2037.7663%2047.7724%2042.2395%2043.7102L34.0649%2037.5291C31.7605%2038.949%2028.8553%2039.7151%2025.5679%2039.7151'%20fill='%2334A853'/%3e%3cpath%20d='M49.9922%2024.9489C49.9922%2023.4723%2049.7584%2021.8809%2049.4109%2020.4043H25.5674V30.0602H39.2904C38.6065%2033.3526%2036.7393%2035.8838%2034.0662%2037.53L42.2389%2043.7111C46.9374%2039.4477%2049.9922%2033.0958%2049.9922%2024.9489Z'%20fill='%234285F4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_537_3867'%3e%3crect%20width='50'%20height='50'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`
|
||||
BIN
src/assets/images/arrow_left.png
Normal file
BIN
src/assets/images/arrow_left.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -105,13 +105,13 @@ import { showToast } from 'vant'
|
||||
const router = useRouter()
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
const formData = reactive<Record<string, string>>({
|
||||
email: '',
|
||||
password: ''
|
||||
})
|
||||
|
||||
// 表单验证状态
|
||||
const formErrors = reactive({
|
||||
const formErrors = reactive<Record<string, string>>({
|
||||
email: '',
|
||||
password: ''
|
||||
})
|
||||
|
||||
@@ -1,38 +1,36 @@
|
||||
<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>
|
||||
<!-- <van-icon name="arrow-left" size="3rem" /> -->
|
||||
<img src="@/assets/images/arrow_left.png" class="back-icon" />
|
||||
</div>
|
||||
|
||||
<!-- 标题区域 -->
|
||||
<div class="header">
|
||||
<h1 class="title">Sign up.</h1>
|
||||
<div class="title">Sign up.</div>
|
||||
<p class="subtitle">Redefine the styling experience with AI.</p>
|
||||
<p class="description">Use Styling Angel to speed up your fashion journey.</p>
|
||||
<p class="subtitle">Use Styling Angel to speed up your fashion journey.</p>
|
||||
</div>
|
||||
|
||||
<div class="login-container">
|
||||
<form @submit.prevent="handleSignup" class="login-form">
|
||||
<form @submit.prevent="handleLogin" class="login-form">
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="email"
|
||||
v-model="formData.email"
|
||||
placeholder="Email"
|
||||
type="text"
|
||||
v-model="formData.name"
|
||||
placeholder="Name"
|
||||
class="input-field"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.name"
|
||||
placeholder="Name"
|
||||
type="email"
|
||||
v-model="formData.email"
|
||||
placeholder="Email"
|
||||
class="input-field"
|
||||
required
|
||||
/>
|
||||
@@ -46,33 +44,19 @@
|
||||
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>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
<button type="submit" class="login-button">Log in</button>
|
||||
|
||||
<!-- Google登录按钮 -->
|
||||
<div type="button" class="google-button" @click="handleGoogleLogin">
|
||||
<img :src="google" class="google-icon" />
|
||||
Sign in with Google
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>Powered by AiDLab for Lane Crawford</p>
|
||||
</div>
|
||||
@@ -83,18 +67,20 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { showToast } from 'vant'
|
||||
import { google } from '@/assets/base64'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
const formData = reactive<Record<string, string>>({
|
||||
name: '',
|
||||
email: '',
|
||||
password: '',
|
||||
name:''
|
||||
password: ''
|
||||
})
|
||||
|
||||
// 表单验证状态
|
||||
const formErrors = reactive({
|
||||
const formErrors = reactive<Record<string, string>>({
|
||||
name: '',
|
||||
email: '',
|
||||
password: ''
|
||||
})
|
||||
@@ -117,10 +103,11 @@ const validateForm = () => {
|
||||
let isValid = true
|
||||
|
||||
// 重置错误信息
|
||||
formErrors.name = ''
|
||||
formErrors.email = ''
|
||||
formErrors.password = ''
|
||||
formErrors.name = ''
|
||||
|
||||
// 验证邮箱
|
||||
if (!formData.name) {
|
||||
formErrors.name = '请输入姓名'
|
||||
isValid = false
|
||||
@@ -164,7 +151,7 @@ const goBack = () => {
|
||||
}
|
||||
|
||||
// 处理登录
|
||||
const handleSignup = async () => {
|
||||
const handleLogin = async () => {
|
||||
if (!validateForm()) {
|
||||
showToast('请检查输入信息')
|
||||
return
|
||||
@@ -179,34 +166,46 @@ const handleSignup = async () => {
|
||||
// 这里添加实际的登录API调用
|
||||
// const response = await loginAPI(formData)
|
||||
|
||||
showToast('注册成功')
|
||||
showToast('登录成功')
|
||||
|
||||
// 登录成功后跳转到主页或工作台
|
||||
router.push('/workshop')
|
||||
} catch (error) {
|
||||
console.error('注册失败:', error)
|
||||
showToast('注册失败,请重试')
|
||||
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注册功能开发中...')
|
||||
showToast('Google登录功能开发中...')
|
||||
|
||||
// 这里添加Google OAuth登录逻辑
|
||||
// const response = await googleLoginAPI()
|
||||
} catch (error) {
|
||||
console.error('Google注册失败:', error)
|
||||
showToast('Google注册失败,请重试')
|
||||
console.error('Google登录失败:', error)
|
||||
showToast('Google登录失败,请重试')
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 处理注册
|
||||
const handleSignup = () => {
|
||||
router.push('/signup')
|
||||
}
|
||||
|
||||
// 实时验证输入
|
||||
const handleEmailInput = () => {
|
||||
@@ -239,159 +238,137 @@ const handlePasswordInput = () => {
|
||||
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; /* 为状态栏留出空间 */
|
||||
padding-top: 12rem;
|
||||
font-family: 'satoshiRegular';
|
||||
}
|
||||
|
||||
.back-button {
|
||||
position: absolute;
|
||||
top: 2rem;
|
||||
left: 2rem;
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
// position: absolute;
|
||||
// top: 2rem;
|
||||
// left: 2rem;
|
||||
margin-top: 2.4rem;
|
||||
margin-left: 6.1rem;
|
||||
width: 2rem;
|
||||
height: 3.4rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
z-index: 3;
|
||||
font-size: 3.4rem;
|
||||
.back-icon {
|
||||
width: 2.83rem;
|
||||
height: 3.47rem;
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 4rem;
|
||||
margin-top: 1.42rem;
|
||||
padding-left: 15.5rem;
|
||||
color: white;
|
||||
font-family: 'satoshiRegular';
|
||||
.title {
|
||||
font-size: 11rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.8rem;
|
||||
color: white;
|
||||
font-family: 'satoshiBold';
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 3rem;
|
||||
color: white;
|
||||
font-weight: 400;
|
||||
line-height: 141%;
|
||||
letter-spacing: 0.08rem;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
.content {
|
||||
position: relative;
|
||||
// z-index: 2;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 30%;
|
||||
margin-top: 7.2rem;
|
||||
.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;
|
||||
width: calc(100% - 28.4rem);
|
||||
height: 118.4rem;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
backdrop-filter: blur(4.5rem) brightness(0.8) contrast(1.3);
|
||||
border: 2px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 4.79rem;
|
||||
padding: 11.2rem 8.62rem 14.28rem 7.18rem;
|
||||
box-shadow: 0 0.8rem 3.2rem rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
margin: 0 10rem;
|
||||
height: 115rem;
|
||||
border: 2px solid #fff;
|
||||
font-size: 3.83rem;
|
||||
}
|
||||
|
||||
.input-field {
|
||||
width: 100%;
|
||||
height: 10rem;
|
||||
padding: 16px 20px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 25px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: 2px solid #fff;
|
||||
background: transparent;
|
||||
border-radius: 7.1rem;
|
||||
color: white;
|
||||
font-size: 1.6rem;
|
||||
outline: none;
|
||||
transition: all 0.3s ease;
|
||||
font-size: 3.83rem;
|
||||
padding: 0 5.5rem;
|
||||
}
|
||||
|
||||
.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);
|
||||
font-size: 3.83rem;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 5rem;
|
||||
|
||||
margin-bottom: 4rem;
|
||||
&.pwd {
|
||||
margin-bottom: 6.7rem;
|
||||
}
|
||||
}
|
||||
.signup-btn {
|
||||
.login-button {
|
||||
width: 100%;
|
||||
padding: 1.6rem;
|
||||
height: 10rem;
|
||||
background: #000;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
font-size: 1.6rem;
|
||||
margin-bottom: 37rem;
|
||||
border-radius: 7rem;
|
||||
font-size: 4rem;
|
||||
margin-bottom: 26.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 7rem;
|
||||
font-size: 3.83rem;
|
||||
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;
|
||||
column-gap: 3.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;
|
||||
width: 4.8rem;
|
||||
height: 4.8rem;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
opacity: 0.8;
|
||||
font-size: 3rem;
|
||||
margin-bottom: 9rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
:show-cancel-button="false"
|
||||
v-model:show="showVideo"
|
||||
title=""
|
||||
show-cancel-button
|
||||
>
|
||||
<div class="close-btn" @click="showVideo = false">
|
||||
<van-icon name="cross" class="close-icon" />
|
||||
@@ -76,7 +75,7 @@ import Video from './components/Video.vue'
|
||||
const router = useRouter()
|
||||
|
||||
// stylist数据
|
||||
const stylists = ref<array>([
|
||||
const stylists = ref<any[]>([
|
||||
{
|
||||
id: 1,
|
||||
name: 'Vera Lo',
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const options = ref([
|
||||
import { ref } from 'vue'
|
||||
const options = ref<any[]>([
|
||||
{ label: 'Female', value: '1' },
|
||||
{ label: 'Male', value: '0' }
|
||||
])
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
"_c/*": ["./src/components/*"]
|
||||
},
|
||||
"skipLibCheck": true,
|
||||
"strict": false
|
||||
"strict": false,
|
||||
"noEmit": true
|
||||
},
|
||||
|
||||
"references": [
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"types": ["node", "vant/global"],
|
||||
"types": ["node"],
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user