diff --git a/app/controller/Index.php b/app/controller/Index.php new file mode 100644 index 0000000..6dae10e --- /dev/null +++ b/app/controller/Index.php @@ -0,0 +1,39 @@ + +// +---------------------------------------------------------------------- +namespace app\controller; + +use app\controller\Base; + +/** + * @title 首页 + */ +class Index extends Base{ + + /** + * @title 首页 + * + * @return void + */ + public function index(){ + if(request()->isAjax()){ + return ['code' => 1, 'data' => 'SentOS']; + }else{ + return view('/index'); + } + } + + public function test(){ + // $area = \think\facade\Db::name('areas')->select(); + // $save = []; + // foreach($area as $val){ + // $save[] = ['title' => $val['area'], 'code' => $val['area_id'], 'parent_id' => $val['city_id'], 'first' => '', 'create_time' => time(), 'update_time' => time()]; + // } + // \think\facade\Db::name('area')->insertAll($save); + } +} \ No newline at end of file diff --git a/app/controller/system/Menu.php b/app/controller/system/Menu.php index 701f168..0887ed9 100644 --- a/app/controller/system/Menu.php +++ b/app/controller/system/Menu.php @@ -58,7 +58,7 @@ class Menu extends Base{ try { $result = app()->make(MenuService::class)->saveData($data); if($result){ - $this->data['data'] = app()->make(MenuService::class)->getSystemMenu(); + $this->data['data'] = app()->make(AuthService::class)->getAuthMenu(); } } catch (\Exception $e) { $this->data['code'] = 0; diff --git a/app/model/auth/Permissions.php b/app/model/auth/Permissions.php index 8ef42cd..93bf06d 100644 --- a/app/model/auth/Permissions.php +++ b/app/model/auth/Permissions.php @@ -14,6 +14,8 @@ class Permissions extends \app\model\BaseModel{ 'updated_time' => 'timestamp', 'hidden' => 'int', 'hiddenBreadcrumb' => 'int', + 'affix' => 'int', + 'fullpage' => 'int', 'api_list' => 'json' ]; @@ -26,6 +28,7 @@ class Permissions extends \app\model\BaseModel{ 'hidden' => (int) $data['hidden'], 'hiddenBreadcrumb' => (int) $data['hiddenBreadcrumb'], 'affix' => (int) $data['affix'], + 'fullpage' => (int) $data['fullpage'], ]; } diff --git a/app/services/auth/AuthService.php b/app/services/auth/AuthService.php index ef0564b..78cf9e5 100644 --- a/app/services/auth/AuthService.php +++ b/app/services/auth/AuthService.php @@ -66,8 +66,7 @@ class AuthService{ if(request()->user['uid'] != Env::get('admin_root')){ $map[] = ['name', 'IN', request()->auth()['permission']]; } - $map[] = ['type', '=', 'menu']; - $map[] = ['hidden', '=', 0]; + $map[] = ['type', '<>', 'button']; $list = Permissions::where($map)->order($order)->append(['meta'])->select() ->each(function($item){ $item->hidden = (int) $item['hidden']; @@ -87,7 +86,6 @@ class AuthService{ if(request()->user['uid'] != Env::get('admin_root')){ $map[] = ['name', 'IN', request()->auth()['permission']]; } - $map[] = ['hidden', '=', 0]; $list = Permissions::where($map)->select(); $data = []; foreach($list as $item){ diff --git a/app/services/auth/MenuService.php b/app/services/auth/MenuService.php index 7c33daa..9fa26b2 100644 --- a/app/services/auth/MenuService.php +++ b/app/services/auth/MenuService.php @@ -28,7 +28,7 @@ class MenuService{ $map[] = ['name', 'IN', request()->auth()['permission']]; } if($is_menu){ - $map[] = ['type', '=', 'menu']; + $map[] = ['type', '<>', 'button']; $map[] = ['hidden', '=', 0]; } $list = Permissions::where($map)->order($order)->append(['meta'])->select() diff --git a/composer.lock b/composer.lock index 8b2fdc7..bccc169 100644 --- a/composer.lock +++ b/composer.lock @@ -492,16 +492,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -591,7 +591,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -607,7 +607,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "guzzlehttp/uri-template", @@ -703,7 +703,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/lcobucci/jwt/3.3.3/lcobucci-jwt-3.3.3.zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/c1123697f6a2ec29162b82f170dd4a491f524773", "reference": "c1123697f6a2ec29162b82f170dd4a491f524773", "shasum": "" }, @@ -730,6 +730,7 @@ "Lcobucci\\JWT\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -745,6 +746,10 @@ "JWS", "jwt" ], + "support": { + "issues": "https://github.com/lcobucci/jwt/issues", + "source": "https://github.com/lcobucci/jwt/tree/3.3.3" + }, "funding": [ { "url": "https://github.com/lcobucci", @@ -759,16 +764,16 @@ }, { "name": "league/flysystem", - "version": "1.1.9", + "version": "1.1.10", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/league/flysystem/1.1.9/league-flysystem-1.1.9.zip", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1", "shasum": "" }, "require": { @@ -809,6 +814,7 @@ "League\\Flysystem\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -838,59 +844,17 @@ "sftp", "storage" ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/1.1.10" + }, "funding": [ { "url": "https://offset.earth/frankdejonge", "type": "other" } ], - "time": "2021-12-09T09:40:50+00:00" - }, - { - "name": "league/flysystem-cached-adapter", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", - "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff" - }, - "dist": { - "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/league/flysystem-cached-adapter/1.1.0/league-flysystem-cached-adapter-1.1.0.zip", - "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff", - "shasum": "" - }, - "require": { - "league/flysystem": "~1.0", - "psr/cache": "^1.0.0" - }, - "require-dev": { - "mockery/mockery": "~0.9", - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7", - "predis/predis": "~1.0", - "tedivm/stash": "~0.12" - }, - "suggest": { - "ext-phpredis": "Pure C implemented extension for PHP" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\Flysystem\\Cached\\": "src/" - } - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "frankdejonge", - "email": "info@frenky.net" - } - ], - "description": "An adapter decorator to enable meta-data caching.", - "time": "2020-07-25T15:56:04+00:00" + "time": "2022-10-04T09:16:37+00:00" }, { "name": "league/mime-type-detection", @@ -902,7 +866,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/league/mime-type-detection/1.11.0/league-mime-type-detection-1.11.0.zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", "shasum": "" }, @@ -921,6 +885,7 @@ "League\\MimeTypeDetection\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -931,6 +896,10 @@ } ], "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + }, "funding": [ { "url": "https://github.com/frankdejonge", @@ -1138,21 +1107,21 @@ }, { "name": "nette/php-generator", - "version": "v3.6.7", + "version": "v3.6.9", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "b9ba414c9895fd9420887f20eeb4eabde123677f" + "reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/nette/php-generator/v3.6.7/nette-php-generator-v3.6.7.zip", - "reference": "b9ba414c9895fd9420887f20eeb4eabde123677f", + "url": "https://api.github.com/repos/nette/php-generator/zipball/d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6", + "reference": "d31782f7bd2ae84ad06f863391ec3fb77ca4d0a6", "shasum": "" }, "require": { "nette/utils": "^3.1.2", - "php": ">=7.2 <8.2" + "php": ">=7.2 <8.3" }, "require-dev": { "nette/tester": "^2.4", @@ -1174,6 +1143,7 @@ "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause", "GPL-2.0-only", @@ -1197,24 +1167,28 @@ "php", "scaffolding" ], - "time": "2022-03-10T01:51:00+00:00" + "support": { + "issues": "https://github.com/nette/php-generator/issues", + "source": "https://github.com/nette/php-generator/tree/v3.6.9" + }, + "time": "2022-10-04T11:49:47+00:00" }, { "name": "nette/utils", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99" + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/nette/utils/v3.2.7/nette-utils-v3.2.7.zip", - "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99", + "url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", "shasum": "" }, "require": { - "php": ">=7.2 <8.2" + "php": ">=7.2 <8.3" }, "conflict": { "nette/di": "<3.0.6" @@ -1244,6 +1218,7 @@ "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause", "GPL-2.0-only", @@ -1277,7 +1252,11 @@ "utility", "validation" ], - "time": "2022-01-24T11:29:14+00:00" + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.8" + }, + "time": "2022-09-12T23:36:20+00:00" }, { "name": "overtrue/flysystem-cos", @@ -1327,51 +1306,6 @@ }, "time": "2020-10-22T10:28:58+00:00" }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/psr/cache/1.0.1/psr-cache-1.0.1.zip", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "time": "2016-08-06T20:24:11+00:00" - }, { "name": "psr/container", "version": "1.1.2", @@ -1382,7 +1316,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/psr/container/1.1.2/psr-container-1.1.2.zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, @@ -1395,6 +1329,7 @@ "Psr\\Container\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1413,6 +1348,10 @@ "container-interop", "psr" ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, "time": "2021-11-05T16:50:12+00:00" }, { @@ -1532,7 +1471,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/psr/http-message/1.0.1/psr-http-message-1.0.1.zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, @@ -1550,6 +1489,7 @@ "Psr\\Http\\Message\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1569,6 +1509,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { @@ -1581,7 +1524,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/psr/log/1.1.4/psr-log-1.1.4.zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, @@ -1599,6 +1542,7 @@ "Psr\\Log\\": "Psr/Log/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1615,6 +1559,9 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, "time": "2021-05-03T11:20:27+00:00" }, { @@ -1627,7 +1574,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/psr/simple-cache/1.0.1/psr-simple-cache-1.0.1.zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, @@ -1645,6 +1592,7 @@ "Psr\\SimpleCache\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1662,6 +1610,9 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" }, { @@ -1849,6 +1800,7 @@ "sent\\tree\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1930,16 +1882,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-mbstring/v1.25.0/symfony-polyfill-mbstring-v1.25.0.zip", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -1954,7 +1906,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1969,6 +1921,7 @@ "Symfony\\Polyfill\\Mbstring\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1991,6 +1944,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2005,20 +1961,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-php80/v1.25.0/symfony-polyfill-php80-v1.25.0.zip", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -2027,7 +1983,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2045,6 +2001,7 @@ "Resources/stubs" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -2070,6 +2027,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2084,7 +2044,7 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/process", @@ -2376,23 +2336,21 @@ }, { "name": "topthink/framework", - "version": "v6.0.12", + "version": "v6.1.1", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "e478316ac843c1a884a3b3a7a94db17c4001ff5c" + "reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/topthink/framework/v6.0.12/topthink-framework-v6.0.12.zip", - "reference": "e478316ac843c1a884a3b3a7a94db17c4001ff5c", + "url": "https://api.github.com/repos/top-think/framework/zipball/2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210", + "reference": "2cb56f3e6f3c479fe90ea5f28d38d3b5ef6c4210", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "league/flysystem": "^1.1.4", - "league/flysystem-cached-adapter": "^1.0", "php": ">=7.2.5", "psr/container": "~1.0", "psr/http-message": "^1.0", @@ -2414,6 +2372,7 @@ "think\\": "src/think/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -2434,7 +2393,11 @@ "orm", "thinkphp" ], - "time": "2022-01-21T06:31:07+00:00" + "support": { + "issues": "https://github.com/top-think/framework/issues", + "source": "https://github.com/top-think/framework/tree/v6.1.1" + }, + "time": "2022-10-26T03:48:53+00:00" }, { "name": "topthink/think-helper", @@ -2446,7 +2409,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/topthink/think-helper/v3.1.6/topthink-think-helper-v3.1.6.zip", + "url": "https://api.github.com/repos/top-think/think-helper/zipball/769acbe50a4274327162f9c68ec2e89a38eb2aff", "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff", "shasum": "" }, @@ -2465,6 +2428,7 @@ "think\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -2475,24 +2439,28 @@ } ], "description": "The ThinkPHP6 Helper Package", + "support": { + "issues": "https://github.com/top-think/think-helper/issues", + "source": "https://github.com/top-think/think-helper/tree/v3.1.6" + }, "time": "2021-12-15T04:27:55+00:00" }, { "name": "topthink/think-migration", - "version": "v3.0.3", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/top-think/think-migration.git", - "reference": "5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79" + "reference": "c5880669b277762d5ff935e551bc0d5c71de6811" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-migration/zipball/5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79", - "reference": "5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79", + "url": "https://api.github.com/repos/top-think/think-migration/zipball/c5880669b277762d5ff935e551bc0d5c71de6811", + "reference": "c5880669b277762d5ff935e551bc0d5c71de6811", "shasum": "" }, "require": { - "topthink/framework": "^6.0.0", + "topthink/framework": "^6.0", "topthink/think-helper": "^3.0.3" }, "require-dev": { @@ -2527,30 +2495,30 @@ ], "support": { "issues": "https://github.com/top-think/think-migration/issues", - "source": "https://github.com/top-think/think-migration/tree/v3.0.3" + "source": "https://github.com/top-think/think-migration/tree/v3.0.4" }, - "time": "2020-12-07T05:54:22+00:00" + "time": "2022-10-26T07:57:54+00:00" }, { "name": "topthink/think-orm", - "version": "v2.0.53", + "version": "v2.0.55", "source": { "type": "git", "url": "https://github.com/top-think/think-orm.git", - "reference": "06783eda65547a70ea686360a897759e1f873fff" + "reference": "e1974a4c3b1b4c5b808fcc0863fc254e711dee13" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/topthink/think-orm/v2.0.53/topthink-think-orm-v2.0.53.zip", - "reference": "06783eda65547a70ea686360a897759e1f873fff", + "url": "https://api.github.com/repos/top-think/think-orm/zipball/e1974a4c3b1b4c5b808fcc0863fc254e711dee13", + "reference": "e1974a4c3b1b4c5b808fcc0863fc254e711dee13", "shasum": "" }, "require": { "ext-json": "*", "ext-pdo": "*", "php": ">=7.1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0", + "psr/log": "^1.0|^2.0", + "psr/simple-cache": "^1.0|^2.0", "topthink/think-helper": "^3.1" }, "require-dev": { @@ -2565,6 +2533,7 @@ "think\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -2579,7 +2548,11 @@ "database", "orm" ], - "time": "2022-02-28T14:54:22+00:00" + "support": { + "issues": "https://github.com/top-think/think-orm/issues", + "source": "https://github.com/top-think/think-orm/tree/v2.0.55" + }, + "time": "2022-09-27T14:18:43+00:00" }, { "name": "webmozart/assert", @@ -2649,7 +2622,7 @@ }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/xiaodi/think-jwt/v2.0.3/xiaodi-think-jwt-v2.0.3.zip", + "url": "https://api.github.com/repos/friendsofthinkphp/think-jwt/zipball/e24e6084a25d3463f125b3844061b0b0fa1ab843", "reference": "e24e6084a25d3463f125b3844061b0b0fa1ab843", "shasum": "" }, @@ -2686,6 +2659,7 @@ "xiaodi\\JWTAuth\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -2700,6 +2674,10 @@ "php", "thinkphp" ], + "support": { + "issues": "https://github.com/friendsofthinkphp/think-jwt/issues", + "source": "https://github.com/friendsofthinkphp/think-jwt/tree/v2.0.3" + }, "time": "2021-02-22T02:09:36+00:00" }, { @@ -2725,6 +2703,7 @@ "xin\\helper\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -2849,16 +2828,16 @@ "packages-dev": [ { "name": "symfony/polyfill-php72", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/symfony/polyfill-php72/v1.25.0/symfony-polyfill-php72-v1.25.0.zip", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", "shasum": "" }, "require": { @@ -2867,7 +2846,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2882,6 +2861,7 @@ "Symfony\\Polyfill\\Php72\\": "" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -2903,6 +2883,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2917,20 +2900,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.4.41", + "version": "v4.4.47", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481" + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/symfony/var-dumper/v4.4.41/symfony-var-dumper-v4.4.41.zip", - "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63", + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63", "shasum": "" }, "require": { @@ -2969,6 +2952,7 @@ "/Tests/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -2988,6 +2972,9 @@ "debug", "dump" ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v4.4.47" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3002,25 +2989,25 @@ "type": "tidelift" } ], - "time": "2022-04-25T21:15:06+00:00" + "time": "2022-10-03T15:15:11+00:00" }, { "name": "topthink/think-trace", - "version": "v1.4", + "version": "v1.5", "source": { "type": "git", "url": "https://github.com/top-think/think-trace.git", - "reference": "9a9fa8f767b6c66c5a133ad21ca1bc96ad329444" + "reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7" }, "dist": { "type": "zip", - "url": "https://repo.huaweicloud.com/repository/php/topthink/think-trace/v1.4/topthink-think-trace-v1.4.zip", - "reference": "9a9fa8f767b6c66c5a133ad21ca1bc96ad329444", + "url": "https://api.github.com/repos/top-think/think-trace/zipball/55027fd79abb744f32a3be8d9e1ccf873a3ca9b7", + "reference": "55027fd79abb744f32a3be8d9e1ccf873a3ca9b7", "shasum": "" }, "require": { "php": ">=7.1.0", - "topthink/framework": "^6.0.0" + "topthink/framework": "^6.0" }, "type": "library", "extra": { @@ -3038,6 +3025,7 @@ "think\\trace\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "Apache-2.0" ], @@ -3048,7 +3036,11 @@ } ], "description": "thinkphp debug trace", - "time": "2020-06-29T05:27:28+00:00" + "support": { + "issues": "https://github.com/top-think/think-trace/issues", + "source": "https://github.com/top-think/think-trace/tree/v1.5" + }, + "time": "2022-10-26T07:56:45+00:00" } ], "aliases": [], @@ -3060,5 +3052,5 @@ "php": ">=7.2.5" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/database/migrations/20221018140421_base_data.php b/database/migrations/20221018140421_base_data.php new file mode 100644 index 0000000..48ec637 --- /dev/null +++ b/database/migrations/20221018140421_base_data.php @@ -0,0 +1,68 @@ +table('dictionary', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '字典表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('name', 'string', ['limit' => 15,'null' => false,'default' => '','signed' => true,'comment' => '项名称',]) + ->addColumn('values', 'string', ['limit' => 255,'null' => false,'default' => '','signed' => true,'comment' => '键值',]) + ->addColumn('dic_type', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '所属字典',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) + ->addColumn('delete_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '删除状态,null 未删除 timestamp 已删除',]) + ->create(); + $table = $this->table('dictionary_type', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '字典分类表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('name', 'string', ['limit' => 15,'null' => false,'default' => '','signed' => true,'comment' => '字典名称',]) + ->addColumn('parent_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '父级ID',]) + ->addColumn('code', 'string', ['limit' => 255,'null' => false,'default' => '','signed' => true,'comment' => '编码',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) + ->addColumn('delete_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '删除状态,null 未删除 timestamp 已删除',]) + ->create(); + $table = $this->table('system_config', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '系统配置表' ,'id' => 'id' ,'primary_key' => ['id']]); + $table->addColumn('name', 'string', ['limit' => 100,'null' => false,'default' => null,'signed' => true,'comment' => '配置名称',]) + ->addColumn('title', 'string', ['limit' => 200,'null' => false,'default' => null,'signed' => true,'comment' => '配置标题',]) + ->addColumn('value', 'text', ['limit' => MysqlAdapter::TEXT_REGULAR,'null' => false,'signed' => true,'comment' => '配置值',]) + ->addColumn('type', 'string', ['limit' => 100,'null' => false,'default' => null,'signed' => true,'comment' => '表单类型',]) + ->addColumn('group_name', 'string', ['limit' => 100,'null' => false,'default' => null,'signed' => true,'comment' => '分组',]) + ->addColumn('remark', 'string', ['limit' => 200,'null' => false,'default' => null,'signed' => true,'comment' => '描述',]) + ->addColumn('status', 'boolean', ['null' => false,'default' => null,'signed' => true,'comment' => '状态',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => true,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => true,'comment' => '更新时间',]) + ->create(); + $table = $this->table('area',array('engine'=>'MyISAM')); + $table->addColumn('title', 'string',array('limit' => 255,'default'=>'','comment'=>'名称')) + ->addColumn('code', 'string',array('limit'=>18,'comment'=>'编号')) + ->addColumn('parent_id', 'integer',array('limit'=>11,'comment'=>'上级code')) + ->addColumn('first', 'string',array('limit'=>255,'comment'=>'首字母')) + ->addColumn('create_time', 'integer',array('limit'=>11, 'default'=>0,'comment'=>'创建时间')) + ->addColumn('update_time', 'integer',array('limit'=>11, 'default'=>0,'comment'=>'更新时间')) + ->create(); + } +} diff --git a/database/migrations/20221018140632_user_data.php b/database/migrations/20221018140632_user_data.php new file mode 100644 index 0000000..81f14a1 --- /dev/null +++ b/database/migrations/20221018140632_user_data.php @@ -0,0 +1,88 @@ +table('users', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '用户表' ,'id' => 'uid','signed' => true ,'primary_key' => ['uid']]); + $table->addColumn('username', 'string', ['limit' => 15,'null' => false,'default' => '','signed' => true,'comment' => '用户名',]) + ->addColumn('nickname', 'string', ['limit' => 255,'null' => false,'default' => null,'signed' => true,'comment' => '姓名',]) + ->addColumn('password', 'string', ['limit' => 255,'null' => false,'default' => null,'signed' => true,'comment' => '用户密码',]) + ->addColumn('email', 'string', ['limit' => 100,'null' => true,'signed' => true,'comment' => '邮箱 登录',]) + ->addColumn('avatar', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '用户头像',]) + ->addColumn('remember_token', 'string', ['limit' => 512,'null' => true,'signed' => true,'comment' => '用户token',]) + ->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '创建人ID',]) + ->addColumn('department_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '部门ID',]) + ->addColumn('user_type', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '用户类型',]) + ->addColumn('status', 'boolean', ['null' => false,'default' => 1,'signed' => true,'comment' => '用户状态 1 正常 2 禁用',]) + ->addColumn('last_login_ip', 'string', ['limit' => 50,'null' => false,'default' => 0,'signed' => true,'comment' => '最后登录IP',]) + ->addColumn('last_login_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '最后登录时间',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) + ->addColumn('delete_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '删除状态,0未删除 >0 已删除',]) + ->create(); + $table = $this->table('departments', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '部门表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('title', 'string', ['limit' => 15,'null' => false,'default' => '','signed' => true,'comment' => '部门名称',]) + ->addColumn('parent_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '父级ID',]) + ->addColumn('principal', 'string', ['limit' => 20,'null' => false,'default' => '','signed' => true,'comment' => '负责人',]) + ->addColumn('mobile', 'string', ['limit' => 20,'null' => false,'default' => '','signed' => true,'comment' => '联系电话',]) + ->addColumn('email', 'string', ['limit' => 100,'null' => false,'default' => '','signed' => true,'comment' => '联系又想',]) + ->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '创建人ID',]) + ->addColumn('status', 'boolean', ['null' => false,'default' => 1,'signed' => true,'comment' => '1 正常 2 停用',]) + ->addColumn('sort', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '排序字段',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) + ->addColumn('delete_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '删除状态,null 未删除 timestamp 已删除',]) + ->create(); + $table = $this->table('users_log', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '用户表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('uid', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '用户ID',]) + ->addColumn('title', 'string', ['limit' => 100,'null' => false,'default' => '','signed' => true,'comment' => '操作名称',]) + ->addColumn('method', 'string', ['limit' => 20,'null' => false,'default' => 'POST','signed' => true,'comment' => '操作类型',]) + ->addColumn('route', 'string', ['limit' => 255,'null' => false,'default' => '','signed' => true,'comment' => '操作路由',]) + ->addColumn('params', 'text', ['limit' => MysqlAdapter::TEXT_REGULAR,'null' => false,'signed' => true,'comment' => '操作参数',]) + ->addColumn('client_ip', 'string', ['limit' => 100,'null' => false,'default' => '','signed' => true,'comment' => '客户端IP',]) + ->addColumn('browser', 'string', ['limit' => 255,'null' => false,'default' => '','signed' => true,'comment' => '浏览器',]) + ->addColumn('code', 'string', ['limit' => 20,'null' => false,'default' => null,'signed' => true,'comment' => '状态码',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) + ->addColumn('delete_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '删除状态,0未删除 >0 已删除',]) + ->create(); + $table = $this->table('jobs', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '岗位表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('job_name', 'string', ['limit' => 15,'null' => false,'default' => '','signed' => true,'comment' => '岗位名称',]) + ->addColumn('coding', 'string', ['limit' => 50,'null' => false,'default' => '','signed' => true,'comment' => '编码',]) + ->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '创建人ID',]) + ->addColumn('status', 'boolean', ['null' => false,'default' => 1,'signed' => true,'comment' => '1 正常 2 停用',]) + ->addColumn('sort', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '排序字段',]) + ->addColumn('description', 'string', ['limit' => 255,'null' => false,'default' => '','signed' => true,'comment' => '描述',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) + ->addColumn('delete_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '删除状态,null 未删除 timestamp 已删除',]) + ->create(); + + } +} diff --git a/database/migrations/20221018140811_user_auth.php b/database/migrations/20221018140811_user_auth.php new file mode 100644 index 0000000..e3132d6 --- /dev/null +++ b/database/migrations/20221018140811_user_auth.php @@ -0,0 +1,83 @@ +table('permissions', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '系统菜单表' ,'id' => 'id' ,'primary_key' => ['id']]); + $table->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => true,'comment' => '创建人',]) + ->addColumn('parent_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => true,'comment' => '上级ID',]) + ->addColumn('name', 'string', ['limit' => 200,'null' => false,'default' => null,'signed' => true,'comment' => '菜单标识',]) + ->addColumn('title', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '权限标题',]) + ->addColumn('type', 'string', ['limit' => 20,'null' => true,'signed' => true,'comment' => '栏目类型',]) + ->addColumn('icon', 'string', ['limit' => 100,'null' => true,'signed' => true,'comment' => '图标',]) + ->addColumn('color', 'string', ['limit' => 10,'null' => true,'signed' => true,'comment' => '标题颜色',]) + ->addColumn('hidden', 'boolean', ['null' => true,'signed' => true,'comment' => '是否隐藏',]) + ->addColumn('hiddenBreadcrumb', 'boolean', ['null' => true,'signed' => true,'comment' => 'hiddenBreadcrumb',]) + ->addColumn('affix', 'boolean', ['null' => true,'signed' => true,'comment' => '是否固定',]) + ->addColumn('fullpage', 'boolean', ['null' => true,'signed' => true,'comment' => '是否全屏',]) + ->addColumn('path', 'string', ['limit' => 200,'null' => false,'default' => null,'signed' => true,'comment' => '路径',]) + ->addColumn('redirect', 'string', ['limit' => 200,'null' => true,'signed' => true,'comment' => '重定向',]) + ->addColumn('component', 'string', ['limit' => 200,'null' => true,'signed' => true,'comment' => '组件',]) + ->addColumn('api_list', 'text', ['limit' => MysqlAdapter::TEXT_TINY,'null' => true,'signed' => true,'comment' => 'api接口列表',]) + ->addColumn('sort', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 1,'signed' => true,'comment' => '排序',]) + ->addColumn('status', 'boolean', ['null' => false,'default' => 1,'signed' => true,'comment' => '状态',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => true,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => true,'comment' => '更新时间',]) + ->create(); + $table = $this->table('roles', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '角色表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('title', 'string', ['limit' => 15,'null' => false,'default' => '','signed' => true,'comment' => '角色名',]) + ->addColumn('identify', 'string', ['limit' => 20,'null' => false,'default' => 1,'signed' => true,'comment' => '角色的标识,用英文表示,用于后台路由权限',]) + ->addColumn('parent_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '父级ID',]) + ->addColumn('description', 'string', ['limit' => 255,'null' => false,'default' => '','signed' => true,'comment' => '角色备注',]) + ->addColumn('data_range', 'boolean', ['null' => false,'default' => 0,'signed' => true,'comment' => '1 全部数据 2 自定义数据 3 仅本人数据 4 部门数据 5 部门及以下数据',]) + ->addColumn('sort', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '排序',]) + ->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '创建人ID',]) + ->addColumn('create_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) + ->addColumn('update_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) + ->addColumn('delete_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '删除状态,0未删除 >0 已删除',]) + ->create(); + $table = $this->table('role_has_departments', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '角色部门表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('role_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '角色ID',]) + ->addColumn('department_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '部门ID',]) + ->create(); + $table = $this->table('role_has_permissions', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '角色权限表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('role_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '角色ID',]) + ->addColumn('permission_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '权限ID',]) + ->create(); + + $table = $this->table('user_has_jobs', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '用户角色表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('uid', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '用户ID',]) + ->addColumn('job_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '岗位ID',]) + ->create(); + $table = $this->table('user_has_roles', ['engine' => 'InnoDB', 'collation' => 'utf8_general_ci', 'comment' => '用户角色表' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); + $table->addColumn('uid', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '用户ID',]) + ->addColumn('role_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => null,'signed' => false,'comment' => '角色ID',]) + ->create(); + } +} diff --git a/database/seeds/Area.php b/database/seeds/Area.php new file mode 100644 index 0000000..95c6d26 --- /dev/null +++ b/database/seeds/Area.php @@ -0,0 +1,19 @@ +isAjax()){ - return ['code' => 1, 'data' => 'SentOS']; - }else{ - return view('index'); - } -}); +Route::rule('/', 'Index/index'); +Route::rule('test', 'Index/test'); Route::group('/', function(){ Route::rule('system/:controller/:action', 'system.:controller/:action'); Route::rule('auth/user/:action', 'auth.User/:action'); Route::rule('auth/department/:action', 'auth.Department/:action'); Route::rule('auth/role/:action', 'auth.Role/:action'); - Route::rule('tools/filter/:action', 'tools.Filter/:action'); - Route::rule('tools/inspect/:action', 'tools.Inspect/:action'); + // Route::rule('tools/filter/:action', 'tools.Filter/:action'); + // Route::rule('tools/inspect/:action', 'tools.Inspect/:action'); + Route::rule('customer/company/:action', 'customer.Company/:action'); })->middleware([\app\middleware\Check::class], 'api'); \ No newline at end of file diff --git a/ui/package.json b/ui/package.json index e6ec76c..dbd3c43 100644 --- a/ui/package.json +++ b/ui/package.json @@ -54,7 +54,8 @@ "eslint:recommended" ], "parserOptions": { - "parser": "@babel/eslint-parser" + "parser": "@babel/eslint-parser", + "requireConfigFile": false }, "rules": { "indent": 0, diff --git a/ui/public/static/images/auth_banner.jpg b/ui/public/static/images/auth_banner.jpg index 449b0ad..dda5466 100644 Binary files a/ui/public/static/images/auth_banner.jpg and b/ui/public/static/images/auth_banner.jpg differ diff --git a/ui/src/api/model/common.js b/ui/src/api/model/common.js index ba5f3fa..fd40a10 100644 --- a/ui/src/api/model/common.js +++ b/ui/src/api/model/common.js @@ -11,14 +11,14 @@ export default { }, file: { menu: { - url: `${config.API_URL}/file/menu`, + url: `${config.API_URL}file/menu`, name: "获取文件分类", get: async function(){ return await http.get(this.url); } }, list: { - url: `${config.API_URL}/file/list`, + url: `${config.API_URL}file/list`, name: "获取文件列表", get: async function(params){ return await http.get(this.url, params); diff --git a/ui/src/api/model/tools.js b/ui/src/api/model/tools.js index cedfd24..a6ee6bd 100644 --- a/ui/src/api/model/tools.js +++ b/ui/src/api/model/tools.js @@ -4,14 +4,14 @@ import http from "@/utils/request" export default { filter: { list: { - url: `${config.API_URL}/tools/filter/index`, + url: `${config.API_URL}tools/filter/index`, name: "获得过滤数据", get: async function(params){ return await http.get(this.url, params); } }, insert:{ - url: `${config.API_URL}/tools/filter/insert`, + url: `${config.API_URL}tools/filter/insert`, name: "导入过滤数据", post: async function(data={}){ return await http.post(this.url, data); diff --git a/ui/src/api/model/user.js b/ui/src/api/model/user.js index e870e90..f506b4c 100644 --- a/ui/src/api/model/user.js +++ b/ui/src/api/model/user.js @@ -3,35 +3,35 @@ import http from "@/utils/request" export default { list: { - url: `${config.API_URL}/auth/user/index`, + url: `${config.API_URL}auth/user/index`, name: "获得用户列表", get: async function(params){ return await http.get(this.url, params); } }, add: { - url: `${config.API_URL}/auth/user/add`, + url: `${config.API_URL}auth/user/add`, name: "添加用户", post: async function(params){ return await http.post(this.url, params); } }, edit: { - url: `${config.API_URL}/auth/user/edit`, + url: `${config.API_URL}auth/user/edit`, name: "编辑用户", post: async function(params){ return await http.post(this.url, params); } }, uppasswd:{ - url: `${config.API_URL}/auth/user/passwd`, + url: `${config.API_URL}auth/user/passwd`, name: "修改密码", post: async function(params){ return await http.post(this.url, params); } }, uprole: { - url: `${config.API_URL}/auth/user/auth`, + url: `${config.API_URL}auth/user/auth`, name: "编辑用户", post: async function(params){ return await http.post(this.url, params); @@ -39,21 +39,21 @@ export default { }, role: { list: { - url: `${config.API_URL}/auth/role/index`, + url: `${config.API_URL}auth/role/index`, name: "获得角色列表", get: async function(params){ return await http.get(this.url, params); } }, edit: { - url: `${config.API_URL}/auth/role/edit`, + url: `${config.API_URL}auth/role/edit`, name: "编辑角色", post: async function(params){ return await http.post(this.url, params); } }, auth: { - url: `${config.API_URL}/auth/role/auth`, + url: `${config.API_URL}auth/role/auth`, name: "编辑角色", post: async function(params){ return await http.post(this.url, params); @@ -62,14 +62,14 @@ export default { }, department: { list: { - url: `${config.API_URL}/auth/department/index`, + url: `${config.API_URL}auth/department/index`, name: "获得部门列表", get: async function(params){ return await http.get(this.url, params); } }, edit: { - url: `${config.API_URL}/auth/department/edit`, + url: `${config.API_URL}auth/department/edit`, name: "编辑部门", post: async function(params){ return await http.post(this.url, params); @@ -77,7 +77,7 @@ export default { } }, userinfo:{ - url: `${config.API_URL}/auth/user/info`, + url: `${config.API_URL}auth/user/info`, name: "获得用户信息", get: async function(params){ return await http.get(this.url, params); diff --git a/ui/src/config/index.js b/ui/src/config/index.js index cf4a5fb..10ae029 100644 --- a/ui/src/config/index.js +++ b/ui/src/config/index.js @@ -12,7 +12,8 @@ const DEFAULT_CONFIG = { CORE_VER: "1.6.6", //接口地址 - API_URL: "http://127.0.0.1:8000/", + // API_URL: "http://127.0.0.1:8000/", + API_URL: "http://q.dxpd.cn/", //请求超时 TIMEOUT: 10000, diff --git a/ui/src/layout/components/userbar.vue b/ui/src/layout/components/userbar.vue index 08d8256..865a741 100644 --- a/ui/src/layout/components/userbar.vue +++ b/ui/src/layout/components/userbar.vue @@ -89,33 +89,33 @@ tasksVisible: false, msg: false, msgList: [ - { - id: 1, - type: 'user', - avatar: "static/images/avatar.jpg", - title: "Skuya", - describe: "如果喜欢就点个星星支持一下哦", - link: "https://gitee.com/lolicode/scui", - time: "5分钟前" - }, - { - id: 2, - type: 'user', - avatar: "static/images/avatar2.gif", - title: "Lolowan", - describe: "点进去Gitee获取最新开源版本", - link: "https://gitee.com/lolicode/scui", - time: "14分钟前" - }, - { - id: 3, - type: 'system', - avatar: "static/images/logo.png", - title: "感谢登录SCUI Admin", - describe: "Vue 3.0 + Vue-Router 4.0 + ElementPlus + Axios 后台管理系统。", - link: "https://gitee.com/lolicode/scui", - time: "2020年7月24日" - } + // { + // id: 1, + // type: 'user', + // avatar: "static/images/avatar.jpg", + // title: "Skuya", + // describe: "如果喜欢就点个星星支持一下哦", + // link: "https://gitee.com/lolicode/scui", + // time: "5分钟前" + // }, + // { + // id: 2, + // type: 'user', + // avatar: "static/images/avatar2.gif", + // title: "Lolowan", + // describe: "点进去Gitee获取最新开源版本", + // link: "https://gitee.com/lolicode/scui", + // time: "14分钟前" + // }, + // { + // id: 3, + // type: 'system', + // avatar: "static/images/logo.png", + // title: "感谢登录SCUI Admin", + // describe: "Vue 3.0 + Vue-Router 4.0 + ElementPlus + Axios 后台管理系统。", + // link: "https://gitee.com/lolicode/scui", + // time: "2020年7月24日" + // } ] } }, diff --git a/ui/src/layout/index.vue b/ui/src/layout/index.vue index 2467d03..219c4ad 100644 --- a/ui/src/layout/index.vue +++ b/ui/src/layout/index.vue @@ -184,7 +184,7 @@
- + diff --git a/ui/src/pages/auth/menu/index.vue b/ui/src/pages/auth/menu/index.vue index cf2d0f7..0253a18 100644 --- a/ui/src/pages/auth/menu/index.vue +++ b/ui/src/pages/auth/menu/index.vue @@ -98,7 +98,8 @@ export default { path: "", component: "", title: newMenuName, - type: "menu" + type: "menu", + sort: 0 } this.menuloading = true var res = await this.$API.system.menu.add.post(newMenuData) diff --git a/ui/src/pages/auth/menu/save.vue b/ui/src/pages/auth/menu/save.vue index 64eda79..8e83718 100644 --- a/ui/src/pages/auth/menu/save.vue +++ b/ui/src/pages/auth/menu/save.vue @@ -60,6 +60,10 @@
是否固定,类似首页控制台在标签中是没有关闭按钮的
+ + +
是否全屏
+
保 存 @@ -185,7 +189,10 @@ //表单注入数据 setData(data, pid){ this.form = data - this.form.sort = parseInt(this.form.sort); + this.form.hidden = this.form.hidden == 1 ? true : false; + this.form.hiddenBreadcrumb = this.form.hiddenBreadcrumb == 1 ? true : false; + this.form.affix = this.form.affix == 1 ? true : false; + this.form.fullpage = this.form.fullpage == 1 ? true : false; this.form.apiList = data.apiList || [] this.form.parent_id = pid } diff --git a/ui/src/pages/login/index.vue b/ui/src/pages/login/index.vue index 3fd070f..3b9bfa2 100644 --- a/ui/src/pages/login/index.vue +++ b/ui/src/pages/login/index.vue @@ -144,7 +144,7 @@ .login_adv__title div i {font-size: 40px;} .login_adv__title div i.add {font-size: 20px;color: rgba(255,255,255,0.6);} .login_adv__bottom {position: absolute;left:0px;right: 0px;bottom: 0px;color: #fff;padding: 40px;background-image:linear-gradient(transparent, #000);z-index: 3;} - .login_adv__mask {position: absolute;top:0px;left:0px;right: 0px;bottom: 0px;background: rgba(0,0,0,0.5);z-index: 1;} + .login_adv__mask {position: absolute;top:0px;left:0px;right: 0px;bottom: 0px;background: rgba(255,255,255,0.1);z-index: 1;} .login_main {flex: 1;overflow: auto;display:flex;} .login-form {width: 400px;margin: auto;padding:20px 0;}