去掉流程类型,改为在路由中表示流程
This commit is contained in:
@@ -3,7 +3,6 @@ import { onMounted, onUnmounted, reactive, toRefs, computed, onActivated } from
|
||||
import HeaderTitle from '@/components/HeaderTitle.vue'
|
||||
import FooterNavigation from '@/components/FooterNavigation.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useOverallStore } from '@/stores'
|
||||
const router = useRouter()
|
||||
import { showConfirmDialog } from 'vant'
|
||||
import MyEvent from '@/utils/myEvent'
|
||||
@@ -14,7 +13,6 @@ const emit = defineEmits([
|
||||
'view-type'
|
||||
])
|
||||
|
||||
const overallStore = useOverallStore()
|
||||
// const data = reactive({
|
||||
// })
|
||||
|
||||
@@ -28,14 +26,18 @@ const clickSwitchVIPID = ()=>{
|
||||
.then(() => {
|
||||
MyEvent.emit('clear-generate-state')
|
||||
MyEvent.emit('clearAllCache')
|
||||
router.push('/stylist/customer')
|
||||
router.push({ name: 'customer', query: { demo: 1 } })
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
const openFlow = (path:string,flowType:string)=>{
|
||||
if(flowType == 'clientId')return clickSwitchVIPID
|
||||
overallStore.setFlowType(flowType)
|
||||
if(flowType == 'clientId')return clickSwitchVIPID()
|
||||
router.push(path)
|
||||
if(flowType == 'main'){
|
||||
router.push({ name: path })
|
||||
}else{
|
||||
router.push({ name: path, query: { demo: 1 } })
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
@@ -58,13 +60,13 @@ defineExpose({})
|
||||
Explore
|
||||
</div>
|
||||
<div class="navList">
|
||||
<div class="item" @click="openFlow('/stylist/index','main')">
|
||||
<div class="item" @click="openFlow('index','main')">
|
||||
<img src="@/assets/images/nav1.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('/workshop/recommended','reinventing')">
|
||||
<div class="item" @click="openFlow('recommended','reinventing')">
|
||||
<img src="@/assets/images/nav2.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('/stylist/index','stylist')">
|
||||
<div class="item" @click="openFlow('index','stylist')">
|
||||
<img src="@/assets/images/nav3.png" alt="">
|
||||
</div>
|
||||
<div class="item" @click="openFlow('','clientId')">
|
||||
|
||||
Reference in New Issue
Block a user