├── README.md ├── check_redis_status.php ├── conn.php ├── css ├── bootstrap.min.css ├── fontawesome-all.min.css ├── simple-line-icons.css ├── styles.css └── styles.css_bak ├── db_connect_graph_getdata.php ├── db_memory_graph_getdata.php ├── db_qps_graph_getdata.php ├── image ├── chart.gif ├── redis_monitor.jpg ├── redis_monitor_history1.png ├── redis_monitor_history2.png ├── redis_monitor_history3.png ├── redis_slowlog.png └── table_info.png ├── js ├── echarts.common.min.js ├── jquery-3.3.1.min.js ├── shine.js ├── show_connect.php ├── show_graph_index.php ├── show_graph_qps.php └── show_used_memory.php ├── mail ├── mail.php └── sendEmail ├── redis_status_monitor.php ├── schema └── redis_monitor_schema.sql ├── show_graph.php ├── slowlog.php ├── weixin ├── wechat.py └── weixin.php └── xadmin ├── css ├── font.css └── xadmin.css ├── fonts ├── iconfont.eot ├── iconfont.svg ├── iconfont.ttf └── iconfont.woff ├── images ├── aiwrap.png └── bg.png ├── js ├── cookie.js ├── jquery-3.3.1.min.js ├── xadmin.js └── xcity.js └── lib ├── layui ├── css │ ├── layui.css │ ├── layui.mobile.css │ └── modules │ │ ├── code.css │ │ ├── laydate │ │ └── default │ │ │ └── laydate.css │ │ └── layer │ │ └── default │ │ ├── icon-ext.png │ │ ├── icon.png │ │ ├── layer.css │ │ ├── loading-0.gif │ │ ├── loading-1.gif │ │ └── loading-2.gif ├── 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 │ └── modules │ │ ├── carousel.js │ │ ├── code.js │ │ ├── colorpicker.js │ │ ├── element.js │ │ ├── flow.js │ │ ├── form.js │ │ ├── jquery.js │ │ ├── laydate.js │ │ ├── layedit.js │ │ ├── layer.js │ │ ├── laypage.js │ │ ├── laytpl.js │ │ ├── mobile.js │ │ ├── rate.js │ │ ├── slider.js │ │ ├── table.js │ │ ├── tree.js │ │ ├── upload.js │ │ └── util.js ├── layui.all.js └── layui.js └── test /README.md: -------------------------------------------------------------------------------- 1 | # redis_monitor 2 | 3 | 轻便式Redis Monitor面向研发人员图形可视化监控工具,借鉴了LEPUS(天兔)监控平台以及redis-cli info命令输出的监控指标项,去掉了一些不必要看不懂的监控项,目前采集了数据库连接数、QPS、内存使用率统计和同步复制延迟时长,以及列出当前所有慢查询命令。 4 | 5 | Redis Monitor可以监控单机模式,哨兵模式,集群模式,并且录入一个主库或者从库IP,自动发现主库或者从库IP信息,无需人工再次录入。 6 | 7 | 采用远程连接方式获取数据,所以无需要在Redis服务器端部署相关agent或计划任务,可实现微信和邮件报警。 8 | 9 | 注:监控环境为Redis 6.2以上版本。 10 | 11 | 1)Redis状态监控 12 | ![image](https://raw.githubusercontent.com/hcymysql/redis_monitor/main/image/redis_monitor.jpg) 13 | 14 | 2)点击图表,可以查看历史曲线图 15 | 16 | 连接数 17 | ![image](https://raw.githubusercontent.com/hcymysql/redis_monitor/main/image/redis_monitor_history1.png) 18 | 19 | QPS每秒查询量 20 | ![image](https://raw.githubusercontent.com/hcymysql/redis_monitor/main/image/redis_monitor_history2.png) 21 | 22 | 内存使用率 23 | ![image](https://raw.githubusercontent.com/hcymysql/redis_monitor/main/image/redis_monitor_history3.png) 24 | 25 | 3)点击端口号,可以列出该实例下的所有慢日志命令 26 | 27 | 慢查询 28 | ![image](https://raw.githubusercontent.com/hcymysql/redis_monitor/main/image/redis_slowlog.png) 29 | 30 | # 一、环境搭建 31 | 32 | 1)php-redis驱动安装(Centos 7系统) 33 | 34 | shell> yum install -y php-pear php-devel php httpd mysql php-mysqlnd php-redis 35 | 36 | 2)重启httpd服务 37 | 38 | shell> systemctl restart httpd.service 39 | 40 | 3)redis需要授权连接密码 41 | 42 | > config set requirepass yourPassword 43 | 44 | # 二、Redis monitor部署 45 | 46 | 把https://github.com/hcymysql/redis_monitor/archive/refs/heads/main.zip 安装包解压缩到 /var/www/html/目录下 47 | 48 | cd /var/www/html/redis_monitor/ 49 | 50 | chmod 755 ./mail/sendEmail 51 | 52 | chmod 755 ./weixin/wechat.py 53 | 54 | (注:邮件和微信报警调用的第三方工具,所以这里要赋予可执行权限755) 55 | 56 | ### 1、导入Redis Monitor监控工具表结构(redis_monitor库) 57 | 58 | cd /var/www/html/mongo_monitor/schema/ 59 | 60 | mysql -uroot -p123456 < redis_monitor_schema.sql 61 | #### 注:redis_status_history表引擎可以更改为rocksdb引擎,支持数据压缩,这对于减小存储空间以及增快IO效率都有直接的帮助。 62 | https://www.percona.com/blog/2018/04/30/a-look-at-myrocks-performance/ 63 | 64 | ### 2、录入被监控主机的信息 65 | 66 | mysql> INSERT INTO `redis_status_info`(`id`,`host`,`tag`,`pwd`,`port`,`monitor`, 67 | `send_mail`,`send_mail_to_list`,`send_weixin`,`send_weixin_to_list`,`alarm_threads_running`, 68 | `threshold_alarm_threads_running`,`alarm_used_memory_status`,`threshold_warning_used_memory`) 69 | VALUES (1,'192.168.176.27','Redis测试','hechunyang123456',6379,1,1,'hechunyang@126.com',1,'hechunyang',NULL,150,NULL,'200M'); 70 | 71 | 注,以下字段可以按照需求变更: 72 | 73 | ip字段含义:输入被监控Redis的IP地址 74 | 75 | tag字段含义:输入被监控Redis的业务名字 76 | 77 | pwd字段含义:输入被监控Redis的密码 78 | 79 | port字段含义:输入被监控Redis的端口号 80 | 81 | monitor字段含义:0为关闭监控(也不采集数据,直接跳过);1为开启监控(采集数据) 82 | 83 | send_mail字段含义:0为关闭邮件报警;1为开启邮件报警 84 | 85 | send_mail_to_list字段含义:邮件人列表 86 | 87 | send_weixin字段含义:0为关闭微信报警;1为开启微信报警 88 | 89 | send_weixin_to_list字段含义:微信公众号 90 | 91 | threshold_alarm_threads_running字段含义:设置连接数阀值(单位个) 92 | 93 | threshold_warning_used_memory字段含义:设置已用内存报警阀值(单位M) 94 | 95 | ### 3、修改conn.php配置文件 96 | 97 | vim /var/www/html/redis_monitor/conn.php 98 | 99 | $con = mysqli_connect("127.0.0.1","admin","hechunyang","redis_monitor","3306") or die("数据库链接错误".mysqli_error()); 100 | 101 | 改成你的Redis Monitor监控工具表结构(redis_monitor库)连接信息 102 | 103 | ### 4、修改邮件报警信息 104 | 105 | cd /var/www/html/redis_monitor/mail/ 106 | 107 | vim mail.php 108 | 109 | system("./mail/sendEmail -f chunyang_he@139.com -t '{$this->send_mail_to_list}' -s 110 | smtp.139.com:25 -u '{$this->alarm_subject}' -o message-charset=utf8 -o message-content-type=html -m '报警信息:
{$this->alarm_info}' -xu chunyang_he@139.com -xp 112 | '123456' -o tls=no"); 113 | 114 | 改成你的发件人地址,账号密码,里面的变量不用修改。 115 | 116 | 117 | ### 5、修改微信报警信息 118 | 119 | cd /var/www/html/redis_monitor/weixin/ 120 | 121 | vim wechat.py 122 | 123 | 微信企业号设置移步 124 | 125 | https://github.com/X-Mars/Zabbix-Alert-WeChat/blob/master/README.md 看此教程配置。 126 | 127 | ### 6、定时任务每分钟抓取一次 128 | 129 | # crontab -l 130 | */1 * * * * /usr/bin/php /var/www/html/redis_monitor/check_redis_status.php > /dev/null 2 >&1 131 | ##### check_redis_status.php(用来采集被监控端Redis状态信息和触发报警) 132 | 133 | ### 7、更改页面自动刷新频率 134 | 135 | vim redis_status_monitor.php 136 | 137 | http-equiv="refresh" content="600" 138 | 139 | 默认页面每600秒自动刷新一次。 140 | 141 | 142 | ### 8、页面访问 143 | 144 | http://yourIP/redis_monitor/redis_status_monitor.php 145 | 146 | 加一个超链接,可方便地接入你们的自动化运维平台里。 147 | -------------------------------------------------------------------------------- /conn.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /db_connect_graph_getdata.php: -------------------------------------------------------------------------------- 1 | =${interval_time} AND create_time <=NOW() group by FLOOR(UNIX_TIMESTAMP(create_time)/60)"; 19 | 20 | $result1 = mysqli_query($con,$get_info); 21 | //echo $get_info; 22 | 23 | $array= array(); 24 | class Connections{ 25 | public $create_time; 26 | public $threads_connected; 27 | } 28 | while($row = mysqli_fetch_array($result1,MYSQLI_ASSOC)){ 29 | $cons=new Connections(); 30 | $cons->create_time = $row['create_time']; 31 | //$user->user_max = $row['user_max']; 32 | $cons->threads_connected = $row['threads_connected']; 33 | $array[]=$cons; 34 | } 35 | $top_data=json_encode($array); 36 | // echo "{".'"user"'.":".$data."}"; 37 | echo $top_data; 38 | } 39 | 40 | /*$fn = isset($_GET['fn']) ? $_GET['fn'] : 'main'; 41 | if (function_exists($fn)) { 42 | call_user_func($fn); 43 | } 44 | */ 45 | 46 | $ip = $_GET['ip']; 47 | $tag = $_GET['tag']; 48 | $port = $_GET['port']; 49 | $interval_time = $_GET['interval_time']; 50 | 51 | index($ip,$tag,$port,$interval_time); 52 | 53 | 54 | ?> 55 | 56 | -------------------------------------------------------------------------------- /db_memory_graph_getdata.php: -------------------------------------------------------------------------------- 1 | =${interval_time} AND create_time <=NOW() group by FLOOR(UNIX_TIMESTAMP(create_time)/60)"; 19 | $result1 = mysqli_query($con,$get_info); 20 | //echo $get_info; 21 | 22 | $array=array(); 23 | class UsingIndex{ 24 | public $create_time; 25 | public $used_memory_rss_human; 26 | public $used_memory_peak_human; 27 | } 28 | while($row = mysqli_fetch_array($result1,MYSQLI_ASSOC)){ 29 | $cons=new UsingIndex(); 30 | $cons->create_time = $row['create_time']; 31 | $cons->used_memory_rss_human = $row['used_memory_rss_human']; 32 | $cons->used_memory_peak_human = $row['used_memory_peak_human']; 33 | $array[]=$cons; 34 | } 35 | $top_data=json_encode($array); 36 | // echo "{".'"user"'.":".$data."}"; 37 | echo $top_data; 38 | } 39 | 40 | /*$fn = isset($_GET['fn']) ? $_GET['fn'] : 'main'; 41 | if (function_exists($fn)) { 42 | call_user_func($fn); 43 | } 44 | */ 45 | 46 | $ip = $_GET['ip']; 47 | $tag = $_GET['tag']; 48 | $port = $_GET['port']; 49 | $interval_time = $_GET['interval_time']; 50 | 51 | index($ip,$tag,$port,$interval_time); 52 | 53 | 54 | ?> 55 | 56 | -------------------------------------------------------------------------------- /db_qps_graph_getdata.php: -------------------------------------------------------------------------------- 1 | =${interval_time} AND create_time <=NOW() group by FLOOR(UNIX_TIMESTAMP(create_time)/60)"; 21 | $result1 = mysqli_query($con,$get_info); 22 | //echo $get_info; 23 | 24 | $array= array(); 25 | class Connections{ 26 | public $create_time; 27 | public $qps; 28 | } 29 | while($row = mysqli_fetch_array($result1,MYSQLI_ASSOC)){ 30 | $cons=new Connections(); 31 | $cons->create_time = $row['create_time']; 32 | $cons->qps = $row['qps']; 33 | $array[]=$cons; 34 | } 35 | $top_data=json_encode($array); 36 | // echo "{".'"user"'.":".$data."}"; 37 | echo $top_data; 38 | } 39 | 40 | /*$fn = isset($_GET['fn']) ? $_GET['fn'] : 'main'; 41 | if (function_exists($fn)) { 42 | call_user_func($fn); 43 | } 44 | */ 45 | 46 | $ip = $_GET['ip']; 47 | $tag = $_GET['tag']; 48 | $port = $_GET['port']; 49 | $interval_time = $_GET['interval_time']; 50 | 51 | index($ip,$tag,$port,$interval_time); 52 | 53 | 54 | ?> 55 | 56 | -------------------------------------------------------------------------------- /image/chart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/image/chart.gif -------------------------------------------------------------------------------- /image/redis_monitor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/image/redis_monitor.jpg -------------------------------------------------------------------------------- /image/redis_monitor_history1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/image/redis_monitor_history1.png -------------------------------------------------------------------------------- /image/redis_monitor_history2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/image/redis_monitor_history2.png -------------------------------------------------------------------------------- /image/redis_monitor_history3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/image/redis_monitor_history3.png -------------------------------------------------------------------------------- /image/redis_slowlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/image/redis_slowlog.png -------------------------------------------------------------------------------- /image/table_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/image/table_info.png -------------------------------------------------------------------------------- /js/shine.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) {if (typeof define === 'function' && define.amd) { 2 | // AMD. Register as an anonymous module. 3 | define(['exports', 'echarts'], factory); 4 | } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { 5 | // CommonJS 6 | factory(exports, require('echarts')); 7 | } else { 8 | // Browser globals 9 | factory({}, root.echarts); 10 | } 11 | }(this, function (exports, echarts) { 12 | var log = function (msg) { 13 | if (typeof console !== 'undefined') { 14 | console && console.error && console.error(msg); 15 | } 16 | }; 17 | if (!echarts) { 18 | log('ECharts is not Loaded'); 19 | return; 20 | } 21 | 22 | var colorPalette = [ 23 | '#c12e34','#e6b600','#0098d9','#2b821d', 24 | '#005eaa','#339ca8','#cda819','#32a487' 25 | ]; 26 | 27 | var theme = { 28 | 29 | color: colorPalette, 30 | 31 | title: { 32 | textStyle: { 33 | fontWeight: 'normal' 34 | } 35 | }, 36 | 37 | visualMap: { 38 | color:['#1790cf','#a2d4e6'] 39 | }, 40 | 41 | toolbox: { 42 | iconStyle: { 43 | normal: { 44 | borderColor: '#06467c' 45 | } 46 | } 47 | }, 48 | 49 | tooltip: { 50 | backgroundColor: 'rgba(0,0,0,0.6)' 51 | }, 52 | 53 | dataZoom: { 54 | dataBackgroundColor: '#dedede', 55 | fillerColor: 'rgba(154,217,247,0.2)', 56 | handleColor: '#005eaa' 57 | }, 58 | 59 | timeline: { 60 | lineStyle: { 61 | color: '#005eaa' 62 | }, 63 | controlStyle: { 64 | normal: { 65 | color: '#005eaa', 66 | borderColor: '#005eaa' 67 | } 68 | } 69 | }, 70 | 71 | candlestick: { 72 | itemStyle: { 73 | normal: { 74 | color: '#c12e34', 75 | color0: '#2b821d', 76 | lineStyle: { 77 | width: 1, 78 | color: '#c12e34', 79 | color0: '#2b821d' 80 | } 81 | } 82 | } 83 | }, 84 | 85 | graph: { 86 | color: colorPalette 87 | }, 88 | 89 | map: { 90 | label: { 91 | normal: { 92 | textStyle: { 93 | color: '#c12e34' 94 | } 95 | }, 96 | emphasis: { 97 | textStyle: { 98 | color: '#c12e34' 99 | } 100 | } 101 | }, 102 | itemStyle: { 103 | normal: { 104 | borderColor: '#eee', 105 | areaColor: '#ddd' 106 | }, 107 | emphasis: { 108 | areaColor: '#e6b600' 109 | } 110 | } 111 | }, 112 | 113 | gauge: { 114 | axisLine: { 115 | show: true, 116 | lineStyle: { 117 | color: [[0.2, '#2b821d'],[0.8, '#005eaa'],[1, '#c12e34']], 118 | width: 5 119 | } 120 | }, 121 | axisTick: { 122 | splitNumber: 10, 123 | length:8, 124 | lineStyle: { 125 | color: 'auto' 126 | } 127 | }, 128 | axisLabel: { 129 | textStyle: { 130 | color: 'auto' 131 | } 132 | }, 133 | splitLine: { 134 | length: 12, 135 | lineStyle: { 136 | color: 'auto' 137 | } 138 | }, 139 | pointer: { 140 | length: '90%', 141 | width: 3, 142 | color: 'auto' 143 | }, 144 | title: { 145 | textStyle: { 146 | color: '#333' 147 | } 148 | }, 149 | detail: { 150 | textStyle: { 151 | color: 'auto' 152 | } 153 | } 154 | } 155 | }; 156 | echarts.registerTheme('shine', theme); 157 | })); -------------------------------------------------------------------------------- /js/show_connect.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 103 | -------------------------------------------------------------------------------- /js/show_graph_index.php: -------------------------------------------------------------------------------- 1 | 7 | 115 | -------------------------------------------------------------------------------- /js/show_graph_qps.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 103 | -------------------------------------------------------------------------------- /js/show_used_memory.php: -------------------------------------------------------------------------------- 1 | 7 | 115 | -------------------------------------------------------------------------------- /mail/mail.php: -------------------------------------------------------------------------------- 1 | send_mail_to_list = $send_mail_to_list; 10 | $this->alarm_subject = $alarm_subject; 11 | $this->alarm_info = $alarm_info; 12 | } 13 | 14 | function execCommand(){ 15 | echo $this->alarm_subject."\n"; 16 | echo $this->alarm_info."\n"; 17 | system("./mail/sendEmail -f chunyang_he@139.com -t '{$this->send_mail_to_list}' -s smtp.139.com:25 -u '{$this->alarm_subject}' -o message-charset=utf8 -o message-content-type=html -m '报警信息:
{$this->alarm_info}' -xu chunyang_he@139.com -xp '123456' -o tls=no"); 18 | } 19 | } 20 | 21 | ?> 22 | -------------------------------------------------------------------------------- /redis_status_monitor.php: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Redis 状态监控 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 50 | 51 | 63 | 64 | 65 | 66 |
67 |
68 |

