refactor: 调整页面路由和导航配置

移除关于页面的相关路由配置,更新页面跳转路径
修正组件文档说明,更新登录排除路径示例
This commit is contained in:
feige996
2025-10-02 10:25:47 +08:00
parent a9530c4248
commit 61fc140e76
4 changed files with 4 additions and 36 deletions

View File

@@ -159,10 +159,6 @@ const pages = {
text: '首页',
pagePath: 'pages/index/index',
},
{
text: '关于',
pagePath: 'pages/about/about',
},
{
text: '我的',
pagePath: 'pages/me/me',
@@ -178,35 +174,6 @@ const pages = {
navigationBarTitleText: '首页',
},
},
{
path: 'pages/about/about',
type: 'page',
style: {
navigationBarTitleText: '关于',
},
excludeLoginPath: false,
},
{
path: 'pages/about/alova',
type: 'page',
style: {
navigationBarTitleText: 'Alova 演示',
},
},
{
path: 'pages/login/login',
type: 'page',
style: {
navigationBarTitleText: '登录',
},
},
{
path: 'pages/login/register',
type: 'page',
style: {
navigationBarTitleText: '注册',
},
},
{
path: 'pages/me/me',
type: 'page',

View File

@@ -49,7 +49,7 @@ function gotoScroll() {
function gotoAlova() {
uni.navigateTo({
url: '/pages/about/alova',
url: '/pages-sub/about/alova',
})
}
function gotoSubPage() {

View File

@@ -37,7 +37,7 @@ function reset() {
pages 里面的 vue 文件会扫描成页面将自动添加到 pages.json 里面
</view>
<view class="my-2 text-green-400">
但是 pages/components 里面的 vue 不会
但是 components 里面的 vue 不会
</view>
<view class="my-4 text-center">

View File

@@ -20,7 +20,8 @@ export const excludeLoginPathList = getAllPages('excludeLoginPath').map(page =>
// 排除在外的列表,白名单策略指白名单列表,黑名单策略指黑名单列表
// TODO: 2/3 在 definePage 配置 excludeLoginPath或者在下面配置 EXCLUDE_LOGIN_PATH_LIST
export const EXCLUDE_LOGIN_PATH_LIST = [
'/pages/xxx/index',
'/pages/xxx/index', // 示例值
'/pages-sub/xxx/index', // 示例值
...excludeLoginPathList, // 都是以 / 开头的 path
]