├── .github └── ISSUE_TEMPLATE │ ├── ------xx--.md │ └── -bug.md ├── .gitignore ├── DONATE.md ├── LICENSE ├── QA.md ├── README.md ├── composer.json ├── config └── axe.php ├── database └── migrations │ └── 2019_08_08_000000_create_axe_admin_table.php ├── phpunit.xml.dist ├── resources ├── assets │ └── dist │ │ └── axestatic │ │ ├── config.js │ │ ├── layui │ │ ├── css │ │ │ ├── layui.css │ │ │ ├── layui.mobile.css │ │ │ └── modules │ │ │ │ ├── code.css │ │ │ │ ├── laydate │ │ │ │ └── default │ │ │ │ │ ├── font.css │ │ │ │ │ └── laydate.css │ │ │ │ ├── layer │ │ │ │ └── default │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── layer.css │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ └── loading-2.gif │ │ │ │ └── layim │ │ │ │ ├── html │ │ │ │ ├── chatlog.html │ │ │ │ ├── find.html │ │ │ │ ├── getmsg.json │ │ │ │ └── msgbox.html │ │ │ │ ├── layim.css │ │ │ │ ├── mobile │ │ │ │ └── layim.css │ │ │ │ ├── skin │ │ │ │ ├── 1.jpg │ │ │ │ ├── 2.jpg │ │ │ │ ├── 3.jpg │ │ │ │ ├── 4.jpg │ │ │ │ ├── 5.jpg │ │ │ │ └── logo.jpg │ │ │ │ └── voice │ │ │ │ └── default.mp3 │ │ ├── font │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ │ ├── images │ │ │ └── face │ │ │ │ ├── 0.gif │ │ │ │ ├── 1.gif │ │ │ │ ├── 10.gif │ │ │ │ ├── 11.gif │ │ │ │ ├── 12.gif │ │ │ │ ├── 13.gif │ │ │ │ ├── 14.gif │ │ │ │ ├── 15.gif │ │ │ │ ├── 16.gif │ │ │ │ ├── 17.gif │ │ │ │ ├── 18.gif │ │ │ │ ├── 19.gif │ │ │ │ ├── 2.gif │ │ │ │ ├── 20.gif │ │ │ │ ├── 21.gif │ │ │ │ ├── 22.gif │ │ │ │ ├── 23.gif │ │ │ │ ├── 24.gif │ │ │ │ ├── 25.gif │ │ │ │ ├── 26.gif │ │ │ │ ├── 27.gif │ │ │ │ ├── 28.gif │ │ │ │ ├── 29.gif │ │ │ │ ├── 3.gif │ │ │ │ ├── 30.gif │ │ │ │ ├── 31.gif │ │ │ │ ├── 32.gif │ │ │ │ ├── 33.gif │ │ │ │ ├── 34.gif │ │ │ │ ├── 35.gif │ │ │ │ ├── 36.gif │ │ │ │ ├── 37.gif │ │ │ │ ├── 38.gif │ │ │ │ ├── 39.gif │ │ │ │ ├── 4.gif │ │ │ │ ├── 40.gif │ │ │ │ ├── 41.gif │ │ │ │ ├── 42.gif │ │ │ │ ├── 43.gif │ │ │ │ ├── 44.gif │ │ │ │ ├── 45.gif │ │ │ │ ├── 46.gif │ │ │ │ ├── 47.gif │ │ │ │ ├── 48.gif │ │ │ │ ├── 49.gif │ │ │ │ ├── 5.gif │ │ │ │ ├── 50.gif │ │ │ │ ├── 51.gif │ │ │ │ ├── 52.gif │ │ │ │ ├── 53.gif │ │ │ │ ├── 54.gif │ │ │ │ ├── 55.gif │ │ │ │ ├── 56.gif │ │ │ │ ├── 57.gif │ │ │ │ ├── 58.gif │ │ │ │ ├── 59.gif │ │ │ │ ├── 6.gif │ │ │ │ ├── 60.gif │ │ │ │ ├── 61.gif │ │ │ │ ├── 62.gif │ │ │ │ ├── 63.gif │ │ │ │ ├── 64.gif │ │ │ │ ├── 65.gif │ │ │ │ ├── 66.gif │ │ │ │ ├── 67.gif │ │ │ │ ├── 68.gif │ │ │ │ ├── 69.gif │ │ │ │ ├── 7.gif │ │ │ │ ├── 70.gif │ │ │ │ ├── 71.gif │ │ │ │ ├── 8.gif │ │ │ │ └── 9.gif │ │ ├── lay │ │ │ ├── all-mobile.js │ │ │ ├── all.js │ │ │ └── modules │ │ │ │ ├── carousel.js │ │ │ │ ├── code.js │ │ │ │ ├── colorpicker.js │ │ │ │ ├── element.js │ │ │ │ ├── flow.js │ │ │ │ ├── form.js │ │ │ │ ├── jquery.js │ │ │ │ ├── laydate.js │ │ │ │ ├── layedit.js │ │ │ │ ├── layer.js │ │ │ │ ├── layim.js │ │ │ │ ├── laypage.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── mobile.js │ │ │ │ ├── mobile │ │ │ │ ├── layer-mobile.js │ │ │ │ ├── layim-mobile-open.js │ │ │ │ ├── layim-mobile.js │ │ │ │ ├── upload-mobile.js │ │ │ │ └── zepto.js │ │ │ │ ├── rate.js │ │ │ │ ├── slider.js │ │ │ │ ├── table.js │ │ │ │ ├── tree.js │ │ │ │ ├── upload.js │ │ │ │ └── util.js │ │ ├── layui.all.js │ │ └── layui.js │ │ ├── lib │ │ ├── admin.js │ │ ├── extend │ │ │ ├── echarts.js │ │ │ └── echartsTheme.js │ │ ├── index.js │ │ └── view.js │ │ ├── modules │ │ ├── common.js │ │ ├── console.js │ │ ├── contlist.js │ │ ├── forum.js │ │ ├── im.js │ │ ├── message.js │ │ ├── sample.js │ │ ├── senior.js │ │ ├── set.js │ │ ├── user.js │ │ ├── useradmin.js │ │ └── workorder.js │ │ └── style │ │ ├── admin.css │ │ ├── login.css │ │ ├── res │ │ ├── bg-none.jpg │ │ ├── layui-logo.jpg │ │ ├── logo-black.png │ │ ├── logo.png │ │ └── template │ │ │ ├── character.jpg │ │ │ ├── huge.jpg │ │ │ └── portrait.png │ │ └── template.css ├── lang │ └── tt.t └── views │ ├── admin │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── group │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── home.blade.php │ ├── index.blade.php │ ├── layout │ └── page.blade.php │ ├── login.blade.php │ ├── menu │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── operation_log │ └── index.blade.php │ ├── pagination.blade.php │ └── role │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php ├── routes └── axe.php ├── src ├── AxeServiceProvider.php ├── Console │ ├── InstallAxeCommand.php │ └── ResetPasswordCommand.php ├── Events │ └── AdminLoginSuccessEvent.php ├── Http │ ├── Controllers │ │ ├── AdminController.php │ │ ├── AuthController.php │ │ ├── BaseController.php │ │ ├── GroupController.php │ │ ├── IndexController.php │ │ ├── LoginController.php │ │ ├── MenuController.php │ │ ├── OperationLogController.php │ │ └── RoleController.php │ └── Middleware │ │ ├── AxeAuthMiddleware.php │ │ ├── AxeOperationLogMiddleware.php │ │ └── AxeRbacMiddleware.php ├── Models │ ├── Admin.php │ ├── AxeModel.php │ ├── Group.php │ ├── GroupRole.php │ ├── Menu.php │ ├── OperationLog.php │ └── Role.php ├── Seeder │ └── AxeAdminSeeder.php ├── Traits │ ├── HasNameTrait.php │ └── VendorTreeTrait.php └── functions.php └── tests ├── LoginTest.php └── TestCase.php /.github/ISSUE_TEMPLATE/------xx--.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 我需要有一个xx功能 3 | about: 我有建议和意见 4 | title: '' 5 | labels: help wanted 6 | assignees: kphcdr 7 | 8 | --- 9 | 10 | **增加什么功能** 11 | 例:增加上次用户登录时间记录 12 | 13 | **什么用途** 14 | 例:记录上次登录时间,用于查看哪些管理员长期没有登录 15 | 16 | **没有这个功能对你造成了什么困扰** 17 | 例:无法了解每个管理员的使用时间段 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/-bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 有bug 3 | about: 我发现了一个大bug 4 | title: '' 5 | labels: bug 6 | assignees: kphcdr 7 | 8 | --- 9 | 10 | ## 环境 11 | 1. nginx or apache 12 | 1. laravel版本 13 | 1. php版本 14 | 1. 其他信息 15 | 16 | ## 描述 17 | ~ 问题的描述 18 | 19 | ## 日志 20 | 21 | ~ 如果有日志,请贴在这里 22 | 23 | ## 必要的截图 24 | 25 | ~ 如果有截图,可以减少沟通时间 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /resources/assets/node_modules/* 2 | -------------------------------------------------------------------------------- /DONATE.md: -------------------------------------------------------------------------------- 1 | # 感谢你,我们现在还不需要捐赠 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jens Segers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /QA.md: -------------------------------------------------------------------------------- 1 | Q: axeadmin有什么意义? 2 | 3 | A: 作者使用过laravel-admin 和 voyager ,但是两个软件都存在学习成本高、扩展难度高、需要反复翻阅手册的问题 4 | 5 | axeadmin使用最贴近框架原生的方式来开发常用功能,可以帮助小型团队快速过渡创业初期,保证简洁的基础上不增加额外的学习成本 6 | 7 | Q: axeadmin可以用于商业项目吗? 8 | 9 | A: 可以,但是请保留项目中layuiAdmin的源码头注释和出处。附:[layuiAdmin开源协议](https://fly.layui.com/jie/26280/) 10 | 11 | 12 | Q: 要怎样修改视图文件? 13 | 14 | A: 所有的视图都保存在resources/views/axe中,可以自行更改 15 | 16 | Q: 如何对原有功能进行二次开发? 17 | 18 | A: 19 | 1. 可以fork本项目,自行更改后上传到https://packagist.org,使用composer重新加载 20 | 2. 可以下载项目到项目跟目录下,然后使用composer单独进行加载 21 | 3. 直接复制src中的源代码到自己的项目中,并删除composer中对于axeadmin的依赖 22 | 4. 直接修改vendor/kphcdr/axeadmin-laravel下的对应文件(不推荐) 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # axeadmin-laravel 2 | 3 | [![StyleCI](https://github.styleci.io/repos/205770921/shield?branch=master)](https://github.styleci.io/repos/205770921) 4 | [![Latest Stable Version](https://poser.pugx.org/kphcdr/axeadmin-laravel/v/stable)](https://packagist.org/packages/kphcdr/axeadmin-laravel) 5 | [![Total Downloads](https://poser.pugx.org/kphcdr/axeadmin-laravel/downloads)](https://packagist.org/packages/kphcdr/axeadmin-laravel) 6 | [![Latest Unstable Version](https://poser.pugx.org/kphcdr/axeadmin-laravel/v/unstable)](https://packagist.org/packages/kphcdr/axeadmin-laravel) 7 | [![License](https://poser.pugx.org/kphcdr/axeadmin-laravel/license)](https://packagist.org/packages/kphcdr/axeadmin-laravel) 8 | 9 | axeadmin 是一套用于laravel的扩展,可以使你快速搭建一个可用的后台。 10 | 11 | # 要求 12 | 13 | `laravel` >= 5.5 14 | 15 | laravel支持的数据库 16 | 17 | # 预览 18 | 19 | 为了保证每一位的预览体验,预览版本关闭了数据修改功能 [预览版本](http://axeadmin.kphcdr.com/axe) 20 | 21 | 22 | 23 | # 安装 24 | 25 | 1. 拥有一个已经可以正常运行的laravel服务,laravel版本 >= 5.5 26 | 1. `composer require kphcdr/axeadmin-laravel` 27 | 1. `php artisan axe:install` 28 | 1. 开始使用 http://xxx.com/axe 29 | 30 | # 备忘 31 | 32 | 1. 初始管理员账号admin 密码 admin,你可以通过php artisan axe:reset-password 重置密码 33 | 1. 配置文件位于 config/axe.php,可以根据实际情况进行修改 34 | 35 | # 致谢 36 | 37 | axeadmin 使用了 [layuiAdmin](https://www.layui.com/admin/) 38 | 39 | axeadmin 借鉴了 [laravel-admin](https://github.com/z-song/laravel-admin) 40 | 41 | # 部分截图 42 | ![](http://static-axe.kphcdr.com/1.png) 43 | ![](http://static-axe.kphcdr.com/2.png) 44 | ![](http://static-axe.kphcdr.com/3.png) 45 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kphcdr/axeadmin-laravel", 3 | "description": "axeadmin-laravel", 4 | "type": "admin", 5 | "license": "MIT", 6 | "homepage": "https://github.com/kphcdr/axeadmin-laravel", 7 | "authors": [ 8 | { 9 | "name": "kphcdr", 10 | "email": "kphcdr@gmail.com" 11 | } 12 | ], 13 | "keywords": [ 14 | "laravel", 15 | "admin", 16 | "rbac", 17 | "axe" 18 | ], 19 | "require": { 20 | "php": ">=7.0.0", 21 | "laravel/framework": ">=5.5" 22 | }, 23 | "require-dev": { 24 | "phpunit/phpunit": "~6.0 || ~8.0", 25 | "laravel/laravel": ">=5.5", 26 | "laravel/browser-kit-testing": "^2.0" 27 | }, 28 | "autoload": { 29 | "psr-4": { 30 | "Axe\\": "src/" 31 | }, 32 | "files": [ 33 | "src/functions.php" 34 | ] 35 | }, 36 | "autoload-dev": { 37 | "classmap": [ 38 | "tests/TestCase.php" 39 | ] 40 | }, 41 | "scripts": { 42 | "test": "./vendor/bin/phpunit" 43 | }, 44 | "extra": { 45 | "laravel": { 46 | "providers": [ 47 | "Axe\\AxeServiceProvider" 48 | ] 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /config/axe.php: -------------------------------------------------------------------------------- 1 | 'axe管理后台', 6 | //网址后的url, 如 xxx.com/axe 7 | 'url' => 'axe', 8 | //忽略rbac控制的地址 9 | 'ignore_rbac_route' => [ 10 | '', '/home', 11 | ], 12 | //自动记录操作 13 | 'operation_log' => [ 14 | //只会记录以下的method方法 15 | 'methods' => ['POST', 'PUT', 'DELETE'], 16 | ], 17 | ]; 18 | -------------------------------------------------------------------------------- /database/migrations/2019_08_08_000000_create_axe_admin_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('password'); 20 | $table->integer('group_id'); 21 | $table->boolean('is_use')->default(1); 22 | $table->timestamps(); 23 | $table->softDeletes(); 24 | }); 25 | 26 | Schema::create('axe_menus', function (Blueprint $table) { 27 | $table->increments('id'); 28 | $table->string('name'); 29 | $table->string('url')->nullable(); 30 | $table->unsignedTinyInteger('type')->comment('1 目录 2 链接 3 外部链接'); 31 | $table->boolean('is_use'); 32 | $table->tinyInteger('sort'); 33 | $table->string('icon')->nullable(); 34 | $table->unsignedInteger('parent_id')->default(0); 35 | $table->timestamps(); 36 | $table->softDeletes(); 37 | }); 38 | 39 | Schema::create('axe_roles', function (Blueprint $table) { 40 | $table->increments('id'); 41 | $table->string('name', 60); 42 | $table->string('code', 60); 43 | $table->text('rules'); 44 | $table->timestamps(); 45 | $table->softDeletes(); 46 | }); 47 | 48 | Schema::create('axe_groups', function (Blueprint $table) { 49 | $table->increments('id'); 50 | $table->string('name', 60); 51 | $table->string('desc', 255); 52 | $table->timestamps(); 53 | $table->softDeletes(); 54 | }); 55 | 56 | Schema::create('axe_group_roles', function (Blueprint $table) { 57 | $table->increments('id'); 58 | $table->integer('group_id'); 59 | $table->integer('role_id'); 60 | $table->timestamps(); 61 | }); 62 | 63 | Schema::create('axe_operation_logs', function (Blueprint $table) { 64 | $table->increments('id'); 65 | $table->integer('admin_id'); 66 | $table->string('method'); 67 | $table->string('url'); 68 | $table->text('extra_data')->nullable(); 69 | $table->timestamps(); 70 | }); 71 | } 72 | 73 | /** 74 | * Reverse the migrations. 75 | * 76 | * @return void 77 | */ 78 | public function down() 79 | { 80 | Schema::dropIfExists('axe_admins'); 81 | Schema::dropIfExists('axe_menus'); 82 | Schema::dropIfExists('axe_roles'); 83 | Schema::dropIfExists('axe_groups'); 84 | Schema::dropIfExists('axe_group_roles'); 85 | Schema::dropIfExists('axe_operation_logs'); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | tests/ 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/config.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layuiAdmin iframe版全局配置 4 | @Author:贤心 5 | @Site:http://www.layui.com/admin/ 6 | @License:LPPL(layui付费产品协议) 7 | 8 | */ 9 | 10 | layui.define(['laytpl', 'layer', 'element', 'util'], function(exports){ 11 | exports('setter', { 12 | container: 'LAY_app' //容器ID 13 | ,base: layui.cache.base //记录静态资源所在路径 14 | ,views: layui.cache.base + 'tpl/' //动态模板所在目录 15 | ,entry: 'index' //默认视图文件名 16 | ,engine: '.html' //视图文件后缀名 17 | ,pageTabs: true //是否开启页面选项卡功能。iframe版推荐开启 18 | 19 | ,name: 'layuiAdmin' 20 | ,tableName: 'layuiAdmin' //本地存储表名 21 | ,MOD_NAME: 'admin' //模块事件名 22 | 23 | ,debug: true //是否开启调试模式。如开启,接口异常时会抛出异常 URL 等信息 24 | 25 | //自定义请求字段 26 | ,request: { 27 | tokenName: false //自动携带 token 的字段名(如:access_token)。可设置 false 不携带。 28 | } 29 | 30 | //自定义响应字段 31 | ,response: { 32 | statusName: 'code' //数据状态的字段名称 33 | ,statusCode: { 34 | ok: 0 //数据状态一切正常的状态码 35 | ,logout: 1001 //登录状态失效的状态码 36 | } 37 | ,msgName: 'msg' //状态信息的字段名称 38 | ,dataName: 'data' //数据详情的字段名称 39 | } 40 | 41 | //扩展的第三方模块 42 | ,extend: [ 43 | 'echarts', //echarts 核心包 44 | 'echartsTheme' //echarts 主题 45 | ] 46 | 47 | //主题配置 48 | ,theme: { 49 | //内置主题配色方案 50 | color: [{ 51 | main: '#20222A' //主题色 52 | ,selected: '#009688' //选中色 53 | ,alias: 'default' //默认别名 54 | },{ 55 | main: '#03152A' 56 | ,selected: '#3B91FF' 57 | ,alias: 'dark-blue' //藏蓝 58 | },{ 59 | main: '#2E241B' 60 | ,selected: '#A48566' 61 | ,alias: 'coffee' //咖啡 62 | },{ 63 | main: '#50314F' 64 | ,selected: '#7A4D7B' 65 | ,alias: 'purple-red' //紫红 66 | },{ 67 | main: '#344058' 68 | ,logo: '#1E9FFF' 69 | ,selected: '#1E9FFF' 70 | ,alias: 'ocean' //海洋 71 | },{ 72 | main: '#3A3D49' 73 | ,logo: '#2F9688' 74 | ,selected: '#5FB878' 75 | ,alias: 'green' //墨绿 76 | },{ 77 | main: '#20222A' 78 | ,logo: '#F78400' 79 | ,selected: '#F78400' 80 | ,alias: 'red' //橙色 81 | },{ 82 | main: '#28333E' 83 | ,logo: '#AA3130' 84 | ,selected: '#AA3130' 85 | ,alias: 'fashion-red' //时尚红 86 | },{ 87 | main: '#24262F' 88 | ,logo: '#3A3D49' 89 | ,selected: '#009688' 90 | ,alias: 'classic-black' //经典黑 91 | },{ 92 | logo: '#226A62' 93 | ,header: '#2F9688' 94 | ,alias: 'green-header' //墨绿头 95 | },{ 96 | main: '#344058' 97 | ,logo: '#0085E8' 98 | ,selected: '#1E9FFF' 99 | ,header: '#1E9FFF' 100 | ,alias: 'ocean-header' //海洋头 101 | },{ 102 | header: '#393D49' 103 | ,alias: 'classic-black-header' //经典黑头 104 | },{ 105 | main: '#50314F' 106 | ,logo: '#50314F' 107 | ,selected: '#7A4D7B' 108 | ,header: '#50314F' 109 | ,alias: 'purple-red-header' //紫红头 110 | },{ 111 | main: '#28333E' 112 | ,logo: '#28333E' 113 | ,selected: '#AA3130' 114 | ,header: '#AA3130' 115 | ,alias: 'fashion-red-header' //时尚红头 116 | },{ 117 | main: '#28333E' 118 | ,logo: '#009688' 119 | ,selected: '#009688' 120 | ,header: '#009688' 121 | ,alias: 'green-header' //墨绿头 122 | }] 123 | 124 | //初始的颜色索引,对应上面的配色方案数组索引 125 | //如果本地已经有主题色记录,则以本地记录为优先,除非请求本地数据(localStorage) 126 | ,initColorIndex: 0 127 | } 128 | }); 129 | }); 130 | -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/laydate/default/font.css: -------------------------------------------------------------------------------- 1 | /** 图标字体 **/ 2 | @font-face {font-family: 'laydate-icon'; 3 | src: url('./font/iconfont.eot'); 4 | src: url('./font/iconfont.eot#iefix') format('embedded-opentype'), 5 | url('./font/iconfont.svg#iconfont') format('svg'), 6 | url('./font/iconfont.woff') format('woff'), 7 | url('./font/iconfont.ttf') format('truetype'); 8 | } 9 | 10 | .laydate-icon{ 11 | font-family:"laydate-icon" !important; 12 | font-size: 16px; 13 | font-style: normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/html/chatlog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 聊天记录 9 | 10 | 11 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 |
22 | 23 | 24 | 33 | 34 | 38 | 39 | 40 | 41 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/html/find.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 发现 9 | 10 | 11 | 14 | 15 | 16 | 17 |
18 |
此为自定义的【查找】页面,因需求不一,所以官方暂不提供该模版结构与样式,实际使用时,可移至该文件到你的项目中,对页面自行把控。 19 |
文件所在目录(相对于layui.js):/css/modules/layim/html/find.html
20 |
21 | 22 | 23 | 24 | 25 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/html/getmsg.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "pages": 1, 4 | "data": [ 5 | { 6 | "id": 76, 7 | "content": "申请添加你为好友", 8 | "uid": 168, 9 | "from": 166488, 10 | "from_group": 0, 11 | "type": 1, 12 | "remark": "有问题要问", 13 | "href": null, 14 | "read": 1, 15 | "time": "刚刚", 16 | "user": { 17 | "id": 166488, 18 | "avatar": "http://q.qlogo.cn/qqapp/101235792/B704597964F9BD0DB648292D1B09F7E8/100", 19 | "username": "李彦宏", 20 | "sign": null 21 | } 22 | }, 23 | { 24 | "id": 75, 25 | "content": "申请添加你为好友", 26 | "uid": 168, 27 | "from": 347592, 28 | "from_group": 0, 29 | "type": 1, 30 | "remark": "你好啊!", 31 | "href": null, 32 | "read": 1, 33 | "time": "刚刚", 34 | "user": { 35 | "id": 347592, 36 | "avatar": "http://q.qlogo.cn/qqapp/101235792/B78751375E0531675B1272AD994BA875/100", 37 | "username": "麻花疼", 38 | "sign": null 39 | } 40 | }, 41 | { 42 | "id": 62, 43 | "content": "雷军 拒绝了你的好友申请", 44 | "uid": 168, 45 | "from": null, 46 | "from_group": null, 47 | "type": 1, 48 | "remark": null, 49 | "href": null, 50 | "read": 1, 51 | "time": "10天前", 52 | "user": { 53 | "id": null 54 | } 55 | }, 56 | { 57 | "id": 60, 58 | "content": "马小云 已经同意你的好友申请", 59 | "uid": 168, 60 | "from": null, 61 | "from_group": null, 62 | "type": 1, 63 | "remark": null, 64 | "href": null, 65 | "read": 1, 66 | "time": "10天前", 67 | "user": { 68 | "id": null 69 | } 70 | }, 71 | { 72 | "id": 61, 73 | "content": "贤心 已经同意你的好友申请", 74 | "uid": 168, 75 | "from": null, 76 | "from_group": null, 77 | "type": 1, 78 | "remark": null, 79 | "href": null, 80 | "read": 1, 81 | "time": "10天前", 82 | "user": { 83 | "id": null 84 | } 85 | } 86 | ] 87 | } -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/skin/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layim/skin/1.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/skin/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layim/skin/2.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/skin/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layim/skin/3.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/skin/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layim/skin/4.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/skin/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layim/skin/5.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/skin/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layim/skin/logo.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/css/modules/layim/voice/default.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/css/modules/layim/voice/default.mp3 -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/font/iconfont.eot -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/font/iconfont.woff -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/0.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/1.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/10.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/11.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/12.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/13.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/14.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/15.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/16.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/17.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/18.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/19.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/2.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/20.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/21.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/22.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/23.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/24.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/25.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/26.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/27.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/28.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/29.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/3.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/30.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/31.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/32.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/33.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/34.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/35.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/36.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/37.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/38.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/39.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/4.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/40.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/41.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/42.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/43.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/44.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/45.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/46.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/47.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/48.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/49.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/5.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/50.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/51.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/52.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/53.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/54.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/55.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/56.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/57.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/58.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/59.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/6.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/60.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/61.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/62.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/63.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/64.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/65.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/66.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/67.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/68.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/69.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/7.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/70.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/71.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/8.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/layui/images/face/9.gif -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/lay/all-mobile.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:用于打包移动完整版 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define(function(exports){ 10 | exports('layui.mobile', layui.v); 11 | }); 12 | -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/lay/all.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:用于打包PC完整版,即包含layui.js和所有模块的完整合并(该文件不会存在于构建后的目录) 4 | @Author:贤心 5 | @License:LGPL 6 | 7 | */ 8 | 9 | layui.define(function(exports){ 10 | var cache = layui.cache; 11 | layui.config({ 12 | dir: cache.dir.replace(/lay\/dest\/$/, '') 13 | }); 14 | exports('layui.all', layui.v); 15 | }); 16 | -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/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(['
"].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):a/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"); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/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)}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/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)}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/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)}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/lay/modules/mobile/layim-mobile-open.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | @Name:layim mobile 开源包 4 | @Author:贤心 5 | @License:MIT 6 | 7 | */ 8 | 9 | layui.define(function(exports){ 10 | exports('layim-mobile', layui.v); 11 | }); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/lay/modules/mobile/upload-mobile.js: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @Title: layui.upload 单文件上传 - 全浏览器兼容版 4 | @Author: 贤心 5 | @License:MIT 6 | 7 | */ 8 | 9 | layui.define(['layer-mobile', 'zepto'] , function(exports){ 10 | "use strict"; 11 | 12 | var $ = layui.zepto; 13 | var layer = layui['layer-mobile']; 14 | var device = layui.device(); 15 | 16 | var elemDragEnter = 'layui-upload-enter'; 17 | var elemIframe = 'layui-upload-iframe'; 18 | 19 | var msgConf = { 20 | icon: 2 21 | ,shift: 6 22 | }, fileType = { 23 | file: '文件' 24 | ,video: '视频' 25 | ,audio: '音频' 26 | }; 27 | 28 | layer.msg = function(content){ 29 | return layer.open({ 30 | content: content || '' 31 | ,skin: 'msg' 32 | ,time: 2 //2秒后自动关闭 33 | }); 34 | }; 35 | 36 | var Upload = function(options){ 37 | this.options = options; 38 | }; 39 | 40 | //初始化渲染 41 | Upload.prototype.init = function(){ 42 | var that = this, options = that.options; 43 | var body = $('body'), elem = $(options.elem || '.layui-upload-file'); 44 | var iframe = $(''); 45 | 46 | //插入iframe 47 | $('#'+elemIframe)[0] || body.append(iframe); 48 | 49 | return elem.each(function(index, item){ 50 | item = $(item); 51 | var form = '
'; 52 | 53 | var type = item.attr('lay-type') || options.type; //获取文件类型 54 | 55 | //包裹ui元素 56 | if(!options.unwrap){ 57 | form = '
' + form + ''+ ( 58 | item.attr('lay-title') || options.title|| ('上传'+ (fileType[type]||'图片') ) 59 | ) +'
'; 60 | } 61 | 62 | form = $(form); 63 | 64 | //拖拽支持 65 | if(!options.unwrap){ 66 | form.on('dragover', function(e){ 67 | e.preventDefault(); 68 | $(this).addClass(elemDragEnter); 69 | }).on('dragleave', function(){ 70 | $(this).removeClass(elemDragEnter); 71 | }).on('drop', function(){ 72 | $(this).removeClass(elemDragEnter); 73 | }); 74 | } 75 | 76 | //如果已经实例化,则移除包裹元素 77 | if(item.parent('form').attr('target') === elemIframe){ 78 | if(options.unwrap){ 79 | item.unwrap(); 80 | } else { 81 | item.parent().next().remove(); 82 | item.unwrap().unwrap(); 83 | } 84 | }; 85 | 86 | //包裹元素 87 | item.wrap(form); 88 | 89 | //触发上传 90 | item.off('change').on('change', function(){ 91 | that.action(this, type); 92 | }); 93 | }); 94 | }; 95 | 96 | //提交上传 97 | Upload.prototype.action = function(input, type){ 98 | var that = this, options = that.options, val = input.value; 99 | var item = $(input), ext = item.attr('lay-ext') || options.ext || ''; //获取支持上传的文件扩展名; 100 | 101 | if(!val){ 102 | return; 103 | }; 104 | 105 | //校验文件 106 | switch(type){ 107 | case 'file': //一般文件 108 | if(ext && !RegExp('\\w\\.('+ ext +')$', 'i').test(escape(val))){ 109 | layer.msg('不支持该文件格式', msgConf); 110 | return input.value = ''; 111 | } 112 | break; 113 | case 'video': //视频文件 114 | if(!RegExp('\\w\\.('+ (ext||'avi|mp4|wma|rmvb|rm|flash|3gp|flv') +')$', 'i').test(escape(val))){ 115 | layer.msg('不支持该视频格式', msgConf); 116 | return input.value = ''; 117 | } 118 | break; 119 | case 'audio': //音频文件 120 | if(!RegExp('\\w\\.('+ (ext||'mp3|wav|mid') +')$', 'i').test(escape(val))){ 121 | layer.msg('不支持该音频格式', msgConf); 122 | return input.value = ''; 123 | } 124 | break; 125 | default: //图片文件 126 | if(!RegExp('\\w\\.('+ (ext||'jpg|png|gif|bmp|jpeg') +')$', 'i').test(escape(val))){ 127 | layer.msg('不支持该图片格式', msgConf); 128 | return input.value = ''; 129 | } 130 | break; 131 | } 132 | 133 | options.before && options.before(input); 134 | item.parent().submit(); 135 | 136 | var iframe = $('#'+elemIframe), timer = setInterval(function() { 137 | var res; 138 | try { 139 | res = iframe.contents().find('body').text(); 140 | } catch(e) { 141 | layer.msg('上传接口存在跨域', msgConf); 142 | clearInterval(timer); 143 | } 144 | if(res){ 145 | clearInterval(timer); 146 | iframe.contents().find('body').html(''); 147 | try { 148 | res = JSON.parse(res); 149 | } catch(e){ 150 | res = {}; 151 | return layer.msg('请对上传接口返回JSON字符', msgConf); 152 | } 153 | typeof options.success === 'function' && options.success(res, input); 154 | } 155 | }, 30); 156 | 157 | input.value = ''; 158 | }; 159 | 160 | //暴露接口 161 | exports('upload-mobile', function(options){ 162 | var upload = new Upload(options = options || {}); 163 | upload.init(); 164 | }); 165 | }); 166 | 167 | -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/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='
    ",u=1;u<=i.length;u++){var r='
  • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
  • ":n+=r}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)}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/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+"元素")})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/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(['
      ',t.bar1?'
    • '+c[0]+"
    • ":"",t.bar2?'
    • '+c[1]+"
    • ":"",'
    • '+c[2]+"
    • ","
    "].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)}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/layui/layui.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:rli"),y=a.replace(/(^http(s*):)|(\?[\s\S]*$)/g,"");if(b.each(function(e){var i=r(this),n=i.attr("lay-id");n===a&&(l=!0,t.index=e)}),d=d||"新标签页",e.pageTabs)l||(r(s).append(['
    ','',"
    "].join("")),t.index=b.length,i.tabAdd(o,{title:""+d+"",id:a,attr:y}));else{var u=n.tabsBody(n.tabsPage.index).find(".layadmin-iframe");u[0].contentWindow.location.href=a}i.tabChange(o,a),n.tabsBodyChange(t.index,{url:a,text:d})},s="#LAY_app_body",o="layadmin-layout-tabs",r=layui.$;r(window);n.screen()<2&&n.sideFlexible(),layui.config({base:e.base+"modules/"}),layui.each(e.extend,function(a,i){var n={};n[i]="{/}"+e.base+"lib/extend/"+i,layui.extend(n)}),d().autoRender(),layui.use("common"),a("index",{openTabsPage:l})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/lib/view.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["laytpl","layer"],function(e){var t=layui.jquery,a=layui.laytpl,n=layui.layer,r=layui.setter,o=(layui.device(),layui.hint()),i=function(e){return new d(e)},s="LAY_app_body",d=function(e){this.id=e,this.container=t("#"+(e||s))};i.loading=function(e){e.append(this.elemLoad=t(''))},i.removeLoad=function(){this.elemLoad&&this.elemLoad.remove()},i.exit=function(e){layui.data(r.tableName,{key:r.request.tokenName,remove:!0}),e&&e()},i.req=function(e){var a=e.success,n=(e.error,r.request),o=r.response,s=function(){return r.debug?"
    URL:"+e.url:""};if(e.data=e.data||{},e.headers=e.headers||{},n.tokenName){var d="string"==typeof e.data?JSON.parse(e.data):e.data;e.data[n.tokenName]=n.tokenName in d?e.data[n.tokenName]:layui.data(r.tableName)[n.tokenName]||"",e.headers[n.tokenName]=n.tokenName in e.headers?e.headers[n.tokenName]:layui.data(r.tableName)[n.tokenName]||""}return delete e.success,delete e.error,t.ajax(t.extend({type:"get",dataType:"json",success:function(t){var n=o.statusCode;if(t[o.statusName]==n.ok)"function"==typeof e.done&&e.done(t);else if(t[o.statusName]==n.logout)i.exit();else{var r=["Error: "+(t[o.msgName]||"返回状态码异常"),s()].join("");i.error(r)}"function"==typeof a&&a(t)},error:function(e,t){var a=["请求异常,请重试
    错误信息:"+t,s()].join("");i.error(a),"function"==typeof a&&a(res)}},e))},i.popup=function(e){var a=e.success,r=e.skin;return delete e.success,delete e.skin,n.open(t.extend({type:1,title:"提示",content:"",id:"LAY-system-view-popup",skin:"layui-layer-admin"+(r?" "+r:""),shadeClose:!0,closeBtn:!1,success:function(e,r){var o=t('');e.append(o),o.on("click",function(){n.close(r)}),"function"==typeof a&&a.apply(this,arguments)}},e))},i.error=function(e,a){return i.popup(t.extend({content:e,maxWidth:300,offset:"t",anim:6,id:"LAY_adminError"},a))},d.prototype.render=function(e,a){var n=this;layui.router();return e=r.views+e+r.engine,t("#"+s).children(".layadmin-loading").remove(),i.loading(n.container),t.ajax({url:e,type:"get",dataType:"html",data:{v:layui.cache.version},success:function(e){e="
    "+e+"
    ";var r=t(e).find("title"),o=r.text()||(e.match(/\([\s\S]*)\<\/title>/)||[])[1],s={title:o,body:e};r.remove(),n.params=a||{},n.then&&(n.then(s),delete n.then),n.parse(e),i.removeLoad(),n.done&&(n.done(s),delete n.done)},error:function(e){return i.removeLoad(),n.render.isError?i.error("请求视图文件异常,状态:"+e.status):(404===e.status?n.render("template/tips/404"):n.render("template/tips/error"),void(n.render.isError=!0))}}),n},d.prototype.parse=function(e,n,r){var s=this,d="object"==typeof e,l=d?e:t(e),u=d?e:l.find("*[template]"),c=function(e){var n=a(e.dataElem.html()),o=t.extend({params:p.params},e.res);e.dataElem.after(n.render(o)),"function"==typeof r&&r();try{e.done&&new Function("d",e.done)(o)}catch(i){console.error(e.dataElem[0],"\n存在错误回调脚本\n\n",i)}},p=layui.router();l.find("title").remove(),s.container[n?"after":"html"](l.children()),p.params=s.params||{};for(var y=u.length;y>0;y--)!function(){var e=u.eq(y-1),t=e.attr("lay-done")||e.attr("lay-then"),n=a(e.attr("lay-url")||"").render(p),r=a(e.attr("lay-data")||"").render(p),s=a(e.attr("lay-headers")||"").render(p);try{r=new Function("return "+r+";")()}catch(d){o.error("lay-data: "+d.message),r={}}try{s=new Function("return "+s+";")()}catch(d){o.error("lay-headers: "+d.message),s=s||{}}n?i.req({type:e.attr("lay-type")||"get",url:n,data:r,dataType:"json",headers:s,success:function(a){c({dataElem:e,res:a,done:t})}}):c({dataElem:e,done:t})}();return s},d.prototype.autoRender=function(e,a){var n=this;t(e||"body").find("*[template]").each(function(e,a){var r=t(this);n.container=r,n.parse(r,"refresh")})},d.prototype.send=function(e,t){var n=a(e||this.container.html()).render(t||{});return this.container.html(n),this},d.prototype.refresh=function(e){var t=this,a=t.container.next(),n=a.attr("lay-templateid");return t.id!=n?t:(t.parse(t.container,"refresh",function(){t.container.siblings('[lay-templateid="'+t.id+'"]:last').remove(),"function"==typeof e&&e()}),t)},d.prototype.then=function(e){return this.then=e,this},d.prototype.done=function(e){return this.done=e,this},e("view",i)}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/common.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(function(i){layui.$,layui.layer,layui.laytpl,layui.setter,layui.view,layui.admin;i("common",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/console.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(function(e){layui.use(["admin","carousel"],function(){var e=layui.$,t=(layui.admin,layui.carousel),a=layui.element,i=layui.device();e(".layadmin-carousel").each(function(){var a=e(this);t.render({elem:this,width:"100%",arrow:"none",interval:a.data("interval"),autoplay:a.data("autoplay")===!0,trigger:i.ios||i.android?"click":"hover",anim:a.data("anim")})}),a.render("progress")}),layui.use(["admin","carousel","echarts"],function(){var e=layui.$,t=layui.admin,a=layui.carousel,i=layui.echarts,l=[],n=[{title:{text:"今日流量趋势",x:"center",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{data:["",""]},xAxis:[{type:"category",boundaryGap:!1,data:["06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30"]}],yAxis:[{type:"value"}],series:[{name:"PV",type:"line",smooth:!0,itemStyle:{normal:{areaStyle:{type:"default"}}},data:[111,222,333,444,555,666,3333,33333,55555,66666,33333,3333,6666,11888,26666,38888,56666,42222,39999,28888,17777,9666,6555,5555,3333,2222,3111,6999,5888,2777,1666,999,888,777]},{name:"UV",type:"line",smooth:!0,itemStyle:{normal:{areaStyle:{type:"default"}}},data:[11,22,33,44,55,66,333,3333,5555,12666,3333,333,666,1188,2666,3888,6666,4222,3999,2888,1777,966,655,555,333,222,311,699,588,277,166,99,88,77]}]},{title:{text:"访客浏览器分布",x:"center",textStyle:{fontSize:14}},tooltip:{trigger:"item",formatter:"{a}
    {b} : {c} ({d}%)"},legend:{orient:"vertical",x:"left",data:["Chrome","Firefox","IE 8.0","Safari","其它浏览器"]},series:[{name:"访问来源",type:"pie",radius:"55%",center:["50%","50%"],data:[{value:9052,name:"Chrome"},{value:1610,name:"Firefox"},{value:3200,name:"IE 8.0"},{value:535,name:"Safari"},{value:1700,name:"其它浏览器"}]}]},{title:{text:"最近一周新增的用户量",x:"center",textStyle:{fontSize:14}},tooltip:{trigger:"axis",formatter:"{b}
    新增用户:{c}"},xAxis:[{type:"category",data:["11-07","11-08","11-09","11-10","11-11","11-12","11-13"]}],yAxis:[{type:"value"}],series:[{type:"line",data:[200,300,400,610,150,270,380]}]}],r=e("#LAY-index-dataview").children("div"),o=function(e){l[e]=i.init(r[e],layui.echartsTheme),l[e].setOption(n[e]),t.resize(function(){l[e].resize()})};if(r[0]){o(0);var d=0;a.on("change(LAY-index-dataview)",function(e){o(d=e.index)}),layui.admin.on("side",function(){setTimeout(function(){o(d)},300)}),layui.admin.on("hash(tab)",function(){layui.router().path.join("")||o(d)})}}),layui.use("table",function(){var e=(layui.$,layui.table);e.render({elem:"#LAY-index-topSearch",url:layui.setter.base+"json/console/top-search.js",page:!0,cols:[[{type:"numbers",fixed:"left"},{field:"keywords",title:"关键词",minWidth:300,templet:''},{field:"frequency",title:"搜索次数",minWidth:120,sort:!0},{field:"userNums",title:"用户数",sort:!0}]],skin:"line"}),e.render({elem:"#LAY-index-topCard",url:layui.setter.base+"json/console/top-card.js",page:!0,cellMinWidth:120,cols:[[{type:"numbers",fixed:"left"},{field:"title",title:"标题",minWidth:300,templet:''},{field:"username",title:"发帖者"},{field:"channel",title:"类别"},{field:"crt",title:"点击率",sort:!0}]],skin:"line"})}),e("console",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/contlist.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["table","form"],function(t){var e=layui.$,i=layui.table,n=layui.form;i.render({elem:"#LAY-app-content-list",url:layui.setter.base+"json/content/list.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"文章ID",sort:!0},{field:"label",title:"文章标签",minWidth:100},{field:"title",title:"文章标题"},{field:"author",title:"作者"},{field:"uploadtime",title:"上传时间",sort:!0},{field:"status",title:"发布状态",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",minWidth:150,align:"center",fixed:"right",toolbar:"#table-content-list"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-content-list)",function(t){var e=t.data;"del"===t.event?layer.confirm("确定删除此文章?",function(e){t.del(),layer.close(e)}):"edit"===t.event&&layer.open({type:2,title:"编辑文章",content:"../../../views/app/content/listform.html?id="+e.id,maxmin:!0,area:["550px","550px"],btn:["确定","取消"],yes:function(e,i){var l=window["layui-layer-iframe"+e],a=i.find("iframe").contents().find("#layuiadmin-app-form-edit");l.layui.form.on("submit(layuiadmin-app-form-edit)",function(i){var l=i.field;t.update({label:l.label,title:l.title,author:l.author,status:l.status}),n.render(),layer.close(e)}),a.trigger("click")}})}),i.render({elem:"#LAY-app-content-tags",url:layui.setter.base+"json/content/tags.js",cols:[[{type:"numbers",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"tags",title:"分类名",minWidth:100},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#layuiadmin-app-cont-tagsbar"}]],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-content-tags)",function(t){var i=t.data;if("del"===t.event)layer.confirm("确定删除此分类?",function(e){t.del(),layer.close(e)});else if("edit"===t.event){e(t.tr);layer.open({type:2,title:"编辑分类",content:"../../../views/app/content/tagsform.html?id="+i.id,area:["450px","200px"],btn:["确定","取消"],yes:function(e,i){var n=i.find("iframe").contents().find("#layuiadmin-app-form-tags"),l=n.find('input[name="tags"]').val();l.replace(/\s/g,"")&&(t.update({tags:l}),layer.close(e))},success:function(t,e){var n=t.find("iframe").contents().find("#layuiadmin-app-form-tags").click();n.find('input[name="tags"]').val(i.tags)}})}}),i.render({elem:"#LAY-app-content-comm",url:layui.setter.base+"json/content/comment.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"reviewers",title:"评论者",minWidth:100},{field:"content",title:"评论内容",minWidth:100},{field:"commtime",title:"评论时间",minWidth:100,sort:!0},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-content-com"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-content-comm)",function(t){t.data;"del"===t.event?layer.confirm("确定删除此条评论?",function(e){t.del(),layer.close(e)}):"edit"===t.event&&layer.open({type:2,title:"编辑评论",content:"../../../views/app/content/contform.html",area:["450px","300px"],btn:["确定","取消"],yes:function(t,e){var n=window["layui-layer-iframe"+t],l="layuiadmin-app-comm-submit",a=e.find("iframe").contents().find("#"+l);n.layui.form.on("submit("+l+")",function(e){e.field;i.reload("LAY-app-content-comm"),layer.close(t)}),a.trigger("click")},success:function(t,e){}})}),t("contlist",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/forum.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["table","form"],function(e){var t=layui.$,i=layui.table;layui.form;i.render({elem:"#LAY-app-forum-list",url:layui.setter.base+"json/forum/list.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"poster",title:"发帖人"},{field:"avatar",title:"头像",width:100,templet:"#imgTpl"},{field:"content",title:"发帖内容"},{field:"posttime",title:"发帖时间",sort:!0},{field:"top",title:"置顶",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-forum-list"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-forum-list)",function(e){e.data;if("del"===e.event)layer.confirm("确定删除此条帖子?",function(t){e.del(),layer.close(t)});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑帖子",content:"../../../views/app/forum/listform.html",area:["550px","400px"],btn:["确定","取消"],resize:!1,yes:function(e,t){var l=window["layui-layer-iframe"+e],r="LAY-app-forum-submit",o=t.find("iframe").contents().find("#"+r);l.layui.form.on("submit("+r+")",function(t){t.field;i.reload("LAY-app-forum-list"),layer.close(e)}),o.trigger("click")},success:function(e,t){}})}}),i.render({elem:"#LAY-app-forumreply-list",url:layui.setter.base+"json/forum/replys.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"replyer",title:"回帖人"},{field:"cardid",title:"回帖ID",sort:!0},{field:"avatar",title:"头像",width:100,templet:"#imgTpl"},{field:"content",title:"回帖内容",width:200},{field:"replytime",title:"回帖时间",sort:!0},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-forum-replys"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-forumreply-list)",function(e){e.data;if("del"===e.event)layer.confirm("确定删除此条评论?",function(t){e.del(),layer.close(t)});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑评论",content:"../../../views/app/forum/replysform.html",area:["550px","350px"],btn:["确定","取消"],resize:!1,yes:function(t,i){var l=i.find("iframe").contents().find("#layuiadmin-form-replys"),r=l.find('textarea[name="content"]').val();e.update({content:r}),layer.close(t)},success:function(e,t){}})}}),e("forum",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/im.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["index","layim"],function(e){var a=layui.$,t=(layui.admin,layui.element,layui.router(),layui.layim),n=["您好,我现在有事不在,一会再和您联系。","你没发错吧?face[微笑] ","洗澡中,请勿打扰,偷窥请购票,个体四十,团体八折,订票电话:一般人我不告诉他!face[哈哈] ","你好,我是主人的美女秘书,有什么事就跟我说吧,等他回来我会转告他的。face[心] face[心] face[心] ","face[威武] face[威武] face[威武] face[威武] ","<(@ ̄︶ ̄@)>","你要和我说话?你真的要和我说话?你确定自己想说吗?你一定非说不可吗?那你说吧,这是自动回复。","face[黑线] 你慢慢说,别急……","(*^__^*) face[嘻嘻] ,是贤心吗?"];t.config({init:{url:layui.setter.base+"json/layim/getList.js",data:{}},members:{url:layui.setter.base+"json/layim/getMembers.js",data:{}},uploadImage:{url:"",type:""},uploadFile:{url:"",type:""},isAudio:!0,isVideo:!0,tool:[{alias:"code",title:"代码",icon:""}],initSkin:"3.jpg",msgbox:"/layim/demo/msgbox.html",find:"/layim/demo/find.html",chatLog:"/layim/demo/chatlog.html"}),t.on("online",function(e){layer.msg(e)}),t.on("sign",function(e){layer.msg(e)}),t.on("tool(code)",function(e){layer.prompt({title:"插入代码 - 工具栏扩展示例",formType:2,shade:0},function(a,t){layer.close(t),e("[pre class=layui-code]"+a+"[/pre]")})}),t.on("ready",function(e){t.msgbox(5)}),t.on("sendMessage",function(e){var a=e.to;"friend"===a.type&&t.setChatStatus('对方正在输入。。。'),setTimeout(function(){var e={};"group"===a.type?e={username:"模拟群员"+(100*Math.random()|0),avatar:layui.cache.dir+"images/face/"+(72*Math.random()|0)+".gif",id:a.id,type:a.type,content:n[9*Math.random()|0]}:(e={username:a.name,avatar:a.avatar,id:a.id,type:a.type,content:n[9*Math.random()|0]},t.setChatStatus('在线')),t.getMessage(e)},1e3)}),t.on("members",function(e){}),t.on("chatChange",function(e){var a=e.data.type;console.log(e.data.id),"friend"===a||"group"===a&&t.getMessage({system:!0,id:e.data.id,type:"group",content:"模拟群员"+(100*Math.random()|0)+"加入群聊"})});var a=layui.jquery,i={chat:function(){t.chat({name:"小闲",type:"friend",avatar:"//tva3.sinaimg.cn/crop.0.0.180.180.180/7f5f6861jw1e8qgp5bmzyj2050050aa8.jpg",id:1008612}),layer.msg("也就是说,此人可以不在好友面板里")},message:function(){t.getMessage({username:"贤心",avatar:"//tp1.sinaimg.cn/1571889140/180/40030060651/1",id:"100001",type:"friend",content:"嗨,你好!欢迎体验LayIM。演示标记:"+(new Date).getTime(),timestamp:(new Date).getTime()})},messageAudio:function(){t.getMessage({username:"林心如",avatar:"//tp3.sinaimg.cn/1223762662/180/5741707953/0",id:"76543",type:"friend",content:"audio[http://gddx.sc.chinaz.com/Files/DownLoad/sound1/201510/6473.mp3]",timestamp:(new Date).getTime()})},messageVideo:function(){t.getMessage({username:"林心如",avatar:"//tp3.sinaimg.cn/1223762662/180/5741707953/0",id:"76543",type:"friend",content:"video[http://www.w3school.com.cn//i/movie.ogg]",timestamp:(new Date).getTime()})},messageTemp:function(){t.getMessage({username:"小酱",avatar:"//tva1.sinaimg.cn/crop.7.0.736.736.50/bd986d61jw8f5x8bqtp00j20ku0kgabx.jpg",id:"198909151014",type:"friend",content:"临时:"+(new Date).getTime()})},add:function(){t.add({type:"friend",username:"麻花疼",avatar:"//tva1.sinaimg.cn/crop.0.0.720.720.180/005JKVuPjw8ers4osyzhaj30k00k075e.jpg",submit:function(e,a,t){layer.msg("好友申请已发送,请等待对方确认",{icon:1,shade:.5},function(){layer.close(t)})}})},addqun:function(){t.add({type:"group",username:"LayIM会员群",avatar:"//tva2.sinaimg.cn/crop.0.0.180.180.50/6ddfa27bjw1e8qgp5bmzyj2050050aa8.jpg",submit:function(e,a,t){layer.msg("申请已发送,请等待管理员确认",{icon:1,shade:.5},function(){layer.close(t)})}})},addFriend:function(){var e={type:"friend",id:1234560,username:"李彦宏",avatar:"//tva4.sinaimg.cn/crop.0.0.996.996.180/8b2b4e23jw8f14vkwwrmjj20ro0rpjsq.jpg",sign:"全球最大的中文搜索引擎"};t.setFriendGroup({type:e.type,username:e.username,avatar:e.avatar,group:t.cache().friend,submit:function(a,n){t.addList({type:e.type,username:e.username,avatar:e.avatar,groupid:a,id:e.id,sign:e.sign}),layer.close(n)}})},addGroup:function(){layer.msg("已成功把[Angular开发]添加到群组里",{icon:1}),t.addList({type:"group",avatar:"//tva3.sinaimg.cn/crop.64.106.361.361.50/7181dbb3jw8evfbtem8edj20ci0dpq3a.jpg",groupname:"Angular开发",id:"12333333",members:0})},removeFriend:function(){layer.msg("已成功删除[凤姐]",{icon:1}),t.removeList({id:121286,type:"friend"})},removeGroup:function(){layer.msg("已成功删除[前端群]",{icon:1}),t.removeList({id:101,type:"group"})},setGray:function(){t.setFriendStatus(168168,"offline"),layer.msg("已成功将好友[马小云]置灰",{icon:1})},unGray:function(){t.setFriendStatus(168168,"online"),layer.msg("成功取消好友[马小云]置灰状态",{icon:1})},kefu1:function(){t.chat({name:"在线客服一",type:"kefu",avatar:"//tp1.sinaimg.cn/5619439268/180/40030060651/1",id:1111111})},kefu2:function(){t.chat({name:"在线客服二",type:"kefu",avatar:"//tp1.sinaimg.cn/5619439268/180/40030060651/1",id:2222222})},mobile:function(){var e=layui.device(),a="/layim/demo/mobile.html";if(e.android||e.ios)return location.href=a;var t=layer.open({type:2,title:"移动版演示 (或手机扫右侧二维码预览)",content:a,area:["375px","667px"],shadeClose:!0,shade:.8,end:function(){layer.close(t+2)}});layer.photos({photos:{data:[{src:"http://cdn.layui.com/upload/2016_12/168_1481056358469_50288.png"}]},anim:0,shade:!1,success:function(e){e.css("margin-left","350px")}})}};a(".LAY-senior-im-chat-demo .layui-btn").on("click",function(){var e=a(this).data("type");i[e]?i[e].call(this):""}),e("im",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/message.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["admin","table","util"],function(e){var t=layui.$,i=(layui.admin,layui.table),l=(layui.element,{all:{text:"全部消息",id:"LAY-app-message-all"},notice:{text:"通知",id:"LAY-app-message-notice"},direct:{text:"私信",id:"LAY-app-message-direct"}}),a=function(e){return''+e.title};i.render({elem:"#LAY-app-message-all",url:layui.setter.base+"json/message/all.js",page:!0,cols:[[{type:"checkbox",fixed:"left"},{field:"title",title:"标题内容",minWidth:300,templet:a},{field:"time",title:"时间",width:170,templet:"
    {{ layui.util.timeAgo(d.time) }}
    "}]],skin:"line"}),i.render({elem:"#LAY-app-message-notice",url:layui.setter.base+"json/message/notice.js",page:!0,cols:[[{type:"checkbox",fixed:"left"},{field:"title",title:"标题内容",minWidth:300,templet:a},{field:"time",title:"时间",width:170,templet:"
    {{ layui.util.timeAgo(d.time) }}
    "}]],skin:"line"}),i.render({elem:"#LAY-app-message-direct",url:layui.setter.base+"json/message/direct.js",page:!0,cols:[[{type:"checkbox",fixed:"left"},{field:"title",title:"标题内容",minWidth:300,templet:a},{field:"time",title:"时间",width:170,templet:"
    {{ layui.util.timeAgo(d.time) }}
    "}]],skin:"line"});var d={del:function(e,t){var a=l[t],d=i.checkStatus(a.id),s=d.data;return 0===s.length?layer.msg("未选中行"):void layer.confirm("确定删除选中的数据吗?",function(){layer.msg("删除成功",{icon:1}),i.reload(a.id)})},ready:function(e,t){var a=l[t],d=i.checkStatus(a.id),s=d.data;return 0===s.length?layer.msg("未选中行"):(layer.msg("标记已读成功",{icon:1}),void i.reload(a.id))},readyAll:function(e,t){var i=l[t];layer.msg(i.text+":全部已读",{icon:1})}};t(".LAY-app-message-btns .layui-btn").on("click",function(){var e=t(this),i=e.data("events"),l=e.data("type");d[i]&&d[i].call(this,e,l)}),e("message",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/sample.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(function(e){var a=layui.admin;layui.use(["admin","carousel"],function(){var e=layui.$,a=(layui.admin,layui.carousel),l=layui.element,t=layui.device();e(".layadmin-carousel").each(function(){var l=e(this);a.render({elem:this,width:"100%",arrow:"none",interval:l.data("interval"),autoplay:l.data("autoplay")===!0,trigger:t.ios||t.android?"click":"hover",anim:l.data("anim")})}),l.render("progress")}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),l=[],t=[{title:{subtext:"完全实况球员数据",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{x:"left",data:["罗纳尔多","舍普琴科"]},polar:[{indicator:[{text:"进攻",max:100},{text:"防守",max:100},{text:"体能",max:100},{text:"速度",max:100},{text:"力量",max:100},{text:"技巧",max:100}],radius:130}],series:[{type:"radar",center:["50%","50%"],itemStyle:{normal:{areaStyle:{type:"default"}}},data:[{value:[97,42,88,94,90,86],name:"舍普琴科"},{value:[97,32,74,95,88,92],name:"罗纳尔多"}]}]}],i=e("#LAY-index-pageone").children("div"),n=function(e){l[e]=a.init(i[e],layui.echartsTheme),l[e].setOption(t[e]),window.onresize=l[e].resize};i[0]&&n(0)}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),l=[],t=[{tooltip:{trigger:"axis"},calculable:!0,legend:{data:["访问量","下载量","平均访问量"]},xAxis:[{type:"category",data:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]}],yAxis:[{type:"value",name:"访问量",axisLabel:{formatter:"{value} 万"}},{type:"value",name:"下载量",axisLabel:{formatter:"{value} 万"}}],series:[{name:"访问量",type:"line",data:[900,850,950,1e3,1100,1050,1e3,1150,1250,1370,1250,1100]},{name:"下载量",type:"line",yAxisIndex:1,data:[850,850,800,950,1e3,950,950,1150,1100,1240,1e3,950]},{name:"平均访问量",type:"line",data:[870,850,850,950,1050,1e3,980,1150,1e3,1300,1150,1e3]}]}],i=e("#LAY-index-pagetwo").children("div"),n=function(e){l[e]=a.init(i[e],layui.echartsTheme),l[e].setOption(t[e]),window.onresize=l[e].resize};i[0]&&n(0)}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),l=[],t=[{title:{text:"全国的 layui 用户分布",subtext:"不完全统计"},tooltip:{trigger:"item"},dataRange:{orient:"horizontal",min:0,max:6e4,text:["高","低"],splitNumber:0},series:[{name:"全国的 layui 用户分布",type:"map",mapType:"china",selectedMode:"multiple",itemStyle:{normal:{label:{show:!0}},emphasis:{label:{show:!0}}},data:[{name:"西藏",value:60},{name:"青海",value:167},{name:"宁夏",value:210},{name:"海南",value:252},{name:"甘肃",value:502},{name:"贵州",value:570},{name:"新疆",value:661},{name:"云南",value:8890},{name:"重庆",value:10010},{name:"吉林",value:5056},{name:"山西",value:2123},{name:"天津",value:9130},{name:"江西",value:10170},{name:"广西",value:6172},{name:"陕西",value:9251},{name:"黑龙江",value:5125},{name:"内蒙古",value:1435},{name:"安徽",value:9530},{name:"北京",value:51919},{name:"福建",value:3756},{name:"上海",value:59190},{name:"湖北",value:37109},{name:"湖南",value:8966},{name:"四川",value:31020},{name:"辽宁",value:7222},{name:"河北",value:3451},{name:"河南",value:9693},{name:"浙江",value:62310},{name:"山东",value:39231},{name:"江苏",value:35911},{name:"广东",value:55891}]}]}],i=e("#LAY-index-pagethree").children("div"),n=function(e){l[e]=a.init(i[e],layui.echartsTheme),l[e].setOption(t[e]),window.onresize=l[e].resize};i[0]&&n(0)}),layui.use("table",function(){var e=(layui.$,layui.table);e.render({elem:"#LAY-index-prograss",url:layui.setter.base+"json/console/prograss.js",cols:[[{type:"checkbox",fixed:"left"},{field:"prograss",title:"任务"},{field:"time",title:"所需时间"},{field:"complete",title:"完成情况",templet:function(e){return"已完成"==e.complete?''+e.complete+"":"进行中"==e.complete?''+e.complete+"":''+e.complete+""}}]],skin:"line"})}),a.events.replyNote=function(e){var a=e.data("id");layer.prompt({title:"回复留言 ID:"+a,formType:2},function(e,a){layer.msg("得到:"+e),layer.close(a)})},e("sample",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/set.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["form","upload"],function(t){var i=layui.$,e=layui.layer,a=(layui.laytpl,layui.setter,layui.view,layui.admin),n=layui.form,s=layui.upload;i("body");n.verify({nickname:function(t,i){return new RegExp("^[a-zA-Z0-9_一-龥\\s·]+$").test(t)?/(^\_)|(\__)|(\_+$)/.test(t)?"用户名首尾不能出现下划线'_'":/^\d+\d+\d$/.test(t)?"用户名不能全为数字":void 0:"用户名不能有特殊字符"},pass:[/^[\S]{6,12}$/,"密码必须6到12位,且不能出现空格"],repass:function(t){if(t!==i("#LAY_password").val())return"两次密码输入不一致"}}),n.on("submit(set_website)",function(t){return e.msg(JSON.stringify(t.field)),!1}),n.on("submit(set_system_email)",function(t){return e.msg(JSON.stringify(t.field)),!1}),n.on("submit(setmyinfo)",function(t){return e.msg(JSON.stringify(t.field)),!1});var r=i("#LAY_avatarSrc");s.render({url:"/api/upload/",elem:"#LAY_avatarUpload",done:function(t){0==t.status?r.val(t.url):e.msg(t.msg,{icon:5})}}),a.events.avartatPreview=function(t){var i=r.val();e.photos({photos:{title:"查看头像",data:[{src:i}]},shade:.01,closeBtn:1,anim:5})},n.on("submit(setmypass)",function(t){return e.msg(JSON.stringify(t.field)),!1}),t("set",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/user.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define("form",function(e){var s=layui.$,t=(layui.layer,layui.laytpl,layui.setter,layui.view,layui.admin),i=layui.form,a=s("body");i.verify({nickname:function(e,s){return new RegExp("^[a-zA-Z0-9_一-龥\\s·]+$").test(e)?/(^\_)|(\__)|(\_+$)/.test(e)?"用户名首尾不能出现下划线'_'":/^\d+\d+\d$/.test(e)?"用户名不能全为数字":void 0:"用户名不能有特殊字符"},pass:[/^[\S]{6,12}$/,"密码必须6到12位,且不能出现空格"]}),t.sendAuthCode({elem:"#LAY-user-getsmscode",elemPhone:"#LAY-user-login-cellphone",elemVercode:"#LAY-user-login-vercode",ajax:{url:layui.setter.base+"json/user/sms.js"}}),a.on("click","#LAY-user-get-vercode",function(){s(this);this.src="https://www.oschina.net/action/user/captcha?t="+(new Date).getTime()}),e("user",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/useradmin.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["table","form"],function(e){var t=layui.$,i=layui.table;layui.form;i.render({elem:"#LAY-user-manage",url:layui.setter.base+"json/useradmin/webuser.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"username",title:"用户名",minWidth:100},{field:"avatar",title:"头像",width:100,templet:"#imgTpl"},{field:"phone",title:"手机"},{field:"email",title:"邮箱"},{field:"sex",width:80,title:"性别"},{field:"ip",title:"IP"},{field:"jointime",title:"加入时间",sort:!0},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-useradmin-webuser"}]],page:!0,limit:30,height:"full-220",text:"对不起,加载出现异常!"}),i.on("tool(LAY-user-manage)",function(e){e.data;if("del"===e.event)layer.prompt({formType:1,title:"敏感操作,请验证口令"},function(t,i){layer.close(i),layer.confirm("真的删除行么",function(t){e.del(),layer.close(t)})});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑用户",content:"../../../views/user/user/userform.html",maxmin:!0,area:["500px","450px"],btn:["确定","取消"],yes:function(e,t){var l=window["layui-layer-iframe"+e],r="LAY-user-front-submit",n=t.find("iframe").contents().find("#"+r);l.layui.form.on("submit("+r+")",function(t){t.field;i.reload("LAY-user-front-submit"),layer.close(e)}),n.trigger("click")},success:function(e,t){}})}}),i.render({elem:"#LAY-user-back-manage",url:layui.setter.base+"json/useradmin/mangadmin.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:80,title:"ID",sort:!0},{field:"loginname",title:"登录名"},{field:"telphone",title:"手机"},{field:"email",title:"邮箱"},{field:"role",title:"角色"},{field:"jointime",title:"加入时间",sort:!0},{field:"check",title:"审核状态",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-useradmin-admin"}]],text:"对不起,加载出现异常!"}),i.on("tool(LAY-user-back-manage)",function(e){e.data;if("del"===e.event)layer.prompt({formType:1,title:"敏感操作,请验证口令"},function(t,i){layer.close(i),layer.confirm("确定删除此管理员?",function(t){console.log(e),e.del(),layer.close(t)})});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑管理员",content:"../../../views/user/administrators/adminform.html",area:["420px","420px"],btn:["确定","取消"],yes:function(e,t){var l=window["layui-layer-iframe"+e],r="LAY-user-back-submit",n=t.find("iframe").contents().find("#"+r);l.layui.form.on("submit("+r+")",function(t){t.field;i.reload("LAY-user-front-submit"),layer.close(e)}),n.trigger("click")},success:function(e,t){}})}}),i.render({elem:"#LAY-user-back-role",url:layui.setter.base+"json/useradmin/role.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:80,title:"ID",sort:!0},{field:"rolename",title:"角色名"},{field:"limits",title:"拥有权限"},{field:"descr",title:"具体描述"},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-useradmin-admin"}]],text:"对不起,加载出现异常!"}),i.on("tool(LAY-user-back-role)",function(e){e.data;if("del"===e.event)layer.confirm("确定删除此角色?",function(t){e.del(),layer.close(t)});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑角色",content:"../../../views/user/administrators/roleform.html",area:["500px","480px"],btn:["确定","取消"],yes:function(e,t){var l=window["layui-layer-iframe"+e],r=t.find("iframe").contents().find("#LAY-user-role-submit");l.layui.form.on("submit(LAY-user-role-submit)",function(t){t.field;i.reload("LAY-user-back-role"),layer.close(e)}),r.trigger("click")},success:function(e,t){}})}}),e("useradmin",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/modules/workorder.js: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | ;layui.define(["table","form","element"],function(e){var t=layui.$,i=layui.table,r=(layui.form,layui.element);i.render({elem:"#LAY-app-system-order",url:layui.setter.base+"json/workorder/demo.js",cols:[[{type:"numbers",fixed:"left"},{field:"orderid",width:100,title:"工单号",sort:!0},{field:"attr",width:100,title:"业务性质"},{field:"title",width:100,title:"工单标题",width:300},{field:"progress",title:"进度",width:200,align:"center",templet:"#progressTpl"},{field:"submit",width:100,title:"提交者"},{field:"accept",width:100,title:"受理人员"},{field:"state",title:"工单状态",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",align:"center",fixed:"right",toolbar:"#table-system-order"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!",done:function(){r.render("progress")}}),i.on("tool(LAY-app-system-order)",function(e){e.data;if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑工单",content:"../../../views/app/workorder/listform.html",area:["450px","450px"],btn:["确定","取消"],yes:function(e,t){var r=window["layui-layer-iframe"+e],l="LAY-app-workorder-submit",o=t.find("iframe").contents().find("#"+l);r.layui.form.on("submit("+l+")",function(t){t.field;i.reload("LAY-user-front-submit"),layer.close(e)}),o.trigger("click")},success:function(e,t){}})}}),e("workorder",{})}); -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/login.css: -------------------------------------------------------------------------------- 1 | /** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */ 2 | #LAY_app,body,html{height:100%}.layui-layout-body{overflow:auto}#LAY-user-login,.layadmin-user-display-show{display:block!important}.layadmin-user-login{position:relative;left:0;top:0;padding:110px 0;min-height:100%;box-sizing:border-box}.layadmin-user-login-main{width:375px;margin:0 auto;box-sizing:border-box}.layadmin-user-login-box{padding:20px}.layadmin-user-login-header{text-align:center}.layadmin-user-login-header h2{margin-bottom:10px;font-weight:300;font-size:30px;color:#000}.layadmin-user-login-header p{font-weight:300;color:#999}.layadmin-user-login-body .layui-form-item{position:relative}.layadmin-user-login-icon{position:absolute;left:1px;top:1px;width:38px;line-height:36px;text-align:center;color:#d2d2d2}.layadmin-user-login-body .layui-form-item .layui-input{padding-left:38px}.layadmin-user-login-codeimg{max-height:38px;width:100%;cursor:pointer;box-sizing:border-box}.layadmin-user-login-other{position:relative;font-size:0;line-height:38px;padding-top:20px}.layadmin-user-login-other>*{display:inline-block;vertical-align:middle;margin-right:10px;font-size:14px}.layadmin-user-login-other .layui-icon{position:relative;top:2px;font-size:26px}.layadmin-user-login-other a:hover{opacity:.8}.layadmin-user-jump-change{float:right}.layadmin-user-login-footer{position:absolute;left:0;bottom:0;width:100%;line-height:30px;padding:20px;text-align:center;box-sizing:border-box;color:rgba(0,0,0,.5)}.layadmin-user-login-footer span{padding:0 5px}.layadmin-user-login-footer a{padding:0 5px;color:rgba(0,0,0,.5)}.layadmin-user-login-footer a:hover{color:rgba(0,0,0,1)}.layadmin-user-login-main[bgimg]{background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.05)}.ladmin-user-login-theme{position:fixed;bottom:0;left:0;width:100%;text-align:center}.ladmin-user-login-theme ul{display:inline-block;padding:5px;background-color:#fff}.ladmin-user-login-theme ul li{display:inline-block;vertical-align:top;width:64px;height:43px;cursor:pointer;transition:all .3s;-webkit-transition:all .3s;background-color:#f2f2f2}.ladmin-user-login-theme ul li:hover{opacity:.9}@media screen and (max-width:768px){.layadmin-user-login{padding-top:60px}.layadmin-user-login-main{width:300px}.layadmin-user-login-box{padding:10px}} -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/res/bg-none.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/style/res/bg-none.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/res/layui-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/style/res/layui-logo.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/res/logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/style/res/logo-black.png -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/res/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/style/res/logo.png -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/res/template/character.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/style/res/template/character.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/res/template/huge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/style/res/template/huge.jpg -------------------------------------------------------------------------------- /resources/assets/dist/axestatic/style/res/template/portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/assets/dist/axestatic/style/res/template/portrait.png -------------------------------------------------------------------------------- /resources/lang/tt.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kphcdr/axeadmin-laravel/64efb70bee9bf7f7db7870619badd7ae427a0e84/resources/lang/tt.t -------------------------------------------------------------------------------- /resources/views/admin/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    新建管理员
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 |
    20 |
    21 |
    22 | 23 |
    24 | 29 |
    30 |
    31 |
    32 | 33 |
    34 | 38 |
    39 |
    40 |
    41 |
    42 | 45 |
    46 |
    47 | 48 |
    49 |
    50 |
    51 |
    52 | @endsection 53 | @section('script') 54 | 85 | @endsection -------------------------------------------------------------------------------- /resources/views/admin/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    修改管理员
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 |
    20 |
    21 |
    22 | 23 |
    24 | 29 |
    30 |
    31 |
    32 | 33 |
    34 | 38 |
    39 |
    40 |
    41 |
    42 | 45 |
    46 |
    47 | 48 |
    49 |
    50 |
    51 |
    52 | @endsection 53 | @section('script') 54 | 86 | @endsection -------------------------------------------------------------------------------- /resources/views/group/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    新建角色
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 |
    20 |
    21 |
    22 | 23 |
    24 | @foreach(\Axe\Models\Role::getAllName() as $id=>$name) 25 | 26 | @endforeach 27 |
    28 |
    29 |
    30 |
    31 | 34 |
    35 |
    36 | 37 |
    38 |
    39 |
    40 |
    41 | @endsection 42 | @section('script') 43 | 74 | @endsection -------------------------------------------------------------------------------- /resources/views/group/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    编辑角色
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 |
    20 |
    21 |
    22 | 23 |
    24 | @foreach(\Axe\Models\Role::getAllName() as $id=>$name) 25 | getRoleIdArr())) checked @endif title="{{ $name }}" value="{{ $id }}"> 26 | @endforeach 27 |
    28 |
    29 |
    30 |
    31 | 34 |
    35 |
    36 | 37 |
    38 |
    39 |
    40 |
    41 | @endsection 42 | @section('script') 43 | 75 | @endsection -------------------------------------------------------------------------------- /resources/views/home.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Laravel 9 | 10 | 11 | 63 | 64 | 65 |
    78 | 79 | 80 | -------------------------------------------------------------------------------- /resources/views/layout/page.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | @yield('content') 15 | 16 | 23 | @yield('script') 24 | 25 | -------------------------------------------------------------------------------- /resources/views/login.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ config("axe.name") }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 40 | 41 | 80 | 81 | -------------------------------------------------------------------------------- /resources/views/menu/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    创建顶级菜单
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 17 |
    18 |
    19 |
    20 | 21 |
    22 | 23 |
    24 |
    25 | 26 |
    27 | 28 |
    29 | 30 |
    31 |
    32 |
    33 | 34 |
    35 | 36 | 支持的icon,请点击查看 37 |
    38 |
    39 |
    40 | 41 |
    42 | 43 | 排序值越大越靠前 44 |
    45 |
    46 |
    47 | 48 |
    49 | 53 |
    54 |
    55 |
    56 |
    57 | 60 |
    61 |
    62 |
    63 |
    64 |
    65 |
    66 | @endsection 67 | @section('script') 68 | 100 | @endsection -------------------------------------------------------------------------------- /resources/views/menu/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    创建顶级菜单
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 | @if($data->type != \Axe\Models\Menu::TYPE_DIR) 16 |
    17 | 18 |
    19 | 20 |
    21 |
    22 | @endif 23 |
    24 | 25 |
    26 | 27 | 支持的icon,请点击查看 28 |
    29 |
    30 |
    31 | 32 |
    33 | 34 | 排序值越大越靠前 35 |
    36 |
    37 |
    38 | 39 |
    40 | 44 |
    45 |
    46 |
    47 |
    48 | 51 |
    52 |
    53 |
    54 |
    55 |
    56 |
    57 | @endsection 58 | @section('script') 59 | 92 | @endsection -------------------------------------------------------------------------------- /resources/views/menu/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 |
    4 |
    5 |
    6 |
    7 |
    菜单管理
    8 |
    9 |
    10 |
    11 |
    12 |
    13 | 14 |
    15 |
    16 |
    17 |
    18 |
    19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @foreach($list as $a) 30 | 31 | 32 | 37 | 38 | 41 | 42 | @if($a['child']) 43 | @foreach($a['child'] as $child) 44 | 45 | 46 | 51 | 52 | 55 | 56 | @endforeach 57 | @endif 58 | @endforeach 59 | 60 | 61 |
    菜单名称
    是否可见
    排序值
    操作
    {{ $a['model']->name }}
    33 | @switch($a['model']->is_use) 34 | @case(1) 可用 @break 35 | @case(0) 禁用 @break 36 | @endswitch
    {{ $a['model']->sort }}
    编辑 39 | 删除 40 |
    {{ $child->name }}
    47 | @switch($child->is_use) 48 | @case(1) 可用 @break 49 | @case(0) 禁用 @break 50 | @endswitch
    {{ $child->sort }}
    编辑 53 | 删除 54 |
    62 |
    63 | 64 |
    65 |
    66 |
    67 |
    68 |
    69 |
    70 |
    71 | @endsection 72 | 73 | @section('script') 74 | 101 | @endsection -------------------------------------------------------------------------------- /resources/views/operation_log/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 |
    4 |
    5 |
    6 |
    7 |
    操作记录
    8 |
    9 |
    10 |
    11 |
    12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | @foreach($list as $a) 23 | 24 | 25 | 26 | 27 | 28 | 29 | @endforeach 30 | 31 | 32 |
    操作时间
    操作管理员
    地址
    数据
    {{ $a->created_at }}
    {{ $a->admin->name??"已删除管理员" }}
    {{$a->method}}{{ $a->url }}
    {{ json_encode($a->extra_data) }}
    33 |
    34 | 35 |
    36 |
    37 | {{ $list->links("axe.pagination",request()->all()) }} 38 |
    39 |
    40 |
    41 |
    42 |
    43 |
    44 |
    45 | @endsection -------------------------------------------------------------------------------- /resources/views/pagination.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 |
    3 |
    4 | @if ($paginator->onFirstPage()) 5 | 6 | @else 7 | 8 | @endif 9 | {{-- Pagination Elements --}} 10 | @foreach ($elements as $element) 11 | {{-- "Three Dots" Separator --}} 12 | @if (is_string($element)) 13 | {{ $element }} 14 | @endif 15 | {{-- Array Of Links --}} 16 | @if (is_array($element)) 17 | @foreach ($element as $page => $url) 18 | @if ($page == $paginator->currentPage()) 19 | {{ $page }} 20 | @else 21 | {{ $page }} 22 | @endif 23 | @endforeach 24 | @endif 25 | @endforeach 26 | @if ($paginator->hasMorePages()) 27 | 28 | @else 29 | 30 | @endif 31 | 32 |
    33 | all(); ?> 34 | @if(is_array($query)) 35 | @foreach ($query as $pa => $va) 36 | @if($pa != 'page') 37 | 38 | @endif 39 | @endforeach 40 | @endif 41 | 到第 42 |
    43 |
    44 | 共 {{$paginator->total()}} 条 45 |
    46 |
    47 | @endif -------------------------------------------------------------------------------- /resources/views/role/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    编辑权限组
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 |
    20 |
    21 |
    22 | 23 |
    24 |
    25 | 32 |
    33 |
    34 | 35 |
    36 |
    37 | 38 |
    39 |
    40 |
    41 |
    42 |
    43 | 46 |
    47 |
    48 | 49 |
    50 |
    51 |
    52 |
    53 | @endsection 54 | @section('script') 55 | 109 | @endsection -------------------------------------------------------------------------------- /resources/views/role/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | @section('content') 3 | 4 |
    5 |
    6 |
    编辑权限组
    7 |
    8 |
    9 |
    10 | 11 |
    12 | 13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 |
    20 |
    21 |
    22 | 23 | @foreach($data->rules as $rule) 24 |
    25 |
    26 | 33 |
    34 | @if($loop->first) 35 |
    36 | 37 |
    38 |
    39 | 40 |
    41 | @else 42 |
    43 | 44 |
    45 | @endif 46 |
    47 | @endforeach 48 |
    49 |
    50 |
    51 | 54 |
    55 |
    56 | 57 |
    58 |
    59 |
    60 |
    61 | @endsection 62 | @section('script') 63 | 114 | @endsection -------------------------------------------------------------------------------- /resources/views/role/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('axe.layout.page') 2 | 5 | @section('content') 6 | 7 |
    8 |
    9 |
    10 |
    11 |
    {{$tplName}}
    12 |
    13 |
    14 |
    15 |
    16 |
    17 | 18 |
    19 |
    20 |
    21 |
    22 |
    23 | 24 | 25 | 26 | 29 | 32 | 35 | 38 | 41 | 42 | 43 | 44 | @foreach($list as $a) 45 | 46 | 49 | 52 | 55 | 61 | 67 | 68 | @endforeach 69 | 70 | 71 |
    27 |
    ID
    28 |
    30 |
    名称
    31 |
    33 |
    标识
    34 |
    36 |
    动作组
    37 |
    39 |
    操作
    40 |
    47 |
    {{ $a->id }}
    48 |
    50 |
    {{ $a->name }}
    51 |
    53 |
    {{ $a->code }}
    54 |
    56 |
    @foreach($a->rules as $v) 58 | {{ $v['method'] }} {{$v['url']}} 59 |
    @endforeach
    60 |
    62 |
    63 | 编辑 64 | 删除 65 |
    66 |
    72 |
    73 | 74 |
    75 |
    76 | {{ $list->links("axe.pagination",request()->all()) }} 77 |
    78 |
    79 |
    80 |
    81 |
    82 |
    83 |
    84 | @endsection 85 | 86 | @section('script') 87 | 115 | @endsection -------------------------------------------------------------------------------- /routes/axe.php: -------------------------------------------------------------------------------- 1 | config('axe.url'), 'middleware' => 'web', 'namespace' => '\\Axe\\Http\\Controllers'], function () { 6 | Route::get('login', 'LoginController@getLogin'); 7 | Route::get('logout', 'LoginController@getLogout'); 8 | Route::post('login', 'LoginController@postLogin'); 9 | 10 | Route::group(['middleware' => 'axe'], function () { 11 | Route::get('/', 'IndexController@index'); 12 | Route::get('home', 'IndexController@home'); 13 | //menu 14 | Route::resource('admin', 'AdminController'); 15 | Route::resource('menu', 'MenuController'); 16 | Route::resource('role', 'RoleController'); 17 | Route::resource('group', 'GroupController'); 18 | Route::get('operation-log', 'OperationLogController@index'); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/AxeServiceProvider.php: -------------------------------------------------------------------------------- 1 | loadRoutesFrom(__DIR__.'/../routes/axe.php'); 20 | $this->registerMiddleware(); 21 | 22 | if ($this->app->runningInConsole()) { 23 | $this->registerPublishing(); 24 | $this->registerCommand(); 25 | } 26 | } 27 | 28 | /** 29 | * register Middleware. 30 | * 31 | * @return void 32 | */ 33 | public function registerMiddleware() 34 | { 35 | app(Router::class)->aliasMiddleware('axe.auth', AxeAuthMiddleware::class); 36 | app(Router::class)->aliasMiddleware('axe.rbac', AxeRbacMiddleware::class); 37 | app(Router::class)->aliasMiddleware('axe.operation_log', AxeOperationLogMiddleware::class); 38 | app(Router::class)->middlewareGroup('axe', [ 39 | 'axe.auth', 40 | 'axe.rbac', 41 | 'axe.operation_log', 42 | ]); 43 | } 44 | 45 | /** 46 | * Register publish resources. 47 | * 48 | * @return void 49 | */ 50 | protected function registerPublishing() 51 | { 52 | $this->publishes([__DIR__.'/../config' => config_path()], 'axe-config'); 53 | $this->publishes([__DIR__.'/../database/migrations' => database_path('migrations')], 'axe-migrations'); 54 | $this->publishes([__DIR__.'/../resources/assets/dist' => public_path()], 'axe-resource'); 55 | $this->publishes([__DIR__.'/../resources/views' => resource_path('views/axe')], 'axe-views'); 56 | } 57 | 58 | protected function registerCommand() 59 | { 60 | Artisan::starting(function (Application $artisan) { 61 | $artisan->resolveCommands([ 62 | ResetPasswordCommand::class, 63 | InstallAxeCommand::class, 64 | ]); 65 | }); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Console/InstallAxeCommand.php: -------------------------------------------------------------------------------- 1 | info('you will install axe-admin'); 43 | $this->call('vendor:publish', ['--provider' => AxeServiceProvider::class]); 44 | $this->call('migrate'); 45 | $this->call('db:seed', ['--class' => AxeAdminSeeder::class]); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Console/ResetPasswordCommand.php: -------------------------------------------------------------------------------- 1 | ask('please input your admin name?'); 42 | 43 | $admin = Admin::whereName($name)->first(); 44 | if (is_null($admin)) { 45 | $this->error("not found {$name}"); 46 | 47 | return; 48 | } 49 | 50 | $password = $this->ask('please input new password'); 51 | 52 | $admin->password = $password; 53 | $admin->save(); 54 | 55 | $this->info('reset password success!'); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Events/AdminLoginSuccessEvent.php: -------------------------------------------------------------------------------- 1 | doLoginSuccess(); 24 | } 25 | 26 | /** 27 | * Get the channels the event should broadcast on. 28 | * 29 | * @return Channel|array 30 | */ 31 | public function broadcastOn() 32 | { 33 | return new PrivateChannel('channel-name'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Http/Controllers/AdminController.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 17 | 'name' => 'required', 18 | 'password' => 'required', 19 | 'is_use' => 'required', 20 | 'group_id' => 'required', 21 | ]); 22 | 23 | if ($this->getModel()->whereName($request->input('name'))->exists()) { 24 | return $this->vendorJson(false, null, '已经存在相同名称的管理员'); 25 | } 26 | 27 | return parent::store($request); // TODO: Change the autogenerated stub 28 | } 29 | 30 | /** 31 | * @return Group 32 | */ 33 | public function getModel(): Model 34 | { 35 | return app(Admin::class); 36 | } 37 | 38 | public function update(Request $request, $id) 39 | { 40 | $this->validate($request, [ 41 | 'name' => 'required', 42 | 'password' => '', 43 | 'is_use' => 'required', 44 | 'group_id' => 'required', 45 | ]); 46 | 47 | $model = $this->getModel()->findOrFail($id); 48 | 49 | $data = $request->all(); 50 | 51 | if (empty($data['password'])) { 52 | unset($data['password']); 53 | } 54 | $model->fill($data)->save(); 55 | 56 | return $this->vendorJson(true, $model, '操作成功'); 57 | } 58 | 59 | public function destroy($id) 60 | { 61 | $admin = $this->getAdmin(); 62 | 63 | if ($id == $admin->id) { 64 | return $this->vendorJson(false, null, '你不能删除自己的账号'); 65 | } 66 | 67 | return parent::destroy($id); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Http/Controllers/AuthController.php: -------------------------------------------------------------------------------- 1 | getModel()->newQuery()->paginate(); 22 | 23 | return $this->vendorView($this->viewGroup.'.index', [ 24 | 'list' => $paginate, 25 | ]); 26 | } 27 | 28 | /** 29 | * @return Model 30 | */ 31 | abstract public function getModel(): Model; 32 | 33 | protected function vendorView($view, $data = [], $mergeData = []) 34 | { 35 | return parent::vendorView($view, $data, $mergeData); // TODO: Change the autogenerated stub 36 | } 37 | 38 | /** 39 | * @return Admin 40 | */ 41 | public function getAdmin() 42 | { 43 | return request()->attributes->get('admin'); 44 | } 45 | 46 | /** 47 | * Show the form for creating a new resource. 48 | * 49 | * @return Response 50 | */ 51 | public function create() 52 | { 53 | return $this->vendorView($this->viewGroup.'.create'); 54 | } 55 | 56 | /** 57 | * Store a newly created resource in storage. 58 | * 59 | * @param Request $request 60 | * 61 | * @return Response 62 | */ 63 | public function store(Request $request) 64 | { 65 | $model = $this->getModel(); 66 | $model->fill($request->only($model->getFillable()))->save(); 67 | 68 | return $this->vendorJson($model->exists, null, '创建成功'); 69 | } 70 | 71 | /** 72 | * Display the specified resource. 73 | * 74 | * @param int $id 75 | * 76 | * @return Response 77 | */ 78 | public function show($id) 79 | { 80 | } 81 | 82 | /** 83 | * Show the form for editing the specified resource. 84 | * 85 | * @param int $id 86 | * 87 | * @return Response 88 | */ 89 | public function edit($id) 90 | { 91 | $model = $this->getModel()->findOrFail($id); 92 | 93 | return $this->vendorView($this->viewGroup.'.edit', [ 94 | 'data' => $model, 95 | ]); 96 | } 97 | 98 | /** 99 | * Update the specified resource in storage. 100 | * 101 | * @param Request $request 102 | * @param int $id 103 | * 104 | * @return Response 105 | */ 106 | public function update(Request $request, $id) 107 | { 108 | $model = $this->getModel()->findOrFail($id); 109 | $model->fill($request->only($model->getFillable()))->save(); 110 | 111 | return $this->vendorJson($model->exists, null, '修改成功'); 112 | } 113 | 114 | /** 115 | * Remove the specified resource from storage. 116 | * 117 | * @param int $id 118 | * 119 | * @return Response 120 | */ 121 | public function destroy($id) 122 | { 123 | $model = $this->getModel()->findOrFail($id); 124 | if ($model) { 125 | $model->delete(); 126 | 127 | return $this->vendorJson(true, $model, '操作完成'); 128 | } 129 | 130 | return $this->vendorJson(false, $model, '删除失败'); 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/Http/Controllers/BaseController.php: -------------------------------------------------------------------------------- 1 | $ret, 15 | 'data' => $data, 16 | 'message' => $message, 17 | ]; 18 | } 19 | 20 | protected function vendorView($view, $data = [], $mergeData = []) 21 | { 22 | return view($this->viewPrefix.$view, $data, $mergeData); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Http/Controllers/GroupController.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 17 | 'name' => 'required', 18 | 'desc' => '', 19 | 'roles' => 'array', 20 | ]); 21 | 22 | $model = $this->getModel()->create([ 23 | 'name' => $request->input('name'), 24 | 'desc' => $request->input('desc'), 25 | ]); 26 | 27 | $roles = $request->input('roles', []); 28 | foreach ($roles as $role) { 29 | GroupRole::create([ 30 | 'group_id' => $model->id, 31 | 'role_id' => $role, 32 | ]); 33 | } 34 | 35 | return $this->vendorJson(true, $model, '操作成功'); 36 | } 37 | 38 | /** 39 | * @return Group 40 | */ 41 | public function getModel(): Model 42 | { 43 | return app(Group::class); 44 | } 45 | 46 | public function update(Request $request, $id) 47 | { 48 | $this->validate($request, [ 49 | 'name' => 'required', 50 | 'desc' => '', 51 | 'roles' => 'array', 52 | ]); 53 | /** @var Group $model */ 54 | $model = $this->getModel()->findOrFail($id); 55 | $model->update([ 56 | 'name' => $request->input('name'), 57 | 'desc' => $request->input('desc'), 58 | ]); 59 | 60 | $roles = $request->input('roles', []); 61 | GroupRole::whereGroupId($model->id)->delete(); 62 | foreach ($roles as $role) { 63 | GroupRole::create([ 64 | 'group_id' => $model->id, 65 | 'role_id' => $role, 66 | ]); 67 | } 68 | 69 | return $this->vendorJson(true, $model, '操作成功'); 70 | } 71 | 72 | public function destroy($id) 73 | { 74 | $model = $this->getModel()->findOrFail($id); 75 | if ($model->admin) { 76 | return $this->vendorJson(false, null, '角色下还有管理员,禁止删除'); 77 | } 78 | 79 | return parent::destroy($id); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/Http/Controllers/IndexController.php: -------------------------------------------------------------------------------- 1 | vendorView('index'); 10 | } 11 | 12 | public function home() 13 | { 14 | return $this->vendorView('home'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Http/Controllers/LoginController.php: -------------------------------------------------------------------------------- 1 | vendorView('login'); 15 | } 16 | 17 | public function postLogin(Request $request) 18 | { 19 | $this->validate($request, [ 20 | 'name' => 'required', 21 | 'password' => 'required', 22 | ]); 23 | $admin = Admin::whereName($request->input('name'))->first(); 24 | if ($admin) { 25 | if ($admin->checkPassword($request->input('password'))) { 26 | if ($admin->is_use == 0) { 27 | return $this->vendorJson(false, null, '账号已禁用'); 28 | } 29 | AdminLoginSuccessEvent::dispatch($admin); 30 | 31 | return $this->vendorJson(true, null, '登录成功'); 32 | } else { 33 | return $this->vendorJson(false, null, '账号密码错误'); 34 | } 35 | } 36 | 37 | return $this->vendorJson(false, null, '登录失败'); 38 | } 39 | 40 | public function getLogout() 41 | { 42 | Session::forget('axe_id'); 43 | 44 | return redirect(axe_url('login')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Http/Controllers/MenuController.php: -------------------------------------------------------------------------------- 1 | getModel()->getAllTree(); 16 | 17 | return $this->vendorView($this->viewGroup.'.index', [ 18 | 'list' => $list, 19 | ]); 20 | } 21 | 22 | /** 23 | * @return Menu 24 | */ 25 | public function getModel(): Model 26 | { 27 | return app(Menu::class); 28 | } 29 | 30 | public function store(Request $request) 31 | { 32 | $this->validate($request, [ 33 | 'name' => 'required', 34 | 'type' => 'required', 35 | 'url' => '', 36 | 'icon' => '', 37 | 'sort' => 'required', 38 | 'is_use' => 'required', 39 | ]); 40 | 41 | $data = [ 42 | 'name' => $request->input('name'), 43 | 'type' => $request->input('type'), 44 | 'url' => $request->input('url'), 45 | 'icon' => $request->input('icon'), 46 | 'sort' => $request->input('sort'), 47 | 'is_use' => $request->input('is_use'), 48 | ]; 49 | $model = $this->getModel(); 50 | $model->fill($request->only($data))->save(); 51 | 52 | return $this->vendorJson($model->exists, null, '创建成功'); 53 | } 54 | 55 | public function destroy($id) 56 | { 57 | $model = $this->getModel()->findOrFail($id); 58 | if ($model->hasChild()) { 59 | return $this->vendorJson(false, null, '请先删除子菜单'); 60 | } 61 | 62 | return parent::destroy($id); // TODO: Change the autogenerated stub 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/Http/Controllers/OperationLogController.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 16 | 'name' => 'required', 17 | 'code' => 'required', 18 | 'method' => 'required|array', 19 | 'url' => 'required|array', 20 | ]); 21 | $method = $request->input('method'); 22 | $url = $request->input('url'); 23 | $rules = []; 24 | foreach ($method as $k => $m) { 25 | if ($url[$k]) { 26 | $rules[] = [ 27 | 'method' => $m, 28 | 'url' => $url[$k], 29 | ]; 30 | } 31 | } 32 | 33 | $model = $this->getModel()->create([ 34 | 'name' => $request->input('name'), 35 | 'code' => $request->input('code'), 36 | 'rules' => $rules, 37 | ]); 38 | 39 | return $this->vendorJson(true, $model, '操作成功'); 40 | } 41 | 42 | public function getModel(): Model 43 | { 44 | return app(Role::class); 45 | } 46 | 47 | public function update(Request $request, $id) 48 | { 49 | $this->validate($request, [ 50 | 'name' => 'required', 51 | 'code' => 'required', 52 | 'method' => 'required|array', 53 | 'url' => 'required|array', 54 | ]); 55 | $method = $request->input('method'); 56 | $url = $request->input('url'); 57 | $rules = []; 58 | foreach ($method as $k => $m) { 59 | if ($url[$k]) { 60 | $rules[] = [ 61 | 'method' => $m, 62 | 'url' => $url[$k], 63 | ]; 64 | } 65 | } 66 | $model = $this->getModel()->findOrFail($id); 67 | $model->update([ 68 | 'name' => $request->input('name'), 69 | 'code' => $request->input('code'), 70 | 'rules' => $rules, 71 | ]); 72 | 73 | return $this->vendorJson(true, $model, '操作成功'); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/Http/Middleware/AxeAuthMiddleware.php: -------------------------------------------------------------------------------- 1 | attributes->set('admin', $axe); 16 | 17 | return $next($request); 18 | } else { 19 | return redirect(axe_url('login')); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Http/Middleware/AxeOperationLogMiddleware.php: -------------------------------------------------------------------------------- 1 | attributes->get('admin'); 14 | $method = $request->method(); 15 | $operationMethodArr = config('axe.operation_log.methods'); 16 | if (in_array($method, $operationMethodArr)) { 17 | OperationLog::create([ 18 | 'admin_id' => $admin->id, 19 | 'url' => $request->fullUrl(), 20 | 'method' => $method, 21 | 'extra_data' => $request->all(), 22 | ]); 23 | } 24 | 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Http/Middleware/AxeRbacMiddleware.php: -------------------------------------------------------------------------------- 1 | attributes->get('admin'); 14 | $myRole = $admin->group->roles; 15 | 16 | $prefix = config('axe.url'); 17 | $method = $request->method(); 18 | $path = Str::replaceFirst($prefix, '', $request->path()); 19 | $ignoreListArr = config('axe.ignore_rbac_route'); 20 | //in ignoreList 21 | if (in_array($path, $ignoreListArr)) { 22 | return $next($request); 23 | } 24 | 25 | //has role 26 | foreach ($myRole as $role) { 27 | if ($role->checkPath($method, $path)) { 28 | return $next($request); 29 | } 30 | } 31 | 32 | return $this->fail(); 33 | } 34 | 35 | private function fail() 36 | { 37 | return abort(405, '权限不足'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Models/Admin.php: -------------------------------------------------------------------------------- 1 | belongsTo(Group::class); 17 | } 18 | 19 | public function setPasswordAttribute($password) 20 | { 21 | $this->attributes['password'] = Hash::make($password); 22 | } 23 | 24 | public function checkPassword($password) 25 | { 26 | return Hash::check($password, $this->password); 27 | } 28 | 29 | public function doLoginSuccess() 30 | { 31 | session([ 32 | 'axe_id' => $this->id, 33 | 'axe_name' => $this->name, 34 | ]); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Models/AxeModel.php: -------------------------------------------------------------------------------- 1 | orderBy('id', 'desc'); 19 | }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Models/Group.php: -------------------------------------------------------------------------------- 1 | hasOne(Admin::class); 17 | } 18 | 19 | public function groupRole() 20 | { 21 | return $this->hasMany(GroupRole::class); 22 | } 23 | 24 | public function getRoleIdArr(): array 25 | { 26 | return $this->groupRole->pluck('role_id')->toArray(); 27 | } 28 | 29 | public function roles() 30 | { 31 | return $this->belongsToMany(Role::class, 'axe_group_roles'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Models/GroupRole.php: -------------------------------------------------------------------------------- 1 | belongsTo(Role::class, 'role_id', 'id'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Models/Menu.php: -------------------------------------------------------------------------------- 1 | orderBy('sort', 'desc')->get(); 21 | 22 | return $this->vendorTree($menuCollection); 23 | } 24 | 25 | public function getCanUseTree() 26 | { 27 | $menuCollection = self::whereIsUse(1)->orderBy('parent_id', 'asc')->orderBy('sort', 'desc')->get(); 28 | 29 | return $this->vendorTree($menuCollection); 30 | } 31 | 32 | public function hasChild() 33 | { 34 | return $this->whereParentId($this->id)->count() > 0; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Models/OperationLog.php: -------------------------------------------------------------------------------- 1 | 'array', 13 | ]; 14 | 15 | public function admin() 16 | { 17 | return $this->belongsTo(Admin::class); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Models/Role.php: -------------------------------------------------------------------------------- 1 | 'array', 15 | ]; 16 | 17 | protected $hidden = [ 18 | 'deleted_at', 'updated_at', 19 | ]; 20 | 21 | protected $fillable = ['name', 'code', 'rules']; 22 | 23 | public function checkPath($method, $path) 24 | { 25 | $method = strtoupper($method); 26 | foreach ($this->rules as $role) { 27 | if ($role['method'] == 'ALL' || $role['method'] == $method) { 28 | $fx = '/^'.str_replace('/', '\\/', $role['url']).'/i'; 29 | if (preg_match($fx, $path)) { 30 | return true; 31 | } 32 | } 33 | } 34 | 35 | return false; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Traits/HasNameTrait.php: -------------------------------------------------------------------------------- 1 | id] = $a->name; 14 | } 15 | 16 | return $return; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Traits/VendorTreeTrait.php: -------------------------------------------------------------------------------- 1 | parent_id == 0) { 14 | $tree[$menu->id] = [ 15 | 'model' => $menu, 16 | 'child' => [], 17 | ]; 18 | } else { 19 | $tree[$menu->parent_id]['child'][] = $menu; 20 | } 21 | } 22 | 23 | return Collection::make($tree); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/functions.php: -------------------------------------------------------------------------------- 1 | visit('axe/login') 8 | ->see('LAY-user-login') 9 | ->see(csrf_token()); 10 | } 11 | 12 | public function testGetIndex() 13 | { 14 | $this->visit('') 15 | ->see('Laravel'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make('Illuminate\Contracts\Console\Kernel')->bootstrap(); 13 | $app->register(\Axe\AxeServiceProvider::class); 14 | 15 | return $app; 16 | } 17 | 18 | public function setUp() 19 | { 20 | parent::setUp(); 21 | 22 | $this->app['config']->set('database.default', 'mysql'); 23 | $this->app['config']->set('database.connections.mysql.host', env('DB_HOST')); 24 | $this->app['config']->set('database.connections.mysql.database', env('DB_DATABASE')); 25 | $this->app['config']->set('database.connections.mysql.username', env('DB_USERNAME')); 26 | $this->app['config']->set('database.connections.mysql.password', env('DB_PASSWORD')); 27 | $this->app['config']->set('app.key', env('APP_KEY')); 28 | 29 | $this->artisan('axe:install'); 30 | } 31 | 32 | public function tearDown() 33 | { 34 | $this->artisan('migrate:rollback'); 35 | 36 | \Illuminate\Support\Facades\DB::select("delete from `migrations` where `migration` = '2019_08_08_000000_create_axe_admin_table'"); 37 | 38 | parent::tearDown(); 39 | } 40 | } 41 | --------------------------------------------------------------------------------