Skip to content

Commit

Permalink
[*] 添加两个路由
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Sep 27, 2024
1 parent 1c10761 commit 938b56c
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 46 deletions.
130 changes: 84 additions & 46 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,43 +40,48 @@ const routes = [
component: () => import('@views/SignView.vue')
},
{
path: '/auth/login',
name: 'Login',
meta: {
title: '登录',
keepAlive: true,
autoRedirectLogined: true,
sidebar: {
guest: true
}
},
component: () => import('@views/auth/LoginView.vue')
},
{
path: '/auth/register',
name: 'Register',
meta: {
title: '注册',
keepAlive: true,
autoRedirectLogined: true,
sidebar: {
guest: true
}
},
component: () => import('@views/auth/RegisterView.vue')
},
{
path: '/auth/resetPassword',
name: 'ResetPassword',
meta: {
title: '重置密码',
keepAlive: true,
autoRedirectLogined: true,
sidebar: {
guest: true
}
},
component: () => import('@views/auth/ResetPasswordView.vue')
path: '/auth',
children: [
{
path: 'login',
name: 'Login',
meta: {
title: '登录',
keepAlive: true,
autoRedirectLogined: true,
sidebar: {
guest: true
}
},
component: () => import('@views/auth/LoginView.vue')
},
{
path: 'register',
name: 'Register',
meta: {
title: '注册',
keepAlive: true,
autoRedirectLogined: true,
sidebar: {
guest: true
}
},
component: () => import('@views/auth/RegisterView.vue')
},
{
path: 'resetPassword',
name: 'ResetPassword',
meta: {
title: '重置密码',
keepAlive: true,
autoRedirectLogined: true,
sidebar: {
guest: true
}
},
component: () => import('@views/auth/ResetPasswordView.vue')
},
]
},
{
path: '/proxies',
Expand Down Expand Up @@ -164,14 +169,19 @@ const routes = [
component: () => import('@views/IcpCheckView.vue')
},
{
path: '/other/software',
name: 'Software',
meta: {
title: '软件下载',
keepAlive: true,
needLogin: true
},
component: () => import('@views/other/SoftwareView.vue')
path: '/other',
children: [
{
path: 'software',
name: 'Software',
meta: {
title: '软件下载',
keepAlive: true,
needLogin: true
},
component: () => import('@views/other/SoftwareView.vue')
}
]
},
{
path: '/callback',
Expand All @@ -183,12 +193,40 @@ const routes = [
path: 'login',
name: 'LoginAuthCallback',
meta: {
title: '回调页面',
title: 'QQ 登录回调页面',
needLogin: false
},
component: () => import('@views/callback/auth/LoginView.vue')
}
]
},
{
path: 'verification',
children: [
{
path: 'realperson',
children: [
{
path: 'pay',
name: 'PayRealPersonVerificationCallback',
meta: {
title: '实人认证支付回调页面',
needLogin: false
},
component: () => import('@views/callback/verification/realperson/PayView.vue')
},
{
path: 'done',
name: 'DoneRealPersonVerificationCallback',
meta: {
title: '实人认证成功回调页面',
needLogin: false
},
component: () => import('@views/callback/verification/realperson/DoneView.vue')
}
]
}
]
}
]
},
Expand Down
30 changes: 30 additions & 0 deletions src/views/callback/verification/realperson/DoneView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<div class="flex-center outbox" v-if="!error">
<!-- <n-spin description="正在进行第三方登录处理"></n-spin> -->
</div>
<div class="flex-center outbox" v-else>
<!-- <n-h2>发生错误</n-h2>
<p>{{ error_message }}</p>
<n-button style="margin-top: 10px" @click="() => router.push('/auth/login')">
返回登录
</n-button> -->
</div>
</template>

<script setup>
let error = ref(false)
let error_message = ref('')
</script>

<style scoped>
.outbox {
margin: 3rem;
margin-block: 40vh;
}
.flex-center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>
30 changes: 30 additions & 0 deletions src/views/callback/verification/realperson/PayView.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<div class="flex-center outbox" v-if="!error">
<!-- <n-spin description="正在进行第三方登录处理"></n-spin> -->
</div>
<div class="flex-center outbox" v-else>
<!-- <n-h2>发生错误</n-h2>
<p>{{ error_message }}</p>
<n-button style="margin-top: 10px" @click="() => router.push('/auth/login')">
返回登录
</n-button> -->
</div>
</template>

<script setup>
let error = ref(false)
let error_message = ref('')
</script>

<style scoped>
.outbox {
margin: 3rem;
margin-block: 40vh;
}
.flex-center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>

0 comments on commit 938b56c

Please sign in to comment.