├── .idea ├── .gitignore ├── dataSources.xml ├── git_toolbox_prj.xml ├── modules.xml ├── php.xml ├── public.api.com.iml ├── sqldialects.xml └── vcs.xml ├── README.md ├── admin ├── 404.php ├── ajax.php ├── footer.php ├── globals.php ├── header.php ├── index.php └── login.php ├── assets ├── css │ ├── codebase.min-5.4.css │ └── dataTables.bootstrap5.min.css ├── fonts │ ├── fontawesome │ │ ├── fa-brands-400-1.eot │ │ ├── fa-brands-400.eot │ │ ├── fa-brands-400.svg │ │ ├── fa-brands-400.ttf │ │ ├── fa-brands-400.woff │ │ ├── fa-brands-400.woff2 │ │ ├── fa-regular-400-1.eot │ │ ├── fa-regular-400.eot │ │ ├── fa-regular-400.svg │ │ ├── fa-regular-400.ttf │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900-1.eot │ │ ├── fa-solid-900.eot │ │ ├── fa-solid-900.svg │ │ ├── fa-solid-900.ttf │ │ ├── fa-solid-900.woff │ │ └── fa-solid-900.woff2 │ ├── poppins │ │ ├── poppins-v20-latin-500.woff2 │ │ ├── poppins-v20-latin-600.woff2 │ │ ├── poppins-v20-latin-700.woff2 │ │ └── poppins-v20-latin-regular.woff2 │ ├── simple-line-icons │ │ ├── Simple-Line-Icons.eot │ │ ├── Simple-Line-Icons.svg │ │ ├── Simple-Line-Icons.ttf │ │ ├── Simple-Line-Icons.woff │ │ ├── Simple-Line-Icons.woff2 │ │ ├── ╕№╢р╘┤┬ы╡╪╓╖.txt.url │ │ └── ╕№╢р╫╩╘┤╧┬╘╪.url │ └── wenfont │ │ └── HarmonyOS_Sans_SC_Medium.subset.woff2 ├── img │ ├── favicons │ │ └── favicon.png │ └── photo23@2x.jpg └── js │ ├── app.min.js │ ├── bootstrap-notify.min.js │ ├── chart.min.js │ ├── codebase.app.min-5.4.js │ ├── layer.js │ ├── lib │ └── base64.js │ └── theme │ └── default │ ├── icon-ext.png │ ├── icon.png │ ├── layer.css │ ├── loading-0.gif │ ├── loading-1.gif │ └── loading-2.gif ├── config └── config.sql ├── donation.png ├── extend ├── adm │ ├── admin │ │ ├── api │ │ │ └── admin.php │ │ └── view │ │ │ └── edit.php │ ├── control │ │ ├── api │ │ │ ├── control.php │ │ │ └── web.php │ │ └── view │ │ │ ├── list.php │ │ │ ├── log.php │ │ │ └── web.php │ └── index.php ├── ajaxApi.php ├── api │ └── test │ │ └── index.php └── docView.php ├── include ├── Route.class.php ├── common.php ├── config.php └── db.class.php ├── index.php ├── install ├── cloudza_api.php └── index.php ├── nginx.htaccess └── robots.txt /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | # 基于编辑器的 HTTP 客户端请求 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | mysql.8 6 | true 7 | com.mysql.cj.jdbc.Driver 8 | jdbc:mysql://localhost:3306/public_api 9 | $ProjectFileDir$ 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/git_toolbox_prj.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/php.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /.idea/public.api.com.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/sqldialects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Star History 点亮项目星星! 2 | 3 | [![Star History Chart](https://api.star-history.com/svg?repos=iCloudZA/CloudZA_API&type=Date)](https://star-history.com/#iCloudZA/CloudZA_API&Date) 4 | 5 | ## 前言 6 | 祝大家新年快乐,欢迎使用本程序(CloudZA API) 7 | 8 | ---- 9 | 10 | ## 教程 11 | > 以下是本程序的安装教程 12 | ### 环境支持 13 | - PHP版本 8.0 14 | - Mysql 5.6及以上 15 | - Windows/Linux 16 | 17 | ## 安装 18 | 1. 将程序上传到网站目录配置伪静态规则 19 | 2. 访问domain或者domain/install进入到安装指引 20 | 3. 安装数据库/配置管理员账号以及密码即安装完成 21 | 4. 安装教程:https://www.bilibili.com/video/BV1uv4y1y749 22 | 23 | ## 添加API 24 | > 本地API在目录`extend/api/`中添加文件即可,主文件以`index.php`命名 25 | > 然后在后台添加API,类型有`本地`和`外部`,如果是`extend/api/`中的就选择本地API,如果是外链就选外部API 26 | 27 | ## 伪静态 28 | ```nginx 29 | if (!-e $request_filename) 30 | { 31 | rewrite ^(.*)$ /index.php$1 last; 32 | } 33 | ``` 34 | 35 | ## 免签约支付程序(朋友的) 36 | https://github.com/kaindev8/starMQ 37 | 38 | 喜欢可以看看 39 | 40 | 41 | ## 赞助名单 42 | | 昵称 | 联系方式 | 赞助方式 | 赞助金额 | 43 | |:------:|:----------:|:----:|:----:| 44 | | 客观手记 | 22****5716 | 支付宝 | 20 | 45 | | 逢戏 | 13****9867 | 微信 | 10 | 46 | | ℳℓ大鱼ℳℓ | M-****ish | 微信 | 20 | 47 | 48 | ## 最后 49 | 50 | > 开源不代表肆意的倒卖,请勿修改底部的Github链接,尊重开源精神谢谢🌹 51 | -------------------------------------------------------------------------------- /admin/404.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |

Not Found

7 |

Please return to the console.

8 | 9 | 返回控制台 10 | 11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /admin/ajax.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/footer.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /admin/globals.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | 8 | require_once '../include/common.php'; 9 | $res = Db::table('admin')->find(); 10 | $action = isset($_GET[ 'action' ]) ? purge($_GET[ 'action' ]) : ''; 11 | $api = isset($_GET[ 'api' ]) ? purge($_GET[ 'api' ]) : ''; 12 | substr($_SERVER[ 'PHP_SELF' ] , strrpos($_SERVER[ 'PHP_SELF' ] , '/') + 1); 13 | //登录验证 14 | if ($action === 'login') { 15 | $username = isset($_POST[ 'user' ]) ? purge($_POST[ 'user' ]) : ''; 16 | $password = isset($_POST[ 'pwd' ]) ? purge($_POST[ 'pwd' ]) : ''; 17 | if ($username == '' || $password == '') { 18 | exit(ReturnError('账号密码不能为空')); 19 | } 20 | if ($username == $res[ 'user' ] && md5($password) == $res[ 'password' ]) { 21 | $COOKIE = md5($res[ 'user' ] . $res[ 'password' ] . time()); 22 | // 更新数据库中的Cookie 23 | if ( !Db::table('admin')->update(['cookie' => $COOKIE])) { 24 | exit(ReturnError('Sever Error!')); 25 | } 26 | writeLog('logon'); 27 | setcookie('ADMIN_COOKIE' , $COOKIE , time() + 3600 * 24 , '/'); 28 | exit(return_msg('200' , '登录成功' , array('url' => '/admin?index'))); 29 | } else { 30 | exit(ReturnError('账号密码错误')); 31 | } 32 | } 33 | //退出 34 | if ($action === 'logout') { 35 | setcookie('ADMIN_COOKIE' , ' ' , time() - 36000 * 24 , '/'); 36 | header('Location:./login.php'); 37 | exit; 38 | } 39 | $ADMIN_COOKIE = isset($_COOKIE[ 'ADMIN_COOKIE' ]) ? purge($_COOKIE[ 'ADMIN_COOKIE' ]) : ''; 40 | if ($ADMIN_COOKIE == $res[ 'cookie' ]) { 41 | $islogin = true; 42 | } else { 43 | $islogin = false; 44 | } 45 | if ( !$islogin) { 46 | header('Location:./login.php'); 47 | exit; 48 | } 49 | 50 | /*导航配置*/ 51 | $menu_arr = myScanDir(FCPATH . ADM_EXTEND_MULU , 1); 52 | $titlename = []; 53 | foreach ($menu_arr as $value) { 54 | $nav_arr = getPluginDataAd($value); 55 | foreach ($nav_arr as $val) { 56 | $titlename = array_merge($titlename , [$val[ 'file' ] => $val[ 'name' ]]); 57 | } 58 | if ($value == 'admin') {//continue; 59 | $web = $nav_arr; 60 | } else { 61 | if ( !file_exists(FCPATH . ADM_EXTEND_MULU . $value . "/menu.php")) {//continue; 62 | foreach ($nav_arr as $value) { 63 | $menu[] = $value; 64 | } 65 | } else { 66 | $nav = include FCPATH . ADM_EXTEND_MULU . $value . "/menu.php"; 67 | $menu[] = array_merge($nav , ['side-nav-second-level' => $nav_arr]); 68 | } 69 | } 70 | } 71 | $sortKey = array_column($menu , 'sort'); 72 | array_multisort($sortKey , SORT_ASC , $menu); 73 | 74 | $Filename = strpos($_SERVER[ "QUERY_STRING" ] , '&') ? txt_zuo($_SERVER[ "QUERY_STRING" ] , "&") : $_SERVER[ "QUERY_STRING" ]; 75 | $title = !empty($titlename[ $Filename ]) ? $titlename[ $Filename ] : '首页'; 76 | 77 | 78 | if ($api === 'base') { 79 | // chart 80 | $week_array = ["星期日" , "星期一" , "星期二" , "星期三" , "星期四" , "星期五" , "星期六"]; 81 | $data = Db::query('SELECT DATE(datetime) as date, COUNT(DISTINCT ip) as ips, COUNT(*) as pv FROM api_count WHERE datetime >= DATE_SUB(CURDATE(), INTERVAL 6 DAY) GROUP BY DATE(datetime)'); 82 | $result = ["date" => [] , "ip" => [] , "pv" => []]; 83 | // foreach ($data as $item) { 84 | // $result[ "date" ][] = $item[ "date" ]; 85 | // $result[ 'ip' ][] = $item[ 'ips' ]; 86 | // } 87 | $dataCount = count($data); 88 | for ($i = 0; $i < $dataCount; $i++) { 89 | $result[ 'date' ][] = $data[ $i ][ 'date' ]; 90 | $result[ 'ip' ][] = $data[ $i ][ 'ips' ]; 91 | $result[ 'pv' ][] = $data[ $i ][ 'pv' ];; 92 | } 93 | 94 | if ($dataCount < 7) { 95 | $currentDate = new DateTime(); 96 | for ($i = $dataCount; $i < 7; $i++) { 97 | $currentDate->add(new DateInterval('P1D')); 98 | $result[ 'date' ][] = $currentDate->format('Y-m-d'); 99 | $result[ 'ip' ][] = 0; 100 | $result[ 'pv' ][] = 0; 101 | } 102 | } 103 | 104 | // log 105 | $now = time(); 106 | $data = Db::query("SELECT id, ip, time, event, detailed FROM web_log ORDER BY time DESC LIMIT 6"); 107 | $output = array(); 108 | foreach ($data as $row) { 109 | $time = strtotime($row[ 'time' ]); 110 | $diff = $now - $time; 111 | if ($diff < 60) { 112 | $diff = $diff . " 秒前"; 113 | } else if ($diff < 3600) { 114 | $diff = round($diff / 60) . " 分钟前"; 115 | } else if ($diff < 86400) { 116 | $diff = round($diff / 3600) . " 小时前"; 117 | } else { 118 | $diff = round($diff / 86400) . " 天前"; 119 | } 120 | switch ($row[ 'event' ]) { 121 | case 'logon': 122 | $colour = 'text-success'; 123 | $icon = 'si si-check'; 124 | break; 125 | case 'add_api': 126 | $colour = 'text-info'; 127 | $icon = 'si si-plus'; 128 | break; 129 | case 'edit_api': 130 | $colour = 'text-info'; 131 | $icon = 'si si-settings'; 132 | break; 133 | case 'del_api': 134 | $colour = 'text-danger'; 135 | $icon = 'si si-ban'; 136 | break; 137 | case 'dels_api': 138 | $colour = 'text-danger'; 139 | $icon = 'si si-puzzle'; 140 | break; 141 | case 'edit_web': 142 | $colour = 'text-warning'; 143 | $icon = 'si si-equalizer'; 144 | break; 145 | case 'edit_admin': 146 | $colour = 'text-warning'; 147 | $icon = "si si-wrench"; 148 | break; 149 | default: 150 | $colour = 'text-success'; 151 | $icon = 'si si-check'; 152 | } 153 | $output[] = array("time" => $diff , "event" => $lang_adm[ $row[ 'event' ] ] , "icon" => $icon , "colour" => $colour); 154 | } 155 | $arr[ 'chart' ] = $result; 156 | $arr[ 'eventList' ] = $output; 157 | exit(return_msg('200' , 'success' , $arr)); 158 | } -------------------------------------------------------------------------------- /admin/header.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | <?php echo TITLE ?> - <?php echo TITLE_DESC ?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
27 | 135 | 211 |
212 |
-------------------------------------------------------------------------------- /admin/index.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | require_once "header.php"; 8 | if($Filename == '' or $Filename == 'index'){ 9 | include(FCPATH.ADM_EXTEND_MULU."/index.php"); 10 | }else if(file_exists(FCPATH.ADM_EXTEND_MULU.str_replace("_",'/view/',$Filename).".php")){ 11 | include(FCPATH.ADM_EXTEND_MULU.str_replace("_",'/view/',$Filename).".php"); 12 | }else{ 13 | if(!strpos($Filename,"_") && file_exists(FCPATH.ADM_EXTEND_MULU.$Filename.'/view/'.$Filename.".php")){ 14 | include(FCPATH.ADM_EXTEND_MULU.$Filename.'/view/'.$Filename.".php"); 15 | }else{ 16 | include("404.php"); 17 | } 18 | } 19 | require_once "footer.php"; 20 | 21 | -------------------------------------------------------------------------------- /admin/login.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | require_once '../include/common.php'; 8 | $WEB = Db::table('webset')->find(); 9 | ?> 10 | 11 | 12 | 13 | 14 | <?php 15 | echo $WEB[ 'web_title' ]; ?> - 后台登录 16 | 17 | 18 | 19 | 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 28 | 29 | CloudZA 30 | api 31 | 32 |

33 | Welcome to Your Dashboard 34 |

35 |

36 | It’s a great day today! 37 |

