Browse Source

docs: 修改文档说明

pull/89/head
王军 3 years ago
parent
commit
ef3ed039f0
  1. 7
      docs/content/index.md
  2. 12
      docs/content/user-guide/zh/extension/统一返回值格式.md
  3. 15
      docs/content/user-guide/zh/getting-started/introduction.md
  4. 28
      docs/content/user-guide/zh/getting-started/quick-start.md

7
docs/content/index.md

@ -1,19 +1,19 @@
Title: Abp Vnext Pro
# Abp Vnext Pro
<img width="140" align="right" src="/img/logo.svg">
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/WangJunZzz/abp-vnext-pro/blob/main/LICENSE)
## 介绍
- 完全免费开源
- ABP vNext 的前身是 asp.net boilerplate(老版 abp),它不是一个简单的版本更新,而是完全基于.NET Core 的重写。
- ABP vNext 社区版的 UI 不使用于实际项目开发。为此,结合 Vben Admin 打造开箱即用的 ABP vNext Pro。
## 演示
- [演示地址](http://abp.cncore.club/)
- [演示地址](http://116.205.177.85/login)
## 系统功能
@ -32,7 +32,6 @@ Title: Abp Vnext Pro
- [x] 多租户
- [x] 文件管理
![](https://blog-resouce.oss-cn-shenzhen.aliyuncs.com/images/abp/4.4/4.4login.png)
![](https://blog-resouce.oss-cn-shenzhen.aliyuncs.com/images/abp/01.png)
![](https://blog-resouce.oss-cn-shenzhen.aliyuncs.com/images/abp/02.png)

12
docs/content/user-guide/zh/extension/统一返回值格式.md

@ -51,10 +51,10 @@ public class WrapResult<T>
## 实现思路
- 定义 DontWrapResultAttribute
- 定义 WrapResultAttribute
```csharp
public class DontWrapResultAttribute : Attribute
public class WrapResultAttribute : Attribute
{
}
```
@ -76,12 +76,12 @@ public sealed class ResultExceptionFilter : IAsyncExceptionFilter, ITransientDep
private bool ShouldHandleException(ExceptionContext context)
{
if (context.ActionDescriptor.AsControllerActionDescriptor().ControllerTypeInfo.GetCustomAttributes(typeof(DontWrapResultAttribute), true).Any())
if (context.ActionDescriptor.AsControllerActionDescriptor().ControllerTypeInfo.GetCustomAttributes(typeof(WrapResultAttribute), true).Any())
{
return true;
}
if (context.ActionDescriptor.GetMethodInfo().GetCustomAttributes(typeof(DontWrapResultAttribute), true).Any())
if (context.ActionDescriptor.GetMethodInfo().GetCustomAttributes(typeof(WrapResultAttribute), true).Any())
{
return true;
}
@ -174,12 +174,12 @@ public sealed class ResultExceptionFilter : IAsyncExceptionFilter, ITransientDep
## 使用
- 在 Controller 上或者 Action 上打上 DontWrapResultAttribute 特性
- 在 Controller 上或者 Action 上打上 WrapResultAttribute 特性
- 例如
```csharp
[Route("Permissions")]
[DontWrapResult]
[WrapResult]
public class PermissionController : AbpProController,IRolePermissionAppService
{
private readonly IRolePermissionAppService _rolePermissionAppService;

15
docs/content/user-guide/zh/getting-started/introduction.md

@ -3,11 +3,14 @@
Lion.AbpPro 是 Abp Vnext 的 Vue3 版本实现,同时也是免费开源。它有助于提高开发效率,属于开箱即用的后台管理系统,也能适用微服务。
## 后端项目结构
```bash
├── Directory.Build.props nuget 版本控制
├── frameworks # 公共模块
│ ├── CAP # dotnetcore.cap
│ └── Extensions # 自定义扩展
│ ├── src #
│ ├── Lion.AbpPro.CAP # dotnetcore.cap
│ ├── Lion.AbpPro.Core # 核心扩展
│ └── Lion.AbpPro.Localization # 本地化
├── gateways # 网关
│ └── Lion.AbpPro.WebGateway # 基于ocelot网关
├── modules # 模块
@ -27,6 +30,7 @@ Lion.AbpPro 是Abp Vnext 的Vue3版本实现,同时也是免费开源。它有
```
## 前端项目结构
```bash
├── _nginx # docker 打包
├── build # 打包脚本相关
@ -82,10 +86,7 @@ Lion.AbpPro 是Abp Vnext 的Vue3版本实现,同时也是免费开源。它有
├── vite.config.ts # vite配置文件
└── windi.config.ts # windcss配置文件
```
## 相关视频
待完善
## 相关文章
## 相关视频
待完善
[B 站](https://www.bilibili.com/video/BV1pt4y1E7aZ/?spm_id_from=333.337.search-card.all.click&vd_source=963e10b4fc37556dd738bd98e1d46a0f)

28
docs/content/user-guide/zh/getting-started/quick-start.md

@ -1,6 +1,7 @@
# 快速开始
## 先决条件
- [dotnet core 6.0.202](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
- [nodejs 16+](https://nodejs.org/zh-cn/)
- [pnpm](https://www.pnpm.cn/installation)
@ -8,23 +9,28 @@
- [redis](https://redis.io/docs/getting-started/installation/)
- [rabbitmq 可选](https://www.rabbitmq.com/download.html)
## Docker 启动 MySql
```bash
docker run --name mymysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=1q2w3E* -d mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
```
## Docker 启动 Redis
```bash
docker run --name myredis -p 6379:6379 -d redis:latest redis-server
```
## Docker 启动 RabbitMq
```bash
docker run -d --name myrabbitmq -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672 -p 5672:5672 rabbitmq:management
```
## 创建新项目
## 创建新项目
### 安装 Cli 工具
- [仓库地址](https://github.com/WangJunZzz/Lion.AbpPro.Cli)
```bash
@ -34,25 +40,27 @@ dotnet tool install Lion.AbpPro.Cli -g
### 生成项目
**提供了三个模板生成**
- 生成源码版本
```bash
lion.abp new abp-vnext-pro -c 公司名称 -p 项目名称 -o 输出路径(可选) -v 版本号(可选)
lion.abp new abp-vnext-pro -c 公司名称 -p 项目名称 -v 版本号(默认LastRelease)
```
- nuget 包形式的基础版本,包括 abp 自带的所有模块,已经 pro 的通知模块,数据字典模块 以及 ocelot 网关
```bash
lion.abp new abp-vnext-pro-basic -c 公司名称 -p 项目名称 -v 版本(默认LastRelease) -o 项目输出路径(可选).
lion.abp new abp-vnext-pro-basic -c 公司名称 -p 项目名称 -v 版本(默认LastRelease)
```
- nuget 包形式的基础版本,包括 abp 自带的所有模块,已经 pro 的通知模块,数据字典模块 无 ocelot 网关
```bash
lion.abp new abp-vnext-pro-basic-no-ocelot -c 公司名称 -p 项目名称 -v 版本(默认LastRelease) -o 项目输出路径(可选).
lion.abp new abp-vnext-pro-basic-no-ocelot -c 公司名称 -p 项目名称 -v 版本(默认LastRelease)
```
### 后端
- 修改 HttpApi.Host-> appsettings.json 配置
- Mysql 连接字符串
- Redis 连接字符串
@ -67,25 +75,21 @@ lion.abp new abp-vnext-pro-basic-no-ocelot -c 公司名称 -p 项目名称 -v
初始的种子数据在数据库中创建了 admin 用户(密码为1q2w3E*) 用于登录应用程序. 所以, 对于新数据库至少使用 .DbMigrator 一次.
!!! note Ocelot 网关
如果不需要使用Ocelot网关可以移除Lion.AbpPro.WebGateway项目,前端接口地址直接修改为Lion.AbpPro.HttpApi.Host的接口地址。
- 多项目启动(HttpApi.Host,IdentityServer,WebGateway),就能看到后台服务登陆页面,如下:
![](../../../img/login.png)
## 前端
- [Vben Admin 文档](https://vvbin.cn/doc-next/)
### 安装 npm 包
```bash
pnmp install
pnpm install
```
### 启动项目

Loading…
Cancel
Save