Merge branch 'main' of http://18.167.251.121:10003/aidlab/lanecarford_front
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped
This commit is contained in:
@@ -3,7 +3,7 @@ import { onMounted, onUnmounted, reactive, toRefs, computed, onActivated } from
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
import { showConfirmDialog } from 'vant'
|
||||
import MyEvent from '@/utils/myEvent'
|
||||
import { FlowType } from '@/types/enum'
|
||||
|
||||
//const props = defineProps({
|
||||
//})
|
||||
@@ -14,27 +14,12 @@ const emit = defineEmits([
|
||||
// const data = reactive({
|
||||
// })
|
||||
|
||||
const clickSwitchVIPID = ()=>{
|
||||
showConfirmDialog({
|
||||
title: 'Switch VIP ID?',
|
||||
message: 'You have unsaved changes. Your progress will be lost.',
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'Cancel',
|
||||
})
|
||||
.then(() => {
|
||||
MyEvent.emit('clear-generate-state')
|
||||
MyEvent.emit('clearAllCache')
|
||||
router.push({ name: 'customer', query: { demo: 1 } })
|
||||
})
|
||||
.catch(() => {})
|
||||
const newJourney = ()=>{
|
||||
router.push(`/workshop/styList/index?flowType=${FlowType.MAIN}`)
|
||||
}
|
||||
const openFlow = (path:string,flowType:string)=>{
|
||||
if(flowType == 'clientId')return clickSwitchVIPID()
|
||||
if(flowType == 'main'){
|
||||
router.push({ name: path })
|
||||
}else{
|
||||
router.push({ name: path, query: { demo: 1 } })
|
||||
}
|
||||
|
||||
const historicalReview = ()=>{
|
||||
router.push(`/workshop/creation?flowType=${FlowType.HISTORY}`)
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
@@ -46,29 +31,14 @@ defineExpose({})
|
||||
// const { } = toRefs(data);
|
||||
</script>
|
||||
<template>
|
||||
<div class="homeNavPage">
|
||||
<div class="title">
|
||||
Welcome Back,
|
||||
What can I help you today?
|
||||
<div class="homePage">
|
||||
<img class="homeBg" src="@/assets/images/homeBg.png" alt="">
|
||||
<div class="button">
|
||||
<div class="item" @click="newJourney">New Journey</div>
|
||||
<div class="item" @click="historicalReview">Historical Review</div>
|
||||
</div>
|
||||
<div class="navBox">
|
||||
<div class="navTitle">
|
||||
Explore
|
||||
</div>
|
||||
<div class="navList">
|
||||
<div class="item" @click="openFlow('index','main')">
|
||||
<img src="@/assets/images/nav1.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('recommended','reinventing')">
|
||||
<img src="@/assets/images/nav2.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('index','stylist')">
|
||||
<img src="@/assets/images/nav3.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('','clientId')">
|
||||
<img src="@/assets/images/nav4.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
Powered by AiDLab for Lane Crawford
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -77,46 +47,46 @@ defineExpose({})
|
||||
--header-title-background: #fff;
|
||||
--header-title-height: 12rem !important;
|
||||
}
|
||||
.homeNavPage{
|
||||
> .title{
|
||||
padding: 0 8.4rem;
|
||||
font-family: satoshiBold;
|
||||
font-weight: 700;
|
||||
margin-top: 6.8rem;
|
||||
font-size: 9.6rem;
|
||||
line-height: 124%;
|
||||
background: #B3B3B3;
|
||||
background: linear-gradient(120deg, #b3b3b3 1%, rgba(0, 0, 0, 0) 48%), linear-gradient(
|
||||
344deg, #B3B3B2 16%, #000000 66%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
.homePage{
|
||||
position: relative;
|
||||
flex: 1;
|
||||
> .homeBg{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
> .navBox{
|
||||
> .navTitle{
|
||||
padding: 0 8.4rem;
|
||||
font-family: satoshiBold;
|
||||
font-weight: 700;
|
||||
font-size: 5.2rem;
|
||||
margin: 6.3rem 0;
|
||||
}
|
||||
> .navList{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 7.4rem;
|
||||
gap: 4.8rem;
|
||||
> .item{
|
||||
// width: 44.2rem;
|
||||
// height: 41.6rem;
|
||||
height: auto;
|
||||
width: calc(50% - 4.8rem / 2);
|
||||
> img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
> .button{
|
||||
margin: 64.3rem auto 0;
|
||||
font-family: satoshiBold;
|
||||
font-size: 4.6rem;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
> .item{
|
||||
width: 45.6rem;
|
||||
margin-bottom: 8rem;
|
||||
line-height: 13.1rem;
|
||||
border: 1.16px solid #FFFFFF;
|
||||
backdrop-filter: blur(2.5rem);
|
||||
background: radial-gradient(100% 100% at 0% 0%, rgba(115, 115, 115, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
> .info{
|
||||
position: absolute;
|
||||
bottom: 7rem;
|
||||
font-size: 3rem;
|
||||
font-family: satoshiRegular;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-weight: 400;
|
||||
letter-spacing: .5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, reactive, toRefs, computed, onActivated } from "vue";
|
||||
import { onMounted, onUnmounted, reactive, ref, computed, onActivated } from "vue";
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
import { showConfirmDialog } from 'vant'
|
||||
@@ -11,6 +11,9 @@ const emit = defineEmits([
|
||||
'view-type'
|
||||
])
|
||||
|
||||
const navList = ref([])
|
||||
const navDisabledList = ref([])
|
||||
|
||||
// const data = reactive({
|
||||
// })
|
||||
|
||||
@@ -28,17 +31,50 @@ const clickSwitchVIPID = ()=>{
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
const openFlow = (path:string,flowType:string)=>{
|
||||
if(flowType == 'clientId')return clickSwitchVIPID()
|
||||
if(flowType == 'main'){
|
||||
router.push({ name: path })
|
||||
}else{
|
||||
router.push({ name: path, query: { demo: 1 } })
|
||||
}
|
||||
const openFlow = (path:string)=>{
|
||||
const query = computed(() => router.currentRoute.value.query)
|
||||
router.push({ name: path, query: {...query.value} })
|
||||
|
||||
// if(flowType == 'clientId')return clickSwitchVIPID()
|
||||
// if(flowType == 'main'){
|
||||
// router.push({ name: path })
|
||||
// }else{
|
||||
// router.push({ name: path, query: { demo: 1 } })
|
||||
// }
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
emit('view-type', 1)
|
||||
let nav = [
|
||||
{
|
||||
path: 'selectStyle',
|
||||
imgPath: new URL('@/assets/images/nav1.png',import.meta.url).href,
|
||||
flowTypeList: ['history-tryon','history-ai'],
|
||||
},
|
||||
{
|
||||
path: 'recommended',
|
||||
imgPath: new URL('@/assets/images/nav2.png',import.meta.url).href,
|
||||
flowTypeList: ['history-outfit'],
|
||||
},
|
||||
{
|
||||
path: 'uploadFace',
|
||||
imgPath: new URL('@/assets/images/nav3.png',import.meta.url).href,
|
||||
flowTypeList: ['history-tryon','history-ai'],
|
||||
},
|
||||
{
|
||||
path: 'customize',
|
||||
imgPath: new URL('@/assets/images/nav4.png',import.meta.url).href,
|
||||
flowTypeList: ['history-tryon','history-ai'],
|
||||
},
|
||||
]
|
||||
nav.forEach((item)=>{
|
||||
const query = computed(() => router.currentRoute.value.query)
|
||||
if(item.flowTypeList.includes(query.value?.flowType as string)){
|
||||
navList.value.push(item)
|
||||
}else{
|
||||
navDisabledList.value.push(item)
|
||||
}
|
||||
})
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
})
|
||||
@@ -56,18 +92,24 @@ defineExpose({})
|
||||
Explore
|
||||
</div>
|
||||
<div class="navList">
|
||||
<div class="item" @click="openFlow('index','main')">
|
||||
<div class="item active" v-for="item in navList" :key="item.path" @click="openFlow(item.path)">
|
||||
<img :src="item.imgPath" alt="">
|
||||
</div>
|
||||
<div class="item" v-for="item in navDisabledList" :key="item.path" @click="openFlow(item.path)">
|
||||
<img :src="item.imgPath" alt="">
|
||||
</div>
|
||||
<!-- <div class="item" @click="openFlow('index')">
|
||||
<img src="@/assets/images/nav1.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('recommended','reinventing')">
|
||||
<div class="item" :class="{'active': ['history-outfit','history-ai'].includes($route.query?.flowType as string)}" @click="openFlow('recommended','reinventing')">
|
||||
<img src="@/assets/images/nav2.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('index','stylist')">
|
||||
<div class="item" :class="{'active': ['history-outfit','history-ai'].includes($route.query?.flowType as string)}" @click="openFlow('index','stylist')">
|
||||
<img src="@/assets/images/nav3.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('','clientId')">
|
||||
<div class="item" :class="{'active': ['history-ai'].includes($route.query?.flowType as string)}" @click="openFlow('','clientId')">
|
||||
<img src="@/assets/images/nav4.png" alt="">
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,6 +152,12 @@ defineExpose({})
|
||||
// height: 41.6rem;
|
||||
height: auto;
|
||||
width: calc(50% - 4.8rem / 2);
|
||||
pointer-events: none;
|
||||
opacity: .5;
|
||||
&.active{
|
||||
pointer-events: auto;
|
||||
opacity: 1;
|
||||
}
|
||||
> img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user