38 |
39 | 73 |
74 |
75 |
76 |
77 |
78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 102 | 103 | -------------------------------------------------------------------------------- /assets/css/dataTables.bootstrap5.min.css: -------------------------------------------------------------------------------- 1 | td.dt-control{background:url("../../../../../../examples/resources/details_open.png") no-repeat center center;cursor:pointer}tr.dt-hasChild td.dt-control{background:url("../../../../../../examples/resources/details_close.png") no-repeat center center}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}/*! Bootstrap 5 integration for DataTables 2 | * 3 | * ©2020 SpryMedia Ltd, all rights reserved. 4 | * License: MIT datatables.net/license/mit 5 | */table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:.85em}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable>thead>tr>th:active,table.dataTable>thead>tr>td:active{outline:none}table.dataTable>thead>tr>th:not(.sorting_disabled),table.dataTable>thead>tr>td:not(.sorting_disabled){padding-right:30px}table.dataTable>thead .sorting,table.dataTable>thead .sorting_asc,table.dataTable>thead .sorting_desc,table.dataTable>thead .sorting_asc_disabled,table.dataTable>thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable>thead .sorting:before,table.dataTable>thead .sorting:after,table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_asc:after,table.dataTable>thead .sorting_desc:before,table.dataTable>thead .sorting_desc:after,table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_asc_disabled:after,table.dataTable>thead .sorting_desc_disabled:before,table.dataTable>thead .sorting_desc_disabled:after{position:absolute;bottom:.5em;display:block;opacity:.3}table.dataTable>thead .sorting:before,table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_desc:before,table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_desc_disabled:before{right:1em;content:"↑"}table.dataTable>thead .sorting:after,table.dataTable>thead .sorting_asc:after,table.dataTable>thead .sorting_desc:after,table.dataTable>thead .sorting_asc_disabled:after,table.dataTable>thead .sorting_desc_disabled:after{right:.5em;content:"↓"}table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_desc:after{opacity:1}table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:before,div.dataTables_scrollBody>table>thead .sorting_asc:before,div.dataTables_scrollBody>table>thead .sorting_desc:before,div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody tr:first-child th,div.dataTables_scrollBody>table>tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}div.dataTables_wrapper div.dataTables_paginate ul.pagination{justify-content:center !important}}table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled){padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable{border-right-width:0}table.table-bordered.dataTable thead tr:first-child th,table.table-bordered.dataTable thead tr:first-child td{border-top-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable td:first-child,table.table-bordered.dataTable td:first-child{border-left-width:1px}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-bottom-width:1px}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child{padding-right:0}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1){--bs-table-accent-bg: transparent}table.dataTable.table-striped>tbody>tr.odd{--bs-table-accent-bg: var(--bs-table-striped-bg)} -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-brands-400-1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-brands-400-1.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-brands-400.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-brands-400.ttf -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-brands-400.woff -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-brands-400.woff2 -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-regular-400-1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-regular-400-1.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-regular-400.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-regular-400.ttf -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-regular-400.woff -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-regular-400.woff2 -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-solid-900-1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-solid-900-1.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-solid-900.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-solid-900.ttf -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-solid-900.woff -------------------------------------------------------------------------------- /assets/fonts/fontawesome/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/fontawesome/fa-solid-900.woff2 -------------------------------------------------------------------------------- /assets/fonts/poppins/poppins-v20-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/poppins/poppins-v20-latin-500.woff2 -------------------------------------------------------------------------------- /assets/fonts/poppins/poppins-v20-latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/poppins/poppins-v20-latin-600.woff2 -------------------------------------------------------------------------------- /assets/fonts/poppins/poppins-v20-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/poppins/poppins-v20-latin-700.woff2 -------------------------------------------------------------------------------- /assets/fonts/poppins/poppins-v20-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/poppins/poppins-v20-latin-regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/simple-line-icons/Simple-Line-Icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/simple-line-icons/Simple-Line-Icons.eot -------------------------------------------------------------------------------- /assets/fonts/simple-line-icons/Simple-Line-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/simple-line-icons/Simple-Line-Icons.ttf -------------------------------------------------------------------------------- /assets/fonts/simple-line-icons/Simple-Line-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/simple-line-icons/Simple-Line-Icons.woff -------------------------------------------------------------------------------- /assets/fonts/simple-line-icons/Simple-Line-Icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/simple-line-icons/Simple-Line-Icons.woff2 -------------------------------------------------------------------------------- /assets/fonts/simple-line-icons/╕№╢р╘┤┬ы╡╪╓╖.txt.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://www.aqiyuanma.com/ 3 | IDList= 4 | IconFile=C:\WINDOWS\system32\SHELL32.dll 5 | IconIndex=70 6 | HotKey=0 7 | [{000214A0-0000-0000-C000-000000000046}] 8 | Prop3=19,11 9 | -------------------------------------------------------------------------------- /assets/fonts/simple-line-icons/╕№╢р╫╩╘┤╧┬╘╪.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://www.aqiyuanma.com/ 3 | IDList= 4 | HotKey=0 5 | [{000214A0-0000-0000-C000-000000000046}] 6 | Prop3=19,11 7 | -------------------------------------------------------------------------------- /assets/fonts/wenfont/HarmonyOS_Sans_SC_Medium.subset.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/fonts/wenfont/HarmonyOS_Sans_SC_Medium.subset.woff2 -------------------------------------------------------------------------------- /assets/img/favicons/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/img/favicons/favicon.png -------------------------------------------------------------------------------- /assets/img/photo23@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/img/photo23@2x.jpg -------------------------------------------------------------------------------- /assets/js/app.min.js: -------------------------------------------------------------------------------- 1 | x = { 2 | ajax: function (url, data, success, dataType = 'json') { 3 | var loading = layer.load(2); 4 | $.ajax({ 5 | url: url, 6 | data: data, 7 | type: (data === null || data === undefined) ? 'GET' : 'POST', 8 | cache: false, 9 | dataType: dataType, 10 | success: function (data) { 11 | x.close(loading); 12 | if (typeof (success) === 'function') { 13 | // if(typeof(data) === 'string'){ 14 | // var arr = JSON.parse(data) 15 | // } 16 | success(data) 17 | } 18 | }, 19 | error: function (data) { 20 | x.close(loading); 21 | if (typeof (fail) === 'function') { 22 | // if(typeof(data) === 'string'){ 23 | // var arr = JSON.parse(data) 24 | // } 25 | fail(data) 26 | } else { 27 | x.notify('网络链接错误', 'danger'); 28 | } 29 | } 30 | }) 31 | }, 32 | /** 33 | * 34 | * @param url 链接 35 | * @param parameter 参数 36 | * @param callback 回调 37 | * @param ajaxType POST/GET 38 | */ 39 | postData: function (url, parameter, callback, callerror, ajaxType, ajaxTime) { 40 | ajaxType = ajaxType || "POST"; 41 | ajaxTime = ajaxTime || 60000; 42 | var loading = layer.load(2); 43 | $.ajax({ 44 | type: ajaxType, 45 | url: url, 46 | async: true, 47 | dataType: 'json', 48 | timeout: ajaxTime, 49 | data: parameter, 50 | success: function (data) { 51 | x.close(loading); 52 | if (callback == null) { 53 | return; 54 | } 55 | callback(data); 56 | }, 57 | error: function (error) { 58 | x.close(loading); 59 | x.notify('网络链接错误', 'danger'); 60 | } 61 | }); 62 | }, 63 | 64 | getval: function (b, a) { 65 | if ($(b).length == 0) { 66 | return "" 67 | } 68 | if (a === null) { 69 | $(b).val(""); 70 | return 71 | } else { 72 | if (!$(b).val()) { 73 | if (a === 1) { 74 | $(b).focus() 75 | } else { 76 | if (a) { 77 | $(b).focus(); 78 | x.notify(a, 'danger') 79 | } 80 | } 81 | return "" 82 | } 83 | return $(b).val() 84 | } 85 | }, 86 | /** 87 | * 88 | * @param message 描述 89 | * @param type 类型(info/success/warning/danger) 90 | * @param align 显示位置(top/buttom) 91 | */ 92 | notify: function (message, type = 'info', align = 'right') { 93 | switch (type) { 94 | case 'info': 95 | icon = 'fa fa-info me-1'; 96 | break; 97 | case 'success': 98 | icon = 'fa fa-check me-1'; 99 | break; 100 | case 'warning': 101 | icon = 'fa fa-exclamation-triangle me-1'; 102 | break; 103 | case 'danger': 104 | icon = 'fa fa-times me-1'; 105 | break; 106 | } 107 | Codebase.helpers('jq-notify', { 108 | align: align, // 'right', 'left', 'center' 109 | from: 'top', // 'top', 'bottom' 110 | type: type, // 'info', 'success', 'warning', 'danger' 111 | icon: icon, // Icon class 112 | message: message, 113 | }); 114 | }, 115 | pjax: function (url) { 116 | $.pjax({ 117 | url: url, 118 | container: '#pjax-container', 119 | scrollTo: false, 120 | timeout: 20000, 121 | }); 122 | }, 123 | reload: function () { 124 | $("#nav-main a").each(function () { 125 | var pageUrl = window.location.href.split(/[#]/)[0]; // window.location.href.split(/[?#]/)[0]; 126 | if (this.href == pageUrl && window.location.href.split(/[?#]/)[0]) { 127 | $(this).parent().parent().parent().addClass("open"); 128 | $(this).addClass("active"); 129 | } else { 130 | $(this).removeClass("active"); 131 | } 132 | }); 133 | }, 134 | cleartime: function () { 135 | typeof saomaInterID != "undefined" && clearInterval(saomaInterID) 136 | }, 137 | close: function (a) { 138 | if (typeof (a) === "number") { 139 | layer.close(a) 140 | } else { 141 | if (a) { 142 | layer.closeAll(a) 143 | } else { 144 | layer.closeAll() 145 | } 146 | } 147 | }, 148 | btn: function (d, a) { 149 | var e; 150 | if (d) { 151 | e = d; 152 | } else { 153 | e = 'NULL'; 154 | } 155 | return layer.confirm(e, { 156 | btn: a || '我知道了', 157 | closeBtn: 0, 158 | btnAlign: "c", 159 | yes: function (b) { 160 | x.close(b) 161 | } 162 | }) 163 | }, 164 | /** 165 | * 166 | * @param c 链接 167 | * @param g 参数 168 | * @param b 回调方法 169 | * @param a 弹窗文本 170 | */ 171 | del: function (c, g, b, a) { 172 | var a = nv(a, "您确定要删除吗?"); 173 | layer.confirm(a, { 174 | btn: ["确 定", "取 消"] 175 | }, function (d) { 176 | x.close(d) 177 | x.postData(c, g, b) 178 | }) 179 | }, 180 | ints: function (b, e, a) { 181 | e = nv(e, 11); 182 | var d = $(b).val(); 183 | var c = event.which; 184 | if (a) { 185 | if (c == 46) { 186 | if (d.length < 1 || d.indexOf(".") > 0) { 187 | return false 188 | } else { 189 | return true 190 | } 191 | } 192 | } 193 | if (c >= 48 && c <= 57) { 194 | if (d.length < e) { 195 | return true 196 | } 197 | } 198 | return false 199 | }, mode: function (url, parameter, bt, se) { 200 | se ? eval(se) : $("#modal").modal("show"); 201 | var bt = bt || '标题文本'; 202 | var url = url; 203 | get_url(url, parameter, bt); 204 | }, 205 | // 柱行图表 206 | barCharts: (a,b,c) => { 207 | (Chart.defaults.color = "#818d96"), 208 | (Chart.defaults.scale.grid.color = "rgba(0,0,0,.04)"), 209 | (Chart.defaults.scale.grid.zeroLineColor = "rgba(0,0,0,.1)"), 210 | (Chart.defaults.scale.beginAtZero = !0), 211 | (Chart.defaults.elements.line.borderWidth = 2), 212 | (Chart.defaults.elements.point.radius = 5), 213 | (Chart.defaults.elements.point.hoverRadius = 7), 214 | (Chart.defaults.plugins.tooltip.radius = 3), 215 | (Chart.defaults.plugins.legend.labels.boxWidth = 12); 216 | d = document.getElementById("js-chartjs-bars"), 217 | f = { 218 | labels: a, 219 | datasets: [ 220 | { 221 | label: "API调用", 222 | fill: !0, 223 | backgroundColor: "rgba(2, 132, 199, .75)", 224 | borderColor: "rgba(2, 132, 199, 1)", 225 | pointBackgroundColor: "rgba(2, 132, 199, 1)", 226 | pointBorderColor: "#fff", 227 | pointHoverBackgroundColor: "#fff", 228 | pointHoverBorderColor: "rgba(2, 132, 199, 1)", 229 | data: b 230 | }, 231 | { 232 | label: "IP数量", 233 | fill: !0, 234 | backgroundColor: "rgba(2, 132, 199, .25)", 235 | borderColor: "rgba(2, 132, 199, 1)", 236 | pointBackgroundColor: "rgba(2, 132, 199, 1)", 237 | pointBorderColor: "#fff", 238 | pointHoverBackgroundColor: "#fff", 239 | pointHoverBorderColor: "rgba(2, 132, 199, 1)", 240 | data: c 241 | } 242 | ] 243 | }; 244 | new Chart(d, { 245 | type: "bar", 246 | data: f 247 | }) 248 | } 249 | 250 | 251 | } 252 | 253 | /** 254 | * 删除两端空格 255 | * @param a 256 | * @returns {*} 257 | */ 258 | function trim (a) 259 | { 260 | return a.replace(/(^\s*)|(\s*$)/g, "") 261 | } 262 | /** 263 | * 264 | * @function isnull 265 | * @param { any } a - 需要检查的输入参数 266 | * @returns { boolean } - 如果输入参数为 null 或空字符串, "undefined", false, "false" 或 "null",则返回 true。否则返回 false。 267 | * 268 | * 'isnull' 函数用于检查输入参数 'a' 是否为 null 或空字符串。 269 | * 检查输入参数是否符合以下任何一种条件: 270 | * - a == null 271 | * - a == "" (空字符串) 272 | * - a == "undefined" 273 | * - a == undefined 274 | * - a == false 275 | * - a == "false" 276 | * - a == "null" 277 | * 如果任意一种条件为真, 则函数返回 true。否则返回 false。 278 | */ 279 | function isnull (a) 280 | { 281 | if (a == null || a == "" || a == "undefined" || a == undefined || a == false || a == "false" || a == "null") { 282 | return true 283 | } 284 | return false 285 | } 286 | 287 | function nv (b, a) 288 | { 289 | return (isnull(b)) ? (!isnull(a) ? a : "") : b 290 | } 291 | 292 | $.fn.parseForm = function () { 293 | var serializeObj = {}; 294 | var array = this.serializeArray(); 295 | var str = this.serialize(); 296 | $(array).each(function () { 297 | if (serializeObj[this.name]) { 298 | if ($.isArray(serializeObj[this.name])) { 299 | serializeObj[this.name].push(this.value); 300 | } else { 301 | serializeObj[this.name] = [serializeObj[this.name], this.value]; 302 | } 303 | } else { 304 | serializeObj[this.name] = this.value; 305 | } 306 | }); 307 | return serializeObj; 308 | }; 309 | 310 | /*** 模态窗口调用 ***/ 311 | function get_url (url, parameter, bt) 312 | { 313 | $("#modal-title").html(bt); 314 | $("#modal-content").html("
") 315 | console.log(parameter) 316 | x.postData( 317 | url, parameter, function (d) { 318 | $("#modal-content").html(d.content); 319 | return false 320 | }, function (d) { 321 | $("#modal-content").html("

加载失败,请稍后重试!

