From 1adf4f18c26f9f9cc8089cf2253a8c415e34d8d4 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 20 Nov 2025 16:59:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B5=81=E7=A8=8B=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E6=94=B9=E4=B8=BA=E5=9C=A8=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E4=B8=AD=E8=A1=A8=E7=A4=BA=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/modules/overall.ts | 12 ------------ src/views/Workshop/home.vue | 18 ++++++++++-------- src/views/stylist/index.vue | 4 +--- 3 files changed, 11 insertions(+), 23 deletions(-) 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