调整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:
@@ -62,42 +62,17 @@ const router = createRouter({
|
|||||||
name: 'WelcomePage',
|
name: 'WelcomePage',
|
||||||
component: () => import('@/views/login/WelcomePage.vue')
|
component: () => import('@/views/login/WelcomePage.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/customer',
|
||||||
|
name: 'customer',
|
||||||
|
component: () => import('@/views/login/customer.vue'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/homeNav',
|
path: '/homeNav',
|
||||||
name: 'HomeNav',
|
name: 'HomeNav',
|
||||||
component: () => import('@/views/Workshop/home.vue')
|
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',
|
path: '/asistant',
|
||||||
name: 'asistant',
|
name: 'asistant',
|
||||||
@@ -109,10 +84,37 @@ const router = createRouter({
|
|||||||
name: 'Workshop',
|
name: 'Workshop',
|
||||||
component: () => import('../views/Workshop/index.vue'),
|
component: () => import('../views/Workshop/index.vue'),
|
||||||
children: [
|
children: [
|
||||||
{
|
// {
|
||||||
path: '/workshop',
|
// path: '/workshop',
|
||||||
redirect: '/workshop/selectStyle'
|
// 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',
|
path: '/workshop/selectStyle',
|
||||||
name: 'SelectStyle',
|
name: 'SelectStyle',
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ const handleLogin = async () => {
|
|||||||
userInfoStore.setToken(response.token)
|
userInfoStore.setToken(response.token)
|
||||||
userInfoStore.setUserInfo(response.user)
|
userInfoStore.setUserInfo(response.user)
|
||||||
showToast('login success')
|
showToast('login success')
|
||||||
router.replace('/stylist/customer')
|
router.replace('/customer')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ const handleGoogleLogin = async (accessToken: string) => {
|
|||||||
userInfoStore.setToken(result.token)
|
userInfoStore.setToken(result.token)
|
||||||
userInfoStore.setUserInfo(result.user)
|
userInfoStore.setUserInfo(result.user)
|
||||||
showToast('Google login successful')
|
showToast('Google login successful')
|
||||||
router.replace('/stylist/customer')
|
router.replace('/customer')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Google登录失败:', error)
|
console.error('Google登录失败:', error)
|
||||||
showToast('Google login failed, please try again')
|
showToast('Google login failed, please try again')
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ const handleGoogleSignup = async (accessToken: string) => {
|
|||||||
userInfoStore.setToken(result.token)
|
userInfoStore.setToken(result.token)
|
||||||
userInfoStore.setUserInfo(result.user)
|
userInfoStore.setUserInfo(result.user)
|
||||||
showToast('Google sign up successful')
|
showToast('Google sign up successful')
|
||||||
router.replace('/stylist/customer')
|
router.replace('/customer')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Google注册失败:', error)
|
console.error('Google注册失败:', error)
|
||||||
showToast(error?.message || 'Google sign up failed, please try again')
|
showToast(error?.message || 'Google sign up failed, please try again')
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ const handleConfirm = async () => {
|
|||||||
useUserInfoStore().resetGenerateParams()
|
useUserInfoStore().resetGenerateParams()
|
||||||
// console.log('res', res)
|
// console.log('res', res)
|
||||||
generateStore.setCustomerInfo(res)
|
generateStore.setCustomerInfo(res)
|
||||||
// router.push('/stylist/index')
|
// router.push('/workshop/stylist/index')
|
||||||
router.push('/homeNav')
|
router.push('/homeNav')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<header-title style-type="3" />
|
|
||||||
<div class="dressfor-container flex">
|
<div class="dressfor-container flex">
|
||||||
<div class="content flex-1 flex flex-column">
|
<div class="content flex-1 flex flex-column">
|
||||||
<!-- <div class="setting flex flex-between">
|
<!-- <div class="setting flex flex-between">
|
||||||
@@ -36,7 +35,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer-navigation />
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onUnmounted, nextTick, watch } from 'vue'
|
import { ref, onUnmounted, nextTick, watch } from 'vue'
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<header-title style-type="3" />
|
|
||||||
<div class="stylist-page">
|
<div class="stylist-page">
|
||||||
<!-- 主要内容区域 -->
|
<!-- 主要内容区域 -->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -50,7 +49,6 @@
|
|||||||
<Video ref="videoRef" />
|
<Video ref="videoRef" />
|
||||||
</van-dialog>
|
</van-dialog>
|
||||||
</div>
|
</div>
|
||||||
<footer-navigation />
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -125,7 +123,7 @@ const handleContinue = () => {
|
|||||||
stylists.value.find((item) => item.id === currentChoosed.value)?.value || ''
|
stylists.value.find((item) => item.id === currentChoosed.value)?.value || ''
|
||||||
userInfoStore.setGenerateParams(generateParams)
|
userInfoStore.setGenerateParams(generateParams)
|
||||||
|
|
||||||
router.push('/stylist/sex')
|
router.push('/workshop/stylist/sex')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听showVideo变化,关闭时暂停视频
|
// 监听showVideo变化,关闭时暂停视频
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<header-title style-type="3" />
|
|
||||||
<div class="sex-select">
|
<div class="sex-select">
|
||||||
<div class="text">Before we begin.</div>
|
<div class="text">Before we begin.</div>
|
||||||
<div class="desc">Who are you styling?</div>
|
<div class="desc">Who are you styling?</div>
|
||||||
@@ -15,7 +14,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<footer-navigation />
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import HeaderTitle from '@/components/HeaderTitle.vue'
|
import HeaderTitle from '@/components/HeaderTitle.vue'
|
||||||
@@ -42,7 +40,7 @@ const handleSelect = (value: string) => {
|
|||||||
const generateParams = userInfoStore.getGenerateParams()
|
const generateParams = userInfoStore.getGenerateParams()
|
||||||
generateParams.sex = value
|
generateParams.sex = value
|
||||||
userInfoStore.setGenerateParams(generateParams)
|
userInfoStore.setGenerateParams(generateParams)
|
||||||
router.push('/stylist/dressfor')
|
router.push('/workshop/stylist/dressfor')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user