") 322 | return false 323 | }, 'POST' 324 | ); 325 | } 326 | 327 | $(document).pjax('[data-pjax] a, a[data-pjax]', '#pjax-container', { 328 | type: 'get', 329 | scrollTo: false, 330 | timeout: 20000, 331 | }); 332 | $(document).on('pjax:send', function () { 333 | NProgress.start(); 334 | }); 335 | $(document).on('pjax:complete', function () { 336 | if (window.innerWidth <= 991) { 337 | Codebase.layout('sidebar_close'); 338 | } 339 | NProgress.done(); 340 | x.reload(); 341 | }); 342 | 343 | x.reload(); 344 | 345 | function logout () 346 | { 347 | layer.confirm('你确定退出登录吗?', { 348 | btn: ['确定', '取消'], 349 | closeBtn: 0, 350 | }, function () { 351 | x.ajax("/index/login_ajax/logout", null, function (data) { 352 | if (data.code === 1) { 353 | x.notify('退出成功', 'success'); 354 | layer.closeAll(); 355 | setTimeout(function () { 356 | window.location.href = '{:url(\'/index/login/login\')}'; 357 | }, 1500); 358 | } 359 | }); 360 | }); 361 | } 362 | 363 | 364 | var clipboard = new ClipboardJS('.copy'); 365 | clipboard.on('success', function (e) { 366 | x.notify("复制成功", "success"); 367 | }); 368 | clipboard.on('error', function (e) { 369 | document.querySelector('.copy'); 370 | x.notify("复制失败", "warning"); 371 | }); -------------------------------------------------------------------------------- /assets/js/bootstrap-notify.min.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(b,d,e){var d={content:{message:"object"==typeof d?d.message:d,title:d.title?d.title:"",icon:d.icon?d.icon:"",url:d.url?d.url:"#",target:d.target?d.target:"-"}};e=a.extend(!0,{},d,e),this.settings=a.extend(!0,{},c,e),this._defaults=c,"-"==this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),this.init()}var c={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:''};String.format=function(){for(var a=arguments[0],b=1;b .progress-bar').removeClass("progress-bar-"+a.settings.type),a.settings.type=d[b],this.$ele.addClass("alert-"+d[b]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+d[b]);break;case"icon":var e=this.$ele.find('[data-notify="icon"]');"class"==a.settings.icon_type.toLowerCase()?e.removeClass(a.settings.content.icon).addClass(d[b]):(e.is("img")||e.find("img"),e.attr("src",d[b]));break;case"progress":var f=a.settings.delay-a.settings.delay*(d[b]/100);this.$ele.data("notify-delay",f),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",d[b]).css("width",d[b]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",d[b]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",d[b]);break;default:this.$ele.find('[data-notify="'+b+'"]').html(d[b])}var g=this.$ele.outerHeight()+parseInt(a.settings.spacing)+parseInt(a.settings.offset.y);a.reposition(g)},close:function(){a.close()}}},buildNotify:function(){var b=this.settings.content;this.$ele=a(String.format(this.settings.template,this.settings.type,b.title,b.message,b.url,b.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"==this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('Notify Icon')},styleDismiss:function(){this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1})},placement:function(){var b=this,c=this.settings.offset.y,d={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},e=!1,f=this.settings;switch(a('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return c=Math.max(c,parseInt(a(this).css(f.placement.from))+parseInt(a(this).outerHeight())+parseInt(f.spacing))}),1==this.settings.newest_on_top&&(c=this.settings.offset.y),d[this.settings.placement.from]=c+"px",this.settings.placement.align){case"left":case"right":d[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":d.left=0,d.right=0}this.$ele.css(d).addClass(this.settings.animate.enter),a.each(Array("webkit","moz","o","ms",""),function(a,c){b.$ele[0].style[c+"AnimationIterationCount"]=1}),a(this.settings.element).append(this.$ele),1==this.settings.newest_on_top&&(c=parseInt(c)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(c)),a.isFunction(b.settings.onShow)&&b.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(a){e=!0}).one(this.animations.end,function(c){a.isFunction(b.settings.onShown)&&b.settings.onShown.call(this)}),setTimeout(function(){e||a.isFunction(b.settings.onShown)&&b.settings.onShown.call(this)},600)},bind:function(){var b=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){b.close()}),this.$ele.mouseover(function(b){a(this).data("data-hover","true")}).mouseout(function(b){a(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){b.$ele.data("notify-delay",b.settings.delay);var c=setInterval(function(){var a=parseInt(b.$ele.data("notify-delay"))-b.settings.timer;if("false"===b.$ele.data("data-hover")&&"pause"==b.settings.mouse_over||"pause"!=b.settings.mouse_over){var d=(b.settings.delay-a)/b.settings.delay*100;b.$ele.data("notify-delay",a),b.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",d).css("width",d+"%")}a<=-b.settings.timer&&(clearInterval(c),b.close())},b.settings.timer)}},close:function(){var b=this,c=parseInt(this.$ele.css(this.settings.placement.from)),d=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit),b.reposition(c),a.isFunction(b.settings.onClose)&&b.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(a){d=!0}).one(this.animations.end,function(c){a(this).remove(),a.isFunction(b.settings.onClosed)&&b.settings.onClosed.call(this)}),setTimeout(function(){d||(b.$ele.remove(),b.settings.onClosed&&b.settings.onClosed(b.$ele))},600)},reposition:function(b){var c=this,d='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',e=this.$ele.nextAll(d);1==this.settings.newest_on_top&&(e=this.$ele.prevAll(d)),e.each(function(){a(this).css(c.settings.placement.from,b),b=parseInt(b)+parseInt(c.settings.spacing)+a(this).outerHeight()})}}),a.notify=function(a,c){var d=new b(this,a,c);return d.notify},a.notifyDefaults=function(b){return c=a.extend(!0,{},c,b)},a.notifyClose=function(b){"undefined"==typeof b||"all"==b?a("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):a('[data-notify-position="'+b+'"]').find('[data-notify="dismiss"]').trigger("click")}}); -------------------------------------------------------------------------------- /assets/js/layer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @LastEditors: CloudZA(云之安) 3 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 4 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 5 | */ 6 | 7 | /*! layer-v3.5.1 Web 通用弹出层组件 MIT License */ 8 | ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var t=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}(),i=e.LAYUI_GLOBAL||{};return i.layer_dir||t.substring(0,t.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c="creating",u=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function d(t){var n=100,a=document.getElementById(f);return++u>1e4/n?e.console&&console.error(l+".css: Invalid"):void(1989===parseInt(o.getStyle(a,"width"))?(t===c&&a.removeAttribute("lay-status"),a.getAttribute("lay-status")===c?setTimeout(d,n):i()):(a.setAttribute("lay-status",c),setTimeout(function(){d(c)},n)))}()}}},r={v:"3.5.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:260},n))}},s=function(e){var t=this,a=function(){t.creat()};t.index=++r.index,t.config.maxWidth=i(n).width()-30,t.config=i.extend({},t.config,o.config,e),document.body?a():setTimeout(function(){a()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.SHADE="layui-layer-shade",l.MOVE="layui-layer-move",s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,minStack:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
'+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",'
'+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
'+e+"
"}():"")+(r.resize?'':"")+"
"],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i("#"+l.MOVE)[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),e.shadeo=i("#"+l.SHADE+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),e.shadeo.css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():function(){e.offset(),parseInt(o.getStyle(document.getElementById(l.MOVE),"z-index"))||function(){e.layero.css("visibility","hidden"),r.ready(function(){e.offset(),e.layero.css("visibility","visible")})}()}(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&t.shadeo.on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n,t.index);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n,t.index)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n,t.index)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){t=t||{};var a=i("#"+l[0]+e),s=i("#"+l.SHADE+e),f=a.find(l[1]).outerHeight()||0,c=a.attr("minLeft")||181*o.minIndex+"px",u=a.css("position"),d={width:180,height:f,position:"fixed",overflow:"hidden"};o.record(a),o.minLeft[0]&&(c=o.minLeft[0],o.minLeft.shift()),t.minStack&&(d.left=c,d.top=n.height()-f,a.attr("minLeft")||o.minIndex++,a.attr("minLeft",c)),a.attr("position",u),r.style(e,d,!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),s.hide()},r.restore=function(e){var t=i("#"+l[0]+e),n=i("#"+l.SHADE+e),a=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(a[0]),height:parseFloat(a[1]),top:parseFloat(a[2]),left:parseFloat(a[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e),n.show()},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e,t){var n=i("#"+l[0]+e),a=n.attr("type"),s="layer-anim-close";if(n[0]){var f="layui-layer-wrap",c=function(){if(a===o.type[1]&&"object"===n.attr("conType")){n.children(":not(."+l[5]+")").remove();for(var r=n.find("."+f),s=0;s<2;s++)r.unwrap();r.css("display",r.data("display")).removeClass(f)}else{if(a===o.type[2])try{var c=i("#"+l[4]+e)[0];c.contentWindow.document.write(""),c.contentWindow.close(),n.find("."+l[5])[0].removeChild(c)}catch(u){}n[0].innerHTML="",n.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e],"function"==typeof t&&t()};n.data("isOutAnim")&&n.addClass("layer-anim "+s),i("#layui-layer-moves, #"+l.SHADE+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),n.attr("minLeft")&&(o.minIndex--,o.minLeft.push(n.attr("minLeft"))),r.ie&&r.ie<10||!n.data("isOutAnim")?c():setTimeout(function(){c()},200)}},r.closeAll=function(e,t){"function"==typeof e&&(t=e,e=null);var n=i("."+l[0]);i.each(n,function(a){var o=i(this),s=e?o.attr("type")===e:1;s&&r.close(o.attr("times"),a===n.length-1?t:null),s=null}),0===n.length&&"function"==typeof t&&t()};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
    '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
  • '+(t[0].content||"no content")+"
  • ";i'+(t[i].content||"no content")+"";return a}()+"
