合并代码

This commit is contained in:
szz
2025-07-31 13:54:37 +08:00
parent 97a53c200e
commit 7d94b0ddae
21 changed files with 479 additions and 688 deletions

View File

@@ -11,6 +11,75 @@ const routes = [
title: '首页'
}
},
{
path: '/mylogin',
name: 'MyLogin',
component: () => import('@/views/MyLogin.vue'),
meta: {
title: '登录',
hideForAuth: true
}
},
{
path: '/mainpage',
name: 'MainPage',
component: () => import('@/views/MainPage.vue'),
meta: {
title: '主页'
}
},
{
path: '/mymatching',
name: 'MyMatching',
component: () => import('@/views/MyMatching.vue'),
meta: {
title: '资金匹配',
requiresAuth: true
}
},
{
path: '/myshop',
name: 'MyShop',
component: () => import('@/views/MyShop.vue'),
meta: {
title: '积分商城'
}
},
{
path: '/myprofile',
name: 'MyProfile',
component: () => import('@/views/MyProfile.vue'),
meta: {
title: '个人中心'
}
},
{
path: '/mypoints-history',
name: 'MyPointsHistory',
component: () => import('@/views/MyPointsHistory.vue'),
meta: {
title: '积分记录',
requiresAuth: true
}
},
{
path: '/editdetailspage',
name: 'EditDetailsPage',
component: () => import('@/views/EditDetailsPage.vue'),
meta: {
title: '编辑信息',
requiresAuth: true
}
},
{
path: '/editpasswordpage',
name: 'EditPasswordPage',
component: () => import('@/views/EditPasswordPage.vue'),
meta: {
title: '编辑密码',
requiresAuth: true
}
},
{
path: '/home',
name: 'HomePage',
@@ -108,6 +177,22 @@ const routes = [
requiresAuth: true
}
},
{
path: '/agent/login',
name: 'AgentLogin',
component: () => import('@/views/AgentLogin.vue'),
meta: {
title: '代理登录'
}
},
{
path: '/agent/dashboard',
name: 'AgentDashboard',
component: () => import('@/views/AgentDashboard.vue'),
meta: {
title: '代理后台'
}
},
{
path: '/about',
name: 'About',
@@ -146,7 +231,7 @@ router.beforeEach(async (to, from, next) => {
// 设置页面标题
if (to.meta.title) {
document.title = `${to.meta.title} - 易融宝`
document.title = `${to.meta.title} - 炬融圈`
}
// 检查是否需要认证
@@ -157,7 +242,7 @@ router.beforeEach(async (to, from, next) => {
if (!userStore.isAuthenticated) {
next({
name: 'Login',
name: 'MyLogin',
query: { redirect: to.fullPath }
})
return
@@ -165,9 +250,9 @@ router.beforeEach(async (to, from, next) => {
}
}
// 如果已登录用户访问登录/注册页面,重定向到转账管理
// 如果已登录用户访问登录/注册页面,重定向到转账管理(改成了主页)
if (to.meta.hideForAuth && userStore.isAuthenticated) {
next({ name: 'Transfers' })
next({ name: 'MainPage' })
return
}