69 | 状态监控

70 |
71 | 72 |
73 |
74 | 75 |
76 |
77 | 78 |

输入IP地址: 79 | 80 | 81 | 102 | 103 | 126 | 127 | 150 | 151 |   输入Reis端口号: 152 | 153 | 154 | 155 | 156 | 157 |

158 |
159 | 160 | 161 | "; 163 | echo ""; 164 | echo "监控采集阀值是每1分钟/次"; 165 | echo "最新监控时间:".date('Y-m-d H:i:s').""; 166 | echo ""; 167 | echo ""; 168 | echo "

"; 169 | 170 | if(isset($_POST['submit'])){ 171 | $tag=$_POST['tag']; 172 | $dbip=$_POST['dbip']; 173 | $dbport=$_POST['dbport']; 174 | $dbrole=$_POST['dbrole']; 175 | $alive=$_POST['alive']; 176 | //session_start(); 177 | //$_SESSION['transmit_tag']=$tag; 178 | //require 'show.html'; 179 | } else { 180 | //require 'top.html'; 181 | } 182 | 183 | ?> 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 |
基本信息线程/会话内存性能
193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | "; 257 | 258 | $result = mysqli_query($con,$sql); 259 | 260 | //echo "复制监控采集阀值是每1分钟/次 最新监控时间:".date('Y-m-d H:i:s')."
"; 261 | 262 | while($row = mysqli_fetch_array($result)) 263 | { 264 | if($row['is_live']==0){ 265 | $role='未知'; 266 | } else { 267 | $role=$row['role']=='slave'?'slave':'master'; 268 | } 269 | $status=$row['is_live']==1?'在线':'宕机'; 270 | echo ""; 271 | echo ""; 272 | echo ""; 273 | echo ""; 274 | //echo ""; 275 | echo ""; 276 | echo ""; 277 | echo ""; 278 | echo ""; 279 | echo ""; 280 | echo ""; 281 | echo ""; 282 | if ($row['alarm_threads_running'] == 1){ 283 | echo ""; 284 | } else { 285 | echo ""; 286 | } 287 | echo ""; 288 | echo ""; 289 | //echo ""; 290 | echo ""; 291 | if ($row['alarm_used_memory_status'] == 1){ 292 | echo ""; 293 | } else { 294 | echo ""; 295 | } 296 | echo ""; 297 | echo ""; 298 | echo ""; 299 | echo ""; 300 | echo ""; 301 | } 302 | //end while 303 | echo ""; 304 | echo "
主机数据库标签端口角色状态运行模式版本运行时间开启AOF最大连接数当前连接数被阻塞连接数被拒绝连接数最大内存已经使用内存内存消耗峰值同步延迟每秒QPS图表
{$row['host']}{$row['tag']}{$row['port']}{$row['port']}{$role}{$status}{$row['mode']}{$row['db_version']}{$row['runtime']}天{$row['aof_enabled']}{$row['max_connections']}{$row['threads_connected']}{$row['threads_connected']}{$row['blocked_connected']}{$row['rejected_connected']}{$row['7']}{$row['maxmemory_human']}{$row['used_memory_rss_human']}{$row['used_memory_rss_human']}{$row['used_memory_peak_human']}{$row['Seconds_Behind_Master']}{$row['qps']}
"; 305 | echo "