",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=!("string"==typeof t.photos||t.photos instanceof i),f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){h();var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0)}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev(!0)}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext(!0)}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),a&&(t.anim=-1),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||'+function(){return u.length>1?'
'+(u[d].alt||"")+""+s.imgIndex+" / "+u.length+"
":""}()+"
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){r.ready(),o.run(e.jQuery)}()}(window); -------------------------------------------------------------------------------- /assets/js/lib/base64.js: -------------------------------------------------------------------------------- 1 | // 2 | // THIS FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT BY HAND! 3 | // 4 | ; 5 | (function (global, factory) { 6 | typeof exports === 'object' && typeof module !== 'undefined' 7 | ? module.exports = factory() 8 | : typeof define === 'function' && define.amd 9 | ? define(factory) : 10 | // cf. https://github.com/dankogai/js-base64/issues/119 11 | (function () { 12 | // existing version for noConflict() 13 | var _Base64 = global.Base64; 14 | var gBase64 = factory(); 15 | gBase64.noConflict = function () { 16 | global.Base64 = _Base64; 17 | return gBase64; 18 | }; 19 | if (global.Meteor) { // Meteor.js 20 | Base64 = gBase64; 21 | } 22 | global.Base64 = gBase64; 23 | })(); 24 | }((typeof self !== 'undefined' ? self 25 | : typeof window !== 'undefined' ? window 26 | : typeof global !== 'undefined' ? global 27 | : this), function () { 28 | 'use strict'; 29 | /** 30 | * base64.ts 31 | * 32 | * Licensed under the BSD 3-Clause License. 33 | * http://opensource.org/licenses/BSD-3-Clause 34 | * 35 | * References: 36 | * http://en.wikipedia.org/wiki/Base64 37 | * 38 | * @author Dan Kogai (https://github.com/dankogai) 39 | */ 40 | var version = '3.7.2'; 41 | /** 42 | * @deprecated use lowercase `version`. 43 | */ 44 | var VERSION = version; 45 | var _hasatob = typeof atob === 'function'; 46 | var _hasbtoa = typeof btoa === 'function'; 47 | var _hasBuffer = typeof Buffer === 'function'; 48 | var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined; 49 | var _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined; 50 | var b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 51 | var b64chs = Array.prototype.slice.call(b64ch); 52 | var b64tab = (function (a) { 53 | var tab = {}; 54 | a.forEach(function (c, i) { return tab[c] = i; }); 55 | return tab; 56 | })(b64chs); 57 | var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/; 58 | var _fromCC = String.fromCharCode.bind(String); 59 | var _U8Afrom = typeof Uint8Array.from === 'function' 60 | ? Uint8Array.from.bind(Uint8Array) 61 | : function (it, fn) { 62 | if (fn === void 0) { fn = function (x) { return x; }; } 63 | return new Uint8Array(Array.prototype.slice.call(it, 0).map(fn)); 64 | }; 65 | var _mkUriSafe = function (src) { return src 66 | .replace(/=/g, '').replace(/[+\/]/g, function (m0) { return m0 == '+' ? '-' : '_'; }); }; 67 | var _tidyB64 = function (s) { return s.replace(/[^A-Za-z0-9\+\/]/g, ''); }; 68 | /** 69 | * polyfill version of `btoa` 70 | */ 71 | var btoaPolyfill = function (bin) { 72 | // console.log('polyfilled'); 73 | var u32, c0, c1, c2, asc = ''; 74 | var pad = bin.length % 3; 75 | for (var i = 0; i < bin.length;) { 76 | if ((c0 = bin.charCodeAt(i++)) > 255 || 77 | (c1 = bin.charCodeAt(i++)) > 255 || 78 | (c2 = bin.charCodeAt(i++)) > 255) 79 | throw new TypeError('invalid character found'); 80 | u32 = (c0 << 16) | (c1 << 8) | c2; 81 | asc += b64chs[u32 >> 18 & 63] 82 | + b64chs[u32 >> 12 & 63] 83 | + b64chs[u32 >> 6 & 63] 84 | + b64chs[u32 & 63]; 85 | } 86 | return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc; 87 | }; 88 | /** 89 | * does what `window.btoa` of admin browsers do. 90 | * @param {String} bin binary string 91 | * @returns {string} Base64-encoded string 92 | */ 93 | var _btoa = _hasbtoa ? function (bin) { return btoa(bin); } 94 | : _hasBuffer ? function (bin) { return Buffer.from(bin, 'binary').toString('base64'); } 95 | : btoaPolyfill; 96 | var _fromUint8Array = _hasBuffer 97 | ? function (u8a) { return Buffer.from(u8a).toString('base64'); } 98 | : function (u8a) { 99 | // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326 100 | var maxargs = 0x1000; 101 | var strs = []; 102 | for (var i = 0, l = u8a.length; i < l; i += maxargs) { 103 | strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs))); 104 | } 105 | return _btoa(strs.join('')); 106 | }; 107 | /** 108 | * converts a Uint8Array to a Base64 string. 109 | * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5 110 | * @returns {string} Base64 string 111 | */ 112 | var fromUint8Array = function (u8a, urlsafe) { 113 | if (urlsafe === void 0) { urlsafe = false; } 114 | return urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a); 115 | }; 116 | // This trick is found broken https://github.com/dankogai/js-base64/issues/130 117 | // const utob = (src: string) => unescape(encodeURIComponent(src)); 118 | // reverting good old fationed regexp 119 | var cb_utob = function (c) { 120 | if (c.length < 2) { 121 | var cc = c.charCodeAt(0); 122 | return cc < 0x80 ? c 123 | : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6)) 124 | + _fromCC(0x80 | (cc & 0x3f))) 125 | : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f)) 126 | + _fromCC(0x80 | ((cc >>> 6) & 0x3f)) 127 | + _fromCC(0x80 | (cc & 0x3f))); 128 | } 129 | else { 130 | var cc = 0x10000 131 | + (c.charCodeAt(0) - 0xD800) * 0x400 132 | + (c.charCodeAt(1) - 0xDC00); 133 | return (_fromCC(0xf0 | ((cc >>> 18) & 0x07)) 134 | + _fromCC(0x80 | ((cc >>> 12) & 0x3f)) 135 | + _fromCC(0x80 | ((cc >>> 6) & 0x3f)) 136 | + _fromCC(0x80 | (cc & 0x3f))); 137 | } 138 | }; 139 | var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; 140 | /** 141 | * @deprecated should have been internal use only. 142 | * @param {string} src UTF-8 string 143 | * @returns {string} UTF-16 string 144 | */ 145 | var utob = function (u) { return u.replace(re_utob, cb_utob); }; 146 | // 147 | var _encode = _hasBuffer 148 | ? function (s) { return Buffer.from(s, 'utf8').toString('base64'); } 149 | : _TE 150 | ? function (s) { return _fromUint8Array(_TE.encode(s)); } 151 | : function (s) { return _btoa(utob(s)); }; 152 | /** 153 | * converts a UTF-8-encoded string to a Base64 string. 154 | * @param {boolean} [urlsafe] if `true` make the result URL-safe 155 | * @returns {string} Base64 string 156 | */ 157 | var encode = function (src, urlsafe) { 158 | if (urlsafe === void 0) { urlsafe = false; } 159 | return urlsafe 160 | ? _mkUriSafe(_encode(src)) 161 | : _encode(src); 162 | }; 163 | /** 164 | * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5. 165 | * @returns {string} Base64 string 166 | */ 167 | var encodeURI = function (src) { return encode(src, true); }; 168 | // This trick is found broken https://github.com/dankogai/js-base64/issues/130 169 | // const btou = (src: string) => decodeURIComponent(escape(src)); 170 | // reverting good old fationed regexp 171 | var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g; 172 | var cb_btou = function (cccc) { 173 | switch (cccc.length) { 174 | case 4: 175 | var cp = ((0x07 & cccc.charCodeAt(0)) << 18) 176 | | ((0x3f & cccc.charCodeAt(1)) << 12) 177 | | ((0x3f & cccc.charCodeAt(2)) << 6) 178 | | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000; 179 | return (_fromCC((offset >>> 10) + 0xD800) 180 | + _fromCC((offset & 0x3FF) + 0xDC00)); 181 | case 3: 182 | return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12) 183 | | ((0x3f & cccc.charCodeAt(1)) << 6) 184 | | (0x3f & cccc.charCodeAt(2))); 185 | default: 186 | return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6) 187 | | (0x3f & cccc.charCodeAt(1))); 188 | } 189 | }; 190 | /** 191 | * @deprecated should have been internal use only. 192 | * @param {string} src UTF-16 string 193 | * @returns {string} UTF-8 string 194 | */ 195 | var btou = function (b) { return b.replace(re_btou, cb_btou); }; 196 | /** 197 | * polyfill version of `atob` 198 | */ 199 | var atobPolyfill = function (asc) { 200 | // console.log('polyfilled'); 201 | asc = asc.replace(/\s+/g, ''); 202 | if (!b64re.test(asc)) 203 | throw new TypeError('malformed base64.'); 204 | asc += '=='.slice(2 - (asc.length & 3)); 205 | var u24, bin = '', r1, r2; 206 | for (var i = 0; i < asc.length;) { 207 | u24 = b64tab[asc.charAt(i++)] << 18 208 | | b64tab[asc.charAt(i++)] << 12 209 | | (r1 = b64tab[asc.charAt(i++)]) << 6 210 | | (r2 = b64tab[asc.charAt(i++)]); 211 | bin += r1 === 64 ? _fromCC(u24 >> 16 & 255) 212 | : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) 213 | : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255); 214 | } 215 | return bin; 216 | }; 217 | /** 218 | * does what `window.atob` of admin browsers do. 219 | * @param {String} asc Base64-encoded string 220 | * @returns {string} binary string 221 | */ 222 | var _atob = _hasatob ? function (asc) { return atob(_tidyB64(asc)); } 223 | : _hasBuffer ? function (asc) { return Buffer.from(asc, 'base64').toString('binary'); } 224 | : atobPolyfill; 225 | // 226 | var _toUint8Array = _hasBuffer 227 | ? function (a) { return _U8Afrom(Buffer.from(a, 'base64')); } 228 | : function (a) { return _U8Afrom(_atob(a), function (c) { return c.charCodeAt(0); }); }; 229 | /** 230 | * converts a Base64 string to a Uint8Array. 231 | */ 232 | var toUint8Array = function (a) { return _toUint8Array(_unURI(a)); }; 233 | // 234 | var _decode = _hasBuffer 235 | ? function (a) { return Buffer.from(a, 'base64').toString('utf8'); } 236 | : _TD 237 | ? function (a) { return _TD.decode(_toUint8Array(a)); } 238 | : function (a) { return btou(_atob(a)); }; 239 | var _unURI = function (a) { return _tidyB64(a.replace(/[-_]/g, function (m0) { return m0 == '-' ? '+' : '/'; })); }; 240 | /** 241 | * converts a Base64 string to a UTF-8 string. 242 | * @param {String} src Base64 string. Both normal and URL-safe are supported 243 | * @returns {string} UTF-8 string 244 | */ 245 | var decode = function (src) { return _decode(_unURI(src)); }; 246 | /** 247 | * check if a value is a valid Base64 string 248 | * @param {String} src a value to check 249 | */ 250 | var isValid = function (src) { 251 | if (typeof src !== 'string') 252 | return false; 253 | var s = src.replace(/\s+/g, '').replace(/={0,2}$/, ''); 254 | return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s); 255 | }; 256 | // 257 | var _noEnum = function (v) { 258 | return { 259 | value: v, enumerable: false, writable: true, configurable: true 260 | }; 261 | }; 262 | /** 263 | * extend String.prototype with relevant methods 264 | */ 265 | var extendString = function () { 266 | var _add = function (name, body) { return Object.defineProperty(String.prototype, name, _noEnum(body)); }; 267 | _add('fromBase64', function () { return decode(this); }); 268 | _add('toBase64', function (urlsafe) { return encode(this, urlsafe); }); 269 | _add('toBase64URI', function () { return encode(this, true); }); 270 | _add('toBase64URL', function () { return encode(this, true); }); 271 | _add('toUint8Array', function () { return toUint8Array(this); }); 272 | }; 273 | /** 274 | * extend Uint8Array.prototype with relevant methods 275 | */ 276 | var extendUint8Array = function () { 277 | var _add = function (name, body) { return Object.defineProperty(Uint8Array.prototype, name, _noEnum(body)); }; 278 | _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); }); 279 | _add('toBase64URI', function () { return fromUint8Array(this, true); }); 280 | _add('toBase64URL', function () { return fromUint8Array(this, true); }); 281 | }; 282 | /** 283 | * extend Builtin prototypes with relevant methods 284 | */ 285 | var extendBuiltins = function () { 286 | extendString(); 287 | extendUint8Array(); 288 | }; 289 | var gBase64 = { 290 | version: version, 291 | VERSION: VERSION, 292 | atob: _atob, 293 | atobPolyfill: atobPolyfill, 294 | btoa: _btoa, 295 | btoaPolyfill: btoaPolyfill, 296 | fromBase64: decode, 297 | toBase64: encode, 298 | encode: encode, 299 | encodeURI: encodeURI, 300 | encodeURL: encodeURI, 301 | utob: utob, 302 | btou: btou, 303 | decode: decode, 304 | isValid: isValid, 305 | fromUint8Array: fromUint8Array, 306 | toUint8Array: toUint8Array, 307 | extendString: extendString, 308 | extendUint8Array: extendUint8Array, 309 | extendBuiltins: extendBuiltins 310 | }; 311 | // 312 | // export Base64 to the namespace 313 | // 314 | // ES5 is yet to have Object.assign() that may make transpilers unhappy. 315 | // gBase64.Base64 = Object.assign({}, gBase64); 316 | gBase64.Base64 = {}; 317 | Object.keys(gBase64).forEach(function (k) { return gBase64.Base64[k] = gBase64[k]; }); 318 | return gBase64; 319 | })); 320 | -------------------------------------------------------------------------------- /assets/js/theme/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/js/theme/default/icon-ext.png -------------------------------------------------------------------------------- /assets/js/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/js/theme/default/icon.png -------------------------------------------------------------------------------- /assets/js/theme/default/layer.css: -------------------------------------------------------------------------------- 1 | .layui-layer-imgbar, .layui-layer-imgtit a, .layui-layer-tab .layui-layer-title span, .layui-layer-title { 2 | text-overflow: ellipsis; 3 | white-space: nowrap 4 | } 5 | 6 | html #layuicss-layer { 7 | display: none; 8 | position: absolute; 9 | width: 1989px 10 | } 11 | 12 | .layui-layer, .layui-layer-shade { 13 | position: fixed; 14 | _position: absolute; 15 | pointer-events: auto 16 | } 17 | 18 | .layui-layer-shade { 19 | top: 0; 20 | left: 0; 21 | width: 100%; 22 | height: 100%; 23 | _height: expression(document.body.offsetHeight+"px") 24 | } 25 | 26 | .layui-layer { 27 | -webkit-overflow-scrolling: touch; 28 | top: 150px; 29 | left: 0; 30 | margin: 0; 31 | padding: 0; 32 | background-color: #fff; 33 | -webkit-background-clip: content; 34 | border-radius: 8px; 35 | box-shadow: 1px 1px 50px rgba(0, 0, 0, .3) 36 | } 37 | 38 | .layui-layer-close { 39 | position: absolute 40 | } 41 | 42 | .layui-layer-content { 43 | position: relative 44 | } 45 | 46 | .layui-layer-border { 47 | border: 1px solid #B2B2B2; 48 | border: 1px solid rgba(0, 0, 0, .1); 49 | box-shadow: 1px 1px 5px rgba(0, 0, 0, .2) 50 | } 51 | 52 | .layui-layer-load { 53 | background: url(loading-1.gif) center center no-repeat #eee 54 | } 55 | 56 | .layui-layer-ico { 57 | background: url(icon.png) no-repeat 58 | } 59 | 60 | .layui-layer-btn a, .layui-layer-dialog .layui-layer-ico, .layui-layer-setwin a { 61 | display: inline-block; 62 | *display: inline; 63 | *zoom: 1; 64 | vertical-align: top 65 | } 66 | 67 | .layui-layer-move { 68 | display: none; 69 | position: fixed; 70 | *position: absolute; 71 | left: 0; 72 | top: 0; 73 | width: 100%; 74 | height: 100%; 75 | cursor: move; 76 | opacity: 0; 77 | filter: alpha(opacity=0); 78 | background-color: #fff; 79 | z-index: 2147483647 80 | } 81 | 82 | .layui-layer-resize { 83 | position: absolute; 84 | width: 15px; 85 | height: 15px; 86 | right: 0; 87 | bottom: 0; 88 | cursor: se-resize 89 | } 90 | 91 | .layer-anim { 92 | -webkit-animation-fill-mode: both; 93 | animation-fill-mode: both; 94 | -webkit-animation-duration: .3s; 95 | animation-duration: .3s 96 | } 97 | 98 | @-webkit-keyframes layer-bounceIn { 99 | 0% { 100 | opacity: 0; 101 | -webkit-transform: scale(.5); 102 | transform: scale(.5) 103 | } 104 | 100% { 105 | opacity: 1; 106 | -webkit-transform: scale(1); 107 | transform: scale(1) 108 | } 109 | } 110 | 111 | @keyframes layer-bounceIn { 112 | 0% { 113 | opacity: 0; 114 | -webkit-transform: scale(.5); 115 | -ms-transform: scale(.5); 116 | transform: scale(.5) 117 | } 118 | 100% { 119 | opacity: 1; 120 | -webkit-transform: scale(1); 121 | -ms-transform: scale(1); 122 | transform: scale(1) 123 | } 124 | } 125 | 126 | .layer-anim-00 { 127 | -webkit-animation-name: layer-bounceIn; 128 | animation-name: layer-bounceIn 129 | } 130 | 131 | @-webkit-keyframes layer-zoomInDown { 132 | 0% { 133 | opacity: 0; 134 | -webkit-transform: scale(.1) translateY(-2000px); 135 | transform: scale(.1) translateY(-2000px); 136 | -webkit-animation-timing-function: ease-in-out; 137 | animation-timing-function: ease-in-out 138 | } 139 | 60% { 140 | opacity: 1; 141 | -webkit-transform: scale(.475) translateY(60px); 142 | transform: scale(.475) translateY(60px); 143 | -webkit-animation-timing-function: ease-out; 144 | animation-timing-function: ease-out 145 | } 146 | } 147 | 148 | @keyframes layer-zoomInDown { 149 | 0% { 150 | opacity: 0; 151 | -webkit-transform: scale(.1) translateY(-2000px); 152 | -ms-transform: scale(.1) translateY(-2000px); 153 | transform: scale(.1) translateY(-2000px); 154 | -webkit-animation-timing-function: ease-in-out; 155 | animation-timing-function: ease-in-out 156 | } 157 | 60% { 158 | opacity: 1; 159 | -webkit-transform: scale(.475) translateY(60px); 160 | -ms-transform: scale(.475) translateY(60px); 161 | transform: scale(.475) translateY(60px); 162 | -webkit-animation-timing-function: ease-out; 163 | animation-timing-function: ease-out 164 | } 165 | } 166 | 167 | .layer-anim-01 { 168 | -webkit-animation-name: layer-zoomInDown; 169 | animation-name: layer-zoomInDown 170 | } 171 | 172 | @-webkit-keyframes layer-fadeInUpBig { 173 | 0% { 174 | opacity: 0; 175 | -webkit-transform: translateY(2000px); 176 | transform: translateY(2000px) 177 | } 178 | 100% { 179 | opacity: 1; 180 | -webkit-transform: translateY(0); 181 | transform: translateY(0) 182 | } 183 | } 184 | 185 | @keyframes layer-fadeInUpBig { 186 | 0% { 187 | opacity: 0; 188 | -webkit-transform: translateY(2000px); 189 | -ms-transform: translateY(2000px); 190 | transform: translateY(2000px) 191 | } 192 | 100% { 193 | opacity: 1; 194 | -webkit-transform: translateY(0); 195 | -ms-transform: translateY(0); 196 | transform: translateY(0) 197 | } 198 | } 199 | 200 | .layer-anim-02 { 201 | -webkit-animation-name: layer-fadeInUpBig; 202 | animation-name: layer-fadeInUpBig 203 | } 204 | 205 | @-webkit-keyframes layer-zoomInLeft { 206 | 0% { 207 | opacity: 0; 208 | -webkit-transform: scale(.1) translateX(-2000px); 209 | transform: scale(.1) translateX(-2000px); 210 | -webkit-animation-timing-function: ease-in-out; 211 | animation-timing-function: ease-in-out 212 | } 213 | 60% { 214 | opacity: 1; 215 | -webkit-transform: scale(.475) translateX(48px); 216 | transform: scale(.475) translateX(48px); 217 | -webkit-animation-timing-function: ease-out; 218 | animation-timing-function: ease-out 219 | } 220 | } 221 | 222 | @keyframes layer-zoomInLeft { 223 | 0% { 224 | opacity: 0; 225 | -webkit-transform: scale(.1) translateX(-2000px); 226 | -ms-transform: scale(.1) translateX(-2000px); 227 | transform: scale(.1) translateX(-2000px); 228 | -webkit-animation-timing-function: ease-in-out; 229 | animation-timing-function: ease-in-out 230 | } 231 | 60% { 232 | opacity: 1; 233 | -webkit-transform: scale(.475) translateX(48px); 234 | -ms-transform: scale(.475) translateX(48px); 235 | transform: scale(.475) translateX(48px); 236 | -webkit-animation-timing-function: ease-out; 237 | animation-timing-function: ease-out 238 | } 239 | } 240 | 241 | .layer-anim-03 { 242 | -webkit-animation-name: layer-zoomInLeft; 243 | animation-name: layer-zoomInLeft 244 | } 245 | 246 | @-webkit-keyframes layer-rollIn { 247 | 0% { 248 | opacity: 0; 249 | -webkit-transform: translateX(-100%) rotate(-120deg); 250 | transform: translateX(-100%) rotate(-120deg) 251 | } 252 | 100% { 253 | opacity: 1; 254 | -webkit-transform: translateX(0) rotate(0); 255 | transform: translateX(0) rotate(0) 256 | } 257 | } 258 | 259 | @keyframes layer-rollIn { 260 | 0% { 261 | opacity: 0; 262 | -webkit-transform: translateX(-100%) rotate(-120deg); 263 | -ms-transform: translateX(-100%) rotate(-120deg); 264 | transform: translateX(-100%) rotate(-120deg) 265 | } 266 | 100% { 267 | opacity: 1; 268 | -webkit-transform: translateX(0) rotate(0); 269 | -ms-transform: translateX(0) rotate(0); 270 | transform: translateX(0) rotate(0) 271 | } 272 | } 273 | 274 | .layer-anim-04 { 275 | -webkit-animation-name: layer-rollIn; 276 | animation-name: layer-rollIn 277 | } 278 | 279 | @keyframes layer-fadeIn { 280 | 0% { 281 | opacity: 0 282 | } 283 | 100% { 284 | opacity: 1 285 | } 286 | } 287 | 288 | .layer-anim-05 { 289 | -webkit-animation-name: layer-fadeIn; 290 | animation-name: layer-fadeIn 291 | } 292 | 293 | @-webkit-keyframes layer-shake { 294 | 0%, 100% { 295 | -webkit-transform: translateX(0); 296 | transform: translateX(0) 297 | } 298 | 10%, 30%, 50%, 70%, 90% { 299 | -webkit-transform: translateX(-10px); 300 | transform: translateX(-10px) 301 | } 302 | 20%, 40%, 60%, 80% { 303 | -webkit-transform: translateX(10px); 304 | transform: translateX(10px) 305 | } 306 | } 307 | 308 | @keyframes layer-shake { 309 | 0%, 100% { 310 | -webkit-transform: translateX(0); 311 | -ms-transform: translateX(0); 312 | transform: translateX(0) 313 | } 314 | 10%, 30%, 50%, 70%, 90% { 315 | -webkit-transform: translateX(-10px); 316 | -ms-transform: translateX(-10px); 317 | transform: translateX(-10px) 318 | } 319 | 20%, 40%, 60%, 80% { 320 | -webkit-transform: translateX(10px); 321 | -ms-transform: translateX(10px); 322 | transform: translateX(10px) 323 | } 324 | } 325 | 326 | .layer-anim-06 { 327 | -webkit-animation-name: layer-shake; 328 | animation-name: layer-shake 329 | } 330 | 331 | @-webkit-keyframes fadeIn { 332 | 0% { 333 | opacity: 0 334 | } 335 | 100% { 336 | opacity: 1 337 | } 338 | } 339 | 340 | .layui-layer-title { 341 | padding: 0 80px 0 20px; 342 | height: 50px; 343 | line-height: 50px; 344 | border-bottom: 1px solid #F0F0F0; 345 | font-size: 14px; 346 | color: #333; 347 | overflow: hidden; 348 | border-radius: 2px 2px 0 0 349 | } 350 | 351 | .layui-layer-setwin { 352 | position: absolute; 353 | right: 15px; 354 | *right: 0; 355 | top: 17px; 356 | font-size: 0; 357 | line-height: initial 358 | } 359 | 360 | .layui-layer-setwin a { 361 | position: relative; 362 | width: 16px; 363 | height: 16px; 364 | margin-left: 10px; 365 | font-size: 12px; 366 | _overflow: hidden 367 | } 368 | 369 | .layui-layer-setwin .layui-layer-min cite { 370 | position: absolute; 371 | width: 14px; 372 | height: 2px; 373 | left: 0; 374 | top: 50%; 375 | margin-top: -1px; 376 | background-color: #2E2D3C; 377 | cursor: pointer; 378 | _overflow: hidden 379 | } 380 | 381 | .layui-layer-setwin .layui-layer-min:hover cite { 382 | background-color: #2D93CA 383 | } 384 | 385 | .layui-layer-setwin .layui-layer-max { 386 | background-position: -32px -40px 387 | } 388 | 389 | .layui-layer-setwin .layui-layer-max:hover { 390 | background-position: -16px -40px 391 | } 392 | 393 | .layui-layer-setwin .layui-layer-maxmin { 394 | background-position: -65px -40px 395 | } 396 | 397 | .layui-layer-setwin .layui-layer-maxmin:hover { 398 | background-position: -49px -40px 399 | } 400 | 401 | .layui-layer-setwin .layui-layer-close1 { 402 | background-position: 1px -40px; 403 | cursor: pointer 404 | } 405 | 406 | .layui-layer-setwin .layui-layer-close1:hover { 407 | opacity: .7 408 | } 409 | 410 | .layui-layer-setwin .layui-layer-close2 { 411 | position: absolute; 412 | right: -28px; 413 | top: -28px; 414 | width: 30px; 415 | height: 30px; 416 | margin-left: 0; 417 | background-position: -149px -31px; 418 | *right: -18px; 419 | _display: none 420 | } 421 | 422 | .layui-layer-setwin .layui-layer-close2:hover { 423 | background-position: -180px -31px 424 | } 425 | 426 | .layui-layer-btn { 427 | background: rgba(251, 253, 255, 1); 428 | border-top: 1px solid #E9E7E7; 429 | text-align: center; 430 | padding: 5px 10px 10px; 431 | pointer-events: auto; 432 | user-select: none; 433 | -webkit-user-select: none; 434 | border-bottom-left-radius: 8px; 435 | border-bottom-right-radius: 8px; 436 | } 437 | 438 | .layui-layer-btn a { 439 | font-size: 13px; 440 | height: 34px; 441 | line-height: 34px; 442 | margin: 6px 5px 0; 443 | padding: 0 25px; 444 | border-radius: 4px; 445 | border: 1px solid transparent; 446 | background-color: #C9C5C5; 447 | color: #fff; 448 | font-weight: 400; 449 | cursor: pointer; 450 | text-decoration: none; 451 | } 452 | 453 | .layui-layer-btn a:hover { 454 | opacity: .9; 455 | text-decoration: none 456 | } 457 | 458 | .layui-layer-btn a:active { 459 | opacity: .8 460 | } 461 | 462 | .layui-layer-btn .layui-layer-btn0 { 463 | background-color: #3475f5; 464 | border-radius: 4px; 465 | border: 1px solid transparent; 466 | color: #fff; 467 | } 468 | 469 | .layui-layer-btn-l { 470 | text-align: left 471 | } 472 | 473 | .layui-layer-btn-c { 474 | text-align: center 475 | } 476 | 477 | .layui-layer-dialog { 478 | min-width: 300px 479 | } 480 | 481 | .layui-layer-dialog .layui-layer-content { 482 | position: relative; 483 | padding: 20px; 484 | line-height: 24px; 485 | word-break: break-all; 486 | overflow: hidden; 487 | font-size: 14px; 488 | overflow-x: hidden; 489 | overflow-y: auto; 490 | text-align: center; 491 | } 492 | 493 | .layui-layer-dialog .layui-layer-content .layui-layer-ico { 494 | position: absolute; 495 | top: 16px; 496 | left: 15px; 497 | _left: -40px; 498 | width: 30px; 499 | height: 30px 500 | } 501 | 502 | .layui-layer-ico1 { 503 | background-position: -30px 0 504 | } 505 | 506 | .layui-layer-ico2 { 507 | background-position: -60px 0 508 | } 509 | 510 | .layui-layer-ico3 { 511 | background-position: -90px 0 512 | } 513 | 514 | .layui-layer-ico4 { 515 | background-position: -120px 0 516 | } 517 | 518 | .layui-layer-ico5 { 519 | background-position: -150px 0 520 | } 521 | 522 | .layui-layer-ico6 { 523 | background-position: -180px 0 524 | } 525 | 526 | .layui-layer-rim { 527 | border: 6px solid #8D8D8D; 528 | border: 6px solid rgba(0, 0, 0, .3); 529 | border-radius: 5px; 530 | box-shadow: none 531 | } 532 | 533 | .layui-layer-msg { 534 | min-width: 180px; 535 | border: 1px solid #D3D4D3; 536 | box-shadow: none 537 | } 538 | 539 | .layui-layer-hui { 540 | min-width: 100px; 541 | background-color: #000; 542 | filter: alpha(opacity=60); 543 | background-color: rgba(0, 0, 0, .6); 544 | color: #fff; 545 | border: none 546 | } 547 | 548 | .layui-layer-hui .layui-layer-content { 549 | padding: 12px 25px; 550 | text-align: center 551 | } 552 | 553 | .layui-layer-dialog .layui-layer-padding { 554 | padding: 20px 20px 20px 55px; 555 | text-align: left 556 | } 557 | 558 | .layui-layer-page .layui-layer-content { 559 | position: relative; 560 | overflow: auto 561 | } 562 | 563 | .layui-layer-iframe .layui-layer-btn, .layui-layer-page .layui-layer-btn { 564 | padding-top: 10px 565 | } 566 | 567 | .layui-layer-nobg { 568 | background: 0 0 569 | } 570 | 571 | .layui-layer-iframe iframe { 572 | display: block; 573 | width: 100% 574 | } 575 | 576 | .layui-layer-loading { 577 | border-radius: 100%; 578 | background: 0 0; 579 | box-shadow: none; 580 | border: none 581 | } 582 | 583 | .layui-layer-loading .layui-layer-content { 584 | width: 60px; 585 | height: 24px; 586 | background: url(loading-0.gif) no-repeat 587 | } 588 | 589 | .layui-layer-loading .layui-layer-loading1 { 590 | width: 37px; 591 | height: 37px; 592 | background: url(loading-1.gif) no-repeat 593 | } 594 | 595 | .layui-layer-ico16, .layui-layer-loading .layui-layer-loading2 { 596 | width: 32px; 597 | height: 32px; 598 | background: url(loading-2.gif) no-repeat 599 | } 600 | 601 | .layui-layer-tips { 602 | background: 0 0; 603 | box-shadow: none; 604 | border: none 605 | } 606 | 607 | .layui-layer-tips .layui-layer-content { 608 | position: relative; 609 | line-height: 22px; 610 | min-width: 12px; 611 | padding: 8px 15px; 612 | font-size: 12px; 613 | _float: left; 614 | border-radius: 2px; 615 | box-shadow: 1px 1px 3px rgba(0, 0, 0, .2); 616 | background-color: #000; 617 | color: #fff 618 | } 619 | 620 | .layui-layer-tips .layui-layer-close { 621 | right: -2px; 622 | top: -1px 623 | } 624 | 625 | .layui-layer-tips i.layui-layer-TipsG { 626 | position: absolute; 627 | width: 0; 628 | height: 0; 629 | border-width: 8px; 630 | border-color: transparent; 631 | border-style: dashed; 632 | *overflow: hidden 633 | } 634 | 635 | .layui-layer-tips i.layui-layer-TipsB, .layui-layer-tips i.layui-layer-TipsT { 636 | left: 5px; 637 | border-right-style: solid; 638 | border-right-color: #000 639 | } 640 | 641 | .layui-layer-tips i.layui-layer-TipsT { 642 | bottom: -8px 643 | } 644 | 645 | .layui-layer-tips i.layui-layer-TipsB { 646 | top: -8px 647 | } 648 | 649 | .layui-layer-tips i.layui-layer-TipsL, .layui-layer-tips i.layui-layer-TipsR { 650 | top: 5px; 651 | border-bottom-style: solid; 652 | border-bottom-color: #000 653 | } 654 | 655 | .layui-layer-tips i.layui-layer-TipsR { 656 | left: -8px 657 | } 658 | 659 | .layui-layer-tips i.layui-layer-TipsL { 660 | right: -8px 661 | } 662 | 663 | .layui-layer-lan[type=dialog] { 664 | min-width: 280px 665 | } 666 | 667 | .layui-layer-lan .layui-layer-title { 668 | background: #4476A7; 669 | color: #fff; 670 | border: none 671 | } 672 | 673 | .layui-layer-lan .layui-layer-btn { 674 | padding: 5px 10px 10px; 675 | text-align: right; 676 | border-top: 1px solid #E9E7E7 677 | } 678 | 679 | .layui-layer-lan .layui-layer-btn a { 680 | background: #fff; 681 | border-color: #E9E7E7; 682 | color: #333 683 | } 684 | 685 | .layui-layer-lan .layui-layer-btn .layui-layer-btn1 { 686 | background: #C9C5C5 687 | } 688 | 689 | .layui-layer-molv .layui-layer-title { 690 | background: #009f95; 691 | color: #fff; 692 | border: none 693 | } 694 | 695 | .layui-layer-molv .layui-layer-btn a { 696 | background: #009f95; 697 | border-color: #009f95 698 | } 699 | 700 | .layui-layer-molv .layui-layer-btn .layui-layer-btn1 { 701 | background: #92B8B1 702 | } 703 | 704 | .layui-layer-iconext { 705 | background: url(icon-ext.png) no-repeat 706 | } 707 | 708 | .layui-layer-prompt .layui-layer-input { 709 | display: block; 710 | width: 260px; 711 | height: 36px; 712 | margin: 0 auto; 713 | line-height: 30px; 714 | padding-left: 10px; 715 | border: 1px solid #e6e6e6; 716 | color: #333 717 | } 718 | 719 | .layui-layer-prompt textarea.layui-layer-input { 720 | width: 300px; 721 | height: 100px; 722 | line-height: 20px; 723 | padding: 6px 10px 724 | } 725 | 726 | .layui-layer-prompt .layui-layer-content { 727 | padding: 20px 728 | } 729 | 730 | .layui-layer-prompt .layui-layer-btn { 731 | padding-top: 0 732 | } 733 | 734 | .layui-layer-tab { 735 | box-shadow: 1px 1px 50px rgba(0, 0, 0, .4) 736 | } 737 | 738 | .layui-layer-tab .layui-layer-title { 739 | padding-left: 0; 740 | overflow: visible 741 | } 742 | 743 | .layui-layer-tab .layui-layer-title span { 744 | position: relative; 745 | float: left; 746 | min-width: 80px; 747 | max-width: 300px; 748 | padding: 0 20px; 749 | text-align: center; 750 | overflow: hidden; 751 | cursor: pointer 752 | } 753 | 754 | .layui-layer-tab .layui-layer-title span.layui-this { 755 | height: 51px; 756 | border-left: 1px solid #eee; 757 | border-right: 1px solid #eee; 758 | background-color: #fff; 759 | z-index: 10 760 | } 761 | 762 | .layui-layer-tab .layui-layer-title span:first-child { 763 | border-left: none 764 | } 765 | 766 | .layui-layer-tabmain { 767 | line-height: 24px; 768 | clear: both 769 | } 770 | 771 | .layui-layer-tabmain .layui-layer-tabli { 772 | display: none 773 | } 774 | 775 | .layui-layer-tabmain .layui-layer-tabli.layui-this { 776 | display: block 777 | } 778 | 779 | .layui-layer-photos { 780 | background: 0 0; 781 | box-shadow: none 782 | } 783 | 784 | .layui-layer-photos .layui-layer-content { 785 | overflow: hidden; 786 | text-align: center 787 | } 788 | 789 | .layui-layer-photos .layui-layer-phimg img { 790 | position: relative; 791 | width: 100%; 792 | display: inline-block; 793 | *display: inline; 794 | *zoom: 1; 795 | vertical-align: top 796 | } 797 | 798 | .layui-layer-imgnext, .layui-layer-imgprev { 799 | position: fixed; 800 | top: 50%; 801 | width: 27px; 802 | _width: 44px; 803 | height: 44px; 804 | margin-top: -22px; 805 | outline: 0; 806 | blr: expression(this.onFocus=this.blur()) 807 | } 808 | 809 | .layui-layer-imgprev { 810 | left: 30px; 811 | background-position: -5px -5px; 812 | _background-position: -70px -5px 813 | } 814 | 815 | .layui-layer-imgprev:hover { 816 | background-position: -33px -5px; 817 | _background-position: -120px -5px 818 | } 819 | 820 | .layui-layer-imgnext { 821 | right: 30px; 822 | _right: 8px; 823 | background-position: -5px -50px; 824 | _background-position: -70px -50px 825 | } 826 | 827 | .layui-layer-imgnext:hover { 828 | background-position: -33px -50px; 829 | _background-position: -120px -50px 830 | } 831 | 832 | .layui-layer-imgbar { 833 | position: fixed; 834 | left: 0; 835 | right: 0; 836 | bottom: 0; 837 | width: 100%; 838 | height: 40px; 839 | line-height: 40px; 840 | background-color: #000 \9; 841 | filter: Alpha(opacity=60); 842 | background-color: rgba(2, 0, 0, .35); 843 | color: #fff; 844 | overflow: hidden; 845 | font-size: 0 846 | } 847 | 848 | .layui-layer-imgtit * { 849 | display: inline-block; 850 | *display: inline; 851 | *zoom: 1; 852 | vertical-align: top; 853 | font-size: 12px 854 | } 855 | 856 | .layui-layer-imgtit a { 857 | max-width: 65%; 858 | overflow: hidden; 859 | color: #fff 860 | } 861 | 862 | .layui-layer-imgtit a:hover { 863 | color: #fff; 864 | text-decoration: underline 865 | } 866 | 867 | .layui-layer-imgtit em { 868 | padding-left: 10px; 869 | font-style: normal 870 | } 871 | 872 | @-webkit-keyframes layer-bounceOut { 873 | 100% { 874 | opacity: 0; 875 | -webkit-transform: scale(.7); 876 | transform: scale(.7) 877 | } 878 | 30% { 879 | -webkit-transform: scale(1.05); 880 | transform: scale(1.05) 881 | } 882 | 0% { 883 | -webkit-transform: scale(1); 884 | transform: scale(1) 885 | } 886 | } 887 | 888 | @keyframes layer-bounceOut { 889 | 100% { 890 | opacity: 0; 891 | -webkit-transform: scale(.7); 892 | -ms-transform: scale(.7); 893 | transform: scale(.7) 894 | } 895 | 30% { 896 | -webkit-transform: scale(1.05); 897 | -ms-transform: scale(1.05); 898 | transform: scale(1.05) 899 | } 900 | 0% { 901 | -webkit-transform: scale(1); 902 | -ms-transform: scale(1); 903 | transform: scale(1) 904 | } 905 | } 906 | 907 | .layer-anim-close { 908 | -webkit-animation-name: layer-bounceOut; 909 | animation-name: layer-bounceOut; 910 | -webkit-animation-fill-mode: both; 911 | animation-fill-mode: both; 912 | -webkit-animation-duration: .2s; 913 | animation-duration: .2s 914 | } 915 | 916 | @media screen and (max-width: 1100px) { 917 | .layui-layer-iframe { 918 | overflow-y: auto; 919 | -webkit-overflow-scrolling: touch 920 | } 921 | } -------------------------------------------------------------------------------- /assets/js/theme/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/js/theme/default/loading-0.gif -------------------------------------------------------------------------------- /assets/js/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/js/theme/default/loading-1.gif -------------------------------------------------------------------------------- /assets/js/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/assets/js/theme/default/loading-2.gif -------------------------------------------------------------------------------- /config/config.sql: -------------------------------------------------------------------------------- 1 | -- 网站设置 2 | DROP TABLE IF EXISTS `webset`; 3 | CREATE TABLE `webset` 4 | ( 5 | `web_title` text not null comment '网站标题', 6 | `web_titleDesc` text not null comment '标题描述', 7 | `web_des` text not null comment '网站描述', 8 | `web_key` text not null comment '网站关键词', 9 | `web_qq` varchar(12) not null comment 'QQ号', 10 | `web_beian` text not null comment '网站备案号', 11 | `web_ban` text not null comment '网站底部版权', 12 | `web_page_nums` int default '10' comment '每页条数' 13 | ) ENGINE = INNODB 14 | DEFAULT CHARSET = utf8; 15 | INSERT INTO webset (web_title, web_titleDesc, web_des, web_key, web_qq, web_beian, web_ban, web_page_nums) 16 | VALUES ('CloudZA-API', '一款开源的API系统', 'CloudZA-API, 我们致力于为用户提供稳定、快速的免费API数据接口服务。', 17 | 'API,云之安,API内容管理,免费API', '2922619853', '京ICP备8888888号', '云之安', 10); 18 | 19 | -- 管理员账号密码设置 20 | DROP TABLE IF EXISTS `admin`; 21 | CREATE TABLE `admin` 22 | ( 23 | `user` varchar(32) not null comment '管理员账号', 24 | `password` varchar(32) not null comment '管理员密码', 25 | `cookie` varchar(32) not null comment 'Cookie' 26 | ) ENGINE = INNODB 27 | DEFAULT CHARSET = utf8; 28 | INSERT INTO admin (user, password, cookie) 29 | VALUES ('admin', '123456', '5844a8e587c353ce2dfbca3def069981'); 30 | 31 | -- 操作日志 32 | DROP TABLE IF EXISTS `web_log`; 33 | CREATE TABLE `web_log` 34 | ( 35 | `id` int primary key auto_increment comment '主键', 36 | `ip` varchar(32) not null comment 'ip', 37 | `time` datetime not null comment '时间', 38 | `event` text not null comment '事件', 39 | `detailed` text not null comment '地址' 40 | ) ENGINE = INNODB 41 | DEFAULT CHARSET = utf8; 42 | 43 | -- API接口列表 44 | DROP TABLE IF EXISTS `api_list`; 45 | CREATE TABLE `api_list` 46 | ( 47 | `id` int(10) NOT NULL auto_increment comment '主键', 48 | `name` text comment '名称', 49 | `api_url` text comment '接口地址', 50 | `des` text comment '描述', 51 | `http_mode` text comment '请求方法', 52 | `http_case` text comment '请求示例', 53 | `return_format` text comment '返回格式', 54 | `http_param` text comment '请求参数', 55 | `return_param` text comment '返回参数', 56 | `return_case` text comment '返回示例', 57 | `code_case` text comment '代码示例', 58 | `sign` varchar(255) not null comment 'API标识', 59 | `type` varchar(12) not null comment '类型', 60 | `state` enum ('on','off') comment 'API状态', 61 | `pv` int(10) not null default '0' comment '浏览量', 62 | `add_time` datetime not null comment '添加时间', 63 | primary key (`sign`), 64 | KEY `id` (`id`) 65 | ) ENGINE = INNODB 66 | DEFAULT CHARSET = utf8; 67 | 68 | -- API调用统计 69 | DROP TABLE IF EXISTS `api_count`; 70 | CREATE TABLE `api_count` 71 | ( 72 | `id` int primary key auto_increment comment '主键', 73 | `name` text not null comment 'API名称', 74 | `ip` varchar(32) not null comment 'IP', 75 | `address` varchar(32) not null comment '地址', 76 | `datetime` datetime not null comment '时间', 77 | `sign` varchar(255) NOT NULL COMMENT 'API_ID', 78 | FOREIGN KEY (sign) 79 | REFERENCES api_list (sign) 80 | ON DELETE CASCADE 81 | 82 | ) ENGINE = INNODB 83 | DEFAULT CHARSET = utf8; 84 | 85 | -- API黑名单 86 | DROP TABLE IF EXISTS `blacklist`; 87 | CREATE TABLE `blacklist` 88 | ( 89 | `id` int primary key auto_increment comment '主键', 90 | `api_id` int not null comment 'API_ID', 91 | `ip` varchar(32) not null comment 'IP', 92 | `date` datetime not null comment '时间' 93 | ) ENGINE = INNODB 94 | DEFAULT CHARSET = utf8; 95 | -------------------------------------------------------------------------------- /donation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iCloudZA/CloudZA_API/77e331dee1ed68e8da59e71544159e36eec60b89/donation.png -------------------------------------------------------------------------------- /extend/adm/admin/api/admin.php: -------------------------------------------------------------------------------- 1 | update($data)){ 18 | writeLog('edit_admin'); 19 | echo ReturnSuccess('修改成功,即将重新登录'); 20 | } else { 21 | echo ReturnError('修改失败'); 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /extend/adm/admin/view/edit.php: -------------------------------------------------------------------------------- 1 | find(); 12 | ?> 13 | 14 |
15 |
16 |
17 |
18 |

