调整customer路由位置,吧登陆后的路由放在workshop路由下
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped
This commit is contained in:
@@ -61,16 +61,37 @@ const router = createRouter({
|
||||
path: '/welcome',
|
||||
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',
|
||||
path: '/asistant',
|
||||
name: 'asistant',
|
||||
component: () => import('../views/asistant/index.vue'),
|
||||
meta: { cache: true, verify: ()=> VerifyIDs(2) }
|
||||
},
|
||||
{
|
||||
path: '/workshop',
|
||||
name: 'Workshop',
|
||||
component: () => import('../views/Workshop/index.vue'),
|
||||
children: [
|
||||
// {
|
||||
// path: '/workshop',
|
||||
// redirect: '/workshop/selectStyle'
|
||||
// },
|
||||
{
|
||||
path: '/workshop/stylist',
|
||||
name: 'StylistPage',
|
||||
redirect: '/stylist/index',
|
||||
redirect: '/workshop/stylist/index',
|
||||
component: () => import('@/views/stylist/container.vue'),
|
||||
children: [
|
||||
{
|
||||
@@ -91,28 +112,9 @@ const router = createRouter({
|
||||
component: () => import('@/views/stylist/dressfor.vue'),
|
||||
meta: { verify: ()=> VerifyIDs(2) }
|
||||
},
|
||||
{
|
||||
path: 'customer',
|
||||
name: 'customer',
|
||||
component: () => import('@/views/stylist/customer.vue'),
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/asistant',
|
||||
name: 'asistant',
|
||||
component: () => import('../views/asistant/index.vue'),
|
||||
meta: { cache: true, verify: ()=> VerifyIDs(2) }
|
||||
},
|
||||
{
|
||||
path: '/workshop',
|
||||
name: 'Workshop',
|
||||
component: () => import('../views/Workshop/index.vue'),
|
||||
children: [
|
||||
{
|
||||
path: '/workshop',
|
||||
redirect: '/workshop/selectStyle'
|
||||
},
|
||||
{
|
||||
path: '/workshop/selectStyle',
|
||||
name: 'SelectStyle',
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
})
|
||||
}
|
||||
@@ -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'
|
||||
|
||||
@@ -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变化,关闭时暂停视频
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user