Explorar o código

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

移除关于页面的相关路由配置,更新页面跳转路径
修正组件文档说明,更新登录排除路径示例
feige996 hai 7 meses
pai
achega
61fc140e76

+ 0 - 33
scripts/create-base-files.js

@@ -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',

+ 1 - 1
src/pages-sub/about/about.vue

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

+ 1 - 1
src/pages-sub/about/components/request.vue

@@ -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">

+ 2 - 1
src/router/config.ts

@@ -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
 ]