修改密码

19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 31 | 32 |
33 |
34 | 36 | 37 |
38 |
39 | 41 | 42 |
43 |
44 |
45 |
46 | 47 | 48 |
49 |
50 |
51 | 54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 |
63 | 64 | -------------------------------------------------------------------------------- /extend/adm/control/api/control.php: -------------------------------------------------------------------------------- 1 | where('sign' , $data[ 'sign' ])->find()) exit(ReturnError('【' . $data[ 'sign' ] . '】' . '已存在,请更换')); 29 | if (Db::table('api_list')->add($data)) { 30 | writeLog('add_api'); 31 | exit(ReturnSuccess('添加成功')); 32 | } else { 33 | exit(ReturnError('添加失败')); 34 | } 35 | } 36 | //修改API 37 | if ($act === 'edit') { 38 | $id = isset($_POST[ 'id' ]) && !empty($_POST[ 'id' ]) ? purge($_POST[ 'id' ]) : ''; // id 39 | $data[ 'name' ] = isset($_POST[ 'name' ]) && !empty($_POST[ 'name' ]) ? purge($_POST[ 'name' ]) : ''; // 接口名字 40 | $data[ 'type' ] = isset($_POST[ 'type' ]) && !empty($_POST[ 'type' ]) ? purge($_POST[ 'type' ]) : ''; // 接口类型 41 | $data[ 'api_url' ] = isset($_POST[ 'api_url' ]) && !empty($_POST[ 'api_url' ]) ? purge($_POST[ 'api_url' ]) : ''; // 接口地址 42 | $data[ 'des' ] = isset($_POST[ 'des' ]) && !empty($_POST[ 'des' ]) ? purge($_POST[ 'des' ]) : ''; // 接口介绍 43 | $data[ 'http_mode' ] = isset($_POST[ 'http_mode' ]) && !empty($_POST[ 'http_mode' ]) ? purge($_POST[ 'http_mode' ]) : ''; // 接口请求方法 44 | $data[ 'return_format' ] = isset($_POST[ 'return_format' ]) && !empty($_POST[ 'return_format' ]) ? purge($_POST[ 'return_format' ]) : ''; // 接口返回格式 45 | $data[ 'http_case' ] = isset($_POST[ 'http_case' ]) && !empty($_POST[ 'http_case' ]) ? purge($_POST[ 'http_case' ]) : ''; // 接口请求示例 46 | $data['http_param'] = isset($_POST[ 'http_param' ]) && !empty($_POST[ 'http_param' ]) ? $_POST[ 'http_param' ] : ''; // 接口请求参数 47 | $data['return_param'] = isset($_POST[ 'return_param' ]) && !empty($_POST[ 'return_param' ]) ? $_POST[ 'return_param' ] : ''; // 接口返回参数 48 | $data[ 'return_case' ] = isset($_POST[ 'return_case' ]) && !empty($_POST[ 'return_case' ]) ? $_POST[ 'return_case' ] : ''; // 接口返回示例 49 | $data[ 'code_case' ] = isset($_POST[ 'code_case' ]) && !empty($_POST[ 'code_case' ]) ? $_POST[ 'code_case' ] : ''; // 接口代码示例 50 | $data[ 'state' ] = isset($_POST[ 'state' ]) && !empty($_POST[ 'state' ]) ? $_POST[ 'state' ] : ''; // 接口状态 51 | if ($data[ 'type' ] == 'local') { 52 | $data[ 'sign' ] = $data[ 'api_url' ]; 53 | // $data['api_url'] = WEB_URL.APIURI.$data['api_url']; 54 | // $data[ 'http_case' ] = WEB_URL.APIURI.$data[ 'http_case' ]; 55 | } else if ($data[ 'type' ] == 'external') { 56 | // $data['sign'] = 'api-' . getRand(4); 57 | } else { 58 | exit(ReturnError('Form error!')); 59 | } 60 | if ( !f($data)) exit(ReturnError('数据不完整')); 61 | $table = Db::table('api_list'); 62 | $origData = $table->where('id' , $id)->find(); 63 | // 对比原始数据 64 | if (array_diff($origData , (array)$data) && array_diff((array)$data , $origData)) { 65 | if ($table->where('id' , $id)->update($data)) { 66 | writeLog('edit_api'); 67 | exit(ReturnSuccess('更新成功')); 68 | } else { 69 | exit(ReturnError('更新失败')); 70 | } 71 | } else { 72 | exit(ReturnError('你没有修改任何内容!')); 73 | } 74 | } 75 | // 删除选中 76 | if ($act === 'delSelect') { 77 | $id = $_POST[ 'id' ] ?? ''; 78 | if ($id) { 79 | $ids = ''; 80 | foreach ($id as $value) { 81 | $ids .= intval($value) . ","; 82 | } 83 | $ids = rtrim($ids , ","); 84 | $res = Db::table('api_list')->where('id' , 'in' , '(' . $ids . ')')->del(); 85 | if ($res) { 86 | writeLog('dels_api'); 87 | exit(ReturnSuccess('删除成功')); 88 | } else { 89 | exit(ReturnError('删除失败')); 90 | } 91 | } else { 92 | exit(ReturnError('没有需要删除的数据')); 93 | } 94 | } 95 | // 删除按钮 96 | if ($act === 'delapi') { 97 | $id = isset($_POST[ 'id' ]) && !empty($_POST[ 'id' ]) ? purge($_POST[ 'id' ]) : ''; 98 | if (Db::table('api_list')->where('id' , $id)->del()) { 99 | writeLog('del_api'); 100 | exit(ReturnSuccess('删除成功')); 101 | } else { 102 | exit(ReturnError('删除失败')); 103 | } 104 | 105 | } 106 | /** 107 | * 判断数组是否完整 108 | * @param $arr 109 | * @return bool 110 | */ 111 | function f ($arr): bool 112 | { 113 | $len1 = count($arr); 114 | $newarr = array_filter($arr); 115 | $len2 = count($newarr); 116 | if ($len1 === $len2) { 117 | return true; 118 | } else { 119 | return false; 120 | } 121 | } -------------------------------------------------------------------------------- /extend/adm/control/api/web.php: -------------------------------------------------------------------------------- 1 | find(); 17 | // 对比原始数据 18 | if (array_diff($origData , (array)$data) && array_diff((array)$data , $origData)) { 19 | if ($table->update($data)) { 20 | writeLog('edit_web'); 21 | exit(ReturnSuccess('更新成功')); 22 | } else { 23 | exit(ReturnError('更新失败')); 24 | } 25 | } else { 26 | exit(ReturnError('你没有修改任何内容!')); 27 | } 28 | } 29 | if ($act === 'delLog') { 30 | if (Db::table('web_log')->del()) { 31 | exit(ReturnSuccess('删除成功')); 32 | } else { 33 | exit(ReturnError('删除失败')); 34 | } 35 | } 36 | // 删除日志 37 | if ($act === 'delCheck') { 38 | $id = $_POST[ 'id' ] ?? ''; 39 | if ($id) { 40 | $ids = ''; 41 | foreach ($id as $value) { 42 | $ids .= intval($value) . ","; 43 | } 44 | $ids = rtrim($ids , ","); 45 | $res = Db::table('web_log')->where('id' , 'in' , '(' . $ids . ')')->del(); 46 | if ($res) { 47 | exit(ReturnSuccess('删除成功')); 48 | } else { 49 | exit(ReturnError('删除失败')); 50 | } 51 | } else { 52 | exit(ReturnError('没有需要删除的数据')); 53 | } 54 | } 55 | function f ($arr): bool 56 | { 57 | $len1 = count($arr); 58 | $newarr = array_filter($arr); 59 | $len2 = count($newarr); 60 | if ($len1 === $len2) { 61 | return true; 62 | } else { 63 | return false; 64 | } 65 | } -------------------------------------------------------------------------------- /extend/adm/control/view/log.php: -------------------------------------------------------------------------------- 1 | count(); 11 | $page = isset($_GET[ 'page' ]) ? intval($_GET[ 'page' ]) : 1; 12 | $url = "./?control_log&page="; 13 | $ENUMS = PAGES; // 每页条数 14 | $bnums = ( $page - 1 ) * $ENUMS; 15 | ?> 16 | 21 |
22 |
23 |
24 |
25 |

