From f765b3ff7e182481e0c8775ae91f3af7307b8a11 Mon Sep 17 00:00:00 2001 From: wintel Date: Tue, 8 Apr 2025 21:17:11 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pro/router.md | 56 ++++++++++++++++++++++++++++++++------------- docs/vue2/README.md | 4 ++-- 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/docs/pro/router.md b/docs/pro/router.md index 2589467b..c383e240 100644 --- a/docs/pro/router.md +++ b/docs/pro/router.md @@ -16,34 +16,58 @@ OpenAuth.Pro采用的是标准vue router来管理页面跳转,基础知识请 在有些场景下,不想通过系统的【模块管理】功能添加页面,如登录、注册、帮助中心、站点介绍等,可以在路由表中直接添加。 -打开`src\router\index.js`,在数组常量`constantRouterMap`中添加自己的路由信息: +打开`src\router\modules\home.js`添加自己的路由信息: ```javascript -{ - path: '/regster', - name: 'regster', - hidden: true, //是否在左侧导航栏隐藏 - meta: { - title: '仓储中心', - icon: 'guide', - sortNo: 0 + { + path: '/redirect', + component: Layout, + name: 'redirect', + hidden: true, //是否在左侧导航栏隐藏 + meta: { + title: '外部页面', + }, + children: [ + { + path: 'iframe', + hidden: true, + name: 'iframe', + component: IframeView, + meta: { + title: '外部页面', + id: 'iframe', + }, }, - component: () => import('@/views/regster/index') //路由对应的页面视图 -} + ], + }, ``` -因为注册页面没有登录的用户信息,会被系统的权限体系拦截从而跳转到登录页面。需要添加到白名单中。 -打开`src\permission.js`,在`whiteList`中加入刚刚的路由信息: +上面会添加一个带有layout的页面(即有顶部、左侧导航栏、面包屑等区域),如果不想使用layout,可以参考: +```javascript +{ + path: '/wmsinboundordertbls/detail/:id', + component: DetailWmsInboundOrderTbls, + name: 'wmsinboundordertbls', + hidden: true, + meta: { + notauth: true, + title: '入库单详情', + noCache: true, + icon: 'list', + } +} +``` +这种页面没有顶部、左侧导航栏、面包屑等区域,方便作为组件嵌入到其他页面中。 + +部分页面访问的时候,可能没有登录的用户信息,比如:用户注册页面等。会被系统的权限体系拦截从而跳转到登录页面。需要添加到白名单中。 +打开`src\permission.js`,在`whiteList`中加入刚刚的路由信息: ```javascript const whiteList = ['/regster', ...] // 不重定向白名单 ``` -添加完成后,启动站点,直接浏览器访问`http://localhost:1803/#/regster`即可: - - diff --git a/docs/vue2/README.md b/docs/vue2/README.md index 47803cc6..65c6baa6 100644 --- a/docs/vue2/README.md +++ b/docs/vue2/README.md @@ -4,7 +4,7 @@ OpenAuth.Pro Vue2版本基于vue2 + element-ui。它使用开源版OpenAuth.Net vue2版源代码获取方式:[http://old.openauth.net.cn/question/detail.html?id=a2be2d61-7fcb-4df8-8be2-9f296c22a89c](http://old.openauth.net.cn/question/detail.html?id=a2be2d61-7fcb-4df8-8be2-9f296c22a89c) -演示地址: [http://demo.openauth.net.cn:1805/](http://demo.openauth.net.cn:1805/) +演示地址: [http://demo.openauth.net.cn:1803/](http://demo.openauth.net.cn:1803/) ## OpenAuth.Net系列教学视频 @@ -27,7 +27,7 @@ vue2版源代码获取方式:[http://old.openauth.net.cn/question/detail.html? #### visual studio code -下载最新版的vs code,或Cursor、Windsurf、Trae等工具用来作为OpenAuth.Pro的开发工具。 +下载最新版的vs code,或Cursor、Windsurf、Trae等工具用来作为OpenAuth.Pro Vue2版的开发工具。 ## 创建数据库