├── README.md ├── public ├── .keep ├── images │ ├── bg.png │ └── aiwrap.png ├── fonts │ ├── iconfont.eot │ ├── iconfont.ttf │ └── iconfont.woff ├── lib │ └── layui │ │ ├── font │ │ ├── iconfont.eot │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ │ ├── images │ │ └── face │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 2.gif │ │ │ ├── 3.gif │ │ │ ├── 4.gif │ │ │ ├── 5.gif │ │ │ ├── 6.gif │ │ │ ├── 7.gif │ │ │ ├── 8.gif │ │ │ ├── 9.gif │ │ │ ├── 10.gif │ │ │ ├── 11.gif │ │ │ ├── 12.gif │ │ │ ├── 13.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 70.gif │ │ │ └── 71.gif │ │ ├── css │ │ └── modules │ │ │ ├── layer │ │ │ └── default │ │ │ │ ├── icon.png │ │ │ │ ├── icon-ext.png │ │ │ │ ├── loading-0.gif │ │ │ │ ├── loading-1.gif │ │ │ │ └── loading-2.gif │ │ │ └── code.css │ │ └── lay │ │ └── modules │ │ ├── code.js │ │ ├── laytpl.js │ │ ├── flow.js │ │ ├── rate.js │ │ ├── tree.js │ │ ├── util.js │ │ ├── carousel.js │ │ └── laypage.js ├── css │ ├── theme2.css │ ├── theme1.css │ ├── theme3.css │ ├── theme4.css │ ├── font.css │ ├── theme5.css │ └── login.css ├── error.html ├── demo.html ├── README.md ├── login.html ├── user.json ├── echarts5.html ├── member-password.html ├── echarts1.html └── echarts2.html ├── resource ├── language │ └── .keep └── views │ ├── layouts │ ├── default │ │ ├── footer.php │ │ └── header.php │ └── default.php │ └── role │ ├── edit.php │ ├── add.php │ └── list.php ├── .dockerignore ├── config ├── dev │ └── db.php ├── db.php └── base.php ├── .env.example ├── .gitignore ├── bin ├── swoft └── bootstrap.php ├── app ├── Http │ ├── Controller │ │ ├── NotifyController.php │ │ ├── OrderController.php │ │ ├── PublicController.php │ │ ├── AuthorityController.php │ │ ├── HomeController.php │ │ └── RoleController.php │ └── Middleware │ │ └── LoginMiddleware.php ├── Model │ ├── Dao │ │ └── UserDao.php │ ├── Data │ │ └── UserData.php │ ├── Logic │ │ ├── UserLogic.php │ │ ├── RequestBeanTwo.php │ │ ├── RequestBean.php │ │ ├── ApolloLogic.php │ │ ├── LimiterLogic.php │ │ ├── MonitorLogic.php │ │ ├── ConsulLogic.php │ │ └── BreakerLogic.php │ └── Entity │ │ ├── Desc.php │ │ ├── Count2.php │ │ ├── User3.php │ │ ├── Count.php │ │ └── User.php ├── Helper │ └── Functions.php ├── Exception │ ├── ApiException.php │ └── Handler │ │ ├── ApiExceptionHandler.php │ │ ├── WsMessageExceptionHandler.php │ │ ├── RpcExceptionHandler.php │ │ ├── WsHandshakeExceptionHandler.php │ │ └── HttpExceptionHandler.php ├── Aspect │ └── AnnotationAspect.php ├── AutoLoader.php ├── Listener │ ├── Test │ │ ├── TaskProcessListener.php │ │ ├── StartListener.php │ │ ├── ShutDownListener.php │ │ ├── WorkerStopListener.php │ │ └── WorkerStartListener.php │ ├── ModelSavedListener.php │ ├── UserSavingListener.php │ ├── RanListener.php │ ├── DeregisterServiceListener.php │ └── RegisterServiceListener.php ├── Application.php ├── Rpc │ ├── Middleware │ │ └── ServiceMiddleware.php │ ├── Lib │ │ └── UserInterface.php │ └── Service │ │ ├── UserService.php │ │ └── UserServiceV2.php ├── Validator │ ├── TestValidator.php │ ├── CustomerValidator.php │ └── Rule │ │ └── AlphaDashRule.php ├── Console │ └── Command │ │ ├── DemoCommand.php │ │ └── AgentCommand.php ├── Annotation │ ├── Parser │ │ └── AlphaDashParser.php │ └── Mapping │ │ └── AlphaDash.php ├── Crontab │ └── CronTask.php └── bean.php ├── test └── bootstrap.php ├── .editorconfig ├── phpunit.xml ├── .travis.yml ├── docker-compose.yml ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── CODE_OF_CONDUCT.md ├── database ├── AutoLoader.php └── Migration │ ├── AddAdminRoleNavTable.php │ ├── AddAdminRoleUrlTable.php │ ├── AddAdminUserTable.php │ ├── AddAdminUrlTable.php │ ├── AddAdminRoleTable.php │ ├── AddNavTable.php │ └── AddPaymentTable.php ├── .php_cs ├── dev.composer.json ├── composer.json ├── phpstan.neon.dist ├── CONTRIBUTING.md └── Dockerfile /README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resource/language/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | runtime 2 | -------------------------------------------------------------------------------- /config/dev/db.php: -------------------------------------------------------------------------------- 1 | 'http://127.0.0.1' 4 | ]; 5 | -------------------------------------------------------------------------------- /public/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/images/bg.png -------------------------------------------------------------------------------- /public/images/aiwrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/images/aiwrap.png -------------------------------------------------------------------------------- /public/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/fonts/iconfont.eot -------------------------------------------------------------------------------- /public/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/fonts/iconfont.ttf -------------------------------------------------------------------------------- /public/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/fonts/iconfont.woff -------------------------------------------------------------------------------- /public/lib/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/font/iconfont.eot -------------------------------------------------------------------------------- /public/lib/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /public/lib/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/0.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/1.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/2.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/3.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/4.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/5.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/6.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/7.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/8.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/9.gif -------------------------------------------------------------------------------- /public/lib/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/font/iconfont.woff -------------------------------------------------------------------------------- /public/lib/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/10.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/11.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/12.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/13.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/14.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/15.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/16.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/17.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/18.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/19.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/20.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/21.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/22.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/23.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/24.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/25.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/26.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/27.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/28.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/29.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/30.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/31.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/32.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/33.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/34.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/35.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/36.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/37.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/38.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/39.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/40.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/41.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/42.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/43.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/44.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/45.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/46.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/47.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/48.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/49.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/50.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/51.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/52.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/53.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/54.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/55.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/56.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/57.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/58.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/59.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/60.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/61.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/62.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/63.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/64.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/65.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/66.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/67.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/68.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/69.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/70.gif -------------------------------------------------------------------------------- /public/lib/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/images/face/71.gif -------------------------------------------------------------------------------- /config/base.php: -------------------------------------------------------------------------------- 1 | 'Swoft framework 2.0', 4 | 'debug' => env('SWOFT_DEBUG', 1), 5 | ]; 6 | -------------------------------------------------------------------------------- /public/lib/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /public/lib/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /public/lib/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /public/lib/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /public/lib/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ctfang/pay-center/master/public/lib/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .buildpath 2 | .settings/ 3 | .project 4 | *.patch 5 | .idea/ 6 | .git/ 7 | runtime/ 8 | vendor/ 9 | *.lock 10 | .phpintel/ 11 | .env 12 | .phpstorm.meta.php 13 | .DS_Store 14 | public/devtool/ 15 | bin/php-cs-fixer 16 | -------------------------------------------------------------------------------- /bin/swoft: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 300000, 9 | ]); 10 | 11 | // Run application 12 | (new \App\Application())->run(); 13 | -------------------------------------------------------------------------------- /app/Http/Controller/NotifyController.php: -------------------------------------------------------------------------------- 1 | 2 | 16 |

This is footer