操作日志

26 |
27 |
28 |
29 | 30 |
31 |
32 |
33 |

操作日志 每页展示条数据 35 |

36 |
37 |
38 | 123 | 124 |
125 |
126 |
127 | 选中项:删除 128 |
129 |
130 |
131 |
132 | 134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | 196 | -------------------------------------------------------------------------------- /extend/adm/control/view/web.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | 8 | /* 9 | Sort:1 10 | icons:si si-settings 11 | Hidden:false 12 | Name:网站设置 13 | Url:control_web 14 | */ 15 | $row = Db::table('webset')->find(); 16 | ?> 17 |
18 |
19 |
20 |
21 |

网站设置

22 |
23 |
24 |
25 |
26 |
27 |

28 | 网站设置 29 |

30 |
31 |
32 |
33 |
34 |
35 | 36 | 39 |
40 |
41 | 42 | 45 |
46 |
47 | 48 | 51 |
52 |
53 | 54 | 57 |
58 |
59 | 60 | 63 |
64 |
65 | 66 | 69 |
70 |
71 | 72 | 75 |
76 |
77 | 78 | 81 |
82 |
83 | 86 |
87 |
88 |
89 |
90 |
91 |
92 | 93 | -------------------------------------------------------------------------------- /extend/adm/index.php: -------------------------------------------------------------------------------- 1 | count(); 4 | $apiCallCount = Db::table('api_count')->count(); 5 | $today = Db::table('api_count')->where('datetime' , 'like' , '%' . date('Y-m-d') . '%')->count(); 6 | $arr = Db::table('api_count')->select(); 7 | $ipArr = array(); 8 | foreach ($arr as $item) { 9 | if ( !in_array($item[ 'ip' ] , $ipArr)) { 10 | $ipArr[] = $item[ 'ip' ]; 11 | } 12 | } 13 | ?> 14 |
15 |
16 |
17 |
18 |