"; 306 | echo "
"; 307 | echo "
"; 308 | 309 | $maxPageCount=10; 310 | $buffCount=2; 311 | $startPage=1; 312 | 313 | if ($page< $buffCount){ 314 | $startPage=1; 315 | }else if($page>=$buffCount and $page<$totalPage-$maxPageCount ){ 316 | $startPage=$page-$buffCount+1; 317 | }else{ 318 | $startPage=$totalPage-$maxPageCount+1; 319 | } 320 | 321 | $endPage=$startPage+$maxPageCount-1; 322 | 323 | 324 | $htmlstr=""; 325 | 326 | $htmlstr.=""; 327 | if ($page > 1){ 328 | $htmlstr.=""; 329 | $htmlstr.=""; 330 | } 331 | 332 | $htmlstr.=""; 333 | 334 | for ($i=$startPage;$i<=$endPage; $i++){ 335 | 336 | $htmlstr.=""; 337 | } 338 | 339 | if ($page<$totalPage){ 340 | $htmlstr.=""; 341 | $htmlstr.=""; 342 | 343 | } 344 | $htmlstr.="
第一页 上一页 总共${totalPage}页" . $i . "下一页最后页
"; 345 | echo $htmlstr; 346 | 347 | ?> 348 | -------------------------------------------------------------------------------- /schema/redis_monitor_schema.sql: -------------------------------------------------------------------------------- 1 | /* 2 | SQLyog Ultimate v12.09 (64 bit) 3 | MySQL - 10.3.32-MariaDB-log : Database - redis_monitor 4 | ********************************************************************* 5 | */ 6 | 7 | 8 | /*!40101 SET NAMES utf8 */; 9 | 10 | /*!40101 SET SQL_MODE=''*/; 11 | 12 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 13 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 14 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 15 | CREATE DATABASE /*!32312 IF NOT EXISTS*/`redis_monitor` /*!40100 DEFAULT CHARACTER SET utf8 */; 16 | 17 | USE `redis_monitor`; 18 | 19 | /*Table structure for table `redis_status` */ 20 | 21 | DROP TABLE IF EXISTS `redis_status`; 22 | 23 | CREATE TABLE `redis_status` ( 24 | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 25 | `host` varchar(30) DEFAULT NULL, 26 | `tag` varchar(100) DEFAULT NULL, 27 | `port` int(11) DEFAULT NULL, 28 | `role` varchar(100) DEFAULT NULL, 29 | `is_live` tinyint(4) DEFAULT NULL, 30 | `max_connections` int(11) DEFAULT NULL, 31 | `threads_connected` int(11) DEFAULT NULL, 32 | `blocked_connected` int(11) DEFAULT NULL, 33 | `rejected_connected` int(11) DEFAULT NULL, 34 | `qps` int(11) DEFAULT NULL, 35 | `maxmemory_human` varchar(30) DEFAULT NULL, 36 | `used_memory_rss_human` varchar(30) DEFAULT NULL, 37 | `used_memory_peak_human` varchar(30) DEFAULT NULL, 38 | `runtime` int(11) DEFAULT NULL, 39 | `db_version` varchar(100) DEFAULT NULL, 40 | `aof_enabled` int(11) DEFAULT NULL, 41 | `mode` varchar(100) DEFAULT NULL, 42 | `cluster_enabled` int(11) DEFAULT NULL, 43 | `Seconds_Behind_Master` varchar(100) DEFAULT NULL, 44 | `create_time` timestamp NULL DEFAULT NULL, 45 | PRIMARY KEY (`id`), 46 | KEY `IX_h_d_p_c` (`host`,`tag`,`port`,`create_time`) 47 | ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; 48 | 49 | /*Table structure for table `redis_status_history` */ 50 | 51 | DROP TABLE IF EXISTS `redis_status_history`; 52 | 53 | CREATE TABLE `redis_status_history` ( 54 | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 55 | `host` varchar(30) DEFAULT NULL, 56 | `tag` varchar(100) DEFAULT NULL, 57 | `port` int(11) DEFAULT NULL, 58 | `role` varchar(100) DEFAULT NULL, 59 | `is_live` tinyint(4) DEFAULT NULL, 60 | `max_connections` int(11) DEFAULT NULL, 61 | `threads_connected` int(11) DEFAULT NULL, 62 | `blocked_connected` int(11) DEFAULT NULL, 63 | `rejected_connected` int(11) DEFAULT NULL, 64 | `qps` int(11) DEFAULT NULL, 65 | `maxmemory_human` varchar(30) DEFAULT NULL, 66 | `used_memory_rss_human` varchar(30) DEFAULT NULL, 67 | `used_memory_peak_human` varchar(30) DEFAULT NULL, 68 | `runtime` int(11) DEFAULT NULL, 69 | `db_version` varchar(100) DEFAULT NULL, 70 | `aof_enabled` int(11) DEFAULT NULL, 71 | `mode` varchar(100) DEFAULT NULL, 72 | `cluster_enabled` int(11) DEFAULT NULL, 73 | `Seconds_Behind_Master` varchar(100) DEFAULT NULL, 74 | `create_time` timestamp NULL DEFAULT NULL, 75 | PRIMARY KEY (`id`), 76 | KEY `IX_h_d_p_c` (`host`,`tag`,`port`,`create_time`) 77 | ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; 78 | 79 | /*Table structure for table `redis_status_info` */ 80 | 81 | DROP TABLE IF EXISTS `redis_status_info`; 82 | 83 | CREATE TABLE `redis_status_info` ( 84 | `id` int(11) NOT NULL AUTO_INCREMENT, 85 | `host` varchar(100) DEFAULT NULL COMMENT '输入被监控Redis的IP地址', 86 | `tag` varchar(100) DEFAULT NULL COMMENT '输入被监控Redis的主机信息', 87 | `pwd` varchar(100) DEFAULT NULL COMMENT '输入被监控Redis的密码', 88 | `port` int(11) DEFAULT NULL COMMENT '输入被监控Redis的端口号', 89 | `monitor` tinyint(4) DEFAULT 1 COMMENT '0为关闭监控;1为开启监控', 90 | `send_mail` tinyint(4) DEFAULT 1 COMMENT '0为关闭邮件报警;1为开启邮件报警', 91 | `send_mail_to_list` varchar(255) DEFAULT NULL COMMENT '邮件人列表', 92 | `send_weixin` tinyint(4) DEFAULT 1 COMMENT '0为关闭微信报警;1为开启微信报警', 93 | `send_weixin_to_list` varchar(100) DEFAULT NULL COMMENT '微信公众号', 94 | `alarm_threads_running` tinyint(4) DEFAULT NULL COMMENT '记录活动连接数告警信息,1为已记录', 95 | `threshold_alarm_threads_running` int(11) DEFAULT NULL COMMENT '设置连接数阀值', 96 | `alarm_used_memory_status` tinyint(4) DEFAULT NULL COMMENT '记录内存使用率告警信息,1为已记录', 97 | `threshold_warning_used_memory` varchar(100) DEFAULT NULL COMMENT '设置内存使用率阀值', 98 | PRIMARY KEY (`id`), 99 | UNIQUE KEY `IX_i_d_p` (`host`,`tag`,`port`) 100 | ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='Redis监控信息表'; 101 | 102 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 103 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 104 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 105 | -------------------------------------------------------------------------------- /show_graph.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 图形展示 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
23 | 24 | 25 | 26 | 32 | 33 | 39 | 40 | 46 | 47 | 53 | 54 | 60 | 61 | 67 | 68 | 74 | 75 | 76 |
27 |
28 | 29 | 30 |
31 |
34 |
35 | 36 | 37 |
38 |
41 |
42 | 43 | 44 |
45 |
48 |
49 | 50 | 51 |
52 |
55 |
56 | 57 | 58 |
59 |
62 |
63 | 64 | 65 |
66 |
69 |
70 | 71 | 72 |
73 |
77 | 78 |
79 |
80 | 81 | '; 112 | 113 | ?> 114 | 115 | 116 | 117 |
118 | 119 |
120 | 121 |

