Merge branch 'main' of http://18.167.251.121:10003/aidlab/lanecarford_front
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, reactive, toRefs, computed } from "vue";
|
||||
import { onMounted, onUnmounted, reactive, toRefs, computed, onActivated } from "vue";
|
||||
import SelectItem from "@/components/selectStyle/selectItem.vue";
|
||||
import HeaderTitle from '@/components/HeaderTitle.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -35,7 +35,7 @@ const updateStyle = ({item,index})=>{
|
||||
|
||||
const toProduct = ()=>{
|
||||
if(!generateStore.style.id && !generateStore.style.oldId){
|
||||
showNotify({ message: 'Please select a style.', type:'warning' });
|
||||
showNotify({ message: 'Please select a style.', type:'warning', color:'#fff', background:'#ff976a' });
|
||||
return
|
||||
}
|
||||
if(generateStore.style.id){
|
||||
|
||||
@@ -31,12 +31,13 @@ import InputArea from './components/InputArea.vue'
|
||||
import GenerateLoading from './components/GenerateLoading.vue'
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useUserInfoStore } from '@/stores'
|
||||
import { useUserInfoStore,useGenerateStore } from '@/stores'
|
||||
import { streamChatAddress } from '@/api/workshop'
|
||||
import { generateUUID } from '@/utils/tools'
|
||||
import { showToast } from 'vant'
|
||||
|
||||
const router = useRouter()
|
||||
const generateStore = useGenerateStore()
|
||||
const userInfoStore = useUserInfoStore()
|
||||
|
||||
defineOptions({
|
||||
@@ -214,6 +215,7 @@ const handleContinue = () => {
|
||||
// router.push('/workshop/selectStyle')
|
||||
// 模拟接口之后再跳转
|
||||
isLoading.value = true
|
||||
generateStore.clearProductData()
|
||||
setTimeout(() => {
|
||||
router.push('/workshop/selectStyle')
|
||||
isLoading.value = false
|
||||
|
||||
@@ -79,19 +79,19 @@ const validatePassword = (password: string) => {
|
||||
const validateForm = () => {
|
||||
// 验证邮箱
|
||||
if (!formData.email) {
|
||||
showToast('请输入邮箱地址')
|
||||
showToast('place input your email')
|
||||
return false
|
||||
} else if (!validateEmail(formData.email)) {
|
||||
showToast('请输入有效的邮箱地址')
|
||||
showToast('please input valid email')
|
||||
return false
|
||||
}
|
||||
|
||||
// 验证密码
|
||||
if (!formData.password) {
|
||||
showToast('请输入密码')
|
||||
showToast('please input password')
|
||||
return false
|
||||
} else if (!validatePassword(formData.password)) {
|
||||
showToast('密码至少需要6位字符')
|
||||
showToast('please input correct password')
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
v-else-if="step === 'verify'"
|
||||
:ct="emailCode"
|
||||
@nextStep="handleCheckVerifyCode"
|
||||
@resend="handleSendVerifyCode"
|
||||
/>
|
||||
<Password v-else-if="step === 'password'" @sucess="handleSuccess" />
|
||||
</div>
|
||||
@@ -75,8 +76,10 @@ const handleStep = (type: 'mail' | 'verify' | 'password') => {
|
||||
}
|
||||
|
||||
const handleSendVerifyCode = (data: any) => {
|
||||
fromData.value.email = data.email
|
||||
precheckEmail({ email: data.email }).then(() => {
|
||||
if (data?.email) {
|
||||
fromData.value.email = data?.email
|
||||
}
|
||||
precheckEmail({ email: fromData.value.email }).then(() => {
|
||||
showToast('the verification code has been sent to your email')
|
||||
handleStep('verify')
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="mail-container">
|
||||
<div class="label">Your Email</div>
|
||||
<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 class="btn" @click="handleNext">Next</div>
|
||||
</div>
|
||||
|
||||
@@ -50,6 +50,12 @@ const handleNext = () => {
|
||||
padding: 0 2.2rem 0 5.5rem;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 7.1rem;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
:deep(.van-icon) {
|
||||
flex-shrink: 0;
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
.input-field {
|
||||
background: transparent;
|
||||
|
||||
@@ -48,7 +48,7 @@ const props = defineProps({
|
||||
|
||||
const agreePolicy = ref(false)
|
||||
// Emits
|
||||
const emit = defineEmits(['nextStep'])
|
||||
const emit = defineEmits(['nextStep','resend'])
|
||||
|
||||
// Reactive data
|
||||
const loading = ref(false)
|
||||
@@ -83,6 +83,7 @@ const handleResend = () => {
|
||||
if (countdown.value > 0) return
|
||||
countdown.value = 60
|
||||
handleSendVerifyCode()
|
||||
emit('resend')
|
||||
}
|
||||
|
||||
const handleConfirmCaptcha = () => {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="dressfor-container flex">
|
||||
<div class="content flex-1 flex flex-column">
|
||||
<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" />
|
||||
</div>
|
||||
<div class="text">What are you dressing for?</div>
|
||||
@@ -14,6 +14,10 @@
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
|
||||
const handleBack = () => {
|
||||
router.go(-1)
|
||||
}
|
||||
|
||||
const handleStart = () => {
|
||||
console.log('click start')
|
||||
router.push('/asistant')
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
class="video-dialog"
|
||||
:show-confirm-button="false"
|
||||
:show-cancel-button="false"
|
||||
close-on-click-overlay
|
||||
v-model:show="showVideo"
|
||||
title=""
|
||||
>
|
||||
@@ -54,6 +55,9 @@ import { ref, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Video from './components/Video.vue'
|
||||
import { useUserInfoStore } from '@/stores'
|
||||
import male from '@/assets/images/male.png'
|
||||
import female from '@/assets/images/female.png'
|
||||
|
||||
|
||||
const router = useRouter()
|
||||
const userInfoStore = useUserInfoStore()
|
||||
@@ -64,28 +68,28 @@ const stylists = ref<any[]>([
|
||||
value: 'mini',
|
||||
name: 'Vera Lo',
|
||||
description: 'Contemporary, Classic, Simple Silhouettes, Statement Pieces',
|
||||
image: '/src/assets/images/female.png'
|
||||
image: female
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: 'crystal',
|
||||
name: 'Sarah Chen',
|
||||
description: 'Modern, Edgy, Bold Colors, Street Style',
|
||||
image: '/src/assets/images/male.png'
|
||||
image: male
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: 'mini',
|
||||
name: 'Emma Wilson',
|
||||
description: 'Elegant, Feminine, Vintage Inspired, Soft Tones',
|
||||
image: '/src/assets/images/female.png'
|
||||
image: female
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
value: 'crystal',
|
||||
name: 'Alex Johnson',
|
||||
description: 'Minimalist, Professional, Neutral Palette, Clean Lines',
|
||||
image: '/src/assets/images/male.png'
|
||||
image: male
|
||||
}
|
||||
])
|
||||
const currentChoosed = ref(1)
|
||||
|
||||
@@ -56,9 +56,9 @@ export default defineConfig(({ mode }) => {
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0', // 允许局域网内的IP访问
|
||||
port: 8060, // 根据环境设置端口
|
||||
// port: 8060, // 根据环境设置端口
|
||||
open: false, // 自动打开浏览器
|
||||
strictPort: true, // 如果端口已被占用,则尝试下一个可用端口
|
||||
// strictPort: true, // 如果端口已被占用,则尝试下一个可用端口
|
||||
hmr: {
|
||||
overlay: true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user