20 |

22 |
23 |
24 |
25 | 26 | 85 | 86 |
87 | 88 |
89 |
90 |
91 |

92 | API统计 93 |

94 |
95 | 99 |
100 |
101 |
102 | 104 |
105 |
106 |
107 | 108 |
109 |
110 |
111 | 112 |

操作日志

113 |
114 | 118 |
119 |
120 |
121 |
    122 |
    123 |
    124 |
    125 | 126 |
    127 |
    128 | 129 | -------------------------------------------------------------------------------- /extend/ajaxApi.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | require '../include/common.php'; 8 | $act = $_GET[ 'act' ]; 9 | if ($act === 'list') { 10 | $res = Db::table('api_list')->select(); 11 | $arr = array(); 12 | foreach ($res as $k => $v) { 13 | $row = $res[ $k ]; 14 | $data[ 'name' ] = $row[ 'name' ]; 15 | $data[ 'desc' ] = $row[ 'des' ]; 16 | $data[ 'pv' ] = $row[ 'pv' ]; 17 | $data[ 'state' ] = $row[ 'state' ]; 18 | $data[ 'uri' ] = ( $row[ 'state' ] === 'on' ) ? DESCURI . $row[ 'sign' ] . '.html' : ''; 19 | $data[ 'stateInfo' ] = ( $row[ 'state' ] === 'on' ) ? '正常' : '维护'; 20 | $arr[] = $data; 21 | 22 | } 23 | exit(return_msg('1' , 'success' , $arr)); 24 | } 25 | if ($act === 'search') { 26 | $name = isset($_POST[ 'name' ]) && !empty($_POST[ 'name' ]) ? purge($_POST[ 'name' ]) : ''; 27 | $res = Db::table('api_list','AS a')->where('name' , 'like' , "%$name%")->select(); 28 | $arr = array(); 29 | foreach ($res as $k => $v) { 30 | $row = $res[ $k ]; 31 | $data[ 'name' ] = $row[ 'name' ]; 32 | $data[ 'desc' ] = $row[ 'des' ]; 33 | $data[ 'pv' ] = $row[ 'pv' ]; 34 | $data[ 'state' ] = $row[ 'state' ]; 35 | $data[ 'uri' ] = ( $row[ 'state' ] === 'on' ) ? DESCURI . $row[ 'sign' ] . '.html' : ''; 36 | $data[ 'stateInfo' ] = ( $row[ 'state' ] === 'on' ) ? '正常' : '维护'; 37 | $arr[] = $data; 38 | 39 | } 40 | exit(return_msg(1,'success',$arr)); 41 | } -------------------------------------------------------------------------------- /extend/api/test/index.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | $row = DB::table('api_list')->where('sign',DOC_SIGN)->find(); 8 | if(!$row){ 9 | header('Location:../'); 10 | } 11 | ?> 12 | 13 | 14 | 15 | 16 | 17 | <?php 18 | echo TITLE ?> - <?php 19 | echo TITLE_DESC ?> 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 40 | 41 | 42 |
    43 | 44 | 76 | 77 |
    78 |
    79 |
    80 |
    81 | 82 |
    83 |

    84 | 85 |

    86 |

    87 | 88 |

    89 |
    90 |
    91 |
    92 |

    接口详情

    93 |
    94 |
    95 |
    96 |
    97 | 98 |
    99 | 100 | 101 | 102 | 103 |
    104 |
    105 |
    106 | 107 | 108 |
    109 |
    110 | 111 | 112 |
    113 |
    114 | 115 | 116 | 117 | 请求参数说明 118 |
    119 | 120 | 121 |
    122 |
    123 | 124 | 125 | 调用示例 126 |
    127 |
    128 |
    129 | 130 | 131 | 返回示例 132 |
    133 |
    134 |
    135 | 136 | 137 | 返回参数说明 138 |
    139 | 140 | 141 |
    142 |
    143 | 144 | 145 | 代码示例 146 |
    147 |
    148 |
    149 | 150 |
    151 |
    152 |
    153 | 154 | 155 |
    156 | 157 |
    158 |
    159 |
    160 |
    161 | Powered by Developer is CloudZA 162 |
    163 |
    164 | 165 |
    166 |
    167 |
    168 |
    169 |
    170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /include/Route.class.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | class Route 8 | { 9 | public function __construct () 10 | { 11 | $uri = $_SERVER[ 'REQUEST_URI' ]; 12 | if (str_contains($uri , '/api/')) { 13 | $this->handleApiRoute($uri); 14 | } 15 | if (str_contains($uri , DESCURI)) { 16 | $this->handleDocRoute($uri); 17 | } 18 | } 19 | 20 | private function handleApiRoute ($uri): void 21 | { 22 | $uri_parts = explode('/' , $uri); 23 | $uri_parts = explode('?' , $uri_parts[ 2 ]); 24 | if ($uri_parts[ 0 ]) { 25 | $table = Db::table('api_list'); 26 | $sign = $table->where('sign' , $uri_parts[ 0 ])->find(); 27 | // 判断数据库中&&本地接口是否存在 28 | if ($sign && file_exists(FCPATH . API_EXTEND_MULU . $uri_parts[ 0 ] . '/index.php')) { 29 | // 判断接口是否正常 30 | if ($sign[ 'state' ] === 'on') { 31 | require FCPATH . API_EXTEND_MULU . $uri_parts[ 0 ] . '/index.php'; 32 | if ( !callApiLog($sign[ 'name' ] , $uri_parts[ 0 ] , $sign[ 'pv' ])) { 33 | exit(ReturnError('Sever Error')); 34 | } 35 | } else { 36 | exit(ReturnError('接口维护中')); 37 | } 38 | exit; 39 | } else { 40 | exit(ReturnError('暂无此接口')); 41 | } 42 | } 43 | } 44 | 45 | private function handleDocRoute ($uri): void 46 | { 47 | $uri_parts = explode('-' , $uri); 48 | $uri_parts = explode('.' , $uri_parts[ 1 ]); 49 | define("DOC_SIGN" , $uri_parts[ 0 ]); 50 | require 'extend/docView.php'; 51 | exit; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /include/common.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | require_once 'db.class.php'; 8 | const ADM_EXTEND_MULU = 'extend/adm/'; 9 | //API存放路径 10 | const API_EXTEND_MULU = 'extend/api/'; 11 | // API展示路径 12 | const APIURI = 'api/'; 13 | 14 | // API详情规则 15 | const DESCURI = 'doc-'; 16 | 17 | 18 | $web_info = Db::table('webset' , 'as A')->find(); 19 | define("TITLE" , ( $web_info[ 'web_title' ] ) ?: 'CloudZA-API'); 20 | define("TITLE_DESC" , ( $web_info[ 'web_titleDesc' ] ) ?: '一款开源的API系统'); 21 | define("DESC" , ( $web_info[ 'web_des' ] ) ?: '一款开源的API系统'); 22 | define("KEY" , ( $web_info[ 'web_key' ] ) ?: 'API,CloudZA-API,免费API,API内容管理系统'); 23 | define("BEIAN" , ( $web_info[ 'web_beian' ] ) ?: '京ICP备8888888号-8'); 24 | define("QQ" , ( $web_info[ 'web_qq' ] ) ?: '2922619853'); 25 | define("FOOTER_BAN" , ( $web_info[ 'web_ban' ] ) ?: '云之安'); 26 | define("PAGES" , ( $web_info[ 'web_page_nums' ] ) ?: '10'); 27 | define('FCPATH' , str_replace("\\" , '/' , dirname(dirname(__FILE__)) . '/')); 28 | define('WEB_URL' , ( ( $_SERVER[ 'SERVER_PORT' ] == 443 ) ? 'https' : 'http' ) . '://' . $_SERVER[ 'HTTP_HOST' ] . '/'); 29 | define('WEB_URL_FILE' , ( ( $_SERVER[ 'SERVER_PORT' ] == 443 ) ? 'https' : 'http' ) . '://' . $_SERVER[ 'HTTP_HOST' ] . str_replace($_SERVER[ 'DOCUMENT_ROOT' ] , ( substr($_SERVER[ 'DOCUMENT_ROOT' ] , -1) == '/' ) ? '/' : '' , dirname($_SERVER[ 'SCRIPT_FILENAME' ]))); 30 | //管理日志 31 | $lang_adm = ['logon' => '后台登录' , 'add_api' => '新增API' , 'edit_api' => '修改API' , 'del_api' => '删除API' , 'dels_api' => '删除多个API' , 'edit_web' => '修改网站设置' , 'edit_admin' => '修改管理员信息' ,]; 32 | 33 | 34 | // API调用记录 35 | function callApiLog ($name , $sign , $pv): bool 36 | { 37 | $pv += 1; 38 | if (Db::table('api_list')->where('sign' , $sign)->update(['pv' => $pv]) && Db::table('api_count')->add(['sign' => $sign , 'name' => $name , 'ip' => get_ip() , 'address' => getIPAddress(get_ip()) , 'datetime' => date('Y-m-d H:i:s')])) { 39 | return true; 40 | } else { 41 | return false; 42 | } 43 | } 44 | 45 | /** 46 | * 导航配置方法 47 | */ 48 | function getPluginDataAd ($FilePath): array 49 | { 50 | $file_arr = myScanDir(FCPATH . ADM_EXTEND_MULU . $FilePath . '/view' , 2); 51 | $nav_arr = []; 52 | foreach ($file_arr as $val) { 53 | $Data = implode('' , file(FCPATH . ADM_EXTEND_MULU . $FilePath . '/view/' . $val)); 54 | preg_match("/Sort:(.*)/i" , $Data , $sort); 55 | preg_match("/Hidden:(.*)/i" , $Data , $hidden); 56 | preg_match("/icons:(.*)/i" , $Data , $icons); 57 | preg_match("/Name:(.*)/i" , $Data , $name); 58 | preg_match("/Url:(.*)/i" , $Data , $url); 59 | preg_match("/Right:(.*)/i" , $Data , $right); 60 | $sort = isset($sort[ 1 ]) ? strip_tags(trim($sort[ 1 ])) : ''; 61 | $hidden = isset($hidden[ 1 ]) ? strip_tags(trim($hidden[ 1 ])) : ''; 62 | $icons = isset($icons[ 1 ]) ? strip_tags(trim($icons[ 1 ])) : ''; 63 | $name = isset($name[ 1 ]) ? strip_tags(trim($name[ 1 ])) : ''; 64 | $url = isset($url[ 1 ]) ? strip_tags(trim($url[ 1 ])) : ''; 65 | $right = isset($right[ 1 ]) ? strip_tags(trim($right[ 1 ])) : ''; 66 | //if($hidden == 'true')continue; 67 | $nav_arr[] = ['name' => $name , 'file' => $url , 'icons' => $icons , 'right' => $right , 'sort' => $sort , 'hidden' => $hidden]; 68 | } 69 | $sortKey = array_column($nav_arr , 'sort'); 70 | array_multisort($sortKey , SORT_ASC , $nav_arr); 71 | return $nav_arr; 72 | } 73 | 74 | /** 75 | * 实现遍历出目录及其子文件 76 | */ 77 | function myScanDir ($dir , $type = 0): array 78 | { 79 | $file_arr = scandir($dir); 80 | $new_arr = []; 81 | foreach ($file_arr as $item) { 82 | //echo $item.'
    '; 83 | if ($type == 0 && $item != ".." && $item != ".") { 84 | //目录和文件 85 | $new_arr[] = $item; 86 | } elseif ($type == 1 && is_dir($dir . '/' . $item) && $item != ".." && $item != ".") { 87 | //只要目录 88 | $new_arr[] = $item; 89 | } elseif ($type == 2 && is_file($dir . '/' . $item) && $item != ".." && $item != ".") { 90 | //只要文件 91 | $new_arr[] = $item; 92 | } 93 | } 94 | return $new_arr; 95 | } 96 | 97 | /** 98 | * 分页 99 | */ 100 | function pagination ($count , $perlogs , $page , $url): string 101 | { 102 | $pnums = @ceil($count / $perlogs); 103 | $re = ''; 104 | $urlHome = preg_replace("|[\?&/][^\./\?&=]*page[=/\-]|" , "" , $url); 105 | for ($i = $page - 2; $i <= $page + 2 && $i <= $pnums; $i++) { 106 | if ($i > 0) { 107 | if ($i == $page) { 108 | $re .= "
  • $i
  • "; 109 | } elseif ($i == 1) { 110 | $re .= "
  • $i
  • "; 111 | } else { 112 | $re .= "
  • $i
  • "; 113 | } 114 | } 115 | } 116 | if ($page > 0) if ($pnums > $page) { 117 | //前进 118 | $go = $page + 1; 119 | } else { 120 | $go = $page; 121 | } 122 | if ($page > 1) { 123 | $after = $page - 1; 124 | } else { 125 | $after = $page; 126 | } 127 | $re = "
  • Previous
  • $re"; 128 | $re .= "
  • Next
  • "; 129 | if ($pnums <= 1) $re = ''; 130 | return ""; 131 | } 132 | 133 | function purge ($string , $trim = true , $filter = true , $force = 0 , $strip = false) 134 | { 135 | //递归addslashes 对参数进行净化 136 | $encode = mb_detect_encoding($string , array("ASCII" , "UTF-8" , "GB2312" , "GBK" , "BIG5")); 137 | if ($encode != 'UTF-8') { 138 | $string = iconv($encode , 'UTF-8' , $string); 139 | } 140 | if ($trim) { 141 | $string = preg_replace('/\s+/' , '' , $string); 142 | } 143 | if ($filter) { 144 | $farr = array("/<(\\/?)(script|i?frame|style|html|body|title|link|meta|object|\\?|\\%)([^>]*?)>/isU" , "/(<[^>]*)on[a-zA-Z]+\s*=([^>]*>)/isU" , "/select |insert |and |or |create |update |delete |alter |count |\'|\/\*|\*|\.\.\/|\.\/|\^|union |into |load_file|outfile |dump/is"); 145 | $string = preg_replace($farr , '' , $string); 146 | } 147 | !defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC' , !ini_get('magic_quotes_gpc')); 148 | if ( !MAGIC_QUOTES_GPC || $force) { 149 | if (is_array($string)) { 150 | foreach ($string as $key => $val) { 151 | $string[ $key ] = purge($val , $force , $strip); 152 | } 153 | } else { 154 | $string = addslashes($strip ? stripslashes($string) : $string); 155 | } 156 | } 157 | return $string; 158 | } 159 | 160 | 161 | function txt_Arr ($txt): array 162 | { 163 | //文本转数组 164 | $arr = explode('&' , $txt); 165 | $array = []; 166 | foreach ($arr as $value) { 167 | $tmp_arr = explode('=' , $value); 168 | if (is_array($tmp_arr) && count($tmp_arr) == 2) { 169 | $array = array_merge($array , [$tmp_arr[ 0 ] => $tmp_arr[ 1 ]]); 170 | } 171 | } 172 | return $array; 173 | } 174 | 175 | function txt_zhong ($str , $leftStr , $rightStr) 176 | { 177 | //取文本中间 178 | $left = strpos($str , $leftStr); 179 | //echo '左边:'.$left; 180 | $right = strpos($str , $rightStr , $left); 181 | //echo '
    右边:'.$right; 182 | if ($left < 0 or $right < $left) return ''; 183 | return substr($str , $left + strlen($leftStr) , $right - $left - strlen($leftStr)); 184 | } 185 | 186 | function txt_you ($str , $leftStr) 187 | { 188 | //取文本右边 189 | $left = strpos($str , $leftStr); 190 | return substr($str , $left + strlen($leftStr)); 191 | } 192 | 193 | function txt_zuo ($str , $rightStr) 194 | { 195 | //取文本左边 196 | $right = strpos($str , $rightStr); 197 | return substr($str , 0 , $right); 198 | } 199 | 200 | function ip_city_str ($str) 201 | { 202 | return str_replace(array('省' , '市') , '' , $str); 203 | } 204 | 205 | //获取当个ip所在的省份 206 | function getIpAddress ($ip) 207 | { 208 | $url = 'https://whois.pconline.com.cn/ipJson.jsp?json=true&ip='; 209 | $city = curl_get($url . $ip); 210 | $city = mb_convert_encoding($city , "UTF-8" , "GB2312"); 211 | $city = json_decode($city , true); 212 | if ($city[ 'city' ]) { 213 | $location = ip_city_str($city[ 'pro' ]) . ip_city_str($city[ 'city' ]); 214 | } else { 215 | $location = ip_city_str($city[ 'pro' ]); 216 | } 217 | if ($location) { 218 | return $location; 219 | } else { 220 | return $city[ 'addr' ]; 221 | } 222 | } 223 | 224 | 225 | /** 226 | * 获取用户真实IP 227 | * @param int $type 228 | * @param bool $adv 229 | * @return mixed 230 | */ 231 | function get_ip (int $type = 0 , bool $adv = true) 232 | { 233 | $type = $type ? 1 : 0; 234 | $ip = NULL; 235 | if (NULL !== $ip) { 236 | return $ip[ $type ]; 237 | } 238 | if ($adv) { 239 | if (isset($_SERVER[ 'HTTP_X_FORWARDED_FOR' ])) { 240 | $arr = explode(',' , $_SERVER[ 'HTTP_X_FORWARDED_FOR' ]); 241 | $pos = array_search('unknown' , $arr); 242 | if (false !== $pos) { 243 | unset($arr[ $pos ]); 244 | } 245 | $ip = trim(current($arr)); 246 | } elseif (isset($_SERVER[ 'HTTP_CLIENT_IP' ])) { 247 | $ip = $_SERVER[ 'HTTP_CLIENT_IP' ]; 248 | } elseif (isset($_SERVER[ 'REMOTE_ADDR' ])) { 249 | $ip = $_SERVER[ 'REMOTE_ADDR' ]; 250 | } 251 | } elseif (isset($_SERVER[ 'HTTP_X_FORWARDED_FOR' ])) { 252 | $arr = explode(',' , $_SERVER[ 'HTTP_X_FORWARDED_FOR' ]); 253 | $pos = array_search('unknown' , $arr); 254 | if (false !== $pos) { 255 | unset($arr[ $pos ]); 256 | } 257 | $ip = trim(current($arr)); 258 | } elseif (isset($_SERVER[ 'REMOTE_ADDR' ])) { 259 | $ip = $_SERVER[ 'REMOTE_ADDR' ]; 260 | } 261 | // IP地址合法验证 262 | $long = sprintf("%u" , ip2long($ip)); 263 | $ip = $long ? array($ip , $long) : array('0.0.0.0' , 0); 264 | return $ip[ $type ]; 265 | } 266 | 267 | /** 268 | * 生成随机字符串 269 | * @param $length int 长度 270 | * @return string|null 271 | */ 272 | function getRand (int $length): ?string 273 | { 274 | $str = NULL; 275 | $strPol = "abcdefhijkmnprstwxyz"; 276 | $max = strlen($strPol) - 1; 277 | for ($i = 0; $i < $length; $i++) { 278 | $str .= $strPol[ rand(0 , $max) ]; 279 | } 280 | return $str; 281 | } 282 | 283 | // url参数转数组 284 | function toarr ($para) 285 | { 286 | $str = mb_substr($para , stripos($para , "?") + 1); 287 | parse_str($str , $arr); 288 | return $arr; 289 | } 290 | 291 | 292 | function curl_get ($url) 293 | { 294 | $ch = curl_init($url); 295 | curl_setopt($ch , CURLOPT_SSL_VERIFYPEER , false); 296 | curl_setopt($ch , CURLOPT_SSL_VERIFYHOST , false); 297 | curl_setopt($ch , CURLOPT_RETURNTRANSFER , true); 298 | curl_setopt($ch , CURLOPT_USERAGENT , 'Mozilla/5.0 (Linux; U; Android 4.4.1; zh-cn; R815T Build/JOP40D) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 MQQBrowser/4.5 Mobile Safari/533.1'); 299 | curl_setopt($ch , CURLOPT_TIMEOUT , 30); 300 | $content = curl_exec($ch); 301 | curl_close($ch); 302 | return ( $content ); 303 | } 304 | 305 | /** 306 | * 返回带数据 307 | * @param $code int 响应代码 308 | * @param $msg string 描述字符串 309 | * @param $data array 返回的数据 310 | * @return false|string json 311 | */ 312 | function return_msg (int $code , string $msg , array $data = []) 313 | { 314 | $return_data[ 'code' ] = $code; 315 | $return_data[ 'msg' ] = $msg; 316 | $return_data[ 'data' ] = $data; 317 | return json_encode($return_data); 318 | } 319 | 320 | /** 321 | * 成功返回不带数据 322 | * @param $msg string 描述 323 | */ 324 | function ReturnSuccess (string $msg) 325 | { 326 | $result = ['code' => 200 , 'msg' => $msg ,]; 327 | return json_encode($result); 328 | } 329 | 330 | /** 331 | * 失败返回 332 | * @param $msg string 描述 333 | */ 334 | function ReturnError (string $msg) 335 | { 336 | $result = ['code' => 201 , 'msg' => $msg ,]; 337 | return json_encode($result); 338 | } 339 | 340 | /** 341 | * 记录日志 342 | * @param $msg 343 | * @return bool 344 | */ 345 | function writeLog ($msg): bool 346 | { 347 | if (empty($msg)) { 348 | return false; 349 | } 350 | $ip = get_ip(); 351 | $implement = Db::table('web_log')->add(['ip' => $ip , 'time' => date('Y-m-d H:i:s') , 'event' => $msg , 'detailed' => getIPAddress($ip)]); 352 | if ($implement) { 353 | return true; 354 | } else { 355 | return false; 356 | } 357 | } -------------------------------------------------------------------------------- /include/config.php: -------------------------------------------------------------------------------- 1 | 'localhost', //数据库连接地址,默认:localhost或127.0.0.1 6 | 'port' => '3306', //端口号 7 | 'user' => 'public_api', //用户名 8 | 'pwd' => 'dong2002', //密码 9 | 'dbname' => 'public_api', //数据库名称 10 | 'charset' => 'utf8' //设置字符集 11 | 12 | ); 13 | $db = Db::getInstance($param); 14 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 4 | * @hitokoto: 一场秋雨一场凉,秋心酌满泪为霜。 5 | * Copyright (c) 2022 by CloudZA, All Rights Reserved. 6 | */ 7 | //if (!file_exists('./install/install.lock')) { 8 | // header("Location: ../install"); 9 | // return true; 10 | //} 11 | require_once( 'include/common.php' ); 12 | require_once( 'include/Route.class.php' ); 13 | $count_api = Db::table('api_list')->count(); 14 | 15 | $_GET && SafeFilter($_GET); 16 | $_POST && SafeFilter($_POST); 17 | $_COOKIE && SafeFilter($_COOKIE); 18 | function SafeFilter (&$arr): void 19 | { 20 | $ra = array('/([\x00-\x08,\x0b-\x0c,\x0e-\x19])/' , '/script/' , '/javascript/' , '/vbscript/' , '/expression/' , '/applet/' , '/meta/' , '/xml/' , '/blink/' , '/link/' , '/style/' , '/embed/' , '/object/' , '/frame/' , '/layer/' , '/title/' , '/bgsound/' , '/base/' , '/onload/' , '/onunload/' , '/onchange/' , '/onsubmit/' , '/onreset/' , '/onselect/' , '/onblur/' , '/onfocus/' , '/onabort/' , '/onkeydown/' , '/onkeypress/' , '/onkeyup/' , '/onclick/' , '/ondblclick/' , '/onmousedown/' , '/onmousemove/' , '/onmouseout/' , '/onmouseover/' , '/onmouseup/' , '/onunload/'); 21 | if (is_array($arr)) { 22 | foreach ($arr as $key => $value) { 23 | if ( !is_array($value)) { 24 | if ( !ini_get('magic_quotes_gpc')) { 25 | $value = addslashes($value); 26 | } 27 | $value = preg_replace($ra , '' , $value); 28 | $arr[ $key ] = htmlentities(strip_tags($value)); 29 | } else { 30 | SafeFilter($arr[ $key ]); 31 | } 32 | } 33 | } 34 | } 35 | 36 | $route = new Route(); 37 | ?> 38 | 39 | 40 | 41 | 42 | 43 | <?php 44 | echo TITLE ?> - <?php 45 | echo TITLE_DESC ?> 46 | 48 | 50 | 51 | 52 | 53 | 54 | 56 | 57 | 58 | 59 | 60 |
    61 | 93 | 94 |
    95 |
    96 |
    97 |
    98 |
    99 |

    100 | 102 |

    103 |

    104 | 105 | 107 |

    108 |

    共收录了个接口

    110 |
    111 |
    112 |
    113 | 114 | 117 |
    118 |
    119 |
    120 |
    121 |
    122 |
    123 |
    124 |
    125 | 126 |
    127 |
    128 |
    129 |
    130 | Powered by Developer is CloudZA 131 |
    132 |
    133 | 134 |
    135 |
    136 |
    137 |
    138 |
    139 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | -------------------------------------------------------------------------------- /install/cloudza_api.php: -------------------------------------------------------------------------------- 1 | '请输入数据库地址' , 'cloudDbPort' => '请输入数据库端口号' , 'cloudDbUser' => '请输入数据库用户名' , 'cloudDbPwd' => '请输入数据库密码' , 'cloudDbName' => '请输入数据库名' , 'cloudAdmUser' => '请输入管理员账号' , 'cloudAdmPwd' => '请输入管理员密码']; 19 | foreach ($error as $key => $val) { 20 | if ( !array_isset($_POST , $key)) { 21 | $error_msg = $val; 22 | break; 23 | } 24 | } 25 | if ( !$error_msg) { 26 | $user = $_POST['cloudAdmUser']; 27 | $pass = md5($_POST['cloudAdmPwd']); 28 | $cookie = md5($user.$pass.time()); 29 | $conn = @mysqli_connect($_POST[ 'cloudDbServer' ] , $_POST[ 'cloudDbUser' ] , $_POST[ 'cloudDbPwd' ]); 30 | mysqli_query($conn , "set names utf8"); 31 | 32 | if ($conn) { 33 | if (@mysqli_select_db($conn , $_POST[ 'cloudDbName' ])) { 34 | require_once 'cloudza_api.php';//引入数据表 35 | foreach ($sql as $value) { 36 | mysqli_query($conn , $value); 37 | } 38 | $param = array( 39 | 'host' => $_POST['cloudDbServer'], //数据库连接地址,默认:localhost或127.0.0.1 40 | 'port' => $_POST['cloudDbPort'], //端口号 41 | 'user' => $_POST['cloudDbUser'], //用户名 42 | 'pwd' => $_POST['cloudDbPwd'], //密码 43 | 'dbname' => $_POST['cloudDbName'], //数据库名称 44 | 'charset' => 'utf8' //设置字符集 45 | ); 46 | $config = " 75 | 76 | 77 | 78 | 79 | 80 | 81 | CloudZA API系统 - Install 82 | 83 | 84 | 85 | 87 | 88 | 89 | 90 | 91 |
    92 |
    93 |
    94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 |
    105 |
    106 |
    107 |
    108 | 109 | 110 | CloudZA 111 | 112 |

    欢迎使用CloudZA API系统

    113 |

    114 | 环境监测数据库配置安装完成 - 系统安装 119 |

    120 | 121 |
    122 | 123 | 126 | 127 | 129 |
    130 |
    131 |
    132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 146 | 147 | 151 | 152 | 153 | 154 | 156 | 157 | 161 | 162 | 163 | 164 | 166 | 167 | 171 | 172 | 173 | 174 | 176 | 177 | 182 | 183 | 184 |
    参数当前值需求值状态
    当前域名*正常异常
    PHP版本>=8.0= 8.0 ): ?>正常异常
    MYSQL支持正常异常
    服务器系统WINNT/LINUX 179 | 正常异常
    185 |
    186 |
    187 |
    188 | 193 |
    194 |
    195 |
    196 | 198 |
    199 |
    200 |
    201 |

    数据库安装

    202 |
    203 |
    204 |

    205 | 请确保数据库表单填写正确,否则会造成安装失败 206 |

    207 |
    208 |
    209 |
    210 | 211 | 212 |
    213 |
    214 | 215 | 216 |
    217 |
    218 | 219 | 220 |
    221 |
    222 | 223 | 224 |
    225 |
    226 | 227 | 228 |
    229 |
    230 |
    231 |
    232 |
    233 |

    管理员信息

    234 |
    235 |
    236 |

    237 | 请设置管理员账号信息,请牢记设置好的账号和密码 238 |

    239 |
    240 |
    241 |
    242 | 243 | 244 |
    245 |
    246 | 247 | 248 |
    249 |
    250 |
    251 |
    252 |
    253 |
    254 |
    255 | 258 |
    259 |
    260 |
    261 |
    262 |
    263 | 266 |
    267 |
    268 |
    269 |
    270 |

    271 |

    Good for you !

    272 |

    CloudZA API 安装完成,您可以开始使用本系统了。若访问首页任然继续跳转至安装跳转,请自行在install/目录下创建一个 install.lock 空文档即可

    273 |
    274 | 返回首页 275 | 前往后台 276 |
    277 |
    278 |
    279 |
    280 |
    281 | 284 |
    285 |
    286 |
    287 |
    288 |
    289 |
    290 | 291 | 292 | 293 | -------------------------------------------------------------------------------- /nginx.htaccess: -------------------------------------------------------------------------------- 1 | if (!-e $request_filename) 2 | { 3 | rewrite ^(.*)$ /index.php$1 last; 4 | } -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | # robots.txt generated at https://uutool.cn/robots/ 2 | User-agent: Baiduspider 3 | Disallow: 4 | User-agent: Sosospider 5 | Disallow: 6 | User-agent: sogou spider 7 | Disallow: 8 | User-agent: YodaoBot 9 | Disallow: 10 | User-agent: yisouspider 11 | Disallow: 12 | User-agent: Googlebot 13 | Disallow: 14 | User-agent: Bingbot 15 | Disallow: 16 | User-agent: * 17 | Disallow: 18 | Disallow: /admin 19 | Disallow: /extend/adm 20 | Disallow: /extend/ 21 | Crawl-delay: 60 --------------------------------------------------------------------------------