122 |
123 | 124 |

125 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /slowlog.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 列出当前所有慢查询 26 | 27 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
46 |
47 |
48 |
49 | 50 | 56 | 57 |

列出当前所有慢查询

58 | 59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | connect($ip, $port); 77 | $redis->auth($pwd); 78 | echo "Redis " .$ip.":" .$port ." is running: " . $redis->ping() .PHP_EOL; 79 | } 80 | catch(Exception $e){ 81 | die('ERROR: Could not connect to Redis ' .$ip .':' .$port .' Message: ' .$e->getMessage() .PHP_EOL); 82 | } 83 | 84 | if ($redis->isConnected()) { 85 | $slowlog_info = $redis->slowlog('get',-1); 86 | foreach ($slowlog_info as $value){ 87 | echo ""; 88 | $exec_time = date('Y-m-d H:i:s', $value[1]); 89 | $slow_time = $value[2]/1000; 90 | $slow_cmd = $value[3]; 91 | $client_info = $value[4]; 92 | echo ""; 93 | echo ""; 94 | echo ""; 99 | echo ""; 100 | echo ""; 101 | } 102 | } 103 | 104 | echo ""; 105 | echo "
命令执行时的时间命令消耗的时间执行的命令客户端地址和端口
".$exec_time."".$slow_time."(单位毫秒)".""; 95 | foreach ($slow_cmd as $cmd){ 96 | echo $cmd."
"; 97 | } 98 | echo "
".$client_info."
"; 106 | 107 | ?> 108 | 109 | 110 | 111 |
112 |
113 |
114 |
115 | 116 | 117 | -------------------------------------------------------------------------------- /weixin/wechat.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | #_*_coding:utf-8 _*_ 3 | #auther:火星小刘 4 | 5 | import requests,sys,json 6 | import urllib3 7 | urllib3.disable_warnings() 8 | 9 | reload(sys) 10 | sys.setdefaultencoding('utf-8') 11 | 12 | def GetTokenFromServer(Corpid,Secret): 13 | Url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken" 14 | Data = { 15 | "corpid":Corpid, 16 | "corpsecret":Secret 17 | } 18 | r = requests.get(url=Url,params=Data,verify=False) 19 | print(r.json()) 20 | if r.json()['errcode'] != 0: 21 | return False 22 | else: 23 | Token = r.json()['access_token'] 24 | file = open('/tmp/zabbix_wechat_config.json', 'w') 25 | file.write(r.text) 26 | file.close() 27 | return Token 28 | 29 | def SendMessage(User,Agentid,Subject,Content): 30 | try: 31 | file = open('/tmp/zabbix_wechat_config.json', 'r') 32 | Token = json.load(file)['access_token'] 33 | file.close() 34 | except: 35 | Token = GetTokenFromServer(Corpid, Secret) 36 | 37 | n = 0 38 | Url = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=%s" % Token 39 | Data = { 40 | "touser": User, # 企业号中的用户帐号,在zabbix用户Media中配置,如果配置不正常,将按部门发送。 41 | #"totag": Tagid, # 企业号中的标签id,群发使用(推荐) 42 | #"toparty": Partyid, # 企业号中的部门id,群发时使用。 43 | "msgtype": "text", # 消息类型。 44 | "agentid": Agentid, # 企业号中的应用id。 45 | "text": { 46 | "content": Subject + '\n' + Content 47 | }, 48 | "safe": "0" 49 | } 50 | r = requests.post(url=Url,data=json.dumps(Data),verify=False) 51 | while r.json()['errcode'] != 0 and n < 4: 52 | n+=1 53 | Token = GetTokenFromServer(Corpid, Secret) 54 | if Token: 55 | Url = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=%s" % Token 56 | r = requests.post(url=Url,data=json.dumps(Data),verify=False) 57 | print(r.json()) 58 | 59 | return r.json() 60 | 61 | 62 | if __name__ == '__main__': 63 | User = sys.argv[1] # zabbix传过来的第一个参数 64 | Subject = str(sys.argv[2]) # zabbix传过来的第二个参数 65 | Content = str(sys.argv[3]) # zabbix传过来的第三个参数 66 | 67 | Corpid = "wxaf" # CorpID是企业号的标识 68 | Secret = "aKDdCRT76" # Secret是管理组凭证密钥 69 | #Tagid = "1" # 通讯录标签ID 70 | Agentid = "1000001" # 应用ID 71 | #Partyid = "1" # 部门ID 72 | 73 | Status = SendMessage(User,Agentid,Subject,Content) 74 | print Status 75 | -------------------------------------------------------------------------------- /weixin/weixin.php: -------------------------------------------------------------------------------- 1 | send_weixin_to_list = $send_weixin_to_list; 11 | $this->alarm_subject = $alarm_subject; 12 | $this->alarm_info = $alarm_info; 13 | } 14 | 15 | function execCommand(){ 16 | echo $this->alarm_subject."\n"; 17 | echo $this->alarm_info."\n"; 18 | system("/usr/bin/python ./weixin/wechat.py '{$this->send_weixin_to_list}' '{$this->alarm_subject}' '【内容】:\n{$this->alarm_info}'"); 19 | } 20 | } 21 | 22 | ?> 23 | -------------------------------------------------------------------------------- /xadmin/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('../fonts/iconfont.eot'); 4 | src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'), 5 | url('../fonts/iconfont.woff') format('woff'), 6 | url('../fonts/iconfont.ttf') format('truetype'), 7 | url('../fonts/iconfont.svg#iconfont') format('svg'); 8 | } 9 | .iconfont{ 10 | font-family:"iconfont" !important; 11 | font-size:16px;font-style:normal; 12 | -webkit-font-smoothing: antialiased; 13 | -webkit-text-stroke-width: 0.2px; 14 | -moz-osx-font-smoothing: grayscale; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /xadmin/css/xadmin.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | @import url(../lib/layui/css/layui.css); 3 | *{ 4 | margin: 0px; 5 | padding: 0px; 6 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 7 | } 8 | a{ 9 | text-decoration: none; 10 | } 11 | html{ 12 | width: 100%; 13 | height: 100%; 14 | overflow-x:hidden; 15 | overflow-y:auto; 16 | } 17 | body{ 18 | width: 100%; 19 | min-height: 100%; 20 | } 21 | .login-bg{ 22 | /*background: #eeeeee url() 0 0 no-repeat;*/ 23 | background:url(../images/bg.png) no-repeat center; 24 | background-size: cover; 25 | overflow: hidden; 26 | } 27 | .login{ 28 | margin: 50px auto 0 auto; 29 | min-height: 420px; 30 | max-width: 420px; 31 | padding: 40px; 32 | background-color: #ffffff; 33 | margin-left: auto; 34 | margin-right: auto; 35 | border-radius: 4px; 36 | /* overflow-x: hidden; */ 37 | box-sizing: border-box; 38 | } 39 | .login a.logo{ 40 | display: block; 41 | height: 58px; 42 | width: 167px; 43 | margin: 0 auto 30px auto; 44 | background-size: 167px 42px; 45 | } 46 | .login .message { 47 | margin: 10px 0 0 -58px; 48 | padding: 18px 10px 18px 60px; 49 | background: #189F92; 50 | position: relative; 51 | color: #fff; 52 | font-size: 16px; 53 | } 54 | .login #darkbannerwrap { 55 | background: url(../images/aiwrap.png); 56 | width: 18px; 57 | height: 10px; 58 | margin: 0 0 20px -58px; 59 | position: relative; 60 | } 61 | 62 | .login input[type=text], 63 | .login input[type=file], 64 | .login input[type=password], 65 | .login input[type=email], select { 66 | border: 1px solid #DCDEE0; 67 | vertical-align: middle; 68 | border-radius: 3px; 69 | height: 50px; 70 | padding: 0px 16px; 71 | font-size: 14px; 72 | color: #555555; 73 | outline:none; 74 | width:100%; 75 | box-sizing: border-box; 76 | } 77 | .login input[type=text]:focus, 78 | .login input[type=file]:focus, 79 | .login input[type=password]:focus, 80 | .login input[type=email]:focus, select:focus { 81 | border: 1px solid #27A9E3; 82 | } 83 | .login input[type=submit], 84 | .login input[type=button]{ 85 | display: inline-block; 86 | vertical-align: middle; 87 | padding: 12px 24px; 88 | margin: 0px; 89 | font-size: 18px; 90 | line-height: 24px; 91 | text-align: center; 92 | white-space: nowrap; 93 | vertical-align: middle; 94 | cursor: pointer; 95 | color: #ffffff; 96 | background-color: #189F92; 97 | border-radius: 3px; 98 | border: none; 99 | -webkit-appearance: none; 100 | outline:none; 101 | width:100%; 102 | } 103 | .login hr { 104 | background: #fff url() 0 0 no-repeat; 105 | } 106 | .login hr.hr15 { 107 | height: 15px; 108 | border: none; 109 | margin: 0px; 110 | padding: 0px; 111 | width: 100%; 112 | } 113 | .login hr.hr20 { 114 | height: 20px; 115 | border: none; 116 | margin: 0px; 117 | padding: 0px; 118 | width: 100%; 119 | } 120 | .x-body{ 121 | padding: 20px; 122 | } 123 | .x-nav{ 124 | padding: 0 20px; 125 | position: relative; 126 | z-index: 99; 127 | border-bottom: 1px solid #e5e5e5; 128 | line-height: 39px; 129 | height: 39px; 130 | overflow: hidden; 131 | } 132 | xblock{ 133 | display: block; 134 | margin-bottom: 10px; 135 | padding: 5px; 136 | line-height: 22px; 137 | /* border-left: 5px solid #009688; */ 138 | border-radius: 0 2px 2px 0; 139 | background-color: #f2f2f2; 140 | } 141 | .x-right{ 142 | float: right; 143 | } 144 | .x-so{ 145 | /*text-align: center;*/ 146 | /*background: #f2f2f2 url() 0 0 no-repeat;*/ 147 | margin-bottom: 20px; 148 | } 149 | .x-so input.layui-input{ 150 | width: 150px; 151 | } 152 | .x-so .layui-form-label{ 153 | display: inline-block; 154 | } 155 | .x-so input.layui-input,.x-so input.layui-btn{ 156 | display: inline-block; 157 | } 158 | .x-red{ 159 | color: red; 160 | } 161 | .x-a{ 162 | color: #1AA093; 163 | } 164 | .x-a:hover{ 165 | color: #127F74; 166 | } 167 | .x-sort{ 168 | height: 30px; 169 | } 170 | .x-show{ 171 | cursor: pointer; 172 | } 173 | .layui-form-switch{ 174 | margin-top: 0px; 175 | } 176 | .layui-input:focus, .layui-textarea:focus { 177 | border-color: #189f92!important; 178 | } 179 | 180 | .page{ 181 | margin-top: 20px; 182 | text-align: center; 183 | 184 | } 185 | .page a{ 186 | display: inline-block; 187 | background: #fff url() 0 0 no-repeat; 188 | color: #888; 189 | padding: 10px; 190 | min-width: 15px; 191 | border: 1px solid #E2E2E2; 192 | 193 | } 194 | .page span{ 195 | display: inline-block; 196 | padding: 10px; 197 | min-width: 15px; 198 | border: 1px solid #E2E2E2; 199 | } 200 | .page span.current{ 201 | display: inline-block; 202 | background: #009688 url() 0 0 no-repeat; 203 | color: #fff; 204 | padding: 10px; 205 | min-width: 15px; 206 | border: 1px solid #009688; 207 | } 208 | .page .pagination li{ 209 | display: inline-block; 210 | margin-right: 5px; 211 | text-align: center; 212 | } 213 | .page .pagination li.active span{ 214 | background: #009688 url() 0 0 no-repeat; 215 | color: #fff; 216 | border: 1px solid #009688; 217 | 218 | } 219 | 220 | /*登录样式*/ 221 | /*头部*/ 222 | .container{ 223 | width: 100%; 224 | height: 45px; 225 | background-color: #222; 226 | border-bottom: 1px solid rgba(255, 255, 255, 0.2); 227 | } 228 | .container .logo a{ 229 | float: left; 230 | color: #fff; 231 | font-size: 18px; 232 | padding-left: 20px; 233 | line-height: 45px; 234 | width: 200px; 235 | } 236 | .container .right{ 237 | background-color:rgba(0,0,0,0); 238 | float: right; 239 | 240 | } 241 | .container .left_open{ 242 | height: 45px; 243 | float: left; 244 | } 245 | .container .left_open i{ 246 | display: block; 247 | background: rgba(255,255,255,0.1) url() 0 0 no-repeat; 248 | color: #fff; 249 | width: 32px; 250 | height: 32px; 251 | line-height: 32px; 252 | border-radius: 3px; 253 | text-align: center; 254 | margin-top: 7px; 255 | cursor: pointer; 256 | } 257 | .container .left_open i:hover{ 258 | background: rgba(255,255,255,0.3) url() 0 0 no-repeat; 259 | } 260 | 261 | .container .left{ 262 | background-color:rgba(0,0,0,0); 263 | float: left; 264 | 265 | } 266 | .container .layui-nav-item{ 267 | line-height: 45px; 268 | } 269 | .container .layui-nav-more{ 270 | top: 20px; 271 | } 272 | .container .layui-nav-child{ 273 | top: 50px; 274 | } 275 | .container .layui-nav-child i{ 276 | margin-right: 10px; 277 | } 278 | .layui-nav .layui-nav-item a{ 279 | color: #fff; 280 | cursor: pointer; 281 | } 282 | .layui-nav .layui-nav-child a{ 283 | color: #333; 284 | cursor: pointer; 285 | } 286 | .left-nav{ 287 | position: absolute; 288 | top: 46px; 289 | bottom: 42px; 290 | left: 0; 291 | z-index: 2; 292 | padding-top: 10px; 293 | background-color: #EEEEEE; 294 | width: 220px; 295 | max-width: 220px; 296 | overflow: auto; 297 | overflow-x:hidden; 298 | border-right: 1px solid #e5e5e5; 299 | 300 | /*width: 0px;*/ 301 | } 302 | .left-nav #nav li{ 303 | border-bottom: 1px solid #e5e5e5; 304 | } 305 | .left-nav #nav li:hover > a{ 306 | /*color: blue;*/ 307 | } 308 | .left-nav #nav .current{ 309 | background-color: rgba(0, 0, 0, 0.3); 310 | } 311 | .left-nav #nav li a{ 312 | font-size: 14px; 313 | padding: 10px 15px 10px 20px; 314 | display: block; 315 | cursor: pointer; 316 | } 317 | .left-nav #nav li a cite{ 318 | font-size: 14px; 319 | } 320 | 321 | .left-nav #nav li .sub-menu{ 322 | display: none; 323 | } 324 | .left-nav #nav li .opened{ 325 | display: block; 326 | } 327 | .left-nav #nav li .opened:hover{ 328 | /*background: #fff url() 0 0 no-repeat;*/ 329 | } 330 | .left-nav #nav li .opened .current{ 331 | 332 | } 333 | .left-nav #nav li .sub-menu li:hover{ 334 | /*color: blue;*/ 335 | /*background: #fff url() 0 0 no-repeat;*/ 336 | } 337 | .left-nav #nav li .sub-menu li a{ 338 | padding: 12px 15px 12px 30px; 339 | font-size: 14px; 340 | cursor: pointer; 341 | } 342 | .left-nav #nav li .sub-menu li .sub-menu li a{ 343 | padding-left: 45px; 344 | } 345 | .left-nav #nav li .sub-menu li a:hover{ 346 | color: #148cf1; 347 | } 348 | .left-nav #nav li .sub-menu li a i{ 349 | font-size: 12px; 350 | } 351 | .left-nav #nav li a i{ 352 | padding-right: 10px; 353 | line-height: 14px; 354 | } 355 | .left-nav #nav li .nav_right{ 356 | float: right; 357 | font-size: 16px; 358 | } 359 | .x-slide_left { 360 | width: 17px; 361 | height: 61px; 362 | background: url(../images/icon.png) 0 0 no-repeat; 363 | position: absolute; 364 | top: 200px; 365 | left: 221px; 366 | cursor: pointer; 367 | z-index: 3; 368 | } 369 | .page-content{ 370 | position: absolute; 371 | top: 46px; 372 | right: 0; 373 | bottom: 42px; 374 | left: 221px; 375 | overflow: hidden; 376 | z-index: 1; 377 | } 378 | .page-content-bg{ 379 | position: absolute; 380 | top: 46px; 381 | right: 0; 382 | bottom: 42px; 383 | left: 221px; 384 | background: rgba(0,0,0,0.5); url() 0 0 no-repeat; 385 | overflow: hidden; 386 | z-index: 100; 387 | display: none; 388 | } 389 | 390 | .page-content .tab{ 391 | height: 100%; 392 | width: 100%; 393 | background: #EFEEF0 url() 0 0 no-repeat; 394 | margin: 0px; 395 | } 396 | .page-content .layui-tab-title{ 397 | /*padding-top: 5px;*/ 398 | height: 35px; 399 | background: #EFEEF0 url() 0 0 no-repeat; 400 | position: relative; 401 | z-index: 100; 402 | } 403 | .page-content .layui-tab-title li.home i{ 404 | padding-right: 5px; 405 | } 406 | .page-content .layui-tab-title li.home .layui-tab-close{ 407 | display: none; 408 | } 409 | .page-content .layui-tab-title li{ 410 | line-height: 35px; 411 | } 412 | .page-content .layui-tab-title .layui-this:after{ 413 | height: 36px; 414 | } 415 | .page-content .layui-tab-title li .layui-tab-close{ 416 | border-radius: 50%; 417 | } 418 | .page-content .layui-tab-title .layui-this{ 419 | background: #fff url() 0 0 no-repeat; 420 | } 421 | .page-content .layui-tab-bar{ 422 | height:34px; 423 | line-height: 35px; 424 | } 425 | .page-content .layui-tab-content{ 426 | position: absolute; 427 | top: 36px; 428 | bottom: 0px; 429 | width: 100%; 430 | background: #fff url() 0 0 no-repeat; 431 | padding: 0px; 432 | overflow: hidden; 433 | } 434 | .page-content .layui-tab-content .layui-tab-item{ 435 | width: 100%; 436 | height: 100%; 437 | 438 | } 439 | .page-content .layui-tab-content .layui-tab-item iframe{ 440 | width: 100%; 441 | height: 100%; 442 | 443 | } 444 | .x-admin-carousel,.layui-carousel,.x-admin-carousel>[carousel-item]>* { 445 | background-color:#fff 446 | } 447 | 448 | .x-admin-backlog .x-admin-backlog-body { 449 | display:block; 450 | padding:10px 15px; 451 | background-color:#f8f8f8; 452 | color:#999; 453 | border-radius:2px; 454 | transition:all .3s; 455 | -webkit-transition:all .3s 456 | } 457 | .x-admin-backlog-body h3 { 458 | padding-bottom:10px; 459 | font-size:12px 460 | } 461 | .x-admin-backlog-body p cite { 462 | font-style:normal; 463 | font-size:30px; 464 | font-weight:300; 465 | color:#009688 466 | } 467 | .x-admin-backlog-body:hover { 468 | background-color:#CFCFCF; 469 | color:#888 470 | } 471 | 472 | .welcome-footer{padding: 30px 0; line-height: 30px; text-align: center; background-color: #eee; color: #666; font-weight: 300;} 473 | body .layui-layout-admin .footer-demo{height: auto; padding: 15px 0; line-height: 26px;} 474 | .welcome-footer a{padding: 0 5px;} 475 | 476 | table th, table td { 477 | word-break: break-all; 478 | } 479 | 480 | .footer{ 481 | position: fixed; 482 | bottom: 0px; 483 | width: 100%; 484 | background-color: #222; 485 | border-top: 1px solid rgba(255, 255, 255, 0.2); 486 | line-height: 41px; 487 | color: #fff; 488 | /*padding-left: 10px;*/ 489 | } 490 | .footer .copyright{ 491 | margin-left: 10px; 492 | } 493 | 494 | /*404页面样式*/ 495 | .fly-panel { 496 | margin-bottom: 15px; 497 | border-radius: 2px; 498 | background-color: #fff; 499 | box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); 500 | } 501 | .fly-none { 502 | min-height: 600px; 503 | text-align: center; 504 | padding-top: 50px; 505 | color: #999; 506 | } 507 | .fly-none .layui-icon { 508 | line-height: 300px; 509 | font-size: 300px; 510 | color: #393D49; 511 | } 512 | .fly-none p { 513 | margin-top: 50px; 514 | padding: 0 15px; 515 | font-size: 20px; 516 | color: #999; 517 | font-weight: 300; 518 | } 519 | #tab_right{ 520 | display: none; 521 | width: 80px; 522 | position: absolute; 523 | top: 35px; 524 | left: 0px; 525 | } 526 | #tab_right dl{ 527 | top: 0px; 528 | } 529 | #tab_show{ 530 | position: absolute; 531 | top: 36px; 532 | bottom: 0px; 533 | width: 100%; 534 | background:rgb(255, 255, 255,0); 535 | padding: 0px; 536 | overflow: hidden; 537 | display: none; 538 | } 539 | 540 | 541 | @media screen and (max-width: 768px){ 542 | .fast-add{ 543 | display: none; 544 | } 545 | .layui-nav .to-index{ 546 | display: none; 547 | } 548 | .container .logo a{ 549 | width: 140px; 550 | } 551 | .container .left_open { 552 | /*float: right;*/ 553 | } 554 | .left-nav{ 555 | left: -221px; 556 | } 557 | .page-content{ 558 | left: 0px; 559 | } 560 | .page-content .layui-tab-content .layui-tab-item{ 561 | -webkit-overflow-scrolling: touch; 562 | overflow-y: scroll; 563 | } 564 | .x-so input.layui-input{ 565 | width: 100%; 566 | margin: 10px; 567 | } 568 | } 569 | 570 | 571 | /*精细版样式*/ 572 | 573 | .x-admin-sm{ 574 | font-size: 12px; 575 | } 576 | .x-admin-sm body{ 577 | font-size: 12px; 578 | } 579 | /*登录页面样式*/ 580 | .x-admin-sm .login input[type=submit],.x-admin-sm .login input[type=button]{ 581 | font-size: 14px; 582 | } 583 | .x-admin-sm .login input[type=text], 584 | .x-admin-sm .login input[type=file], 585 | .x-admin-sm .login input[type=password], 586 | .x-admin-sm .login input[type=email], .x-admin-sm select { 587 | font-size: 12px; 588 | } 589 | .x-admin-sm .login .message{ 590 | font-size: 14px; 591 | } 592 | 593 | .x-admin-sm .layui-table td, .x-admin-sm .layui-table th{ 594 | font-size: 12px; 595 | } 596 | .x-admin-sm .layui-elem-field legend{ 597 | font-size: 18px; 598 | } 599 | 600 | .x-admin-sm .x-admin-backlog-body p cite{ 601 | font-size: 24px; 602 | } 603 | .x-admin-sm .left-nav #nav li a cite{ 604 | font-size: 12px; 605 | } 606 | .x-admin-sm .iconfont{ 607 | font-size: 14px; 608 | } 609 | .x-admin-sm .layui-tab-title li{ 610 | font-size: 12px; 611 | } 612 | .x-admin-sm .layui-icon{ 613 | font-size: 14px; 614 | } 615 | .x-admin-sm .layui-nav *{ 616 | font-size: 12px; 617 | } 618 | .x-admin-sm .layui-breadcrumb>*{ 619 | font-size: 12px; 620 | } 621 | .x-admin-sm .layui-btn,.x-admin-sm .layui-btn-xs,.x-admin-sm .layui-btn-sm{ 622 | font-size: 12px; 623 | } 624 | 625 | .x-admin-sm .layui-laydate{ 626 | font-size: 12px; 627 | } 628 | .x-admin-sm .layui-btn{ 629 | height: 30px; 630 | line-height: 30px; 631 | padding: 0 10px; 632 | } 633 | 634 | .x-admin-sm .layui-btn-lg{ 635 | height: 38px; 636 | line-height: 38px; 637 | padding: 0 18px; 638 | font-size: 14px; 639 | } 640 | .x-admin-sm .layui-layer-title,.x-admin-sm .layui-layer-dialog .layui-layer-content{ 641 | font-size: 12px; 642 | } 643 | .x-admin-sm .layui-input,.x-admin-sm .layui-select,.x-admin-sm .layui-textarea{ 644 | height: 30px; 645 | } 646 | 647 | .x-admin-sm .layui-form-pane .layui-form-label{ 648 | height: 30px; 649 | line-height: 14px; 650 | } 651 | .x-admin-sm .layui-form-checkbox span{ 652 | font-size: 12px; 653 | } 654 | .x-admin-sm .fly-none .layui-icon { 655 | line-height: 300px; 656 | font-size: 300px; 657 | color: #393D49; 658 | } 659 | 660 | -------------------------------------------------------------------------------- /xadmin/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/fonts/iconfont.eot -------------------------------------------------------------------------------- /xadmin/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/fonts/iconfont.ttf -------------------------------------------------------------------------------- /xadmin/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/fonts/iconfont.woff -------------------------------------------------------------------------------- /xadmin/images/aiwrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/images/aiwrap.png -------------------------------------------------------------------------------- /xadmin/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/images/bg.png -------------------------------------------------------------------------------- /xadmin/js/cookie.js: -------------------------------------------------------------------------------- 1 | function setCookie(name, value, expires, path, domain, secure) { 2 | if(typeof is_remember!="undefined") 3 | return false; 4 | var today = new Date(); 5 | today.setTime( today.getTime() ); 6 | var expires_date = new Date( today.getTime() + (expires) ); 7 | document.cookie= name + "=" + escape(value) + 8 | ((expires) ? "; expires=" + expires_date.toGMTString() : "") + 9 | ((path) ? "; path=" + path : "") + 10 | ((domain) ? "; domain=" + domain : "") + 11 | ((secure) ? "; secure" : ""); 12 | } 13 | function getCookie(name) { 14 | var dc = document.cookie; 15 | var prefix = name + "="; 16 | var begin = dc.indexOf("; " + prefix); 17 | if (begin == -1) { 18 | begin = dc.indexOf(prefix); 19 | if (begin != 0) return null; 20 | } else { 21 | begin += 2; 22 | } 23 | var end = document.cookie.indexOf(";", begin); 24 | if (end == -1) { 25 | end = dc.length; 26 | } 27 | return unescape(dc.substring(begin + prefix.length, end)); 28 | } 29 | function deleteCookie(name, path, domain) { 30 | if (getCookie(name)) { 31 | document.cookie = name + "=" + 32 | ((path) ? "; path=" + path : "") + 33 | ((domain) ? "; domain=" + domain : "") + 34 | "; expires=Thu, 01-Jan-70 00:00:01 GMT"; 35 | } 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /xadmin/js/xadmin.js: -------------------------------------------------------------------------------- 1 | // Array.prototype.remove = function(val) { 2 | // var index = this.indexOf(val); 3 | // if (index > -1) { 4 | // return this.splice(index, 1); 5 | // } 6 | 7 | // }; 8 | 9 | $(function () { 10 | 11 | //加载弹出层 12 | layui.use(['form','element'], 13 | function() { 14 | layer = layui.layer; 15 | element = layui.element; 16 | 17 | //tab 右键事件 18 | $(".layui-tab-title").on('contextmenu', 'li', function(event) { 19 | var tab_left = $(this).position().left; 20 | var left = $(this).position().top; 21 | this_index = $(this).attr('lay-id'); 22 | $('#tab_right').css({'left':tab_left+50}).show(); 23 | $('#tab_show').show(); 24 | return false; 25 | }); 26 | 27 | $('.page-content,#tab_show,.container,.left-nav').click(function(event) { 28 | $('#tab_right').hide(); 29 | $('#tab_show').hide(); 30 | }); 31 | 32 | $('#tab_right').on('click', 'dd', function(event) { 33 | 34 | if(getCookie('tab_list')){ 35 | var tab_list = getCookie('tab_list').split(','); 36 | }else{ 37 | var tab_list = []; 38 | } 39 | 40 | var type = $(this).attr('data-type'); 41 | 42 | if(type=='this'){ 43 | 44 | tab.tabDelete(this_index); 45 | 46 | var index = -1; 47 | 48 | for (var i in tab_list) { 49 | if(tab_list[i]==(this_index-1)){ 50 | index = i; 51 | } 52 | } 53 | if (index > -1) { 54 | tab_list.splice(index, 1); 55 | } 56 | 57 | setCookie('tab_list',tab_list); 58 | } 59 | if(type=='all'){ 60 | 61 | for (var i in tab_list) { 62 | tab.tabDelete(Number(tab_list[i])+1); 63 | } 64 | 65 | setCookie('tab_list',[]); 66 | } 67 | 68 | if(type=='other'){ 69 | 70 | for (var i in tab_list) { 71 | if(tab_list[i]!=(this_index-1)){ 72 | tab.tabDelete(Number(tab_list[i])+1); 73 | } 74 | } 75 | 76 | setCookie('tab_list',[this_index-1]); 77 | } 78 | // alert(this_index); 79 | $('#tab_right').hide(); 80 | }); 81 | 82 | // tab 双击事件 83 | $(".layui-tab-title").on('dblclick', 'li', function(event) { 84 | var id = $(this).attr('lay-id'); 85 | tab.tabDelete(id); 86 | 87 | if(getCookie('tab_list')){ 88 | tab_list = getCookie('tab_list').split(','); 89 | }else{ 90 | tab_list = []; 91 | } 92 | 93 | 94 | var index = -1; 95 | 96 | for (var i in tab_list) { 97 | if(tab_list[i]==(id-1)){ 98 | index = i; 99 | } 100 | } 101 | 102 | 103 | if (index > -1) { 104 | tab_list.splice(index, 1); 105 | } 106 | 107 | setCookie('tab_list',tab_list); 108 | return false; 109 | }); 110 | 111 | // tab 删除事件 112 | element.on('tabDelete(xbs_tab)', function(data){ 113 | var id = $(this).parent().attr('lay-id')-1; 114 | 115 | if(getCookie('tab_list')){ 116 | tab_list = getCookie('tab_list').split(','); 117 | }else{ 118 | tab_list = []; 119 | } 120 | 121 | 122 | var index = -1; 123 | 124 | for (var i in tab_list) { 125 | if(tab_list[i]==id){ 126 | index = i; 127 | } 128 | } 129 | 130 | 131 | if (index > -1) { 132 | tab_list.splice(index, 1); 133 | } 134 | 135 | setCookie('tab_list',tab_list); 136 | 137 | }); 138 | 139 | if(getCookie('tab_list')){ 140 | tab_list = getCookie('tab_list').split(','); 141 | 142 | for (var i in tab_list) { 143 | $('.left-nav #nav li').eq(tab_list[i]).click(); 144 | } 145 | } 146 | }); 147 | 148 | //触发事件 149 | var tab = { 150 | tabAdd: function(title,url,id){ 151 | //新增一个Tab项 152 | element.tabAdd('xbs_tab', { 153 | title: title 154 | ,content: '' 155 | ,id: id 156 | }) 157 | } 158 | ,tabDelete: function(othis){ 159 | //删除指定Tab项 160 | element.tabDelete('xbs_tab', othis); //删除:“商品管理” 161 | 162 | 163 | // othis.addClass('layui-btn-disabled'); 164 | } 165 | ,tabChange: function(id){ 166 | //切换到指定Tab项 167 | element.tabChange('xbs_tab', id); //切换到:用户管理 168 | } 169 | }; 170 | 171 | 172 | tableCheck = { 173 | init:function () { 174 | $(".x-admin .layui-form-checkbox").click(function(event) { 175 | if($(this).hasClass('layui-form-checked')){ 176 | $(this).removeClass('layui-form-checked'); 177 | if($(this).hasClass('header')){ 178 | $(".x-admin .layui-form-checkbox").removeClass('layui-form-checked'); 179 | } 180 | }else{ 181 | $(this).addClass('layui-form-checked'); 182 | if($(this).hasClass('header')){ 183 | $(".x-admin .layui-form-checkbox").addClass('layui-form-checked'); 184 | } 185 | } 186 | 187 | }); 188 | }, 189 | getData:function () { 190 | var obj = $(".x-admin .layui-form-checked").not('.header'); 191 | var arr=[]; 192 | obj.each(function(index, el) { 193 | arr.push(obj.eq(index).attr('data-id')); 194 | }); 195 | return arr; 196 | } 197 | } 198 | 199 | // 开启表格多选 200 | tableCheck.init(); 201 | 202 | 203 | $('.container .left_open i').click(function(event) { 204 | if($('.left-nav').css('left')=='0px'){ 205 | $('.left-nav').animate({left: '-221px'}, 100); 206 | $('.page-content').animate({left: '0px'}, 100); 207 | $('.page-content-bg').hide(); 208 | }else{ 209 | $('.left-nav').animate({left: '0px'}, 100); 210 | $('.page-content').animate({left: '221px'}, 100); 211 | if($(window).width()<768){ 212 | $('.page-content-bg').show(); 213 | } 214 | } 215 | 216 | }); 217 | 218 | $('.page-content-bg').click(function(event) { 219 | $('.left-nav').animate({left: '-221px'}, 100); 220 | $('.page-content').animate({left: '0px'}, 100); 221 | $(this).hide(); 222 | }); 223 | 224 | 225 | 226 | $('.layui-tab-close').click(function(event) { 227 | $('.layui-tab-title li').eq(0).find('i').remove(); 228 | }); 229 | 230 | $("tbody.x-cate tr[fid!='0']").hide(); 231 | // 栏目多级显示效果 232 | $('.x-show').click(function () { 233 | if($(this).attr('status')=='true'){ 234 | $(this).html(''); 235 | $(this).attr('status','false'); 236 | cateId = $(this).parents('tr').attr('cate-id'); 237 | $("tbody tr[fid="+cateId+"]").show(); 238 | }else{ 239 | cateIds = []; 240 | $(this).html(''); 241 | $(this).attr('status','true'); 242 | cateId = $(this).parents('tr').attr('cate-id'); 243 | getCateId(cateId); 244 | for (var i in cateIds) { 245 | $("tbody tr[cate-id="+cateIds[i]+"]").hide().find('.x-show').html('').attr('status','true'); 246 | } 247 | } 248 | }) 249 | 250 | //左侧菜单效果 251 | 252 | $('.left-nav #nav').on('click', 'li', function(event) { 253 | 254 | var index = $('.left-nav #nav li').index($(this)); 255 | 256 | if($(this).children('.sub-menu').length){ 257 | if($(this).hasClass('open')){ 258 | 259 | if($(this).parent().hasClass('sub-menu')){ 260 | deleteCookie('left_menu_son'); 261 | }else{ 262 | deleteCookie('left_menu_father'); 263 | } 264 | 265 | $(this).removeClass('open'); 266 | $(this).find('.nav_right').html(''); 267 | $(this).children('.sub-menu').stop().slideUp(); 268 | $(this).siblings().children('.sub-menu').slideUp(); 269 | }else{ 270 | 271 | 272 | if($(this).parent().hasClass('sub-menu')){ 273 | setCookie('left_menu_son',index); 274 | }else{ 275 | setCookie('left_menu_father',index); 276 | } 277 | 278 | $(this).addClass('open'); 279 | $(this).children('a').find('.nav_right').html(''); 280 | $(this).children('.sub-menu').stop().slideDown(); 281 | $(this).siblings().children('.sub-menu').stop().slideUp(); 282 | $(this).siblings().find('.nav_right').html(''); 283 | $(this).siblings().removeClass('open'); 284 | } 285 | }else{ 286 | 287 | var url = $(this).children('a').attr('_href'); 288 | var title = $(this).find('cite').html(); 289 | // var index = $('.left-nav #nav li').index($(this)); 290 | 291 | var is_refresh = $(this).attr('date-refresh')?true:false; 292 | 293 | for (var i = 0; i <$('.x-iframe').length; i++) { 294 | if($('.x-iframe').eq(i).attr('tab-id')==index+1){ 295 | tab.tabChange(index+1); 296 | event.stopPropagation(); 297 | 298 | if(is_refresh) 299 | $('.x-iframe').eq(i).attr("src",$('.x-iframe').eq(i).attr('src')); 300 | 301 | return; 302 | } 303 | }; 304 | 305 | if(getCookie('tab_list')){ 306 | tab_list = getCookie('tab_list').split(','); 307 | }else{ 308 | tab_list = []; 309 | } 310 | 311 | var is_exist = false; 312 | 313 | for (var i in tab_list) { 314 | if(tab_list[i]==index) 315 | is_exist = true; 316 | } 317 | 318 | if(!is_exist){ 319 | tab_list.push(index); 320 | } 321 | 322 | setCookie('tab_list',tab_list); 323 | 324 | tab.tabAdd(title,url,index+1); 325 | tab.tabChange(index+1); 326 | } 327 | 328 | event.stopPropagation(); 329 | 330 | }) 331 | 332 | // 左侧菜单记忆功能 333 | if(getCookie('left_menu_father')!=null){ 334 | $('.left-nav #nav li').eq(getCookie('left_menu_father')).click(); 335 | } 336 | 337 | if(getCookie('left_menu_son')!=null){ 338 | $('.left-nav #nav li').eq(getCookie('left_menu_son')).click(); 339 | } 340 | 341 | 342 | 343 | 344 | }) 345 | var cateIds = []; 346 | function getCateId(cateId) { 347 | 348 | $("tbody tr[fid="+cateId+"]").each(function(index, el) { 349 | id = $(el).attr('cate-id'); 350 | cateIds.push(id); 351 | getCateId(id); 352 | }); 353 | } 354 | 355 | /*弹出层*/ 356 | /* 357 | 参数解释: 358 | title 标题 359 | url 请求的url 360 | id 需要操作的数据id 361 | w 弹出层宽度(缺省调默认值) 362 | h 弹出层高度(缺省调默认值) 363 | */ 364 | function x_admin_show(title,url,w,h){ 365 | if (title == null || title == '') { 366 | title=false; 367 | }; 368 | if (url == null || url == '') { 369 | url="404.html"; 370 | }; 371 | if (w == null || w == '') { 372 | w=($(window).width()*0.9); 373 | }; 374 | if (h == null || h == '') { 375 | h=($(window).height() - 50); 376 | }; 377 | layer.open({ 378 | type: 2, 379 | area: [w+'px', h +'px'], 380 | fix: false, //不固定 381 | maxmin: true, 382 | shadeClose: true, 383 | shade:0.4, 384 | title: title, 385 | content: url, 386 | success: function(){ 387 | //窗口加载成功刷新frame 388 | // location.replace(location.href); 389 | }, 390 | cancel:function(){ 391 | //关闭窗口之后刷新frame 392 | // location.replace(location.href); 393 | }, 394 | end:function(){ 395 | //窗口销毁之后刷新frame 396 | // location.replace(location.href); 397 | } 398 | }); 399 | } 400 | 401 | /*关闭弹出框口*/ 402 | function x_admin_close(){ 403 | var index = parent.layer.getFrameIndex(window.name); 404 | parent.layer.close(index); 405 | } 406 | 407 | function x_admin_father_reload(){ 408 | 409 | parent.location.reload(); 410 | } 411 | 412 | 413 | 414 | -------------------------------------------------------------------------------- /xadmin/lib/layui/css/layui.mobile.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /xadmin/lib/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} -------------------------------------------------------------------------------- /xadmin/lib/layui/css/modules/laydate/default/laydate.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} -------------------------------------------------------------------------------- /xadmin/lib/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /xadmin/lib/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /xadmin/lib/layui/css/modules/layer/default/layer.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} -------------------------------------------------------------------------------- /xadmin/lib/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/font/iconfont.eot -------------------------------------------------------------------------------- /xadmin/lib/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /xadmin/lib/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/font/iconfont.woff -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/0.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/1.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/10.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/11.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/12.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/13.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/14.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/15.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/16.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/17.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/18.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/19.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/2.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/20.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/21.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/22.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/23.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/24.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/25.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/26.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/27.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/28.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/29.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/3.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/30.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/31.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/32.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/33.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/34.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/35.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/36.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/37.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/38.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/39.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/4.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/40.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/41.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/42.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/43.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/44.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/45.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/46.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/47.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/48.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/49.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/5.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/50.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/51.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/52.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/53.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/54.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/55.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/56.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/57.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/58.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/59.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/6.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/60.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/61.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/62.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/63.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/64.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/65.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/66.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/67.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/68.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/69.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/7.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/70.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/71.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/8.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hcymysql/redis_monitor/eb8312f0427b408adb9d5cfd7d7389fdfc4884d3/xadmin/lib/layui/images/face/9.gif -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
"].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"); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/colorpicker.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
"].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
','
','
','
','
','
',"
",'
','
',"
","
",'
','
','
',"
","
",function(){if(o.predefine){var e=['
'];return layui.each(o.colors,function(i,o){e.push(['
','
',"
"].join(""))}),e.push("
"),e.join("")}return""}(),'
','
','',"
",'
','','',"","
"].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/element.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
  • "+(i.title||"unnaming")+"
  • ";return s[0]?s.before(r):n.append(r),o.append('
    '+(i.content||"")+"
    "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");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)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/form.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=t(r+'[lay-filter="'+e+'"]');a.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value===t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e)},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),x=i.find("dl"),g=x.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=x.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),g.removeClass(o),y=null,g.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),$()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||T(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},$=function(){var e=x.children("dd."+s);if(e[0]){var t=e.position().top,i=x.height(),a=e.height();t>i&&x.scrollTop(t+x.scrollTop()-i+a-5),t<0&&x.scrollTop(t+x.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),x.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=x.children("dd."+s);if(x.children("dd."+o)[0]&&"next"===t){var i=x.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

    '):x.find("."+r).remove()},"keyup"),""===t&&x.find("."+r).remove(),void $())};f&&k.on("keyup",j).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){T(k.val(),function(e){d||k.val("")},"blur")},200)}),g.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
    ','
    ','','
    ','
    ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
    "+a.label+"
    "):t.push('
    '+a.innerHTML+"
    "):t.push('
    '+(a.innerHTML||i)+"
    ")}),0===t.length&&t.push('
    没有选项
    '),t.join("")}(r.find("*"))+"
    ","
    "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
    ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
    "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
    ',''+i[l.checked?0:1]+"","
    "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
    ","
    "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=t(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),v=e.parents("form")[0],h=u.find("input,select,textarea"),y=e.attr("lay-filter");if(layui.each(d,function(e,l){var r=t(this),c=r.attr("lay-verify").split("|"),u=r.attr("lay-verType"),d=r.val();if(r.removeClass(o),layui.each(c,function(e,t){var c,f="",v="function"==typeof a[t];if(a[t]){var c=v?f=a[t](d,l):!a[t][0].test(d);if(f=f||a[t][1],c)return"tips"===u?i.tips(f,function(){return"string"==typeof r.attr("lay-ignore")||"select"!==l.tagName.toLowerCase()&&!/^checkbox|radio$/.test(l.type)?r:r.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}}),s)return s}),s)return!1;var p={};return layui.each(h,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];p[i]=0|p[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+p[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(c[t.name]=t.value)}}),layui.event.call(this,l,"submit("+y+")",{elem:this,form:v,field:c})},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/layedit.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
    ','
    '+f+"
    ",'
    ','',"
    ","
    "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

    ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

    "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

    "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

      ','
    • ','','
      ','',"
      ","
    • ",'
    • ','','
      ','",'","
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
  • '+e+'
  • ')}),'
      '+t.join("")+"
    "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
      ','
    • ','','
      ','","
      ","
    • ",'
    • ','','
      ','',"
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
    ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
    "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
      ",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)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/slider.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
    '+(t.tips?'
    ':"")+'
    '+(t.range?'
    ':"")+"
    ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
    ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
    ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
    f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
      '),s=o(["
    • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
    • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
      '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/upload.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("layer",function(e){"use strict";var i=layui.$,t=layui.layer,n=layui.hint(),a=layui.device(),o={config:{},set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,r,e,i)}},l=function(){var e=this;return{upload:function(i){e.upload.call(e,i)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var t=this;t.config=i.extend({},t.config,o.config,e),t.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var t=this,e=t.config;e.elem=i(e.elem),e.bindAction=i(e.bindAction),t.file(),t.events()},p.prototype.file=function(){var e=this,t=e.config,n=e.elemFile=i(['"].join("")),o=t.elem.next();(o.hasClass(u)||o.hasClass(c))&&o.remove(),a.ie&&a.ie<10&&t.elem.wrap('
      '),e.isFile()?(e.elemFile=t.elem,t.field=t.elem[0].name):t.elem.after(n),a.ie&&a.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,t=e.config,n=i(''),a=i(['
      ',"
      "].join(""));i("#"+f)[0]||i("body").append(n),t.elem.next().hasClass(c)||(e.elemFile.wrap(a),t.elem.next("."+c).append(function(){var e=[];return layui.each(t.data,function(i,t){t="function"==typeof t?t():t,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var i=this;window.FileReader&&layui.each(i.chooseFiles,function(i,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){e&&e(i,t,this.result)}})},p.prototype.upload=function(e,t){var n,o=this,l=o.config,r=o.elemFile[0],u=function(){var t=0,n=0,a=e||o.files||o.chooseFiles||r.files,u=function(){l.multiple&&t+n===o.fileLength&&"function"==typeof l.allDone&&l.allDone({total:o.fileLength,successful:t,aborted:n})};layui.each(a,function(e,a){var r=new FormData;r.append(l.field,a),layui.each(l.data,function(e,i){i="function"==typeof i?i():i,r.append(e,i)}),i.ajax({url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(i){t++,d(e,i),u()},error:function(){n++,o.msg("请求上传接口出现异常"),m(e),u()}})})},c=function(){var e=i("#"+f);o.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var i,t=e.contents().find("body");try{i=t.text()}catch(n){o.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}i&&(clearInterval(p.timer),t.html(""),d(0,i))},30)},d=function(e,i){if(o.elemFile.next("."+s).remove(),r.value="","object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},o.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(i,e||0,function(e){o.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){o.upload(e)})},h=l.exts,v=function(){var i=[];return layui.each(e||o.chooseFiles,function(e,t){i.push(t.name)}),i}(),g={preview:function(e){o.preview(e)},upload:function(e,i){var t={};t[e]=i,o.upload(t)},pushFile:function(){return o.files=o.files||{},layui.each(o.chooseFiles,function(e,i){o.files[e]=i}),o.files},resetFile:function(e,i,t){var n=new File([i],t);o.files=o.files||{},o.files[e]=n}},y=function(){if("choose"!==t&&!l.auto||(l.choose&&l.choose(g),"choose"!==t))return l.before&&l.before(g),a.ie?a.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return o.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return o.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return o.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,i){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(i))||(n=!0)}),n)return o.msg("选择的图片中包含不支持的格式"),r.value=""}if(o.fileLength=function(){var i=0,t=e||o.files||o.chooseFiles||r.files;return layui.each(t,function(){i++}),i}(),l.number&&o.fileLength>l.number)return o.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(a.ie&&a.ie<10)){var F;if(layui.each(o.chooseFiles,function(e,i){if(i.size>1024*l.size){var t=l.size/1024;t=t>=1?t.toFixed(2)+"MB":l.size+"KB",r.value="",F=t}}),F)return o.msg("文件不能超过"+F)}y()}},p.prototype.events=function(){var e=this,t=e.config,o=function(i){e.chooseFiles={},layui.each(i,function(i,t){var n=(new Date).getTime();e.chooseFiles[n+"-"+i]=t})},l=function(i,n){var a=e.elemFile,o=i.length>1?i.length+"个文件":(i[0]||{}).name||a[0].value.match(/[^\/\\]+\..+/g)||[]||"";a.next().hasClass(s)&&a.next().remove(),e.upload(null,"choose"),e.isFile()||t.choose||a.after(''+o+"")};t.elem.off("upload.start").on("upload.start",function(){var a=i(this),o=a.attr("lay-data");if(o)try{o=new Function("return "+o)(),e.config=i.extend({},t,o)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+o)}e.config.item=a,e.elemFile[0].click()}),a.ie&&a.ie<10||t.elem.off("upload.over").on("upload.over",function(){var e=i(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=i(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,a){var r=i(this),u=a.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),o(u),t.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var i=this.files||[];o(i),t.auto?e.upload():l(i)}),t.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),t.elem.data("haveEvents")||(e.elemFile.on("change",function(){i(this).trigger("upload.change")}),t.elem.on("click",function(){e.isFile()||i(this).trigger("upload.start")}),t.drag&&t.elem.on("dragover",function(e){e.preventDefault(),i(this).trigger("upload.over")}).on("dragleave",function(e){i(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),i(this).trigger("upload.drop",e)}),t.bindAction.on("click",function(){i(this).trigger("upload.action")}),t.elem.data("haveEvents",!0))},o.render=function(e){var i=new p(e);return l.call(i)},e(r,o)}); -------------------------------------------------------------------------------- /xadmin/lib/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
        ',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)}); -------------------------------------------------------------------------------- /xadmin/lib/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:r