Commit 2016c1ff by wulei@ldy.com

fix md title style

1 parent 76fce8a3
Showing with 8 additions and 8 deletions
#后台管理系统 # 后台管理系统
基于dcat-admin、与laravel-wechat的后台管理系统,可以快速开发搭建小程序及其后管平台 基于dcat-admin、与laravel-wechat的后台管理系统,可以快速开发搭建小程序及其后管平台
###环境与包 ### 环境与包
php7.4 php7.4
mysql5.7 mysql5.7
dcat-admin: ^2.0 dcat-admin: ^2.0
...@@ -10,7 +10,7 @@ laravel-wechat: ^6.0 ...@@ -10,7 +10,7 @@ laravel-wechat: ^6.0
jwt-auth: ^1.0 jwt-auth: ^1.0
telescope: ^4.0 telescope: ^4.0
###主要集成项及能力 ### 主要集成项及能力
####dcat-admin ####dcat-admin
[dcat-admin](https://learnku.com/docs/dcat-admin/2.x)是一个只需很少的代码即可快速构建出一个功能完善的高颜值后台系统. [dcat-admin](https://learnku.com/docs/dcat-admin/2.x)是一个只需很少的代码即可快速构建出一个功能完善的高颜值后台系统.
...@@ -28,7 +28,7 @@ $router->resource('users', 'UserController'); ...@@ -28,7 +28,7 @@ $router->resource('users', 'UserController');
``` ```
更多信息可以参考[dcat-admin中文文档](https://learnku.com/docs/dcat-admin/2.x/quick-start/8082) 更多信息可以参考[dcat-admin中文文档](https://learnku.com/docs/dcat-admin/2.x/quick-start/8082)
####laravel-wechat #### laravel-wechat
laravel-wechat是基于[EasyWeChat](https://easywechat.com/5.x/)的laravel框架SDK. laravel-wechat是基于[EasyWeChat](https://easywechat.com/5.x/)的laravel框架SDK.
该SDK封装了各类微信生态开放API,极大程度上简化了微信相关业务的开发工作。 该SDK封装了各类微信生态开放API,极大程度上简化了微信相关业务的开发工作。
在配置文件`config/wechat.php`中增加相关配置 在配置文件`config/wechat.php`中增加相关配置
...@@ -70,7 +70,7 @@ Facade::officialAccount('foo'); // `foo` 为配置文件中的名称,默认为 ...@@ -70,7 +70,7 @@ Facade::officialAccount('foo'); // `foo` 为配置文件中的名称,默认为
``` ```
更新信息参考[laravel-wechat](https://github.com/overtrue/laravel-wechat/tree/6.x) 更新信息参考[laravel-wechat](https://github.com/overtrue/laravel-wechat/tree/6.x)
###jwt ### jwt
集成`jwt-auth`实现了`api`的权限校验。可以直接使用中间件`auth`或者`auth:api`对api进行鉴权。 集成`jwt-auth`实现了`api`的权限校验。可以直接使用中间件`auth`或者`auth:api`对api进行鉴权。
```php ```php
...@@ -104,13 +104,13 @@ $router->group([ ...@@ -104,13 +104,13 @@ $router->group([
$router->post('logout', [AuthController::class, 'logout'])->name('logout'); $router->post('logout', [AuthController::class, 'logout'])->name('logout');
}); });
``` ```
####telescope调试工具 #### telescope调试工具
[Laravel Telescope](https://learnku.com/docs/laravel/10.x/telescopemd/14917#introduction) 是 Laravel 本地开发环境的绝佳伴侣。Telescope 可以方便查看应用程序的请求、异常、日志条目、数据库查询、排队的作业、邮件、消息通知、缓存操作、定时计划任务、变量打印等。 [Laravel Telescope](https://learnku.com/docs/laravel/10.x/telescopemd/14917#introduction) 是 Laravel 本地开发环境的绝佳伴侣。Telescope 可以方便查看应用程序的请求、异常、日志条目、数据库查询、排队的作业、邮件、消息通知、缓存操作、定时计划任务、变量打印等。
![telescope](https://laravel.com/img/docs/telescope-example.png) ![telescope](https://laravel.com/img/docs/telescope-example.png)
目前已集成在`dcat-admin`中,在管理后台顶部可以找到入口。 目前已集成在`dcat-admin`中,在管理后台顶部可以找到入口。
生产环境可以考虑隐藏或者不安装。 生产环境可以考虑隐藏或者不安装。
####Api标准化输出 #### Api标准化输出
增加了针对`Api`接口的标准化输出,默认对整个`api`启用。将所有的可`json`序列化的数据统一转化为标准化输出. 增加了针对`Api`接口的标准化输出,默认对整个`api`启用。将所有的可`json`序列化的数据统一转化为标准化输出.
编写`api`代码时无需关注返回结构,只需要返回对应的数据(即`data`节点)即可 编写`api`代码时无需关注返回结构,只需要返回对应的数据(即`data`节点)即可
```php ```php
...@@ -155,7 +155,7 @@ $router->any('test', function() { ...@@ -155,7 +155,7 @@ $router->any('test', function() {
"data": null "data": null
} }
``` ```
####异常处理 #### 异常处理
对整个`api`的异常进行了统一的捕获和格式化输出,如上文的未授权访问输出。 对整个`api`的异常进行了统一的捕获和格式化输出,如上文的未授权访问输出。
其中系统异常在`app\Exceptions\Handler.php`统一捕获,将系统异常转换为标准化输出。错误码主要使用`HTTP code`,未捕获的统一使用`500`. 其中系统异常在`app\Exceptions\Handler.php`统一捕获,将系统异常转换为标准化输出。错误码主要使用`HTTP code`,未捕获的统一使用`500`.
```php ```php
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!