# easyswoole_crmeb_admin **Repository Path**: snailwork/easyswoole_admin ## Basic Information - **Project Name**: easyswoole_crmeb_admin - **Description**: easyswoole_crmeb_admin,easyswoole写的后台,权限管理,前后分离模板(前端CRMEB打通版)。easyswoole挺不错,但是完整的项目比较少,供大家参考学习 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 3 - **Created**: 2021-05-12 - **Last Updated**: 2022-12-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README easyswoole_crmeb_admin使用教程 备注:CRMEB打通版用thinkphp写的,参考crmeb把后端框架换easyswoole,暂时复制了权限管理功能,供大家参考学习easyswoole 众邦科技 / CRMEB打通版 https://gitee.com/ZhongBangKeJi/CRMEB 计划: 1复制权限功能 ok 2复制系统配置功能 ing .......... 一、先装CRMEB打通版 二、下载easyswoole_crmeb_admin源码压缩包,如下操作 1.后端操作 ① 进入easyswoole_crmeb_admin目录,并执行 composer install ② es安装 php vendor/easyswoole/easyswoole/bin/easyswoole install 所有提示都输入n 回车 ③ 修改dev.php mysql配置(先装CRMEB打通版后端) 2.前端操作 ④ CRMEB打通版前端src/setting.js搜索 VUE_APP_API_URL 请求url换成你自己的es服务地址 IP:Port ⑤ 访问CRMEB打通版前端 进入admin页面 ⑥ 管理员账号 CRMEB打通版安装时配置的 3.vendor库改动 ①替换/vendor/nikic/fast-route,在other目录下面 ②/vendor/easyswoole/http/src/Dispatcher.php 位置: public function dispatch(Request $request,Response $response):void ``` ...... ...... ...... //如果handler不为null,那么说明,非为 \FastRoute\Dispatcher::FOUND ,因此执行 if(is_callable($handler)){ try{ $ret = call_user_func($handler,$request,$response); if(is_string($ret)){ $request->withAttribute('_route', '');//route2 $path = UrlParser::pathInfo($ret); $request->getUri()->withPath($path); goto execController; }else if($ret === false){ return; } }catch (\Throwable $throwable){ $this->onException($throwable,$request,$response); //出现异常的时候,不在往下dispatch return; } }else if(is_string($handler)){ $request->withAttribute('_route', $routeInfo[3] ?? $handler);//route2 $path = UrlParser::pathInfo($handler); $request->getUri()->withPath($path); goto execController; } ...... ...... ...... ```