Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/lanecarford_front

This commit is contained in:
X1627315083
2025-10-30 14:30:09 +08:00
8 changed files with 34 additions and 14 deletions

View File

@@ -31,12 +31,13 @@ import InputArea from './components/InputArea.vue'
import GenerateLoading from './components/GenerateLoading.vue' import GenerateLoading from './components/GenerateLoading.vue'
import { ref, onMounted, onUnmounted } from 'vue' import { ref, onMounted, onUnmounted } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useUserInfoStore } from '@/stores' import { useUserInfoStore,useGenerateStore } from '@/stores'
import { streamChatAddress } from '@/api/workshop' import { streamChatAddress } from '@/api/workshop'
import { generateUUID } from '@/utils/tools' import { generateUUID } from '@/utils/tools'
import { showToast } from 'vant' import { showToast } from 'vant'
const router = useRouter() const router = useRouter()
const generateStore = useGenerateStore()
const userInfoStore = useUserInfoStore() const userInfoStore = useUserInfoStore()
defineOptions({ defineOptions({
@@ -214,6 +215,7 @@ const handleContinue = () => {
// router.push('/workshop/selectStyle') // router.push('/workshop/selectStyle')
// 模拟接口之后再跳转 // 模拟接口之后再跳转
isLoading.value = true isLoading.value = true
generateStore.clearProductData()
setTimeout(() => { setTimeout(() => {
router.push('/workshop/selectStyle') router.push('/workshop/selectStyle')
isLoading.value = false isLoading.value = false

View File

@@ -79,19 +79,19 @@ const validatePassword = (password: string) => {
const validateForm = () => { const validateForm = () => {
// 验证邮箱 // 验证邮箱
if (!formData.email) { if (!formData.email) {
showToast('请输入邮箱地址') showToast('place input your email')
return false return false
} else if (!validateEmail(formData.email)) { } else if (!validateEmail(formData.email)) {
showToast('请输入有效的邮箱地址') showToast('please input valid email')
return false return false
} }
// 验证密码 // 验证密码
if (!formData.password) { if (!formData.password) {
showToast('请输入密码') showToast('please input password')
return false return false
} else if (!validatePassword(formData.password)) { } else if (!validatePassword(formData.password)) {
showToast('密码至少需要6位字符') showToast('please input correct password')
return false return false
} }

View File

@@ -22,6 +22,7 @@
v-else-if="step === 'verify'" v-else-if="step === 'verify'"
:ct="emailCode" :ct="emailCode"
@nextStep="handleCheckVerifyCode" @nextStep="handleCheckVerifyCode"
@resend="handleSendVerifyCode"
/> />
<Password v-else-if="step === 'password'" @sucess="handleSuccess" /> <Password v-else-if="step === 'password'" @sucess="handleSuccess" />
</div> </div>
@@ -75,8 +76,10 @@ const handleStep = (type: 'mail' | 'verify' | 'password') => {
} }
const handleSendVerifyCode = (data: any) => { const handleSendVerifyCode = (data: any) => {
fromData.value.email = data.email if (data?.email) {
precheckEmail({ email: data.email }).then(() => { fromData.value.email = data?.email
}
precheckEmail({ email: fromData.value.email }).then(() => {
showToast('the verification code has been sent to your email') showToast('the verification code has been sent to your email')
handleStep('verify') handleStep('verify')
}) })

View File

@@ -2,7 +2,7 @@
<div class="mail-container"> <div class="mail-container">
<div class="label">Your Email</div> <div class="label">Your Email</div>
<div class="input-group"> <div class="input-group">
<input type="email" v-model="formData.email" placeholder="Email" class="input-field" /> <input type="email" v-model="formData.email" placeholder="Enter your email" class="input-field" />
</div> </div>
<div class="btn" @click="handleNext">Next</div> <div class="btn" @click="handleNext">Next</div>
</div> </div>

View File

@@ -50,6 +50,12 @@ const handleNext = () => {
padding: 0 2.2rem 0 5.5rem; padding: 0 2.2rem 0 5.5rem;
border: 2px solid #fff; border: 2px solid #fff;
border-radius: 7.1rem; border-radius: 7.1rem;
overflow: hidden;
box-sizing: border-box;
}
:deep(.van-icon) {
flex-shrink: 0;
font-size: 3.5rem;
} }
.input-field { .input-field {
background: transparent; background: transparent;

View File

@@ -48,7 +48,7 @@ const props = defineProps({
const agreePolicy = ref(false) const agreePolicy = ref(false)
// Emits // Emits
const emit = defineEmits(['nextStep']) const emit = defineEmits(['nextStep','resend'])
// Reactive data // Reactive data
const loading = ref(false) const loading = ref(false)
@@ -83,6 +83,7 @@ const handleResend = () => {
if (countdown.value > 0) return if (countdown.value > 0) return
countdown.value = 60 countdown.value = 60
handleSendVerifyCode() handleSendVerifyCode()
emit('resend')
} }
const handleConfirmCaptcha = () => { const handleConfirmCaptcha = () => {

View File

@@ -2,7 +2,7 @@
<div class="dressfor-container flex"> <div class="dressfor-container flex">
<div class="content flex-1 flex flex-column"> <div class="content flex-1 flex flex-column">
<div class="setting flex flex-between"> <div class="setting flex flex-between">
<van-icon name="arrow-left" color="#fff" size="70" /> <van-icon name="arrow-left" color="#fff" size="70" @click="handleBack" />
<SvgIcon name="setting" size="70" /> <SvgIcon name="setting" size="70" />
</div> </div>
<div class="text">What are you dressing for?</div> <div class="text">What are you dressing for?</div>
@@ -14,6 +14,10 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
const handleBack = () => {
router.go(-1)
}
const handleStart = () => { const handleStart = () => {
console.log('click start') console.log('click start')
router.push('/asistant') router.push('/asistant')

View File

@@ -38,6 +38,7 @@
class="video-dialog" class="video-dialog"
:show-confirm-button="false" :show-confirm-button="false"
:show-cancel-button="false" :show-cancel-button="false"
close-on-click-overlay
v-model:show="showVideo" v-model:show="showVideo"
title="" title=""
> >
@@ -54,6 +55,9 @@ import { ref, watch } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import Video from './components/Video.vue' import Video from './components/Video.vue'
import { useUserInfoStore } from '@/stores' import { useUserInfoStore } from '@/stores'
import male from '@/assets/images/male.png'
import female from '@/assets/images/female.png'
const router = useRouter() const router = useRouter()
const userInfoStore = useUserInfoStore() const userInfoStore = useUserInfoStore()
@@ -64,28 +68,28 @@ const stylists = ref<any[]>([
value: 'mini', value: 'mini',
name: 'Vera Lo', name: 'Vera Lo',
description: 'Contemporary, Classic, Simple Silhouettes, Statement Pieces', description: 'Contemporary, Classic, Simple Silhouettes, Statement Pieces',
image: '/src/assets/images/female.png' image: female
}, },
{ {
id: 2, id: 2,
value: 'crystal', value: 'crystal',
name: 'Sarah Chen', name: 'Sarah Chen',
description: 'Modern, Edgy, Bold Colors, Street Style', description: 'Modern, Edgy, Bold Colors, Street Style',
image: '/src/assets/images/male.png' image: male
}, },
{ {
id: 3, id: 3,
value: 'mini', value: 'mini',
name: 'Emma Wilson', name: 'Emma Wilson',
description: 'Elegant, Feminine, Vintage Inspired, Soft Tones', description: 'Elegant, Feminine, Vintage Inspired, Soft Tones',
image: '/src/assets/images/female.png' image: female
}, },
{ {
id: 4, id: 4,
value: 'crystal', value: 'crystal',
name: 'Alex Johnson', name: 'Alex Johnson',
description: 'Minimalist, Professional, Neutral Palette, Clean Lines', description: 'Minimalist, Professional, Neutral Palette, Clean Lines',
image: '/src/assets/images/male.png' image: male
} }
]) ])
const currentChoosed = ref(1) const currentChoosed = ref(1)