17 |
18 | view file: 
19 |     
20 | 21 | -------------------------------------------------------------------------------- /app/Http/Controller/PublicController.php: -------------------------------------------------------------------------------- 1 | getResponse()->withStatus(404); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Model/Logic/RequestBeanTwo.php: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./test 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/AutoLoader.php: -------------------------------------------------------------------------------- 1 | __DIR__, 29 | ]; 30 | } 31 | 32 | /** 33 | * @return array 34 | */ 35 | public function metadata(): array 36 | { 37 | return []; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /resource/views/layouts/default.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | Demo for layout 14 | 15 | 16 | 17 | include('layouts/default/header') ?> 18 | 19 |
20 | 21 |
{_CONTENT_}
22 | include('layouts/default/footer') ?> 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /app/Model/Logic/RequestBean.php: -------------------------------------------------------------------------------- 1 | > ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 17 | - | 18 | wget -O bin/php-cs-fixer "https://cs.symfony.com/download/php-cs-fixer-v2.phar" 19 | chmod +x bin/php-cs-fixer 20 | 21 | before_script: 22 | - phpenv config-rm xdebug.ini 23 | - composer config -g process-timeout 900 && composer update 24 | - composer require --dev phpstan/phpstan-shim 25 | 26 | script: 27 | - composer cs-fix 28 | - composer test 29 | -------------------------------------------------------------------------------- /app/Listener/Test/TaskProcessListener.php: -------------------------------------------------------------------------------- 1 | config->pull('application'); 40 | 41 | // Print data 42 | var_dump($data); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Middleware/LoginMiddleware.php: -------------------------------------------------------------------------------- 1 | handle($request); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | services: 3 | swoft: 4 | image: swoft/swoft 5 | # for local develop 6 | command: php -S 127.0.0.1:13300 7 | container_name: php 8 | environment: 9 | - APP_ENV=dev 10 | - TIMEZONE=Asia/Shanghai 11 | restart: always 12 | depends_on: 13 | - mysql 14 | - redis 15 | ports: 16 | - "80:18306" 17 | - "18307:18307" 18 | - "18308:18308" 19 | volumes: 20 | - ./:/var/www/swoft 21 | # - ./runtime/ng-conf:/etc/nginx 22 | # - ./runtime/logs:/var/log 23 | 24 | mysql: 25 | image: mysql 26 | container_name: mysql-srv 27 | environment: 28 | - MYSQL_ROOT_PASSWORD=123456 29 | ports: 30 | - "13306:3306" 31 | volumes: 32 | - ./runtime/data/mysql:/var/lib/mysql 33 | restart: always 34 | 35 | redis: 36 | container_name: redis-srv 37 | image: redis:4-alpine 38 | ports: 39 | - "16379:6379" 40 | sysctls: 41 | net.core.somaxconn: 65535 42 | restart: always 43 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | | Q | A 11 | | ------------------- | ----- 12 | | Bug report? | yes/no 13 | | Feature request? | yes/no 14 | | Swoft version | x.y.z 15 | | Swoole version | x.y.z (by `php --ri swoole`) 16 | | PHP version | x.y.z (by `php -v`) 17 | | Runtime environment | Win10/Mac/CentOS 7/Ubuntu/Docker etc. 18 | 19 | **Describe the bug** 20 | A clear and concise description of what the bug is. 21 | 22 | **Expected behavior** 23 | A clear and concise description of what you expected to happen. 24 | 25 | **Screenshots** 26 | If applicable, add screenshots to help explain your problem. 27 | 28 | **Details** 29 | 30 | > Describe what you are trying to achieve and what goes wrong. 31 | 32 | ```php 33 | // paste output here 34 | ``` 35 | 36 | > Provide minimal script to reproduce the issue 37 | 38 | ```php 39 | // paste code 40 | ``` 41 | -------------------------------------------------------------------------------- /app/Application.php: -------------------------------------------------------------------------------- 1 | __DIR__, 41 | ]; 42 | } 43 | 44 | /** 45 | * @return array 46 | */ 47 | public function metadata(): array 48 | { 49 | return []; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/Listener/Test/WorkerStopListener.php: -------------------------------------------------------------------------------- 1 | getTarget(); 36 | 37 | if ($modelStatic instanceof User) { 38 | // to do something.... 39 | } 40 | 41 | // .... 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /.php_cs: -------------------------------------------------------------------------------- 1 | setRiskyAllowed(true) 14 | ->setRules([ 15 | '@PSR2' => true, 16 | 'header_comment' => [ 17 | 'commentType' => 'PHPDoc', 18 | 'header' => $header, 19 | 'separate' => 'none' 20 | ], 21 | 'array_syntax' => [ 22 | 'syntax' => 'short' 23 | ], 24 | 'single_quote' => true, 25 | 'class_attributes_separation' => true, 26 | 'no_unused_imports' => true, 27 | 'standardize_not_equals' => true, 28 | ]) 29 | ->setFinder( 30 | PhpCsFixer\Finder::create() 31 | ->exclude('public') 32 | ->exclude('resource') 33 | ->exclude('config') 34 | ->exclude('runtime') 35 | ->exclude('vendor') 36 | ->in(__DIR__) 37 | ) 38 | ->setUsingCache(false); 39 | -------------------------------------------------------------------------------- /app/Listener/UserSavingListener.php: -------------------------------------------------------------------------------- 1 | getTarget(); 35 | 36 | /** 37 | if ($user->getAge() > 100) { 38 | // stopping saving 39 | $event->stopPropagation(true); 40 | 41 | $user->setAdd(100); 42 | } 43 | */ 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/Rpc/Middleware/ServiceMiddleware.php: -------------------------------------------------------------------------------- 1 | handle($request); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Validator/TestValidator.php: -------------------------------------------------------------------------------- 1 | /g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /app/Console/Command/DemoCommand.php: -------------------------------------------------------------------------------- 1 | $input->getArgs(), 34 | 'opts' => $input->getOptions(), 35 | ]); 36 | } 37 | 38 | /** 39 | * @CommandMapping("err") 40 | * @throws ConsoleErrorException 41 | */ 42 | public function coError(): void 43 | { 44 | ConsoleErrorException::throw('this is an error message'); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Listener/RanListener.php: -------------------------------------------------------------------------------- 1 | getTarget(); 39 | 40 | $querySql = $event->getParam(0); 41 | $bindings = $event->getParam(1); 42 | 43 | $rawSql = $connection->getRawSql($querySql, $bindings); 44 | output()->info($rawSql); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Listener/DeregisterServiceListener.php: -------------------------------------------------------------------------------- 1 | getTarget(); 44 | 45 | //$this->agent->deregisterService('swoft'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Rpc/Lib/UserInterface.php: -------------------------------------------------------------------------------- 1 | className, $this->propertyName, $annotationObject); 41 | return []; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /database/Migration/AddAdminRoleNavTable.php: -------------------------------------------------------------------------------- 1 | schema->createIfNotExists('admin_role_nav', function (Blueprint $blueprint) { 29 | $blueprint->comment('管理角色菜单'); 30 | 31 | $blueprint->unsignedInteger("role_id")->comment("管理角色id"); 32 | $blueprint->unsignedInteger("nav_id")->comment("菜单id"); 33 | }); 34 | } 35 | 36 | /** 37 | * @return void 38 | * @throws \ReflectionException 39 | * @throws \Swoft\Bean\Exception\ContainerException 40 | * @throws \Swoft\Db\Exception\DbException 41 | */ 42 | public function down(): void 43 | { 44 | $this->schema->dropIfExists("admin_role_nav"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /database/Migration/AddAdminRoleUrlTable.php: -------------------------------------------------------------------------------- 1 | schema->createIfNotExists('admin_role_url', function (Blueprint $blueprint) { 29 | $blueprint->comment('管理角色管理权限'); 30 | 31 | $blueprint->unsignedInteger("role_id")->comment("管理角色id"); 32 | $blueprint->string("path",100)->comment("method@url"); 33 | }); 34 | } 35 | 36 | /** 37 | * @return void 38 | * @throws \ReflectionException 39 | * @throws \Swoft\Bean\Exception\ContainerException 40 | * @throws \Swoft\Db\Exception\DbException 41 | */ 42 | public function down(): void 43 | { 44 | $this->schema->dropIfExists('admin_role_url'); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Validator/CustomerValidator.php: -------------------------------------------------------------------------------- 1 | $end) { 42 | throw new ValidatorException('Start cannot be greater than the end time'); 43 | } 44 | 45 | return $data; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Crontab/CronTask.php: -------------------------------------------------------------------------------- 1 | setAge(mt_rand(1, 100)); 36 | // $user->setUserDesc('desc'); 37 | // 38 | // $user->save(); 39 | // 40 | // $id = $user->getId(); 41 | // $user = User::find($id)->toArray(); 42 | 43 | CLog::info('second task run: %s ', date('Y-m-d H:i:s')); 44 | // CLog::info(JsonHelper::encode($user)); 45 | } 46 | 47 | /** 48 | * @Cron("0 * * * * *") 49 | */ 50 | public function minuteTask(): void 51 | { 52 | CLog::info('minute task run: %s ', date('Y-m-d H:i:s')); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Exception/Handler/ApiExceptionHandler.php: -------------------------------------------------------------------------------- 1 | $except->getCode(), 38 | 'error' => sprintf('(%s) %s', get_class($except), $except->getMessage()), 39 | 'file' => sprintf('At %s line %d', $except->getFile(), $except->getLine()), 40 | 'trace' => $except->getTraceAsString(), 41 | ]; 42 | 43 | return $response->withData($data); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /public/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台登录-X-admin2.2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
18 |

19 |

页面或者数据被 纸飞机 运到火星了,啥都看不到了…

20 |
21 |
22 |
23 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/Model/Logic/MonitorLogic.php: -------------------------------------------------------------------------------- 1 | name('swoft-monitor'); 38 | 39 | while (true) { 40 | $connections = context()->getServer()->getSwooleServer()->connections; 41 | CLog::info('monitor = ' . json_encode($connections)); 42 | 43 | // Database 44 | $user = User::find(1)->toArray(); 45 | CLog::info('user='.json_encode($user)); 46 | 47 | // Redis 48 | Redis::set('test', 'ok'); 49 | CLog::info('test='.Redis::get('test')); 50 | 51 | Coroutine::sleep(3); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Model/Entity/Desc.php: -------------------------------------------------------------------------------- 1 | id; 47 | } 48 | 49 | /** 50 | * @param int $id 51 | */ 52 | public function setId(int $id): void 53 | { 54 | $this->id = $id; 55 | } 56 | 57 | /** 58 | * @return string 59 | */ 60 | public function getDesc(): ?string 61 | { 62 | return $this->desc; 63 | } 64 | 65 | /** 66 | * @param string $desc 67 | */ 68 | public function setDesc(string $desc): void 69 | { 70 | $this->desc = $desc; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /dev.composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "swoft/swoft", 3 | "type": "project", 4 | "keywords": [ 5 | "php", 6 | "swoole", 7 | "swoft" 8 | ], 9 | "description": "Modern High performance AOP and Coroutine PHP Framework, base on Swoole", 10 | "license": "Apache-2.0", 11 | "require": { 12 | "php": ">7.1", 13 | "ext-pdo": "*", 14 | "ext-json": "*", 15 | "ext-swoole": ">=4.3", 16 | "swoft/component": "dev-master as 2.0", 17 | "swoft/ext": "dev-master as 2.0" 18 | }, 19 | "require-dev": { 20 | "swoft/swoole-ide-helper": "dev-master", 21 | "phpunit/phpunit": "^7.5" 22 | }, 23 | "autoload": { 24 | "psr-4": { 25 | "App\\": "app/" 26 | }, 27 | "files": [ 28 | "app/Helper/Functions.php" 29 | ] 30 | }, 31 | "autoload-dev": { 32 | "psr-4": { 33 | "SwoftTest\\": "./test/" 34 | } 35 | }, 36 | "scripts": { 37 | "post-root-package-install": [ 38 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 39 | ], 40 | "test": "./vendor/bin/phpunit -c phpunit.xml", 41 | "cs-fix": "./vendor/bin/php-cs-fixer fix $1" 42 | }, 43 | "repositories": { 44 | "packagist": { 45 | "type": "composer", 46 | "url": "https://mirrors.aliyun.com/composer/" 47 | }, 48 | "0": { 49 | "type": "git", 50 | "url": "git@github.com:swoft-cloud/swoft-component.git" 51 | }, 52 | "1": { 53 | "type": "git", 54 | "url": "git@github.com:swoft-cloud/swoft-ext.git" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /resource/views/layouts/default/header.php: -------------------------------------------------------------------------------- 1 |
2 | 29 |
30 | -------------------------------------------------------------------------------- /database/Migration/AddAdminUserTable.php: -------------------------------------------------------------------------------- 1 | schema->createIfNotExists('admin_user', function (Blueprint $blueprint) { 29 | $blueprint->comment('管理员表'); 30 | 31 | $blueprint->increments('user_id')->comment('主键'); 32 | $blueprint->string('name')->comment('名字'); 33 | $blueprint->unsignedTinyInteger('enable')->comment('1开0关'); 34 | 35 | $blueprint->integer('created_at')->default('0')->comment('create time'); 36 | $blueprint->integer('updated_at')->default('0')->comment('update timestamp'); 37 | }); 38 | } 39 | 40 | /** 41 | * @return void 42 | * @throws \ReflectionException 43 | * @throws \Swoft\Bean\Exception\ContainerException 44 | * @throws \Swoft\Db\Exception\DbException 45 | */ 46 | public function down(): void 47 | { 48 | $this->schema->dropIfExists("admin_user"); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/Exception/Handler/WsMessageExceptionHandler.php: -------------------------------------------------------------------------------- 1 | getMessage(), $e->getFile(), $e->getLine()); 42 | 43 | Log::error('Ws server error(%s)', $message); 44 | 45 | // Debug is false 46 | if (!APP_DEBUG) { 47 | server()->push($frame->fd, $e->getMessage()); 48 | return; 49 | } 50 | 51 | server()->push($frame->fd, $message); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/Validator/Rule/AlphaDashRule.php: -------------------------------------------------------------------------------- 1 | getMessage(); 37 | if (!isset($data[$propertyName]) && $default === null) { 38 | $message = (empty($message)) ? sprintf('%s must exist!', $propertyName) : $message; 39 | throw new ValidatorException($message); 40 | } 41 | 42 | $rule = '/^[A-Za-z0-9\-\_]+$/'; 43 | if (preg_match($rule, $data[$propertyName])) { 44 | return $data; 45 | } 46 | 47 | $message = (empty($message)) ? sprintf('%s must be a email', $propertyName) : $message; 48 | throw new ValidatorException($message); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /database/Migration/AddAdminUrlTable.php: -------------------------------------------------------------------------------- 1 | schema->createIfNotExists('admin_url', function (Blueprint $blueprint) { 29 | $blueprint->comment('地址表,权限'); 30 | 31 | $blueprint->increments('id')->comment('主键'); 32 | $blueprint->string("url", 60)->comment("路由地址 /home"); 33 | $blueprint->string("method", 10)->comment("method"); 34 | $blueprint->string("path", 70)->comment("地址 GET@/home 能完整表达 method@url"); 35 | 36 | $blueprint->integer('created_at')->default('0')->comment('create time'); 37 | $blueprint->integer('updated_at')->default('0')->comment('update timestamp'); 38 | }); 39 | } 40 | 41 | /** 42 | * @return void 43 | * @throws \ReflectionException 44 | * @throws \Swoft\Bean\Exception\ContainerException 45 | * @throws \Swoft\Db\Exception\DbException 46 | */ 47 | public function down(): void 48 | { 49 | $this->schema->dropIfExists("admin_url"); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /database/Migration/AddAdminRoleTable.php: -------------------------------------------------------------------------------- 1 | schema->createIfNotExists('admin_role', function (Blueprint $blueprint) { 29 | $blueprint->comment('管理角色'); 30 | 31 | $blueprint->increments('id')->comment('主键'); 32 | $blueprint->string("name", 30)->comment("名字"); 33 | $blueprint->unsignedTinyInteger("enabled")->default(1)->comment("0关1开"); 34 | $blueprint->string("desc")->comment("备注说明"); 35 | 36 | $blueprint->integer('created_at')->default('0')->comment('create time'); 37 | $blueprint->integer('updated_at')->default('0')->comment('update timestamp'); 38 | }); 39 | } 40 | 41 | /** 42 | * @return void 43 | * @throws \ReflectionException 44 | * @throws \Swoft\Bean\Exception\ContainerException 45 | * @throws \Swoft\Db\Exception\DbException 46 | */ 47 | public function down(): void 48 | { 49 | $this->schema->dropIfExists('admin_role'); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/Annotation/Mapping/AlphaDash.php: -------------------------------------------------------------------------------- 1 | message = $values['value']; 47 | } 48 | if (isset($values['message'])) { 49 | $this->message = $values['message']; 50 | } 51 | if (isset($values['name'])) { 52 | $this->name = $values['name']; 53 | } 54 | } 55 | 56 | /** 57 | * @return string 58 | */ 59 | public function getMessage(): string 60 | { 61 | return $this->message; 62 | } 63 | 64 | /** 65 | * @return string 66 | */ 67 | public function getName(): string 68 | { 69 | return $this->name; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Exception/Handler/RpcExceptionHandler.php: -------------------------------------------------------------------------------- 1 | getMessage(), $e->getFile(), $e->getLine()); 44 | $error = Error::new($e->getCode(), $message, null); 45 | } else { 46 | $error = Error::new($e->getCode(), $e->getMessage(), null); 47 | } 48 | 49 | Debug::log('Rpc server error(%s)', $e->getMessage()); 50 | 51 | $response->setError($error); 52 | 53 | // Debug is true 54 | return $response; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /public/lib/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /app/Rpc/Service/UserService.php: -------------------------------------------------------------------------------- 1 | ['list']]; 37 | } 38 | 39 | /** 40 | * @param int $id 41 | * 42 | * @return bool 43 | */ 44 | public function delete(int $id): bool 45 | { 46 | return false; 47 | } 48 | 49 | /** 50 | * @return void 51 | */ 52 | public function returnNull(): void 53 | { 54 | return; 55 | } 56 | 57 | /** 58 | * @return string 59 | */ 60 | public function getBigContent(): string 61 | { 62 | $content = Co::readFile(__DIR__ . '/big.data'); 63 | return $content; 64 | } 65 | 66 | /** 67 | * Exception 68 | * @throws Exception 69 | */ 70 | public function exception(): void 71 | { 72 | throw new Exception('exception version'); 73 | } 74 | 75 | /** 76 | * @param string $content 77 | * 78 | * @return int 79 | */ 80 | public function sendBigContent(string $content): int 81 | { 82 | return strlen($content); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /app/Model/Logic/ConsulLogic.php: -------------------------------------------------------------------------------- 1 | kv->put('/test/my/key', $value); 79 | 80 | $response = $this->kv->get('/test/my/key'); 81 | var_dump($response->getBody(), $response->getResult()); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/Exception/Handler/WsHandshakeExceptionHandler.php: -------------------------------------------------------------------------------- 1 | withStatus(500)->withContent(sprintf( 43 | '%s At %s line %d', 44 | $e->getMessage(), 45 | $e->getFile(), 46 | $e->getLine() 47 | )); 48 | } 49 | 50 | $data = [ 51 | 'code' => $e->getCode(), 52 | 'error' => sprintf('(%s) %s', get_class($e), $e->getMessage()), 53 | 'file' => sprintf('At %s line %d', $e->getFile(), $e->getLine()), 54 | 'trace' => $e->getTraceAsString(), 55 | ]; 56 | 57 | // Debug is true 58 | return $response->withData($data); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/Rpc/Service/UserServiceV2.php: -------------------------------------------------------------------------------- 1 | ['list'], 38 | 'v' => '1.2' 39 | ]; 40 | } 41 | 42 | /** 43 | * @return void 44 | */ 45 | public function returnNull(): void 46 | { 47 | return; 48 | } 49 | 50 | /** 51 | * @param int $id 52 | * 53 | * @return bool 54 | */ 55 | public function delete(int $id): bool 56 | { 57 | return false; 58 | } 59 | 60 | /** 61 | * @return string 62 | */ 63 | public function getBigContent(): string 64 | { 65 | $content = Co::readFile(__DIR__ . '/big.data'); 66 | return $content; 67 | } 68 | 69 | /** 70 | * Exception 71 | * @throws Exception 72 | */ 73 | public function exception(): void 74 | { 75 | throw new Exception('exception version2'); 76 | } 77 | 78 | /** 79 | * @param string $content 80 | * 81 | * @return int 82 | */ 83 | public function sendBigContent(string $content): int 84 | { 85 | return strlen($content); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /database/Migration/AddNavTable.php: -------------------------------------------------------------------------------- 1 | schema->createIfNotExists('admin_nav', function (Blueprint $blueprint) { 29 | $blueprint->comment('菜单表'); 30 | 31 | $blueprint->increments('id')->comment('主键'); 32 | $blueprint->unsignedInteger('pid')->default(0)->comment('上级菜单'); 33 | $blueprint->string("path", 60)->comment("地址,地址只能GET"); 34 | $blueprint->string("type",15)->comment("处于导航栏的位置,top为顶部;middle为中间;bottom,为底部"); 35 | $blueprint->string("name", 30)->comment("名字"); 36 | $blueprint->string("icon", 30)->comment("图标"); 37 | $blueprint->unsignedTinyInteger("order")->default(1)->comment("排序 ,数字越大越靠后"); 38 | $blueprint->unsignedTinyInteger("enabled")->default(1)->comment("0关1开"); 39 | 40 | $blueprint->integer('created_at')->default('0')->comment('create time'); 41 | $blueprint->integer('updated_at')->default('0')->comment('update timestamp'); 42 | }); 43 | } 44 | 45 | /** 46 | * @return void 47 | * @throws \ReflectionException 48 | * @throws \Swoft\Bean\Exception\ContainerException 49 | * @throws \Swoft\Db\Exception\DbException 50 | */ 51 | public function down(): void 52 | { 53 | $this->schema->dropIfExists('admin_nav'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /public/lib/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('
'+d+"
");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /database/Migration/AddPaymentTable.php: -------------------------------------------------------------------------------- 1 | schema->createIfNotExists('payment', function (Blueprint $blueprint) { 29 | $blueprint->comment('安装的支付方式配置信息'); 30 | 31 | $blueprint->increments('pay_id')->comment('主键'); 32 | $blueprint->string("pay_code", 30)->comment("支付方式的英文缩写,关联程序"); 33 | $blueprint->string("pay_name",30)->comment("支付方式名称"); 34 | $blueprint->string("pay_fee", 30)->comment("手续费"); 35 | $blueprint->text("pay_desc")->comment("支付方式描述"); 36 | $blueprint->unsignedTinyInteger("pay_order")->default(1)->comment("排序 ,数字越大越靠后"); 37 | $blueprint->text("pay_config")->comment("支付方式的配置信息,包括商户号和密钥什么的"); 38 | $blueprint->unsignedTinyInteger("enabled")->default(1)->comment("0关1开"); 39 | 40 | $blueprint->integer('created_at')->default('0')->comment('create time'); 41 | $blueprint->integer('updated_at')->default('0')->comment('update timestamp'); 42 | }); 43 | } 44 | 45 | /** 46 | * @return void 47 | * @throws \ReflectionException 48 | * @throws \Swoft\Bean\Exception\ContainerException 49 | * @throws \Swoft\Db\Exception\DbException 50 | */ 51 | public function down(): void 52 | { 53 | $this->schema->dropIfExists('payment'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/Listener/RegisterServiceListener.php: -------------------------------------------------------------------------------- 1 | getTarget(); 45 | 46 | $service = [ 47 | 'ID' => 'swoft', 48 | 'Name' => 'swoft', 49 | 'Tags' => [ 50 | 'http' 51 | ], 52 | 'Address' => '127.0.0.1', 53 | 'Port' => $httpServer->getPort(), 54 | 'Meta' => [ 55 | 'version' => '1.0' 56 | ], 57 | 'EnableTagOverride' => false, 58 | 'Weights' => [ 59 | 'Passing' => 10, 60 | 'Warning' => 1 61 | ] 62 | ]; 63 | 64 | 65 | // Register 66 | // $this->agent->registerService($service); 67 | // CLog::info('Swoft http register service success by consul!'); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/Exception/Handler/HttpExceptionHandler.php: -------------------------------------------------------------------------------- 1 | getMessage()); 44 | CLog::error($e->getMessage()); 45 | 46 | // Debug is false 47 | if (!APP_DEBUG) { 48 | return $response->withStatus(500)->withContent( 49 | sprintf(' %s At %s line %d', $e->getMessage(), $e->getFile(), $e->getLine()) 50 | ); 51 | } 52 | 53 | $data = [ 54 | 'code' => $e->getCode(), 55 | 'error' => sprintf('(%s) %s', get_class($e), $e->getMessage()), 56 | 'file' => sprintf('At %s line %d', $e->getFile(), $e->getLine()), 57 | 'trace' => $e->getTraceAsString(), 58 | ]; 59 | 60 | // Debug is true 61 | return $response->withData($data)->withStatus(500); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "swoft/swoft", 3 | "type": "project", 4 | "keywords": [ 5 | "php", 6 | "swoole", 7 | "swoft" 8 | ], 9 | "description": "Modern High performance AOP and Coroutine PHP Framework", 10 | "license": "Apache-2.0", 11 | "require": { 12 | "php": ">7.1", 13 | "ext-pdo": "*", 14 | "ext-redis": "*", 15 | "ext-json": "*", 16 | "ext-simplexml": "*", 17 | "ext-libxml": "*", 18 | "ext-mbstring": "*", 19 | "swoft/db": "~2.0.0", 20 | "swoft/i18n": "~2.0.0", 21 | "swoft/view": "~2.0.0", 22 | "swoft/task": "~2.0.0", 23 | "swoft/redis": "~2.0.0", 24 | "swoft/framework": "~2.0.0", 25 | "swoft/http-server": "~2.0.0", 26 | "swoft/rpc-client": "~2.0.0", 27 | "swoft/rpc-server": "~2.0.0", 28 | "swoft/websocket-server": "~2.0.0", 29 | "swoft/tcp-server": "~2.0.0", 30 | "swoft/process": "~2.0.0", 31 | "swoft/apollo": "~2.0.0", 32 | "swoft/consul": "~2.0.0", 33 | "swoft/limiter": "~2.0.0", 34 | "swoft/breaker": "~2.0.0", 35 | "swoft/crontab": "~2.0.0", 36 | "swoft/devtool": "~2.0.0" 37 | }, 38 | "require-dev": { 39 | "ctfang/swoft-admin": "dev-master", 40 | "swoft/swoole-ide-helper": "dev-master", 41 | "phpunit/phpunit": "^7.5" 42 | }, 43 | "autoload": { 44 | "psr-4": { 45 | "App\\": "app/", 46 | "Database\\": "database/" 47 | }, 48 | "files": [ 49 | "app/Helper/Functions.php" 50 | ] 51 | }, 52 | "autoload-dev": { 53 | "psr-4": { 54 | "AppTest\\Testing\\": "test/testing", 55 | "AppTest\\Unit\\": "test/unit" 56 | } 57 | }, 58 | "scripts": { 59 | "post-root-package-install": [ 60 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 61 | ], 62 | "test": [ 63 | "./vendor/bin/phpstan analyze", 64 | "./vendor/bin/phpunit -c phpunit.xml" 65 | ], 66 | "cs-fix": "./bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff" 67 | }, 68 | "repositories": { 69 | "packagist": { 70 | "type": "composer", 71 | "url": "https://mirrors.aliyun.com/composer/" 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /public/demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pay 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 |
20 | 37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /public/README.md: -------------------------------------------------------------------------------- 1 | # X-admin 2 | 3 | 简介 4 | X-admin基于layui的轻量级前端后台管理框架,简单免费,兼容性好,面向所有层次的前后端程序。创立于2017年初,为了敏捷WEB应用开发和简化企业应用开发而诞生的。#X-admin从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发前端后台框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。testadmin 5 | 6 | 商业友好的开源协议 7 | X-admin遵循Apache2开源协议发布。Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再作为开源或商业软件发布。 8 | 9 | ## (ps:喜欢记得点赞,开源免费,大家拿去用,如果过意不去就捐点款,我不介意的) 10 | 11 | ## 官网 12 | 13 | http://x.xuebingsi.com 14 | 15 | 交流QQ群:519492808 16 | 17 | ## 2019-05-06更新 18 | 19 | 修改静态表格展现问题,设置td 最小宽度为80px,table宽度溢出自动出现滚动。 20 | 升级方式,下载复制最新的 xadmin.css 在table外盒子增加 两个类。 21 | 修改如下:class增加"layui-table-body layui-table-main" 22 | ``` 23 |
24 | 25 |
26 |
config->listen($namespaces, [$this, 'updateConfigFile']); 51 | } catch (Throwable $e) { 52 | CLog::error('Config agent fail(%s %s %d)!', $e->getMessage(), $e->getFile(), $e->getLine()); 53 | } 54 | } 55 | } 56 | 57 | /** 58 | * @param array $data 59 | * 60 | * @throws SwoftException 61 | */ 62 | public function updateConfigFile(array $data): void 63 | { 64 | foreach ($data as $namespace => $namespaceData) { 65 | $configFile = sprintf('@config/%s.php', $namespace); 66 | 67 | $configKVs = $namespaceData['configurations'] ?? ''; 68 | $content = 'restart(); 76 | 77 | // /** @var ServiceServer $server */ 78 | // $server = bean('rpcServer'); 79 | // $server->restart(); 80 | 81 | /** @var WebSocketServer $server */ 82 | $server = bean('wsServer'); 83 | $server->restart(); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /resource/views/role/edit.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | pay 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 |
24 |
25 |
26 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /public/lib/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='"+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /app/Model/Logic/BreakerLogic.php: -------------------------------------------------------------------------------- 1 | id; 63 | } 64 | 65 | /** 66 | * @param null|int $id 67 | */ 68 | public function setId(?int $id): void 69 | { 70 | $this->id = $id; 71 | } 72 | 73 | /** 74 | * @return null|int 75 | */ 76 | public function getUserId(): ?int 77 | { 78 | return $this->userId; 79 | } 80 | 81 | /** 82 | * @param null|int $userId 83 | */ 84 | public function setUserId(?int $userId): void 85 | { 86 | $this->userId = $userId; 87 | } 88 | 89 | /** 90 | * @return null|int 91 | */ 92 | public function getCreateTime(): ?int 93 | { 94 | return $this->createTime; 95 | } 96 | 97 | /** 98 | * @param null|int $createTime 99 | */ 100 | public function setCreateTime(?int $createTime): void 101 | { 102 | $this->createTime = $createTime; 103 | } 104 | 105 | /** 106 | * @return null|string 107 | */ 108 | public function getAttributes(): ?string 109 | { 110 | return $this->attributes; 111 | } 112 | 113 | /** 114 | * @param null|string $attributes 115 | */ 116 | public function setAttributes(?string $attributes): void 117 | { 118 | $this->attributes = $attributes; 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /public/css/login.css: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: xuebingsi 3 | * @Date: 2019-04-01 13:37:17 4 | * @Last Modified by: zhibinm 5 | * @Last Modified time: 2019-04-01 13:37:19 6 | */ 7 | .login-bg{ 8 | /*background: #eeeeee url() 0 0 no-repeat;*/ 9 | background:url(../images/bg.png) no-repeat center; 10 | background-size: cover; 11 | overflow: hidden; 12 | } 13 | .login{ 14 | margin: 120px auto 0 auto; 15 | min-height: 420px; 16 | max-width: 420px; 17 | padding: 40px; 18 | background-color: #ffffff; 19 | margin-left: auto; 20 | margin-right: auto; 21 | border-radius: 4px; 22 | /* overflow-x: hidden; */ 23 | box-sizing: border-box; 24 | } 25 | .login a.logo{ 26 | display: block; 27 | height: 58px; 28 | width: 167px; 29 | margin: 0 auto 30px auto; 30 | background-size: 167px 42px; 31 | } 32 | .login .message { 33 | margin: 10px 0 0 -58px; 34 | padding: 18px 10px 18px 60px; 35 | background: #189F92; 36 | position: relative; 37 | color: #fff; 38 | font-size: 16px; 39 | } 40 | .login #darkbannerwrap { 41 | background: url(../images/aiwrap.png); 42 | width: 18px; 43 | height: 10px; 44 | margin: 0 0 20px -58px; 45 | position: relative; 46 | } 47 | 48 | .login input[type=text], 49 | .login input[type=file], 50 | .login input[type=password], 51 | .login input[type=email], select { 52 | border: 1px solid #DCDEE0; 53 | vertical-align: middle; 54 | border-radius: 3px; 55 | height: 50px; 56 | padding: 0px 16px; 57 | font-size: 14px; 58 | color: #555555; 59 | outline:none; 60 | width:100%; 61 | box-sizing: border-box; 62 | } 63 | .login input[type=text]:focus, 64 | .login input[type=file]:focus, 65 | .login input[type=password]:focus, 66 | .login input[type=email]:focus, select:focus { 67 | border: 1px solid #27A9E3; 68 | } 69 | .login input[type=submit], 70 | .login input[type=button]{ 71 | display: inline-block; 72 | vertical-align: middle; 73 | padding: 12px 24px; 74 | margin: 0px; 75 | font-size: 18px; 76 | line-height: 24px; 77 | text-align: center; 78 | white-space: nowrap; 79 | vertical-align: middle; 80 | cursor: pointer; 81 | color: #ffffff; 82 | background-color: #189F92; 83 | border-radius: 3px; 84 | border: none; 85 | -webkit-appearance: none; 86 | outline:none; 87 | width:100%; 88 | } 89 | .login hr { 90 | background: #fff url() 0 0 no-repeat; 91 | } 92 | .login hr.hr15 { 93 | height: 15px; 94 | border: none; 95 | margin: 0px; 96 | padding: 0px; 97 | width: 100%; 98 | } 99 | .login hr.hr20 { 100 | height: 20px; 101 | border: none; 102 | margin: 0px; 103 | padding: 0px; 104 | width: 100%; 105 | } -------------------------------------------------------------------------------- /app/bean.php: -------------------------------------------------------------------------------- 1 | [ 20 | 'logFile' => '@runtime/logs/notice-%d{Y-m-d-H}.log', 21 | ], 22 | 'applicationHandler' => [ 23 | 'logFile' => '@runtime/logs/error-%d{Y-m-d}.log', 24 | ], 25 | 'logger' => [ 26 | 'flushRequest' => false, 27 | 'enable' => false, 28 | 'json' => false, 29 | ], 30 | 'httpServer' => [ 31 | 'class' => HttpServer::class, 32 | 'port' => env('HTTP_PORT',18306), 33 | 'listener' => [ 34 | 'rpc' => bean('rpcServer') 35 | ], 36 | 'process' => [ 37 | // 'monitor' => bean(MonitorProcess::class) 38 | // 'crontab' => bean(CrontabProcess::class) 39 | ], 40 | 'on' => [ 41 | // SwooleEvent::TASK => bean(SyncTaskListener::class), // Enable sync task 42 | SwooleEvent::TASK => bean(TaskListener::class), // Enable task must task and finish event 43 | SwooleEvent::FINISH => bean(FinishListener::class) 44 | ], 45 | /* @see HttpServer::$setting */ 46 | 'setting' => [ 47 | 'task_worker_num' => 12, 48 | 'task_enable_coroutine' => true, 49 | 'worker_num' => 6, 50 | 'enable_static_handler' => true, 51 | 'document_root' => dirname(__DIR__).'/public', 52 | ] 53 | ], 54 | 'httpDispatcher' => [ 55 | // Add global http middleware 56 | 'middlewares' => [ 57 | // Allow use @View tag 58 | \Swoft\View\Middleware\ViewMiddleware::class, 59 | ], 60 | 'afterMiddlewares' => [ 61 | \Swoft\Http\Server\Middleware\ValidatorMiddleware::class 62 | ] 63 | ], 64 | 'db' => [ 65 | 'class' => Database::class, 66 | 'dsn' => 'mysql:dbname=pay;host=mysql', 67 | 'username' => 'root', 68 | 'password' => '123456', 69 | ], 70 | 'db.pool' => [ 71 | 'class' => Pool::class, 72 | 'database' => bean('db'), 73 | ], 74 | 'migrationManager' => [ 75 | 'migrationPath' => '@database/Migration', 76 | ], 77 | 'rpcServer' => [ 78 | 'class' => ServiceServer::class, 79 | 'port' => 18366, 80 | ], 81 | ]; 82 | -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | includes: 2 | - phar://phpstan.phar/conf/bleedingEdge.neon 3 | parameters: 4 | level: max 5 | inferPrivatePropertyTypeFromConstructor: true 6 | paths: 7 | - %currentWorkingDirectory%/app/ 8 | autoload_files: 9 | - %currentWorkingDirectory%/test/bootstrap.php 10 | autoload_directories: 11 | - %currentWorkingDirectory%/vendor/swoft/swoole-ide-helper/output/namespace/ 12 | dynamicConstantNames: 13 | - APP_DEBUG 14 | ignoreErrors: 15 | # Variable type 16 | - '#^Call to an undefined method Swoft\\Contract\\ContextInterface::get\S+\(\)\.$#' 17 | - '#^Call to an undefined method Swoft\\Session\\SessionInterface::push\(\)#' 18 | - '#^Call to an undefined method Swoft\\Session\\SessionInterface::getFd\(\)#' 19 | - '#^Call to an undefined method Swoft\\Server\\Server::push\(\)\.$#' 20 | # - '#^Call to an undefined method Swoft\\Server\\Server::disconnect\(\)\.$#' 21 | - '#^Call to an undefined method\sPsr\\Http\\Message\\ServerRequestInterface::getUriPath\(\)#' 22 | # These are ignored for now 23 | - 24 | path: %currentWorkingDirectory%/app/Http/Controller/DbModelController.php 25 | message: '#^Method App\\Http\\Controller\\DbModelController::getId\(\) should return int but returns int\|null\.$#' 26 | - 27 | path: %currentWorkingDirectory%/app/Http/Controller/DbModelController.php 28 | message: '#^Argument of an invalid type App\\Model\\Entity\\User supplied for foreach, only iterables are supported\.$#' 29 | - 30 | path: %currentWorkingDirectory%/app/Http/Controller/DbTransactionController.php 31 | message: '#^Method App\\Http\\Controller\\DbTransactionController::getId\(\) should return int but returns int\|null\.$#' 32 | - 33 | path: %currentWorkingDirectory%/app/Http/Controller/RpcController.php 34 | message: '#^Unreachable statement - code above always terminates\.$#' 35 | - 36 | path: %currentWorkingDirectory%/app/Http/Controller/SelectDbController.php 37 | message: '#^Method App\\Http\\Controller\\SelectDbController::getId\(\) should return int but returns int\|null\.$#' 38 | - 39 | path: %currentWorkingDirectory%/app/Http/Controller/ValidatorController.php 40 | message: '#^Method App\\Http\\Controller\\ValidatorController::(validateAll|validateType|validatePassword|validateCustomer)\(\) should return array but returns array\|object\|null\.$#' 41 | - 42 | path: %currentWorkingDirectory%/app/Task/Task/SyncTask.php 43 | message: '#^Method App\\Task\\Task\\SyncTask::testNull\(\) should return bool but returns null\.$#' 44 | - 45 | path: %currentWorkingDirectory%/app/Validator/Rule/AlphaDashRule.php 46 | message: '#^Call to an undefined method object::getMessage\(\)\.$#' 47 | 48 | -------------------------------------------------------------------------------- /public/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台登录-X-admin2.2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 |
23 |
x-admin2.0-管理登录
24 |
25 | 26 |
27 | 28 |
29 | 30 |
31 | 32 |
33 |
34 |
35 | 36 | 54 | 55 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /public/lib/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o(''),s=o(["
  • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
  • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
    '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /app/Model/Entity/User3.php: -------------------------------------------------------------------------------- 1 | id; 66 | } 67 | 68 | /** 69 | * @param int|null $id 70 | */ 71 | public function setId(?int $id): void 72 | { 73 | $this->id = $id; 74 | } 75 | 76 | /** 77 | * @return int|null 78 | */ 79 | public function getAge(): ?int 80 | { 81 | return $this->age; 82 | } 83 | 84 | /** 85 | * @param int|null $age 86 | */ 87 | public function setAge(?int $age): void 88 | { 89 | $this->age = $age; 90 | } 91 | 92 | /** 93 | * @return string|null 94 | */ 95 | public function getName(): ?string 96 | { 97 | return $this->name; 98 | } 99 | 100 | /** 101 | * @param string|null $name 102 | */ 103 | public function setName(?string $name): void 104 | { 105 | $this->name = $name; 106 | } 107 | 108 | /** 109 | * @return string|null 110 | */ 111 | public function getPwd(): ?string 112 | { 113 | return $this->pwd; 114 | } 115 | 116 | /** 117 | * @param string|null $pwd 118 | */ 119 | public function setPwd(?string $pwd): void 120 | { 121 | $this->pwd = $pwd; 122 | } 123 | 124 | /** 125 | * @return string|null 126 | */ 127 | public function getUserDesc(): ?string 128 | { 129 | return $this->userDesc; 130 | } 131 | 132 | /** 133 | * @param string|null $userDesc 134 | */ 135 | public function setUserDesc(?string $userDesc): void 136 | { 137 | $this->userDesc = $userDesc; 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CONTRIBUTING 2 | 3 | ## Contributing code via Github 4 | 5 | Swoft currently uses Git to control the version of the program. If you want to contribute source code to Swoft, please get an overview of how Git is used. We currently host the project on GitHub, and any GitHub user can contribute code to us. 6 | 7 | The way to participate is very simple, fork a swoft-component or swoft-ext code into your warehouse, modify and submit, and send us a pull request, we will promptly review the code and process your application. After the review, your code will be merged into our repository, so you will automatically appear on the contributor list, very convenient. 8 | 9 | We hope that the code you contributed will be: 10 | 11 | - Swoft's coding specification 12 | - Appropriate comments that others can read 13 | - Follow the Apache2 open source protocol 14 | - Submit a commit message must be in English 15 | 16 | > If you would like more details or have any questions, please continue reading below 17 | 18 | Precautions 19 | 20 | - PSR-2 is selected for the code formatting standard of this project; 21 | - class name and class file name follow PSR-4; 22 | - For the processing of Issues, use the commit title such as `fix swoft-cloud/swoft#xxx(Issue ID)` to directly close the issue. 23 | - The system will automatically test and modify on PHP 7.1+ (`7.1 7.2 7.3`) Swoole 4.4.1+ 24 | - The administrator will not merge the changes that caused CI faild. If CI faild appears, please check your source code or modify the corresponding unit test file. 25 | 26 | ## GitHub Issue 27 | 28 | GitHub provides the Issue feature, which can be used to: 29 | 30 | - Raise a bug 31 | - propose functional improvements 32 | - Feedback experience 33 | 34 | This feature should not be used for: 35 | 36 | - Unfriendly remarks 37 | 38 | ## Quick modification 39 | 40 | GitHub provides the ability to quickly edit files 41 | 42 | - Log in to your GitHub account; 43 | - Browse the project file and find the file to be modified; 44 | - Click the pencil icon in the upper right corner to modify it; 45 | - Fill in Commit changes related content (Title is required) 46 | - Submit changes, wait for CI verification and administrator merge. 47 | 48 | > This method is suitable for modifying the document project. If you need to submit a large number of changes at once, please continue reading the following 49 | 50 | ## Complete process 51 | 52 | - fork swoft-component or swoft-ext project; 53 | - Clone your fork project to the local; 54 | - Create a new branch and checkout the new branch; 55 | - Make changes. If your changes include additions or subtractions of methods or functions, please remember to modify the unit test file. 56 | - Push your local repository to GitHub; 57 | - submit a pull request; 58 | - Wait for CI verification (if you don't pass, you need to fix the code yourself, GitHub will automatically update your pull request); 59 | - Waiting for administrator processing 60 | 61 | ## Precautions 62 | 63 | If you have any questions about the above process, please check out the GIT tutorial; 64 | 65 | For different aspects of the code, create different branches in your own fork project. 66 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # @description php image base on the debian 9.x 2 | # 3 | # Some Information 4 | # ------------------------------------------------------------------------------------ 5 | # @link https://hub.docker.com/_/debian/ alpine image 6 | # @link https://hub.docker.com/_/php/ php image 7 | # @link https://github.com/docker-library/php php dockerfiles 8 | # @see https://github.com/docker-library/php/tree/master/7.2/stretch/cli/Dockerfile 9 | # ------------------------------------------------------------------------------------ 10 | # @build-example docker build . -f Dockerfile -t swoft/swoft 11 | # 12 | FROM php:7.2 13 | 14 | LABEL maintainer="inhere " version="2.0" 15 | 16 | # --build-arg timezone=Asia/Shanghai 17 | ARG timezone 18 | # app env: prod pre test dev 19 | ARG app_env=prod 20 | # default use www-data user 21 | ARG work_user=www-data 22 | 23 | ENV APP_ENV=${app_env:-"prod"} \ 24 | TIMEZONE=${timezone:-"Asia/Shanghai"} \ 25 | PHPREDIS_VERSION=4.3.0 \ 26 | SWOOLE_VERSION=4.4.5 \ 27 | COMPOSER_ALLOW_SUPERUSER=1 28 | 29 | # Libs -y --no-install-recommends 30 | RUN apt-get update \ 31 | && apt-get install -y \ 32 | curl wget git zip unzip less vim procps lsof tcpdump htop openssl \ 33 | libz-dev \ 34 | libssl-dev \ 35 | libnghttp2-dev \ 36 | libpcre3-dev \ 37 | libjpeg-dev \ 38 | libpng-dev \ 39 | libfreetype6-dev \ 40 | # Install PHP extensions 41 | && docker-php-ext-install \ 42 | bcmath gd pdo_mysql mbstring sockets zip sysvmsg sysvsem sysvshm 43 | 44 | # Install composer 45 | Run curl -sS https://getcomposer.org/installer | php \ 46 | && mv composer.phar /usr/local/bin/composer \ 47 | && composer self-update --clean-backups \ 48 | # Install redis extension 49 | && wget http://pecl.php.net/get/redis-${PHPREDIS_VERSION}.tgz -O /tmp/redis.tar.tgz \ 50 | && pecl install /tmp/redis.tar.tgz \ 51 | && rm -rf /tmp/redis.tar.tgz \ 52 | && docker-php-ext-enable redis \ 53 | # Install swoole extension 54 | && wget https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -O swoole.tar.gz \ 55 | && mkdir -p swoole \ 56 | && tar -xf swoole.tar.gz -C swoole --strip-components=1 \ 57 | && rm swoole.tar.gz \ 58 | && ( \ 59 | cd swoole \ 60 | && phpize \ 61 | && ./configure --enable-mysqlnd --enable-sockets --enable-openssl --enable-http2 \ 62 | && make -j$(nproc) \ 63 | && make install \ 64 | ) \ 65 | && rm -r swoole \ 66 | && docker-php-ext-enable swoole \ 67 | # Clear dev deps 68 | && apt-get clean \ 69 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ 70 | # Timezone 71 | && cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ 72 | && echo "${TIMEZONE}" > /etc/timezone \ 73 | && echo "[Date]\ndate.timezone=${TIMEZONE}" > /usr/local/etc/php/conf.d/timezone.ini 74 | 75 | # Install composer deps 76 | ADD . /var/www/swoft 77 | RUN cd /var/www/swoft \ 78 | && composer install \ 79 | && composer clearcache 80 | 81 | WORKDIR /var/www/swoft 82 | EXPOSE 18306 18307 18308 83 | 84 | # ENTRYPOINT ["php", "/var/www/swoft/bin/swoft", "http:start"] 85 | CMD ["php", "/var/www/swoft/bin/swoft", "http:start"] 86 | -------------------------------------------------------------------------------- /public/lib/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['"].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)}); -------------------------------------------------------------------------------- /public/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0 3 | ,"msg": "" 4 | ,"count": 3000000 5 | ,"data": [{ 6 | "id": "10001" 7 | ,"username": "杜甫" 8 | ,"email": "xianxin@layui.com" 9 | ,"sex": "男" 10 | ,"city": "浙江杭州" 11 | ,"sign": "点击此处,显示更多。当内容超出时,点击单元格会自动显示更多内容。" 12 | ,"experience": "116" 13 | ,"ip": "192.168.0.8" 14 | ,"logins": "108" 15 | ,"joinTime": "2016-10-14" 16 | ,"dw_xinzhi":{ 17 | "id":90 18 | ,"titel":"小学" 19 | } 20 | }, { 21 | "id": "10002" 22 | ,"username": "李白" 23 | ,"email": "xianxin@layui.com" 24 | ,"sex": "男" 25 | ,"city": "浙江杭州" 26 | ,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。" 27 | ,"experience": "12" 28 | ,"ip": "192.168.0.8" 29 | ,"logins": "106" 30 | ,"joinTime": "2016-10-14" 31 | ,"LAY_CHECKED": true 32 | ,"dw_xinzhi":{ 33 | "id":90 34 | ,"titel":"小学" 35 | } 36 | }, { 37 | "id": "10003" 38 | ,"username": "王勃" 39 | ,"email": "xianxin@layui.com" 40 | ,"sex": "男" 41 | ,"city": "浙江杭州" 42 | ,"sign": "人生恰似一场修行" 43 | ,"experience": "65" 44 | ,"ip": "192.168.0.8" 45 | ,"logins": "106" 46 | ,"joinTime": "2016-10-14" 47 | ,"dw_xinzhi":{ 48 | "id":90 49 | ,"titel":"小学" 50 | } 51 | }, { 52 | "id": "10004" 53 | ,"username": "李清照" 54 | ,"email": "xianxin@layui.com" 55 | ,"sex": "女" 56 | ,"city": "浙江杭州" 57 | ,"sign": "人生恰似一场修行" 58 | ,"experience": "666" 59 | ,"ip": "192.168.0.8" 60 | ,"logins": "106" 61 | ,"joinTime": "2016-10-14" 62 | ,"dw_xinzhi":{ 63 | "id":90 64 | ,"titel":"小学" 65 | } 66 | }, { 67 | "id": "10005" 68 | ,"username": "冰心" 69 | ,"email": "xianxin@layui.com" 70 | ,"sex": "女" 71 | ,"city": "浙江杭州" 72 | ,"sign": "人生恰似一场修行" 73 | ,"experience": "86" 74 | ,"ip": "192.168.0.8" 75 | ,"logins": "106" 76 | ,"joinTime": "2016-10-14" 77 | ,"dw_xinzhi":{ 78 | "id":90 79 | ,"titel":"小学" 80 | } 81 | }, { 82 | "id": "10006" 83 | ,"username": "贤心" 84 | ,"email": "xianxin@layui.com" 85 | ,"sex": "男" 86 | ,"city": "浙江杭州" 87 | ,"sign": "人生恰似一场修行" 88 | ,"experience": "12" 89 | ,"ip": "192.168.0.8" 90 | ,"logins": "106" 91 | ,"joinTime": "2016-10-14" 92 | ,"dw_xinzhi":{ 93 | "id":90 94 | ,"titel":"小学" 95 | } 96 | }, { 97 | "id": "10007" 98 | ,"username": "贤心" 99 | ,"email": "xianxin@layui.com" 100 | ,"sex": "男" 101 | ,"city": "浙江杭州" 102 | ,"sign": "人生恰似一场修行" 103 | ,"experience": "16" 104 | ,"ip": "192.168.0.8" 105 | ,"logins": "106" 106 | ,"joinTime": "2016-10-14" 107 | ,"dw_xinzhi":{ 108 | "id":90 109 | ,"titel":"小学" 110 | } 111 | }, { 112 | "id": "10008" 113 | ,"username": "贤心" 114 | ,"email": "xianxin@layui.com" 115 | ,"sex": "男" 116 | ,"city": "浙江杭州" 117 | ,"sign": "人生恰似一场修行" 118 | ,"experience": "106" 119 | ,"ip": "192.168.0.8" 120 | ,"logins": "106" 121 | ,"joinTime": "2016-10-14" 122 | ,"dw_xinzhi":{ 123 | "id":90 124 | ,"titel":"小学" 125 | } 126 | }] 127 | } -------------------------------------------------------------------------------- /resource/views/role/add.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | pay 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 |
    24 |
    25 |
    26 |
    27 | 30 |
    31 | 33 |
    34 |
    35 |
    36 | 39 |
    40 | 41 |
    42 |
    43 |
    44 | 45 |
    46 |
    47 |
    48 |
    49 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /app/Model/Entity/Count.php: -------------------------------------------------------------------------------- 1 | id = $id; 80 | } 81 | 82 | /** 83 | * @param int|null $userId 84 | * 85 | * @return void 86 | */ 87 | public function setUserId(?int $userId): void 88 | { 89 | $this->userId = $userId; 90 | } 91 | 92 | /** 93 | * @param int|null $createTime 94 | * 95 | * @return void 96 | */ 97 | public function setCreateTime(?int $createTime): void 98 | { 99 | $this->createTime = $createTime; 100 | } 101 | 102 | /** 103 | * @param string|null $attributes 104 | * 105 | * @return void 106 | */ 107 | public function setAttributes(?string $attributes): void 108 | { 109 | $this->attributes = $attributes; 110 | } 111 | 112 | /** 113 | * @param string|null $updateTime 114 | * 115 | * @return void 116 | */ 117 | public function setUpdateTime(?string $updateTime): void 118 | { 119 | $this->updateTime = $updateTime; 120 | } 121 | 122 | /** 123 | * @return int|null 124 | */ 125 | public function getId(): ?int 126 | { 127 | return $this->id; 128 | } 129 | 130 | /** 131 | * @return int|null 132 | */ 133 | public function getUserId(): ?int 134 | { 135 | return $this->userId; 136 | } 137 | 138 | /** 139 | * @return int|null 140 | */ 141 | public function getCreateTime(): ?int 142 | { 143 | return $this->createTime; 144 | } 145 | 146 | /** 147 | * @return string|null 148 | */ 149 | public function getAttributes(): ?string 150 | { 151 | return $this->attributes; 152 | } 153 | 154 | /** 155 | * @return string|null 156 | */ 157 | public function getUpdateTime(): ?string 158 | { 159 | return $this->updateTime; 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /app/Http/Controller/HomeController.php: -------------------------------------------------------------------------------- 1 | getLeftNav(); 38 | $data['top'] = $this->getTopNav(); 39 | 40 | return view('home/index', $data); 41 | } 42 | 43 | /** 44 | * 获取菜单 45 | * @return array 46 | * @throws Swoft\Db\Exception\DbException 47 | */ 48 | private function getLeftNav(): array 49 | { 50 | $rows = AdminNav::where('type','=','middle')->orderBy('order')->get(); 51 | if ($rows) { 52 | $rows = $rows->toArray(); 53 | return $this->toTree($rows); 54 | } else { 55 | return []; 56 | } 57 | } 58 | 59 | /** 60 | * 获取菜单 61 | * @return array 62 | * @throws Swoft\Db\Exception\DbException 63 | */ 64 | private function getTopNav(): array 65 | { 66 | $rows = AdminNav::where('type','=','top')->orderBy('order')->get(); 67 | if ($rows) { 68 | $rows = $rows->toArray(); 69 | return $this->toTree($rows); 70 | } else { 71 | return []; 72 | } 73 | } 74 | 75 | /** 76 | * 把返回的数据集转换成Tree 77 | * @param array $list 要转换的数据集 78 | * @param string $pk 79 | * @param string $pid parent标记字段 80 | * @param string $child 81 | * @param int $root 82 | * @return array 83 | */ 84 | function toTree($list, $pk = 'id', $pid = 'pid', $child = '_child', $root = 0) 85 | { 86 | // 创建Tree 87 | $tree = array(); 88 | if (is_array($list)) { 89 | // 创建基于主键的数组引用 90 | $refer = array(); 91 | foreach ($list as $key => $data) { 92 | $refer[$data[$pk]] =& $list[$key]; 93 | } 94 | 95 | foreach ($list as $key => $data) { 96 | // 判断是否存在parent 97 | $parentId = $data[$pid]; 98 | if ($root == $parentId) { 99 | $tree[] =& $list[$key]; 100 | } else { 101 | if (isset($refer[$parentId])) { 102 | $parent =& $refer[$parentId]; 103 | $parent[$child][] =& $list[$key]; 104 | } 105 | } 106 | } 107 | } 108 | return $tree; 109 | } 110 | 111 | /** 112 | * 首页统计 113 | * @RequestMapping("/home",method={RequestMethod::GET}) 114 | */ 115 | public function home() 116 | { 117 | $data['left'] = $this->getLeftNav(); 118 | $data['top'] = $this->getTopNav(); 119 | 120 | return view('home/home', $data); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /public/lib/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
      ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
    "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):aid = $id; 80 | } 81 | 82 | /** 83 | * @param string $name 84 | * 85 | * @return void 86 | */ 87 | public function setName(string $name): void 88 | { 89 | $this->name = $name; 90 | } 91 | 92 | /** 93 | * @param int $age 94 | * 95 | * @return void 96 | */ 97 | public function setAge(int $age): void 98 | { 99 | $this->age = $age; 100 | } 101 | 102 | /** 103 | * @param string $password 104 | * 105 | * @return void 106 | */ 107 | public function setPassword(string $password): void 108 | { 109 | $this->password = $password; 110 | } 111 | 112 | /** 113 | * @param string $userDesc 114 | * 115 | * @return void 116 | */ 117 | public function setUserDesc(string $userDesc): void 118 | { 119 | $this->userDesc = $userDesc; 120 | } 121 | 122 | /** 123 | * @param array|null $testJson 124 | * 125 | * @return void 126 | */ 127 | public function setTestJson(?array $testJson): void 128 | { 129 | $this->testJson = $testJson; 130 | } 131 | 132 | /** 133 | * @return int|null 134 | */ 135 | public function getId(): ?int 136 | { 137 | return $this->id; 138 | } 139 | 140 | /** 141 | * @return string 142 | */ 143 | public function getName(): string 144 | { 145 | return $this->name; 146 | } 147 | 148 | /** 149 | * @return int 150 | */ 151 | public function getAge(): int 152 | { 153 | return $this->age; 154 | } 155 | 156 | /** 157 | * @return string 158 | */ 159 | public function getPassword(): string 160 | { 161 | return $this->password; 162 | } 163 | 164 | /** 165 | * @return string 166 | */ 167 | public function getUserDesc(): string 168 | { 169 | return $this->userDesc; 170 | } 171 | 172 | /** 173 | * @return array|null 174 | */ 175 | public function getTestJson(): ?array 176 | { 177 | return $this->testJson; 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /app/Http/Controller/RoleController.php: -------------------------------------------------------------------------------- 1 | get('page',1); 47 | $limit = (int)$request->get('limit',1); 48 | $data = AdminRole::paginate($page,$limit); 49 | 50 | return [ 51 | "code"=>0, 52 | 'count'=>$data['count'], 53 | 'data'=>$data['list'], 54 | 'msg'=>'', 55 | ]; 56 | } 57 | 58 | /** 59 | * 新增角色GET 60 | * @RequestMapping("/role/create",method={RequestMethod::GET}) 61 | */ 62 | public function add() 63 | { 64 | return view("role/add"); 65 | } 66 | 67 | /** 68 | * 新增角色POST 69 | * @RequestMapping("/role/create",method={RequestMethod::POST}) 70 | * @param Request $request 71 | * @return string 72 | * @throws \ReflectionException 73 | * @throws \Swoft\Bean\Exception\ContainerException 74 | * @throws \Swoft\Db\Exception\DbException 75 | */ 76 | public function create(Request $request) 77 | { 78 | AdminRole::new($request->post())->save(); 79 | 80 | return "OK"; 81 | } 82 | 83 | /** 84 | * 编辑角色GET 85 | * @RequestMapping("/role/edit",method={RequestMethod::GET}) 86 | * @param Request $request 87 | * @return string 88 | * @throws \ReflectionException 89 | * @throws \Swoft\Bean\Exception\ContainerException 90 | * @throws \Swoft\Db\Exception\DbException 91 | * @throws \Throwable 92 | */ 93 | public function update(Request $request) 94 | { 95 | return view('role/edit'); 96 | } 97 | 98 | /** 99 | * 编辑角色POST 100 | * @RequestMapping("/role/edit",method={RequestMethod::POST}) 101 | * @param Request $request 102 | * @return string 103 | * @throws \ReflectionException 104 | * @throws \Swoft\Bean\Exception\ContainerException 105 | * @throws \Swoft\Db\Exception\DbException 106 | */ 107 | public function edit(Request $request) 108 | { 109 | AdminRole::where('id','=',(int)$request->get('id',0))->update($request->post()); 110 | 111 | return "OK"; 112 | } 113 | 114 | 115 | /** 116 | * 删除角色POST 117 | * @RequestMapping("/role/delete",method={RequestMethod::POST}) 118 | * @param Request $request 119 | * @return string 120 | * @throws \ReflectionException 121 | * @throws \Swoft\Bean\Exception\ContainerException 122 | * @throws \Swoft\Db\Exception\DbException 123 | */ 124 | public function delete(Request $request) 125 | { 126 | AdminRole::where('id','=',(int)$request->post('id',0))->delete(); 127 | 128 | return "OK"; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /public/echarts5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台登录-X-admin2.2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 |
    17 |
    18 |
    19 |
    20 |
    21 | 特别声明:ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。如需使用,详细了解可以访问官网 ECharts。 x-admin不承担任何版权问题。 22 |
    23 | 24 |
    25 |
    26 | 注意:本案例的Echarts图表库由cdn引入,需要在线才能正常使用,如想离线,请至Echarts官网下载。 27 |
    28 |
    29 |
    30 |
    31 |
    32 |
    33 | 34 | 78 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /public/member-password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pay 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 |
    21 |
    22 |
    23 |
    24 | 25 |
    26 |
    27 |
    28 |
    29 | 31 |
    32 |
    33 |
    34 |
    35 | 37 |
    38 |
    39 |
    6到16个字符
    40 |
    41 | 43 |
    44 |
    45 |
    46 |
    47 | 48 |
    49 |
    50 |
    51 |
    52 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /public/lib/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | 8 | ## Pull Request Process 9 | 10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a 11 | build. 12 | 2. Update the README.md with details of changes to the interface, this includes new environment 13 | variables, exposed ports, useful file locations and container parameters. 14 | 3. Increase the version numbers in any examples files and the README.md to the new version that this 15 | Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 16 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you 17 | do not have permission to do that, you may request the second reviewer to merge it for you. 18 | 19 | ## Code of Conduct 20 | 21 | ### Our Pledge 22 | 23 | In the interest of fostering an open and welcoming environment, we as 24 | contributors and maintainers pledge to making participation in our project and 25 | our community a harassment-free experience for everyone, regardless of age, body 26 | size, disability, ethnicity, gender identity and expression, level of experience, 27 | nationality, personal appearance, race, religion, or sexual identity and 28 | orientation. 29 | 30 | ### Our Standards 31 | 32 | Examples of behavior that contributes to creating a positive environment 33 | include: 34 | 35 | * Using welcoming and inclusive language 36 | * Being respectful of differing viewpoints and experiences 37 | * Gracefully accepting constructive criticism 38 | * Focusing on what is best for the community 39 | * Showing empathy towards other community members 40 | 41 | Examples of unacceptable behavior by participants include: 42 | 43 | * The use of sexualized language or imagery and unwelcome sexual attention or 44 | advances 45 | * Trolling, insulting/derogatory comments, and personal or political attacks 46 | * Public or private harassment 47 | * Publishing others' private information, such as a physical or electronic 48 | address, without explicit permission 49 | * Other conduct which could reasonably be considered inappropriate in a 50 | professional setting 51 | 52 | ### Our Responsibilities 53 | 54 | Project maintainers are responsible for clarifying the standards of acceptable 55 | behavior and are expected to take appropriate and fair corrective action in 56 | response to any instances of unacceptable behavior. 57 | 58 | Project maintainers have the right and responsibility to remove, edit, or 59 | reject comments, commits, code, wiki edits, issues, and other contributions 60 | that are not aligned to this Code of Conduct, or to ban temporarily or 61 | permanently any contributor for other behaviors that they deem inappropriate, 62 | threatening, offensive, or harmful. 63 | 64 | ### Scope 65 | 66 | This Code of Conduct applies both within project spaces and in public spaces 67 | when an individual is representing the project or its community. Examples of 68 | representing a project or community include using an official project e-mail 69 | address, posting via an official social media account, or acting as an appointed 70 | representative at an online or offline event. Representation of a project may be 71 | further defined and clarified by project maintainers. 72 | 73 | ### Enforcement 74 | 75 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 76 | reported by contacting the project team at group@swoft.org . All 77 | complaints will be reviewed and investigated and will result in a response that 78 | is deemed necessary and appropriate to the circumstances. The project team is 79 | obligated to maintain confidentiality with regard to the reporter of an incident. 80 | Further details of specific enforcement policies may be posted separately. 81 | 82 | Project maintainers who do not follow or enforce the Code of Conduct in good 83 | faith may face temporary or permanent repercussions as determined by other 84 | members of the project's leadership. 85 | 86 | ### Attribution 87 | 88 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 89 | available at [http://contributor-covenant.org/version/1/4][version] 90 | 91 | [homepage]: http://contributor-covenant.org 92 | [version]: http://contributor-covenant.org/version/1/4/ 93 | -------------------------------------------------------------------------------- /public/echarts1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台登录-X-admin2.2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 |
    18 |
    19 |
    20 |
    21 |
    22 | 特别声明:ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。如需使用,详细了解可以访问官网 ECharts。 x-admin不承担任何版权问题。 23 |
    24 | 25 |
    26 |
    27 | 注意:本案例的Echarts图表库由cdn引入,需要在线才能正常使用,如想离线,请至Echarts官网下载。 28 |
    29 |
    30 |
    31 |
    32 |
    33 |
    34 | 35 | 107 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /resource/views/role/list.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pay 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 |
    20 | 21 | 首页 22 | 演示 23 | 24 | 导航元素 25 | 26 | 27 | 28 |
    29 |
    30 |
    31 |
    32 |
    33 |
    34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
    ID名称状态备注操作
    45 |
    46 |
    47 |
    48 |
    49 |
    50 | 51 | 56 | 59 | 67 | 98 | 119 | 120 | -------------------------------------------------------------------------------- /public/echarts2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台登录-X-admin2.2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 |
    17 |
    18 |
    19 |
    20 |
    21 | 特别声明:ECharts,一个纯 Javascript 的图表库,可以流畅的运行在 PC 和移动设备上,兼容当前绝大部分浏览器(IE8/9/10/11,Chrome,Firefox,Safari等),底层依赖轻量级的 Canvas 类库 ZRender,提供直观,生动,可交互,可高度个性化定制的数据可视化图表。如需使用,详细了解可以访问官网 ECharts。 x-admin不承担任何版权问题。 22 |
    23 | 24 |
    25 |
    26 | 注意:本案例的Echarts图表库由cdn引入,需要在线才能正常使用,如想离线,请至Echarts官网下载。 27 |
    28 |
    29 |
    30 |
    31 |
    32 |
    33 | 34 | 104 | 113 | 114 | 115 | --------------------------------------------------------------------------------