fix
This commit is contained in:
@@ -4,6 +4,10 @@ import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
import { showConfirmDialog } from 'vant'
|
||||
import MyEvent from '@/utils/myEvent'
|
||||
import { FlowType, IsHistoryFlow } from '@/types/enum'
|
||||
import { useGenerateStore } from '@/stores'
|
||||
const generateStore = useGenerateStore()
|
||||
|
||||
|
||||
//const props = defineProps({
|
||||
//})
|
||||
@@ -31,9 +35,10 @@ const clickSwitchVIPID = ()=>{
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
const openFlow = (path:string)=>{
|
||||
const openFlow = (item: any)=>{
|
||||
const query = computed(() => router.currentRoute.value.query)
|
||||
router.push({ name: path, query: {...query.value} })
|
||||
item.click && item.click()
|
||||
router.push({ name: item.path, query: {...query.value} })
|
||||
|
||||
// if(flowType == 'clientId')return clickSwitchVIPID()
|
||||
// if(flowType == 'main'){
|
||||
@@ -49,22 +54,25 @@ onMounted(()=>{
|
||||
{
|
||||
path: 'selectStyle',
|
||||
imgPath: new URL('@/assets/images/nav1.png',import.meta.url).href,
|
||||
flowTypeList: ['history-tryon','history-ai'],
|
||||
flowTypeList: [FlowType.H_TRYON,FlowType.H_AI],
|
||||
},
|
||||
{
|
||||
path: 'recommended',
|
||||
imgPath: new URL('@/assets/images/nav2.png',import.meta.url).href,
|
||||
flowTypeList: ['history-outfit'],
|
||||
flowTypeList: [FlowType.H_OUTFIT],
|
||||
},
|
||||
{
|
||||
path: 'uploadFace',
|
||||
imgPath: new URL('@/assets/images/nav3.png',import.meta.url).href,
|
||||
flowTypeList: ['history-tryon','history-ai'],
|
||||
flowTypeList: [FlowType.H_TRYON,FlowType.H_AI],
|
||||
},
|
||||
{
|
||||
path: 'customize',
|
||||
imgPath: new URL('@/assets/images/nav4.png',import.meta.url).href,
|
||||
flowTypeList: ['history-tryon','history-ai'],
|
||||
flowTypeList: [FlowType.H_TRYON,FlowType.H_AI],
|
||||
click(){
|
||||
generateStore.updatePhotoInfo({})
|
||||
},
|
||||
},
|
||||
]
|
||||
nav.forEach((item)=>{
|
||||
@@ -92,10 +100,10 @@ defineExpose({})
|
||||
Explore
|
||||
</div>
|
||||
<div class="navList">
|
||||
<div class="item active" v-for="item in navList" :key="item.path" @click="openFlow(item.path)">
|
||||
<div class="item active" v-for="item in navList" :key="item.path" @click="openFlow(item)">
|
||||
<img :src="item.imgPath" alt="">
|
||||
</div>
|
||||
<div class="item" v-for="item in navDisabledList" :key="item.path" @click="openFlow(item.path)">
|
||||
<div class="item" v-for="item in navDisabledList" :key="item.path" @click="openFlow(item)">
|
||||
<img :src="item.imgPath" alt="">
|
||||
</div>
|
||||
<!-- <div class="item" @click="openFlow('index')">
|
||||
|
||||
Reference in New Issue
Block a user