调整customer路由位置,吧登陆后的路由放在workshop路由下
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped

This commit is contained in:
X1627315083
2025-12-19 13:40:15 +08:00
parent c157c0a14a
commit 67702b36b2
7 changed files with 43 additions and 47 deletions

View File

@@ -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',

View File

@@ -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')

View File

@@ -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')

View File

@@ -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')
})
}

View File

@@ -1,5 +1,4 @@
<template>
<header-title style-type="3" />
<div class="dressfor-container flex">
<div class="content flex-1 flex flex-column">
<!-- <div class="setting flex flex-between">
@@ -36,7 +35,6 @@
</div>
</div>
</div>
<footer-navigation />
</template>
<script setup lang="ts">
import { ref, onUnmounted, nextTick, watch } from 'vue'

View File

@@ -1,5 +1,4 @@
<template>
<header-title style-type="3" />
<div class="stylist-page">
<!-- 主要内容区域 -->
<div class="content">
@@ -50,7 +49,6 @@
<Video ref="videoRef" />
</van-dialog>
</div>
<footer-navigation />
</template>
<script setup lang="ts">
@@ -125,7 +123,7 @@ const handleContinue = () => {
stylists.value.find((item) => item.id === currentChoosed.value)?.value || ''
userInfoStore.setGenerateParams(generateParams)
router.push('/stylist/sex')
router.push('/workshop/stylist/sex')
}
// 监听showVideo变化关闭时暂停视频

View File

@@ -1,5 +1,4 @@
<template>
<header-title style-type="3" />
<div class="sex-select">
<div class="text">Before we begin.</div>
<div class="desc">Who are you styling?</div>
@@ -15,7 +14,6 @@
</div>
</div>
</div>
<footer-navigation />
</template>
<script setup lang="ts">
import HeaderTitle from '@/components/HeaderTitle.vue'
@@ -42,7 +40,7 @@ const handleSelect = (value: string) => {
const generateParams = userInfoStore.getGenerateParams()
generateParams.sex = value
userInfoStore.setGenerateParams(generateParams)
router.push('/stylist/dressfor')
router.push('/workshop/stylist/dressfor')
}
</script>
<style lang="less" scoped>