Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/lanecarford_front
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped

This commit is contained in:
X1627315083
2025-12-23 16:29:46 +08:00
15 changed files with 214 additions and 156 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

@@ -1,16 +1,16 @@
import { createRouter, createWebHistory } from 'vue-router' import { createRouter, createWebHistory } from 'vue-router'
import { useGenerateStore } from '@/stores/modules/generate' import { useGenerateStore } from '@/stores/modules/generate'
const VerifyIDs = (num: number) => { const VerifyIDs = (num: number) => {
return true return true
const ids = [ const ids = [
!!useGenerateStore().customerId, !!useGenerateStore().customerId,
!!useGenerateStore().visitRecordId, !!useGenerateStore().visitRecordId,
!!useGenerateStore().styleId, !!useGenerateStore().styleId,
// !!useGenerateStore().modelPhotoId, // !!useGenerateStore().modelPhotoId,
true, true,
!!useGenerateStore().originalTryOnId, !!useGenerateStore().originalTryOnId
]; ]
return ids.splice(0, num).every(id => id) ? true : "/stylist/customer"; return ids.splice(0, num).every((id) => id) ? true : '/stylist/customer'
} }
/** /**
@@ -18,7 +18,7 @@ const VerifyIDs = (num: number) => {
* 1. 设置路由的meta属性为{ cache: true },表示需要缓存 * 1. 设置路由的meta属性为{ cache: true },表示需要缓存
* 2. App.vue中使用RouteCache组件通过路由的name来进行匹配 * 2. App.vue中使用RouteCache组件通过路由的name来进行匹配
* 3. 路由的name默认是文件名,如果文件名与name不一致,通过defineOptions({ name: 'componentName' })来设置 * 3. 路由的name默认是文件名,如果文件名与name不一致,通过defineOptions({ name: 'componentName' })来设置
* *
* 自定义验证规则: * 自定义验证规则:
* meta{ verify: => boolean || string } * meta{ verify: => boolean || string }
* 1. boolean true 跳转 false 不跳转 * 1. boolean true 跳转 false 不跳转
@@ -48,8 +48,8 @@ const router = createRouter({
component: () => import('@/views/login/LoginPage.vue') component: () => import('@/views/login/LoginPage.vue')
}, },
{ {
path:'/reset', path: '/reset',
name:'ResetPage', name: 'ResetPage',
component: () => import('@/views/login/ResetPage.vue') component: () => import('@/views/login/ResetPage.vue')
}, },
{ {
@@ -62,16 +62,16 @@ const router = createRouter({
name: 'WelcomePage', name: 'WelcomePage',
component: () => import('@/views/login/WelcomePage.vue') component: () => import('@/views/login/WelcomePage.vue')
}, },
{ {
path: '/customer', path: '/customer',
name: 'customer', name: 'customer',
component: () => import('@/views/login/customer.vue'), component: () => import('@/views/login/customer.vue')
}, },
{ {
path: '/asistant', path: '/asistant',
name: 'asistant', name: 'asistant',
component: () => import('../views/asistant/index.vue'), component: () => import('../views/asistant/index.vue'),
meta: { cache: true, verify: ()=> VerifyIDs(2) } meta: { cache: true, verify: () => VerifyIDs(2) }
}, },
{ {
path: '/workshop', path: '/workshop',
@@ -82,115 +82,114 @@ const router = createRouter({
// path: '/workshop', // path: '/workshop',
// redirect: '/workshop/selectStyle' // redirect: '/workshop/selectStyle'
// }, // },
{ {
path: '/workshop/home', path: '/workshop/home',
name: 'Home', name: 'Home',
component: () => import('@/views/Workshop/home.vue') component: () => import('@/views/Workshop/home.vue')
}, },
{ {
path: '/workshop/homeNav', path: '/workshop/homeNav',
name: 'HomeNav', name: 'HomeNav',
component: () => import('@/views/Workshop/homeNav.vue') component: () => import('@/views/Workshop/homeNav.vue')
}, },
{ {
path: '/workshop/stylist', path: '/workshop/stylist',
name: 'StylistPage', name: 'StylistPage',
redirect: '/workshop/stylist/index', redirect: '/workshop/stylist/index',
component: () => import('@/views/stylist/container.vue'), component: () => import('@/views/stylist/container.vue'),
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'index', name: 'index',
component: () => import('@/views/stylist/index.vue'), component: () => import('@/views/stylist/index.vue'),
meta: { verify: ()=> VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
}, },
{ {
path: 'sex', path: 'sex',
name: 'sex', name: 'sex',
component: () => import('@/views/stylist/sex.vue'), component: () => import('@/views/stylist/sex.vue'),
meta: { verify: ()=> VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
}, },
{ {
path: 'dressfor', path: 'dressfor',
name: 'dressfor', name: 'dressfor',
component: () => import('@/views/stylist/dressfor.vue'), component: () => import('@/views/stylist/dressfor.vue'),
meta: { verify: ()=> VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
}, }
]
] },
},
{ {
path: '/workshop/selectStyle', path: '/workshop/selectStyle',
name: 'selectStyle', name: 'selectStyle',
component: () => import('../views/Workshop/selectStyle.vue'), component: () => import('../views/Workshop/selectStyle.vue'),
meta: { verify: ()=> VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
}, },
{ {
path: '/workshop/selectModel', path: '/workshop/selectModel',
name: 'SelectModel', name: 'SelectModel',
component: () => import('../views/Workshop/selectModel.vue'), component: () => import('../views/Workshop/selectModel.vue'),
meta: { verify: ()=> VerifyIDs(3) } meta: { verify: () => VerifyIDs(3) }
}, },
{ {
path: '/workshop/product', path: '/workshop/product',
name: 'product', name: 'product',
component: () => import('../views/Workshop/product.vue'), component: () => import('../views/Workshop/product.vue'),
meta: { verify: ()=> VerifyIDs(4) } meta: { verify: () => VerifyIDs(4) }
}, },
{ {
// 推荐try on // 推荐try on
path: '/workshop/recommended', path: '/workshop/recommended',
name: 'recommended', name: 'recommended',
component: () => import('../views/Workshop/recommended.vue'), component: () => import('../views/Workshop/recommended.vue'),
meta: { verify: ()=> VerifyIDs(5) } meta: { verify: () => VerifyIDs(5) }
}, },
{ {
// 上传照片1 // 上传照片1
path: '/workshop/uploadFace', path: '/workshop/uploadFace',
name: 'uploadFace', name: 'uploadFace',
component: () => import('../views/Workshop/uploadFace1.vue'), component: () => import('../views/Workshop/uploadFace1.vue'),
meta: { verify: ()=> VerifyIDs(5) } meta: { verify: () => VerifyIDs(5) }
}, },
{ {
// 上传照片2 // 上传照片2
path: '/workshop/uploadFace2', path: '/workshop/uploadFace2',
name: 'uploadFace2', name: 'uploadFace2',
component: () => import('../views/Workshop/uploadFace2.vue'), component: () => import('../views/Workshop/uploadFace2.vue'),
meta: { verify: ()=> VerifyIDs(5) } meta: { verify: () => VerifyIDs(5) }
}, },
{ {
// 自定义创作 // 自定义创作
path: '/workshop/customize', path: '/workshop/customize',
name: 'customize', name: 'customize',
component: () => import('../views/Workshop/customize.vue'), component: () => import('../views/Workshop/customize.vue'),
meta: { verify: ()=> VerifyIDs(5) } meta: { verify: () => VerifyIDs(5) }
}, },
{ {
// library // library
path: '/workshop/library', path: '/workshop/library',
name: 'library', name: 'library',
component: () => import('../views/Workshop/library.vue'), component: () => import('../views/Workshop/library.vue'),
meta: { verify: ()=> VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
}, },
{ {
path: '/workshop/profile', path: '/workshop/profile',
name: 'profile', name: 'profile',
component: () => import('../views/Workshop/profile.vue'), component: () => import('../views/Workshop/profile.vue'),
meta: { verify: ()=> VerifyIDs(1) } meta: { verify: () => VerifyIDs(1) }
}, },
{ {
// creation // creation
path: '/workshop/creation', path: '/workshop/creation',
name: 'creation', name: 'creation',
component: () => import('../views/Workshop/creation/index.vue'), component: () => import('../views/Workshop/creation/index.vue'),
meta: { verify: ()=> VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
}, },
{ {
// 完成创建 // 完成创建
path: '/workshop/end', path: '/workshop/end',
name: 'end', name: 'end',
component: () => import('../views/Workshop/end.vue'), component: () => import('../views/Workshop/end.vue'),
meta: { verify: ()=> VerifyIDs(2) } meta: { verify: () => VerifyIDs(2) }
} }
] ]
} }

View File

@@ -9,7 +9,8 @@ export const useUserInfoStore = defineStore('userInfo', () => {
token: '', token: '',
generateParams: { generateParams: {
stylist: '', stylist: '',
sex: '' sex: '',
stylistImage: ''
} }
}) })
@@ -37,7 +38,8 @@ export const useUserInfoStore = defineStore('userInfo', () => {
const resetGenerateParams = () => { const resetGenerateParams = () => {
state.value.generateParams = { state.value.generateParams = {
stylist: '', stylist: '',
sex: '' sex: '',
stylistImage: ''
} }
} }

View File

@@ -26,6 +26,8 @@
emit('view-type', 1) emit('view-type', 1)
}) })
const list = reactive([]) const list = reactive([])
const size = ref(10)
const page = computed(() => Math.ceil(list.length / size.value) + 1)
const loading = ref(false) const loading = ref(false)
const finish = ref(false) const finish = ref(false)
const selectCount = computed(() => list.filter((v) => v.selected).length) const selectCount = computed(() => list.filter((v) => v.selected).length)
@@ -44,20 +46,25 @@
navLst.forEach((v) => { navLst.forEach((v) => {
if (v.flowType === query.value.active) navActive.value = v.value if (v.flowType === query.value.active) navActive.value = v.value
}) })
const clickNav = (v) => { const clickNav = (v) => {
if (v.value === navActive.value || loading.value) return if (v.value === navActive.value || loading.value) return
navActive.value = v.value navActive.value = v.value
onLoad() onBackChooseSave()
onLoad('reload')
} }
const onLoad = () => { const onLoad = (type?: 'reload') => {
if (type === 'reload') {
finish.value = false
list.splice(0, list.length)
}
loading.value = true loading.value = true
finish.value = false
list.splice(0, list.length)
const params = { const params = {
customerId: generateStore.customerId, customerId: generateStore.customerId,
type: navActive.value, type: navActive.value,
isLibrary: false isLibrary: false,
pageNum: page.value,
pageSize: size.value
} }
if (props.isChooseOne) { if (props.isChooseOne) {
params['visitRecordId'] = '' params['visitRecordId'] = ''
@@ -68,8 +75,8 @@
params['visitRecordId'] = generateStore.visitRecordId params['visitRecordId'] = generateStore.visitRecordId
} }
getGenerateHistoricals(params) getGenerateHistoricals(params)
.then((data) => { .then((data: any) => {
data?.forEach((v) => { data.records?.forEach((v) => {
const obj = { const obj = {
// tryOnId: v.tryOnId, // tryOnId: v.tryOnId,
tryOnUrl: v.tryOnUrl, tryOnUrl: v.tryOnUrl,
@@ -86,7 +93,7 @@
list.push(obj) list.push(obj)
}) })
loading.value = false loading.value = false
finish.value = true finish.value = !data.hasNext
}) })
.catch((err) => { .catch((err) => {
console.error(err) console.error(err)
@@ -229,11 +236,11 @@
hGenerateStore.originalTryOn.id = selectedItem.id hGenerateStore.originalTryOn.id = selectedItem.id
hGenerateStore.originalTryOn.tryOnUrl = selectedItem.tryOnUrl hGenerateStore.originalTryOn.tryOnUrl = selectedItem.tryOnUrl
hGenerateStore.originalTryOn.isLike = selectedItem.isFavorite hGenerateStore.originalTryOn.isLike = selectedItem.isFavorite
hGenerateStore.style.id = ''; hGenerateStore.style.id = ''
hGenerateStore.style.url = selectedItem.styleUrl hGenerateStore.style.url = selectedItem.styleUrl
} else { } else {
// style // style
hGenerateStore.style.id = selectedItem.id; hGenerateStore.style.id = selectedItem.id
hGenerateStore.style.url = selectedItem.url hGenerateStore.style.url = selectedItem.url
// selectedItem.isFavorite // selectedItem.isFavorite
} }
@@ -262,7 +269,14 @@
</div> </div>
<div class="list"> <div class="list">
<my-list v-model:loading="loading" v-model:finish="finish" @load="onLoad"> <my-list v-model:loading="loading" v-model:finish="finish" @load="onLoad">
<div class="item" v-for="(v, i) in list" :key="i" @click="onItem(v)" :type="navActive"> <div
class="item"
v-for="(v, i) in list"
:key="i"
@click="onItem(v)"
:type="navActive"
:class="{ active: (isChooseSave || isChooseOne) && v.selected }"
>
<img v-lazy="v.tryOnUrl || v.url" /> <img v-lazy="v.tryOnUrl || v.url" />
<!-- <div class="corner"> <!-- <div class="corner">
<div class="ai" v-if="v.isRegenerated">Gen-AI</div> <div class="ai" v-if="v.isRegenerated">Gen-AI</div>
@@ -360,12 +374,14 @@
.item { .item {
width: 47%; width: 47%;
height: 62.2rem; height: 62.2rem;
// overflow: hidden;
border-radius: var(--border-radius); border-radius: var(--border-radius);
background-color: #fff; background-color: #fff;
margin-bottom: 4rem; margin-bottom: 4rem;
border: 0.1rem solid #000; // overflow: hidden;
position: relative; position: relative;
&.active {
border: 0.3rem solid #d9d9d9;
}
&[type='Outfit'] { &[type='Outfit'] {
height: 50rem; height: 50rem;
> img { > img {
@@ -456,7 +472,7 @@
} }
} }
> .btns { > .btns {
margin: 9rem 0; margin: 5.4rem 0 6.4rem 0;
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@@ -8,7 +8,7 @@ import { FlowType } from '@/types/enum'
//const props = defineProps({ //const props = defineProps({
//}) //})
const emit = defineEmits([ const emit = defineEmits([
'view-type' 'viewType'
]) ])
// const data = reactive({ // const data = reactive({
@@ -23,7 +23,7 @@ const historicalReview = ()=>{
} }
onMounted(()=>{ onMounted(()=>{
emit('view-type', 1) emit('viewType', 1)
}) })
onUnmounted(()=>{ onUnmounted(()=>{
}) })

View File

@@ -4,9 +4,13 @@ import router from '@/router'
import { showConfirmDialog } from 'vant' import { showConfirmDialog } from 'vant'
import { useUserInfoStore, useOverallStore } from '@/stores' import { useUserInfoStore, useOverallStore } from '@/stores'
import { LogOut } from '@/api/login' import { LogOut } from '@/api/login'
import { getCustomerList, type CustomerListParams } from '@/api/workshop' import { getCustomerList, type CustomerListParams,customerCheckin } from '@/api/workshop'
import MyEvent from '@/utils/myEvent' import MyEvent from '@/utils/myEvent'
const props = defineProps<{
isCustomer?: boolean
}>()
const userInfoStore = useUserInfoStore() const userInfoStore = useUserInfoStore()
const overallStore = useOverallStore() const overallStore = useOverallStore()
const emit = defineEmits(['view-type', 'selected-customer']) const emit = defineEmits(['view-type', 'selected-customer'])
@@ -148,6 +152,14 @@ const handleSelectCustomer = () => {
if (selectedCustomer) { if (selectedCustomer) {
emit('selected-customer', selectedCustomer) emit('selected-customer', selectedCustomer)
} }
if(!props.isCustomer){
// show.value = true
customerCheckin({ nickname: selectedCustomer.name }).then((res) => {
useUserInfoStore().resetGenerateParams()
MyEvent.emit('clear-generate-state')
useUserInfoStore().setCustomerInfo(res)
})
}
showSwitchCustomerPopup.value = false showSwitchCustomerPopup.value = false
} }

View File

@@ -2,7 +2,7 @@
<div class="chat-message" :class="{ 'user-message': isMyself, 'ai-message': !isMyself }"> <div class="chat-message" :class="{ 'user-message': isMyself, 'ai-message': !isMyself }">
<!-- AI消息显示头像 --> <!-- AI消息显示头像 -->
<div v-if="!isMyself" class="chat-avatar"> <div v-if="!isMyself" class="chat-avatar">
<img src="@/assets/images/asistant.png" alt="AI Avatar" /> <img class="avatar" :src="thumb" alt="AI Avatar" />
</div> </div>
<!-- 消息内容 --> <!-- 消息内容 -->
@@ -27,9 +27,15 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue' import { computed } from 'vue'
import MarkdownIt from 'markdown-it' import MarkdownIt from 'markdown-it'
import { useUserInfoStore } from '@/stores'
const md = new MarkdownIt() const md = new MarkdownIt()
const userInfoStore = useUserInfoStore()
const thumb = computed(() => {
return userInfoStore.state.generateParams.stylistImage
})
// 定义消息类型 // 定义消息类型
interface ChatMessage { interface ChatMessage {
sessionId: string | number sessionId: string | number
@@ -133,16 +139,17 @@ const actionList: ActionItem[] = [
.chat-avatar { .chat-avatar {
width: 7.8rem; width: 7.8rem;
height: 7.4rem; height: 7.8rem;
border-radius: 50%; border-radius: 50%;
margin-right: 1.88rem; margin-right: 1.88rem;
border: .2rem solid #000; overflow: hidden;
padding: 1.4rem; // border: 0.2rem solid #000;
// padding: 1.4rem;
img { img {
width: 4.9rem; width: 100%;
height: 4.9rem; // height: 100%;
border-radius: 50%; // border-radius: 50%;
// object-fit: cover; // object-fit: cover;
} }
} }

View File

@@ -3,22 +3,20 @@
<div class="header"> <div class="header">
<HeaderTitle hasSetting styleType="3" /> <HeaderTitle hasSetting styleType="3" />
</div> </div>
<template> <div class="content flex-1">
<div class="content flex-1"> <NoticeList
<NoticeList ref="noticeListRef"
ref="noticeListRef" :list="messageList"
:list="messageList" :is-streaming="isStreaming"
:is-streaming="isStreaming" :streaming-message="currentStreamingMessage"
:streaming-message="currentStreamingMessage" />
/> </div>
<div class="footer">
<InputArea @send-message="handleSendMessage" />
<div class="continue flex">
<div class="btn flex flex-center" @click="handleContinue">Generate</div>
</div> </div>
<div class="footer"> </div>
<InputArea @send-message="handleSendMessage" />
<div class="continue flex">
<div class="btn flex flex-center" @click="handleContinue">Continue</div>
</div>
</div>
</template>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -274,7 +272,7 @@ const handleContinue = () => {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.asistant-container { .asistant-container {
height: 100vh; height: 100%;
overflow: hidden; overflow: hidden;
} }
@@ -306,5 +304,4 @@ const handleContinue = () => {
} }
} }
} }
</style> </style>

View File

@@ -2,13 +2,16 @@
<div class="login-page"> <div class="login-page">
<div class="content"> <div class="content">
<div class="back-button" @click="goBack"> <div class="back-button" @click="goBack">
<SvgIcon name="left" size="50" color="#fff" /> <SvgIcon name="left" size="50" color="#fff" />
</div> </div>
<div class="header"> <div class="header">
<div class="title">Log in.</div> <div class="title">Staff Login.</div>
<p class="subtitle">Redefine the styling experience with AI.</p> <p class="subtitle">
<p class="subtitle">Use Styling Angel to speed up your fashion journey.</p> <span>Experience our personalised styling journey with</span>
<br />
<span>Lane Crawford.</span>
</p>
</div> </div>
<div class="login-container"> <div class="login-container">
@@ -32,7 +35,11 @@
<img :src="google" class="google-icon" /> <img :src="google" class="google-icon" />
Sign in with Google Sign in with Google
</div> --> </div> -->
<GoogleLogin @googelLogin="handleGoogleLogin" ref="googleLoginRef" @click="clickGooleLogin"></GoogleLogin> <GoogleLogin
@googelLogin="handleGoogleLogin"
ref="googleLoginRef"
@click="clickGooleLogin"
></GoogleLogin>
<div class="sign-up-button" @click="handleSignup">Dont have an account? Sign Up</div> <div class="sign-up-button" @click="handleSignup">Dont have an account? Sign Up</div>
</div> </div>
</div> </div>
@@ -183,7 +190,7 @@ const handleSignup = () => {
cursor: pointer; cursor: pointer;
z-index: 3; z-index: 3;
font-size: 3.4rem; font-size: 3.4rem;
.c-svg{ .c-svg {
width: initial; width: initial;
height: initial; height: initial;
} }
@@ -191,12 +198,14 @@ const handleSignup = () => {
.header { .header {
margin-top: 1.42rem; margin-top: 1.42rem;
padding-left: 15.5rem; padding-left: 14.5rem;
padding-right: 14.3rem;
color: white; color: white;
font-family: 'satoshiRegular'; font-family: 'satoshiRegular';
.title { .title {
font-size: 11rem; font-size: 11rem;
font-weight: bold; font-weight: bold;
font-weight: 700;
margin-bottom: 0.8rem; margin-bottom: 0.8rem;
color: white; color: white;
font-family: 'satoshiBold'; font-family: 'satoshiBold';
@@ -226,11 +235,7 @@ const handleSignup = () => {
position: relative; position: relative;
width: calc(100% - 28.4rem); width: calc(100% - 28.4rem);
height: 107.8rem; height: 107.8rem;
background: radial-gradient( background: radial-gradient(100% 100% at 0% 0%, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
100% 100% at 0% 0%,
rgba(0, 0, 0, 0.4) 0%,
rgba(0, 0, 0, 0.2) 100%
);
backdrop-filter: blur(35px); backdrop-filter: blur(35px);
-webkit-backdrop-filter: blur(35px); -webkit-backdrop-filter: blur(35px);
-moz-backdrop-filter: blur(35px); -moz-backdrop-filter: blur(35px);

View File

@@ -9,9 +9,12 @@
<!-- 标题区域 --> <!-- 标题区域 -->
<div class="header"> <div class="header">
<div class="title">Log in.</div> <div class="title">Staff Login.</div>
<p class="subtitle">Redefine the styling experience with AI.</p> <p class="subtitle">
<p class="subtitle">Use Styling Angel to speed up your fashion journey.</p> <span>Experience our personalised styling journey with</span>
<br />
<span>Lane Crawford.</span>
</p>
</div> </div>
<div class="login-container"> <div class="login-container">

View File

@@ -6,9 +6,8 @@
</div> </div>
<div class="header"> <div class="header">
<div class="title">Sign up.</div> <div class="title">Staff Sign up.</div>
<p class="subtitle">Redefine the styling experience with AI.</p> <p class="subtitle">Start my personalised styling journey with Lane Crawford.</p>
<p class="subtitle">Use Styling Angel to speed up your fashion journey.</p>
</div> </div>
<div class="login-container"> <div class="login-container">
@@ -30,7 +29,12 @@
<button type="button" class="login-button" @click="handleConfirm">Sign Up</button> <button type="button" class="login-button" @click="handleConfirm">Sign Up</button>
<GoogleLogin text="Sign up with Google" @googelLogin="handleGoogleSignup" ref="googleSignupRef" @click="clickGooleLogin" /> <GoogleLogin
text="Sign up with Google"
@googelLogin="handleGoogleSignup"
ref="googleSignupRef"
@click="clickGooleLogin"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -191,7 +195,8 @@ const handleGoogleSignup = async (accessToken: string) => {
.header { .header {
margin-top: 1.42rem; margin-top: 1.42rem;
padding-left: 15.5rem; padding-left: 14.5rem;
padding-right: 14.3rem;
color: white; color: white;
font-family: 'satoshiRegular'; font-family: 'satoshiRegular';
.title { .title {
@@ -281,7 +286,6 @@ const handleGoogleSignup = async (accessToken: string) => {
} }
} }
.footer { .footer {
position: relative; position: relative;
text-align: center; text-align: center;

View File

@@ -2,10 +2,14 @@
<div class="welcome-page safe-area-top safe-area-bottom"> <div class="welcome-page safe-area-top safe-area-bottom">
<div class="content"> <div class="content">
<div class="title"> <div class="title">
AI STYLING <br /> Styling <br />
ASSISTANT Assistant
</div> </div>
<p class="subtitle">Redefine the styling experience with AI.</p> <p class="subtitle">
<span>Experience our personalised styling journey with</span>
<br>
<span> Lane Crawford.</span>
</p>
<div class="btn-container flex"> <div class="btn-container flex">
<div class="log btn" @click="goToLogin">Log in</div> <div class="log btn" @click="goToLogin">Log in</div>
<div class="sign btn" @click="goToSignup">Sign up</div> <div class="sign btn" @click="goToSignup">Sign up</div>
@@ -49,15 +53,16 @@ const goToLogin = () => {
font-weight: 400; font-weight: 400;
margin-bottom: 31.5rem; margin-bottom: 31.5rem;
.title { .title {
font-family: 'boskaRegular'; font-family: 'satoshiMedium';
line-height: 93%; line-height: 120%;
letter-spacing: -0.02em; // letter-spacing: -0.02em;
} }
.subtitle { .subtitle {
font-size: 3.2rem; font-size: 3.2rem;
font-family: 'satoshiRegular'; font-family: 'satoshiRegular';
margin: 3.2rem 0 6rem; margin: 3.2rem 0 6rem;
list-style: 124%; font-weight: 400;
line-height: 124%;
letter-spacing: 0.08em; letter-spacing: 0.08em;
} }
.btn-container { .btn-container {

View File

@@ -25,8 +25,8 @@
<div class="text"> <div class="text">
<div class="form-title">{{ formTitle }}</div> <div class="form-title">{{ formTitle }}</div>
<div class="description"> <div class="description">
<p>Redefine the styling experience with AI.</p> <p>Unlock personalized styling insights.</p>
<p>Use Styling Angel to speed up your fashion journey.</p> <p>Enter a client profile to begin curating their next look with Styling Angel.</p>
</div> </div>
</div> </div>
@@ -58,7 +58,7 @@
</div> </div>
</template> </template>
<Profile ref="profileRef" @selected-customer="handleSelectCustomer" /> <Profile ref="profileRef" @selected-customer="handleSelectCustomer" is-customer />
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -70,7 +70,6 @@ import { customerCheckin, createCustomer, type CreateCustomerParams } from '@/ap
import Profile from '../Workshop/profile.vue' import Profile from '../Workshop/profile.vue'
import MyEvent from '@/utils/myEvent' import MyEvent from '@/utils/myEvent'
const profileRef = ref<typeof Profile>(null) const profileRef = ref<typeof Profile>(null)
const handleOpenProfile = () => { const handleOpenProfile = () => {
profileRef.value.open() profileRef.value.open()
@@ -107,6 +106,7 @@ const handleConfirm = async () => {
customerCheckin({ nickname: customerData.value.nickname }).then((res) => { customerCheckin({ nickname: customerData.value.nickname }).then((res) => {
useUserInfoStore().resetGenerateParams() useUserInfoStore().resetGenerateParams()
generateStore.setCustomerInfo(res) generateStore.setCustomerInfo(res)
MyEvent.emit('clear-generate-state')
router.push('/workshop/home') router.push('/workshop/home')
}) })
} else { } else {

View File

@@ -35,7 +35,7 @@
<!-- Continue按钮 --> <!-- Continue按钮 -->
<div class="continue-button" @click="handleContinue" v-if="!$route.query?.demo">Continue</div> <div class="continue-button" @click="handleContinue" v-if="!$route.query?.demo">Continue</div>
<van-dialog <!-- <van-dialog
class="video-dialog" class="video-dialog"
:show-confirm-button="false" :show-confirm-button="false"
:show-cancel-button="false" :show-cancel-button="false"
@@ -47,7 +47,7 @@
<van-icon name="cross" class="close-icon" /> <van-icon name="cross" class="close-icon" />
</div> </div>
<Video ref="videoRef" /> <Video ref="videoRef" />
</van-dialog> </van-dialog> -->
</div> </div>
</template> </template>
@@ -57,7 +57,9 @@ 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 male from '@/assets/images/male.png'
import maleThumb from '@/assets/images/male_thumb.png'
import female from '@/assets/images/female.png' import female from '@/assets/images/female.png'
import femaleThumb from '@/assets/images/female_thumb.png'
import HeaderTitle from '@/components/HeaderTitle.vue' import HeaderTitle from '@/components/HeaderTitle.vue'
import FooterNavigation from '@/components/FooterNavigation.vue' import FooterNavigation from '@/components/FooterNavigation.vue'
@@ -70,28 +72,32 @@ const stylists = ref<any[]>([
value: 'crystal', value: 'crystal',
name: 'Vera Lo', name: 'Vera Lo',
description: 'Contemporary, Classic, Simple Silhouettes, Statement Pieces', description: 'Contemporary, Classic, Simple Silhouettes, Statement Pieces',
image: female image: female,
thumb: femaleThumb
}, },
{ {
id: 2, id: 2,
value: 'mini', value: 'mini',
name: 'Sarah Chen', name: 'Sarah Chen',
description: 'Modern, Edgy, Bold Colors, Street Style', description: 'Modern, Edgy, Bold Colors, Street Style',
image: male image: male,
thumb: maleThumb
}, },
{ {
id: 3, id: 3,
value: 'crystal', value: 'crystal',
name: 'Emma Wilson', name: 'Emma Wilson',
description: 'Elegant, Feminine, Vintage Inspired, Soft Tones', description: 'Elegant, Feminine, Vintage Inspired, Soft Tones',
image: female image: female,
thumb: femaleThumb
}, },
{ {
id: 4, id: 4,
value: 'mini', value: 'mini',
name: 'Alex Johnson', name: 'Alex Johnson',
description: 'Minimalist, Professional, Neutral Palette, Clean Lines', description: 'Minimalist, Professional, Neutral Palette, Clean Lines',
image: male image: male,
thumb: maleThumb
} }
]) ])
const currentChoosed = ref(1) const currentChoosed = ref(1)
@@ -119,20 +125,22 @@ const handleClickStylist = (item: any) => {
const handleContinue = () => { const handleContinue = () => {
const generateParams = userInfoStore.getGenerateParams() const generateParams = userInfoStore.getGenerateParams()
generateParams.stylist = const selected = stylists.value.find((item) => item.id === currentChoosed.value)
stylists.value.find((item) => item.id === currentChoosed.value)?.value || '' generateParams.stylist = selected?.value
generateParams.stylistImage = selected?.thumb
userInfoStore.setGenerateParams(generateParams) userInfoStore.setGenerateParams(generateParams)
router.push('/workshop/stylist/sex') router.push('/workshop/stylist/sex')
} }
// 监听showVideo变化关闭时暂停视频 // 监听showVideo变化关闭时暂停视频
watch(showVideo, (newValue) => { // watch(showVideo, (newValue) => {
if (!newValue && videoRef.value) { // if (!newValue && videoRef.value) {
videoRef.value.pause() // videoRef.value.pause()
videoRef.value.reset() // videoRef.value.reset()
} // }
}) // })
</script> </script>
<style scoped lang="less"> <style scoped lang="less">