Giter VIP home page Giter VIP logo

joyboo-admin-easyswoole's Introduction

前后端分离的后台管理系统

本项目为后端部分

后端语言: PHP

后端框架: EasySwoole

前端部分

https://github.com/Joyboo/Joyboo-vben-admin-thin

前端语言: TypeScript + vue3.2

前端框架: Vben-admin

运行

  • 在项目目录下执行:

composer install

  • 建好vben_admin库

  • 修改easwoole配置文件中的数据库相关配置

  • 建表

php easyswoole migrate run

  • 填充数据

php easyswoole migrate seed

  • 开发环境下启动:

php easyswoole server start

  • 登录

    账号: admin
    密码:  123456
    

实现功能

  • 客户端动态路由
  • jwt登录认证
  • 基于 Policy 实现的权限认证(菜单级别、按钮级别、table单元格级别)
  • 单元测试
  • 客户端错误日志
  • 后台登录、操作日志
  • 自定义异常处理器、log处理器
  • migrate数据库管理
  • Mysql连接池、Redis连接池
  • 封装CURD业务(继承Auth即可实现基本的CURD)
  • Crontab定时任务(可视化操作动态添加、删除、传参)
  • CustomProcess消费队列进程
  • WebSocket给管理员发消息、踢下线(可批量)
  • WebSocket自动无感刷新jwt的token
  • WebSocket连接符管理 FdManager.php
  • 监听系统错误Wechat推送、钉钉推送
  • HttpTracker链路追踪
  • I18N国际化
  • 第三方OAuth扫码登录

还有很多功能正在火热开发中,对应的单元测试和系统demo会慢慢完善,欢迎 issues 交流和pr

joyboo-admin-easyswoole's People

Contributors

joyboo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

joyboo-admin-easyswoole's Issues

登入时Jwt报错

Argument 1 passed to EasySwoole\Jwt\Jwt::setSecretKey() must be of the type string, null given, called

php easyswoole migrate run errors

php7.4 and swoole4.8.11
#!/usr/bin/env php
PHP Fatal error: Uncaught EasySwoole\Mysqli\Exception\Exception: SQLSTATE[HY000] [2002] Connection reset by peer or Transport endpoint is not connected in /www/wwwroot/Joyboo-admin-easyswoole/vendor/easyswoole/mysqli/src/Client.php:69
Stack trace:
#0 /www/wwwroot/Joyboo-admin-easyswoole/vendor/easyswoole/db-migrate/src/MigrateManager.php(58): EasySwoole\Mysqli\Client->execBuilder()
#1 /www/wwwroot/Joyboo-admin-easyswoole/vendor/easyswoole/db-migrate/src/MigrateCommand.php(136): EasySwoole\DatabaseMigrate\MigrateManager->query()
#2 /www/wwwroot/Joyboo-admin-easyswoole/vendor/easyswoole/db-migrate/src/MigrateCommand.php(100): EasySwoole\DatabaseMigrate\MigrateCommand->checkDefaultMigrateTable()
#3 {main}
thrown in /www/wwwroot/Joyboo-admin-easyswoole/vendor/easyswoole/mysqli/src/Client.php on line 69

Fatal error: Uncaught EasySwoole\Mysqli\Exception\Exception: SQLSTATE[HY000] [2002] Connection reset by peer or Transport endpoint is not connected in /www/wwwroot/Joyboo-admin-easyswoole/vendor/easyswoole/mysqli/src/Client.php:69

Argument 1 passed to EasySwoole\\Jwt\\Jwt::setSecretKey() must be of the type string, null given,

[2023-06-04 03:12:10][throwable][error]{"message":"Argument 1 passed to EasySwoole\Jwt\Jwt::setSecretKey() must be of the type string, null given, called in /Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/wonder-game/es-utility/src/Common/Classes/LamJwt.php on line 31","file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/easyswoole/jwt/src/Jwt.php","line":29,"trace":[{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/wonder-game/es-utility/src/Common/Classes/LamJwt.php","line":31,"function":"setSecretKey","class":"EasySwoole\Jwt\Jwt","type":"->","args":[null]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/wonder-game/es-utility/src/function.php","line":736,"function":"getToken","class":"WonderGame\EsUtility\Common\Classes\LamJwt","type":"::","args":[{"id":1},false,172800]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/wonder-game/es-utility/src/HttpController/Admin/PubTrait.php","line":60,"function":"get_login_token","args":[1]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/wonder-game/es-utility/src/HttpController/BaseControllerTrait.php","line":223,"function":"_login","class":"App\HttpController\Admin\Pub","type":"->","args":[]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/easyswoole/http/src/AbstractInterface/Controller.php","line":165,"function":"actionNotFound","class":"App\HttpController\BaseController","type":"->","args":["login"]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/easyswoole/http/src/AbstractInterface/Controller.php","line":153,"function":"__exec","class":"EasySwoole\Http\AbstractInterface\Controller","type":"->","args":[]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/easyswoole/http/src/Dispatcher.php","line":229,"function":"__hook","class":"EasySwoole\Http\AbstractInterface\Controller","type":"->","args":["login",{},{}]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/easyswoole/http/src/Dispatcher.php","line":183,"function":"controllerExecutor","class":"EasySwoole\Http\Dispatcher","type":"->","args":[{},{},"/admin/pub/login"]},{"file":"/Users/lijie/www/test/Joyboo-admin-easyswoole-main/vendor/easyswoole/easyswoole/src/Core.php","line":264,"function":"dispatch","class":"EasySwoole\Http\Dispatcher","type":"->","args":[{},{}]}]}

php easyswoole migrate run

命令执行后连接不上mysql
Fatal error: Uncaught EasySwoole\Mysqli\Exception\Exception: SQLSTATE[HY000] [2002] Connection reset by peer or Transport endpoint is not connected in /mnt/d/wamp64/www/Joyboo-admin-easyswoole/vendor/easyswoole/mysqli/src/Client.php:69
Stack trace:
#0 /mnt/d/wamp64/www/Joyboo-admin-easyswoole/vendor/easyswoole/db-migrate/src/MigrateManager.php(58): EasySwoole\Mysqli\Client->execBuilder()
#1 /mnt/d/wamp64/www/Joyboo-admin-easyswoole/vendor/easyswoole/db-migrate/src/MigrateCommand.php(136): EasySwoole\DatabaseMigrate\MigrateManager->query('SHOW TABLES LIK...')
#2 /mnt/d/wamp64/www/Joyboo-admin-easyswoole/vendor/easyswoole/db-migrate/src/MigrateCommand.php(100): EasySwoole\DatabaseMigrate\MigrateCommand->checkDefaultMigrateTable()
#3 [internal function]: EasySwoole\DatabaseMigrate\MigrateCommand->EasySwoole\DatabaseMigrate{closure}()
#4 {main}
thrown in /mnt/d/wamp64/www/Joyboo-admin-easyswoole/vendor/easyswoole/mysqli/src/Client.php on line 69

跨域配置问题,修改依赖数据才生效

您好,跨域配置我发现是在vender依赖包中的event中,能否支持在根目录的event中配置跨域呢,本人是前端开发,不太理解。但从理解上不太期望修改依赖包中的数据

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.