mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 18:42:49 +08:00
需要重新整合框架
This commit is contained in:
@@ -61,7 +61,6 @@ class ExceptionHandle extends Handle
|
|||||||
public function render($request, Throwable $e): Response
|
public function render($request, Throwable $e): Response
|
||||||
{
|
{
|
||||||
// 添加自定义异常处理机制
|
// 添加自定义异常处理机制
|
||||||
|
|
||||||
// 其他错误交给系统处理
|
// 其他错误交给系统处理
|
||||||
return parent::render($request, $e);
|
return parent::render($request, $e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,13 +19,13 @@ class AdminLog
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$is_exit = $logged_admin_permission->where('app',$request->app())
|
$is_exit = $logged_admin_permission->where('app',app('http')->getName())
|
||||||
->where('controller',$request->controller())
|
->where('controller',$request->controller())
|
||||||
->where('action',$request->action());
|
->where('action',$request->action());
|
||||||
|
|
||||||
if(!$is_exit->isEmpty()){
|
if(!$is_exit->isEmpty()){
|
||||||
AppAdminLog::create([
|
AppAdminLog::create([
|
||||||
'app'=>$request->app(),
|
'app'=>app('http')->getName(),
|
||||||
'controller'=>$request->controller(),
|
'controller'=>$request->controller(),
|
||||||
'action'=>$request->action(),
|
'action'=>$request->action(),
|
||||||
'param'=>$request->param(),
|
'param'=>$request->param(),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class PermissionRecord
|
|||||||
{
|
{
|
||||||
|
|
||||||
$current_access_info = [
|
$current_access_info = [
|
||||||
'app'=>$request->app(),
|
'app'=>app('http')->getName(),
|
||||||
'controller'=>$request->controller(),
|
'controller'=>$request->controller(),
|
||||||
'action'=>$request->action()
|
'action'=>$request->action()
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
"topthink/think-view": "^1.0",
|
"topthink/think-view": "^1.0",
|
||||||
"topthink/think-migration": "^3.0",
|
"topthink/think-migration": "^3.0",
|
||||||
"topthink/think-helper": "^3.1",
|
"topthink/think-helper": "^3.1",
|
||||||
"topthink/think-captcha": "^3.0"
|
"topthink/think-captcha": "^3.0",
|
||||||
|
"topthink/think-multi-app": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/var-dumper": "^4.2"
|
"symfony/var-dumper": "^4.2"
|
||||||
|
|||||||
113
composer.lock
generated
113
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "0ce3c4389679ec95fb18c7578e5a0eca",
|
"content-hash": "f1eea88aa96466e1b83b1303306f9a13",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
@@ -436,12 +436,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/framework.git",
|
"url": "https://github.com/top-think/framework.git",
|
||||||
"reference": "3f851f5d2105ea43843363093c3c945f0bdc2e3c"
|
"reference": "768f12f01daa0bd96ef4ad8771d80fb6fec137c8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/framework/zipball/3f851f5d2105ea43843363093c3c945f0bdc2e3c",
|
"url": "https://api.github.com/repos/top-think/framework/zipball/768f12f01daa0bd96ef4ad8771d80fb6fec137c8",
|
||||||
"reference": "3f851f5d2105ea43843363093c3c945f0bdc2e3c",
|
"reference": "768f12f01daa0bd96ef4ad8771d80fb6fec137c8",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -496,20 +496,20 @@
|
|||||||
"orm",
|
"orm",
|
||||||
"thinkphp"
|
"thinkphp"
|
||||||
],
|
],
|
||||||
"time": "2019-09-16T03:49:50+00:00"
|
"time": "2019-10-08T14:53:51+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-captcha",
|
"name": "topthink/think-captcha",
|
||||||
"version": "v3.0.1",
|
"version": "v3.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-captcha.git",
|
"url": "https://github.com/top-think/think-captcha.git",
|
||||||
"reference": "9fc0c627d773f6a54a8dd142ebf358f746557a48"
|
"reference": "0b4305da19e118cefd934007875a8112f9352f01"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-captcha/zipball/9fc0c627d773f6a54a8dd142ebf358f746557a48",
|
"url": "https://api.github.com/repos/top-think/think-captcha/zipball/0b4305da19e118cefd934007875a8112f9352f01",
|
||||||
"reference": "9fc0c627d773f6a54a8dd142ebf358f746557a48",
|
"reference": "0b4305da19e118cefd934007875a8112f9352f01",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -526,7 +526,10 @@
|
|||||||
"think": {
|
"think": {
|
||||||
"services": [
|
"services": [
|
||||||
"think\\captcha\\CaptchaService"
|
"think\\captcha\\CaptchaService"
|
||||||
]
|
],
|
||||||
|
"config": {
|
||||||
|
"captcha": "src/config.php"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -548,20 +551,20 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "captcha package for thinkphp",
|
"description": "captcha package for thinkphp",
|
||||||
"time": "2019-06-06T07:16:01+00:00"
|
"time": "2019-10-03T07:45:11+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-helper",
|
"name": "topthink/think-helper",
|
||||||
"version": "v3.1.2",
|
"version": "v3.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-helper.git",
|
"url": "https://github.com/top-think/think-helper.git",
|
||||||
"reference": "a629c4271fdf3d7e7c6d89089791417cb4796a2c"
|
"reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-helper/zipball/a629c4271fdf3d7e7c6d89089791417cb4796a2c",
|
"url": "https://api.github.com/repos/top-think/think-helper/zipball/4d85dfd3778623bbb1de3648f1dcd0c82f4439f4",
|
||||||
"reference": "a629c4271fdf3d7e7c6d89089791417cb4796a2c",
|
"reference": "4d85dfd3778623bbb1de3648f1dcd0c82f4439f4",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -593,7 +596,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The ThinkPHP6 Helper Package",
|
"description": "The ThinkPHP6 Helper Package",
|
||||||
"time": "2019-07-11T04:35:03+00:00"
|
"time": "2019-09-30T02:36:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-migration",
|
"name": "topthink/think-migration",
|
||||||
@@ -651,18 +654,68 @@
|
|||||||
],
|
],
|
||||||
"time": "2019-06-17T10:13:39+00:00"
|
"time": "2019-06-17T10:13:39+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-multi-app",
|
||||||
|
"version": "v1.0.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-multi-app.git",
|
||||||
|
"reference": "27bb12fa049e8479a453c75087ef9ad1bda6d730"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-multi-app/zipball/27bb12fa049e8479a453c75087ef9ad1bda6d730",
|
||||||
|
"reference": "27bb12fa049e8479a453c75087ef9ad1bda6d730",
|
||||||
|
"shasum": "",
|
||||||
|
"mirrors": [
|
||||||
|
{
|
||||||
|
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||||
|
"preferred": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.0",
|
||||||
|
"topthink/framework": "^6.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"think": {
|
||||||
|
"services": [
|
||||||
|
"think\\app\\Service"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"think\\app\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "liu21st@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "thinkphp6 multi app support",
|
||||||
|
"time": "2019-10-08T02:20:35+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-orm",
|
"name": "topthink/think-orm",
|
||||||
"version": "2.0.x-dev",
|
"version": "2.0.x-dev",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-orm.git",
|
"url": "https://github.com/top-think/think-orm.git",
|
||||||
"reference": "759cc5848dbd3d5b9662040e135011198e882146"
|
"reference": "01f530a70a31b461557937ea75a7713862418b32"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/759cc5848dbd3d5b9662040e135011198e882146",
|
"url": "https://api.github.com/repos/top-think/think-orm/zipball/01f530a70a31b461557937ea75a7713862418b32",
|
||||||
"reference": "759cc5848dbd3d5b9662040e135011198e882146",
|
"reference": "01f530a70a31b461557937ea75a7713862418b32",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -700,7 +753,7 @@
|
|||||||
"database",
|
"database",
|
||||||
"orm"
|
"orm"
|
||||||
],
|
],
|
||||||
"time": "2019-09-16T01:27:31+00:00"
|
"time": "2019-09-27T12:49:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-template",
|
"name": "topthink/think-template",
|
||||||
@@ -747,16 +800,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/think-view",
|
"name": "topthink/think-view",
|
||||||
"version": "v1.0.11",
|
"version": "v1.0.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-view.git",
|
"url": "https://github.com/top-think/think-view.git",
|
||||||
"reference": "2110794aad592e007f2a8949c07ff50928028073"
|
"reference": "90803b73f781db5d42619082c4597afc58b2d4c5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-view/zipball/2110794aad592e007f2a8949c07ff50928028073",
|
"url": "https://api.github.com/repos/top-think/think-view/zipball/90803b73f781db5d42619082c4597afc58b2d4c5",
|
||||||
"reference": "2110794aad592e007f2a8949c07ff50928028073",
|
"reference": "90803b73f781db5d42619082c4597afc58b2d4c5",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -786,7 +839,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "thinkphp template driver",
|
"description": "thinkphp template driver",
|
||||||
"time": "2019-09-10T14:58:31+00:00"
|
"time": "2019-10-07T12:23:10+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
@@ -918,16 +971,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v4.3.4",
|
"version": "v4.3.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
"reference": "641043e0f3e615990a0f29479f9c117e8a6698c6"
|
"reference": "bde8957fc415fdc6964f33916a3755737744ff05"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/641043e0f3e615990a0f29479f9c117e8a6698c6",
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/bde8957fc415fdc6964f33916a3755737744ff05",
|
||||||
"reference": "641043e0f3e615990a0f29479f9c117e8a6698c6",
|
"reference": "bde8957fc415fdc6964f33916a3755737744ff05",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -996,7 +1049,7 @@
|
|||||||
"debug",
|
"debug",
|
||||||
"dump"
|
"dump"
|
||||||
],
|
],
|
||||||
"time": "2019-08-26T08:26:39+00:00"
|
"time": "2019-10-04T19:48:13+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|||||||
@@ -43,5 +43,5 @@ return [
|
|||||||
// 错误显示信息,非调试模式有效
|
// 错误显示信息,非调试模式有效
|
||||||
'error_message' => '页面错误!请稍后再试~',
|
'error_message' => '页面错误!请稍后再试~',
|
||||||
// 显示错误信息
|
// 显示错误信息
|
||||||
'show_error_msg' => false,
|
'show_error_msg' => true,
|
||||||
];
|
];
|
||||||
|
|||||||
39
config/captcha.php
Normal file
39
config/captcha.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Captcha配置文件
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
return [
|
||||||
|
//验证码位数
|
||||||
|
'length' => 5,
|
||||||
|
// 验证码字符集合
|
||||||
|
'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY',
|
||||||
|
// 验证码过期时间
|
||||||
|
'expire' => 1800,
|
||||||
|
// 是否使用中文验证码
|
||||||
|
'useZh' => false,
|
||||||
|
// 是否使用算术验证码
|
||||||
|
'math' => false,
|
||||||
|
// 是否使用背景图
|
||||||
|
'useImgBg' => false,
|
||||||
|
//验证码字符大小
|
||||||
|
'fontSize' => 25,
|
||||||
|
// 是否使用混淆曲线
|
||||||
|
'useCurve' => true,
|
||||||
|
//是否添加杂点
|
||||||
|
'useNoise' => true,
|
||||||
|
// 验证码字体 不设置则随机
|
||||||
|
'fontttf' => '',
|
||||||
|
//背景颜色
|
||||||
|
'bg' => [243, 251, 254],
|
||||||
|
// 验证码图片高度
|
||||||
|
'imageH' => 0,
|
||||||
|
// 验证码图片宽度
|
||||||
|
'imageW' => 0,
|
||||||
|
|
||||||
|
// 添加额外的验证码设置
|
||||||
|
// verify => [
|
||||||
|
// 'length'=>4,
|
||||||
|
// ...
|
||||||
|
//],
|
||||||
|
];
|
||||||
@@ -3,13 +3,14 @@
|
|||||||
// | 模板设置
|
// | 模板设置
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
// 模板引擎类型使用Think
|
// 模板引擎类型使用Think
|
||||||
'type' => 'Think',
|
'type' => 'Think',
|
||||||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||||
'auto_rule' => 1,
|
'auto_rule' => 1,
|
||||||
// 模板基础路径
|
// 模板基础路径
|
||||||
'view_base' => '',
|
'view_base' => root_path().'view/',
|
||||||
// 模板路径
|
// 模板路径
|
||||||
'view_path' => '',
|
'view_path' => '',
|
||||||
// 模板后缀
|
// 模板后缀
|
||||||
Reference in New Issue
Block a user