docs: 更新文档

This commit is contained in:
wintel
2025-04-08 21:33:38 +08:00
parent f765b3ff7e
commit d5f1f007f0
3 changed files with 23 additions and 15 deletions

View File

@@ -1,3 +1,7 @@
::: warning 注意事项
如何你使用的是vue2版本请参考[OpenAuth.Pro Vue2版本](/vue2/)
:::
OpenAuth.Pro Vue3版本基于vue3 + element-plus。它使用开源版OpenAuth.Net的API接口OpenAuth.WebApi提供数据服务。二者的关系如下
![系统架构](http://img.openauth.net.cn/系统架构.png)
@@ -29,12 +33,15 @@ vue3版源代码获取方式[http://old.openauth.net.cn/question/detail.html?
下载最新版的vs code或Cursor、Windsurf、Trae等工具用来作为OpenAuth.Pro Vue3版的开发工具。
## 源码下载
根据授权文件的下载指示下载Vue3源码。注意一定要使用下图中的数据库脚本
![2025-04-08-20-53-49](http://img.openauth.net.cn/2025-04-08-20-53-49.png)
## 创建数据库
* 新建一个空数据库OpenAuthPro。前端源码文件夹【sql脚本】中运行`Sql Server脚本.sql`或mysql脚本
![2025-04-08-20-53-49](http://img.openauth.net.cn/2025-04-08-20-53-49.png)
* 新建一个空数据库OpenAuthPro。使用上一步下载的【sql脚本】文件夹根据你的数据库类型选择运行你需要的脚本`Sql Server脚本.sql``mysql脚本.sql`
## 启动后端

View File

@@ -2,24 +2,21 @@
后端接口部署请参考:[部署API](/core/deployapi.html),前端打包流程如下:
使用`npm run build`进行打包构建
![20211214232752](http://img.openauth.net.cn/20211214232752.png)
::: warning 注意事项
前端部署时使用的配置文件为`.env.prod`,打包构建前请调整为自己的接口地址:
首先修改配置文件`.env.production`,打包构建前请调整为自己的接口地址
```javascript
VUE_APP_BASE_API = http://demo.openauth.net.cn:52789/api
VITE_BASE_API = http://demo.openauth.net.cn:52789/api
VUE_APP_BASE_IMG_URL = demo.openauth.net.cn:52789
VITE_BASE_IMG_URL = demo.openauth.net.cn:52789
```
:::
然后使用`npm run build`进行打包构建:
![2025-04-08-21-29-00](http://img.openauth.net.cn/2025-04-08-21-29-00.png)
构建完成后会生成dist文件夹。如下
![20211214232928](http://img.openauth.net.cn/20211214232928.png)
![2025-04-08-21-31-00](http://img.openauth.net.cn/2025-04-08-21-31-00.png)
该文件夹为纯静态的页面可以使用任何自己喜欢的Web服务器进行部署如IIS/tomcat/nginx等。个人推荐使用nginx部署。
@@ -30,9 +27,9 @@ nginx.conf推荐配置如下
```javascript
server {
listen 1803;
#server_name pro.openauth.me;
#server_name pro.openauth.net.cn;
location / {
alias /openauth.pro/Client/dist/;
alias /openauthvue3/dist/;
expires 1d;
}

View File

@@ -1,3 +1,7 @@
::: warning 注意事项
如何你使用的是vue3版本请参考[OpenAuth.Pro Vue3版本](/pro/)
:::
OpenAuth.Pro Vue2版本基于vue2 + element-ui。它使用开源版OpenAuth.Net的API接口OpenAuth.WebApi提供数据服务。二者的关系如下
![系统架构](http://img.openauth.net.cn/系统架构.png)