refactor: 调整页面路由和导航配置
移除关于页面的相关路由配置,更新页面跳转路径 修正组件文档说明,更新登录排除路径示例
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -49,7 +49,7 @@ function gotoScroll() {
|
||||
|
||||
function gotoAlova() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/about/alova',
|
||||
url: '/pages-sub/about/alova',
|
||||
})
|
||||
}
|
||||
function gotoSubPage() {
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user