From 83dbd6bd41cf1b66d56866a2c077b686ad51f42b Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 20 Nov 2025 14:54:41 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5?= 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 | 15 +++++++++++---- src/views/stylist/index.vue | 5 ++++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/stores/modules/overall.ts b/src/stores/modules/overall.ts index 7689f34..78c4d21 100644 --- a/src/stores/modules/overall.ts +++ b/src/stores/modules/overall.ts @@ -5,6 +5,15 @@ export const useOverallStore = defineStore({ state: () => { return { loading:false, + /** + * 流程类型 + * main: 主流程 + * reinventing: 魔改 + * stylist: 查看设计师 + * clientId: 切换客户 + * + */ + flowType:'', } }, getters: { @@ -14,6 +23,9 @@ export const useOverallStore = defineStore({ // 全局loading 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 d96a2c1..1a49ee2 100644 --- a/src/views/Workshop/home.vue +++ b/src/views/Workshop/home.vue @@ -3,6 +3,7 @@ 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' @@ -13,6 +14,7 @@ const emit = defineEmits([ 'view-type' ]) +const overallStore = useOverallStore() // const data = reactive({ // }) @@ -30,6 +32,11 @@ const clickSwitchVIPID = ()=>{ }) .catch(() => {}) } +const openFlow = (path:string,flowType:string)=>{ + if(flowType == 'clientId')return clickSwitchVIPID + overallStore.setFlowType(flowType) + router.push(path) +} onMounted(()=>{ emit('view-type', 1) @@ -51,16 +58,16 @@ defineExpose({}) Explore