From 67702b36b2f14afc0a08866fa9a0e734efb1daa7 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Fri, 19 Dec 2025 13:40:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4customer=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=EF=BC=8C=E5=90=A7=E7=99=BB=E9=99=86=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E8=B7=AF=E7=94=B1=E6=94=BE=E5=9C=A8workshop=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 72 ++++++++++++----------- src/views/login/LoginPage.vue | 4 +- src/views/login/SignupPage.vue | 2 +- src/views/{stylist => login}/customer.vue | 2 +- src/views/stylist/dressfor.vue | 2 - src/views/stylist/index.vue | 4 +- src/views/stylist/sex.vue | 4 +- 7 files changed, 43 insertions(+), 47 deletions(-) rename src/views/{stylist => login}/customer.vue (99%) diff --git a/src/router/index.ts b/src/router/index.ts index 5e98295..2498bec 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -62,42 +62,17 @@ const router = createRouter({ name: 'WelcomePage', component: () => import('@/views/login/WelcomePage.vue') }, + { + path: '/customer', + name: 'customer', + component: () => import('@/views/login/customer.vue'), + }, { path: '/homeNav', name: 'HomeNav', component: () => import('@/views/Workshop/home.vue') }, - { - path: '/stylist', - name: 'StylistPage', - redirect: '/stylist/index', - component: () => import('@/views/stylist/container.vue'), - children: [ - { - path: 'index', - name: 'index', - component: () => import('@/views/stylist/index.vue'), - meta: { verify: ()=> VerifyIDs(2) } - }, - { - path: 'sex', - name: 'sex', - component: () => import('@/views/stylist/sex.vue'), - meta: { verify: ()=> VerifyIDs(2) } - }, - { - path: 'dressfor', - name: 'dressfor', - component: () => import('@/views/stylist/dressfor.vue'), - meta: { verify: ()=> VerifyIDs(2) } - }, - { - path: 'customer', - name: 'customer', - component: () => import('@/views/stylist/customer.vue'), - } - ] - }, + { path: '/asistant', name: 'asistant', @@ -109,10 +84,37 @@ const router = createRouter({ name: 'Workshop', component: () => import('../views/Workshop/index.vue'), children: [ - { - path: '/workshop', - redirect: '/workshop/selectStyle' - }, + // { + // path: '/workshop', + // redirect: '/workshop/selectStyle' + // }, + { + path: '/workshop/stylist', + name: 'StylistPage', + redirect: '/workshop/stylist/index', + component: () => import('@/views/stylist/container.vue'), + children: [ + { + path: 'index', + name: 'index', + component: () => import('@/views/stylist/index.vue'), + meta: { verify: ()=> VerifyIDs(2) } + }, + { + path: 'sex', + name: 'sex', + component: () => import('@/views/stylist/sex.vue'), + meta: { verify: ()=> VerifyIDs(2) } + }, + { + path: 'dressfor', + name: 'dressfor', + component: () => import('@/views/stylist/dressfor.vue'), + meta: { verify: ()=> VerifyIDs(2) } + }, + + ] + }, { path: '/workshop/selectStyle', name: 'SelectStyle', diff --git a/src/views/login/LoginPage.vue b/src/views/login/LoginPage.vue index 73de64a..2bfe9b4 100644 --- a/src/views/login/LoginPage.vue +++ b/src/views/login/LoginPage.vue @@ -118,7 +118,7 @@ const handleLogin = async () => { userInfoStore.setToken(response.token) userInfoStore.setUserInfo(response.user) showToast('login success') - router.replace('/stylist/customer') + router.replace('/customer') } ) } @@ -141,7 +141,7 @@ const handleGoogleLogin = async (accessToken: string) => { userInfoStore.setToken(result.token) userInfoStore.setUserInfo(result.user) showToast('Google login successful') - router.replace('/stylist/customer') + router.replace('/customer') } catch (error) { console.error('Google登录失败:', error) showToast('Google login failed, please try again') diff --git a/src/views/login/SignupPage.vue b/src/views/login/SignupPage.vue index 404a3c8..62bd270 100644 --- a/src/views/login/SignupPage.vue +++ b/src/views/login/SignupPage.vue @@ -142,7 +142,7 @@ const handleGoogleSignup = async (accessToken: string) => { userInfoStore.setToken(result.token) userInfoStore.setUserInfo(result.user) showToast('Google sign up successful') - router.replace('/stylist/customer') + router.replace('/customer') } catch (error) { console.error('Google注册失败:', error) showToast(error?.message || 'Google sign up failed, please try again') diff --git a/src/views/stylist/customer.vue b/src/views/login/customer.vue similarity index 99% rename from src/views/stylist/customer.vue rename to src/views/login/customer.vue index 3b563bf..f3f39dc 100644 --- a/src/views/stylist/customer.vue +++ b/src/views/login/customer.vue @@ -93,7 +93,7 @@ const handleConfirm = async () => { useUserInfoStore().resetGenerateParams() // console.log('res', res) generateStore.setCustomerInfo(res) - // router.push('/stylist/index') + // router.push('/workshop/stylist/index') router.push('/homeNav') }) } diff --git a/src/views/stylist/dressfor.vue b/src/views/stylist/dressfor.vue index 6e0fed9..d4c210b 100644 --- a/src/views/stylist/dressfor.vue +++ b/src/views/stylist/dressfor.vue @@ -1,5 +1,4 @@