docs: 更新文档

This commit is contained in:
wintel
2025-04-08 21:03:59 +08:00
parent db00b3feae
commit aabd5c04e1
2 changed files with 23 additions and 64 deletions

View File

@@ -1,14 +1,10 @@
OpenAuth.Pro是一套全新的前端界面基于vue2 + element-ui /vue3 + element-plus采用VUE全家桶VUE+VUEX+VUE-ROUTER单页面SPA开发。它使用开源版OpenAuth.Net的API接口OpenAuth.WebApi提供数据服务。二者的关系如下
OpenAuth.Pro Vue3版本基于vue3 + element-plus。它使用开源版OpenAuth.Net的API接口OpenAuth.WebApi提供数据服务。二者的关系如下
![系统架构](http://img.openauth.net.cn/系统架构.png)
企业版代码获取方式:[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)
vue3版源代码获取方式:[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)
Vue2演示地址: [http://demo.openauth.net.cn:1803/](http://demo.openauth.net.cn:1803/)
Vue3演示地址 [http://demo.openauth.net.cn:1805/](http://demo.openauth.net.cn:1805/)
移动H5版本演示请使用浏览器移动模式或直接用手机打开[http://demo.openauth.net.cn:1804/](http://demo.openauth.net.cn:1804/)
演示地址: [http://demo.openauth.net.cn:1805/](http://demo.openauth.net.cn:1805/)
## OpenAuth.Net系列教学视频
@@ -27,24 +23,18 @@ Vue3演示地址 [http://demo.openauth.net.cn:1805/](http://demo.openauth.net
#### NodeJs
前端环境为NodeJs下载地址[http://nodejs.cn/download/current/](http://nodejs.cn/download/current/)。其中:
OpenAuth.Pro v4.6.4及以后的版本使用Node 18
OpenAuth.Pro v4.6.3-v4.3 使用Node 16
OpenAuth.Pro v4.3及以前的版本使用Node 14
前端环境为NodeJs下载地址[http://nodejs.cn/download/current/](http://nodejs.cn/download/current/)
#### visual studio code
下载最新版的vs code用来作为OpenAuth.Pro的开发工具。
下载最新版的vs code或Cursor、Windsurf、Trae等工具用来作为OpenAuth.Pro Vue3版的开发工具。
## 创建数据库
* 如果只使用开源的OpenAuth.Mvc。则新建一个空数据库OpenAuthDB。然后在OpenAuth.Net项目文件夹【sql server 初始化脚本】中,运行`Sql Server脚本.sql`或mysql初始化脚本)
* 新建一个空数据库OpenAuthPro。前端源码文件夹【sql脚本】中,运行`Sql Server脚本.sql`或mysql脚本
* 如果只使用企业版的OpenAuth.WebApi,则新建一个空数据库OpenAuthPro。使用OpenAuth.Pro前端源码文件夹【sql脚本】中运行`Sql Server脚本.sql`或mysql脚本
![2025-04-08-20-53-49](http://img.openauth.net.cn/2025-04-08-20-53-49.png)
## 启动后端
@@ -52,43 +42,24 @@ OpenAuth.Pro v4.3及以前的版本使用Node 14
## 启动前端
使用Vs Code或个人喜欢的工具打开OpenAuth.Pro/Client文件夹如下图
![20211214232057](http://img.openauth.net.cn/20211214232057.png)
安装程序运行所需的第三方包。使用npm install 命令经行安装,如下图:
![20211214232207](http://img.openauth.net.cn/20211214232207.png)
::: warning 注意事项
4.6.4及以后的版本默认Node 18进行编译如果使用的是Node 18以前的版本请尝试把package.json中scripts改为下面内容
使用Vs Code或个人喜欢的工具打开openauthvue3文件夹修改配置文件`.env.dev`对应的后端接口地址,调整为自己的接口地址
```javascript
"scripts": {
"serve": "vue-cli-service serve --mode dev",
"dev": "vue-cli-service serve --mode dev",
"build": "vue-cli-service build --mode prod",
"lint": "vue-cli-service lint"
},
```
:::
修改配置文件`.env.dev`对应的后端接口地址,调整为自己的接口地址:
```javascript
VUE_APP_BASE_API = http://localhost:52789/api
VUE_APP_BASE_IMG_URL = http://localhost:52789
VITE_BASE_API = http://localhost:52789/api
VITE_BASE_IMG_URL = http://localhost:52789
```
::: warning 注意事项
如果是发布打包,调整的文件为`.env.prod`
如果是发布打包,调整的文件为`.env.production`
:::
使用npm run dev 命令运行。如下图:
![20211214232229](http://img.openauth.net.cn/20211214232229.png)
使用`npm install`命令安装程序运行所需的第三方包。再用`npm run dev`命令运行。如下图:
启动成功后,使用浏览器访问[http://localhost:1803/](http://localhost:1803/) 即可打开企业版界面
![2025-04-08-20-57-34](http://img.openauth.net.cn/2025-04-08-20-57-34.png)
启动成功后,使用浏览器访问[http://localhost:1803/](http://localhost:1803/) 即可打开vue3版界面
![2025-04-08-21-03-19](http://img.openauth.net.cn/2025-04-08-21-03-19.png)

View File

@@ -1,14 +1,10 @@
OpenAuth.Pro是一套全新的前端界面,基于vue2 + element-ui /vue3 + element-plus采用VUE全家桶VUE+VUEX+VUE-ROUTER单页面SPA开发。它使用开源版OpenAuth.Net的API接口OpenAuth.WebApi提供数据服务。二者的关系如下
OpenAuth.Pro Vue2版本基于vue2 + element-ui。它使用开源版OpenAuth.Net的API接口OpenAuth.WebApi提供数据服务。二者的关系如下
![系统架构](http://img.openauth.net.cn/系统架构.png)
企业版代码获取方式:[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)
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)
Vue2演示地址: [http://demo.openauth.net.cn:1803/](http://demo.openauth.net.cn:1803/)
Vue3演示地址 [http://demo.openauth.net.cn:1805/](http://demo.openauth.net.cn:1805/)
移动H5版本演示请使用浏览器移动模式或直接用手机打开[http://demo.openauth.net.cn:1804/](http://demo.openauth.net.cn:1804/)
演示地址: [http://demo.openauth.net.cn:1805/](http://demo.openauth.net.cn:1805/)
## OpenAuth.Net系列教学视频
@@ -27,24 +23,16 @@ Vue3演示地址 [http://demo.openauth.net.cn:1805/](http://demo.openauth.net
#### NodeJs
前端环境为NodeJs下载地址[http://nodejs.cn/download/current/](http://nodejs.cn/download/current/)。其中:
OpenAuth.Pro v4.6.4及以后的版本使用Node 18
OpenAuth.Pro v4.6.3-v4.3 使用Node 16
OpenAuth.Pro v4.3及以前的版本使用Node 14
前端环境为NodeJs下载地址[http://nodejs.cn/download/current/](http://nodejs.cn/download/current/)
#### visual studio code
下载最新版的vs code用来作为OpenAuth.Pro的开发工具。
下载最新版的vs code或Cursor、Windsurf、Trae等工具用来作为OpenAuth.Pro的开发工具。
## 创建数据库
* 如果只使用开源的OpenAuth.Mvc。则新建一个空数据库OpenAuthDB。然后在OpenAuth.Net项目文件夹【sql server 初始化脚本】中,运行`Sql Server脚本.sql`或mysql初始化脚本)
* 如果只使用企业版的OpenAuth.WebApi,则新建一个空数据库OpenAuthPro。使用OpenAuth.Pro前端源码文件夹【sql脚本】中运行`Sql Server脚本.sql`或mysql脚本
* 使用下载的OpenAuth.Pro前端源码文件夹【sql脚本】中,运行`Sql Server脚本.sql`或mysql脚本
## 启动后端