diff --git a/src/stores/modules/overall.ts b/src/stores/modules/overall.ts index 78c4d21..95e5635 100644 --- a/src/stores/modules/overall.ts +++ b/src/stores/modules/overall.ts @@ -5,15 +5,6 @@ export const useOverallStore = defineStore({ state: () => { return { loading:false, - /** - * 流程类型 - * main: 主流程 - * reinventing: 魔改 - * stylist: 查看设计师 - * clientId: 切换客户 - * - */ - flowType:'', } }, getters: { @@ -24,8 +15,5 @@ export const useOverallStore = defineStore({ setLoading(data:boolean){ this.loading = data }, - setFlowType(data:string){ - this.flowType = data - } } }) diff --git a/src/views/Workshop/home.vue b/src/views/Workshop/home.vue index 1a49ee2..b52add8 100644 --- a/src/views/Workshop/home.vue +++ b/src/views/Workshop/home.vue @@ -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