Giter Club home page Giter Club logo

easyswoole_admin's Introduction

easyswoole_admin部署教程

在github上切换tag 到1.0版本 下载zip 或者git clone checkout指定tag

v1版本使用mysqli组件+pool

v2版本使用orm组件

① 上传源码 composer install

② 开设网站 指向目录 public目录 纯静态 不加载php

③ es安装 (参照es文档安装章节 建议先行运行过hello world 文档过一遍 再尝试本项目) 修改dev.php mysql配置

④ 导入mysql结构数据 在public目录下的sql文件

⑤ public/nepadmin/config.js搜索 requestUrl 请求url换成你自己的es服务地址 IP:Port

⑥ EasySwooleEvent.php 106行左右(不固定 代码会更新) 设置跨域 填写加入 第二步开设的域名(如果为* 则允许所有跨域 不需更改)

⑦ 管理员账号 1001 123456 测试账号 100083 123456 可以看到测试账号的菜单只有权限管理,点击查看缓存、清除缓存会提示没有权限 (页面权限和接口权限是两回事)

⑧ layui调试模式 在public/index.html

 // version: Date.parse(new Date()),
 debug: false

作者

Siam - 宣言 - QQ 59419979

可以在easyswoole 1群、2群(管理员)找到俺

截图演示

Image text Image text Image text

权限控制dom

在权限页面有三个按钮

<button class="layui-btn" data-siam-auth="!testtets">没有testtets权限则显示</button>
<button class="layui-btn" data-siam-auth="/api/*">有/api/*权限则显示</button>
<button class="layui-btn" data-siam-auth="/admin/*">有/admin/*权限则显示</button>

在dom中使用 data-siam-auth='规则名' 视图显示时候则可自动移除没权限的dom

也可以手动调用验证

// 手动调用验证权限
if ( layui.siam.vifAuth('/api/system/clearCache')){
    layer.msg('有/api/system/clearCache的权限');
}else{
    layer.msg('没有/api/system/clearCache的权限');
}

easyswoole_admin's People

Contributors

xuanyanwow avatar

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.