xiaoz 6 years ago
parent
commit
0602a4528e
  1. 51
      admin/index.php
  2. 7
      config.php
  3. BIN
      data/imgurl.db3
  4. 45
      found.php
  5. 44
      import.php
  6. 4
      recycle.php
  7. 6
      static/admin.css
  8. 4
      static/admin.js
  9. 2
      static/embed.js
  10. 2
      static/layui/css/layui.css
  11. 2
      static/layui/css/layui.mobile.css
  12. 2
      static/layui/css/modules/code.css
  13. 2
      static/layui/css/modules/laydate/default/laydate.css
  14. BIN
      static/layui/css/modules/layer/default/icon-ext.png
  15. BIN
      static/layui/css/modules/layer/default/icon.png
  16. 2
      static/layui/css/modules/layer/default/layer.css
  17. BIN
      static/layui/css/modules/layer/default/loading-0.gif
  18. BIN
      static/layui/css/modules/layer/default/loading-1.gif
  19. BIN
      static/layui/css/modules/layer/default/loading-2.gif
  20. BIN
      static/layui/font/iconfont.eot
  21. 459
      static/layui/font/iconfont.svg
  22. BIN
      static/layui/font/iconfont.ttf
  23. BIN
      static/layui/font/iconfont.woff
  24. BIN
      static/layui/images/face/0.gif
  25. BIN
      static/layui/images/face/1.gif
  26. BIN
      static/layui/images/face/10.gif
  27. BIN
      static/layui/images/face/11.gif
  28. BIN
      static/layui/images/face/12.gif
  29. BIN
      static/layui/images/face/13.gif
  30. BIN
      static/layui/images/face/14.gif
  31. BIN
      static/layui/images/face/15.gif
  32. BIN
      static/layui/images/face/16.gif
  33. BIN
      static/layui/images/face/17.gif
  34. BIN
      static/layui/images/face/18.gif
  35. BIN
      static/layui/images/face/19.gif
  36. BIN
      static/layui/images/face/2.gif
  37. BIN
      static/layui/images/face/20.gif
  38. BIN
      static/layui/images/face/21.gif
  39. BIN
      static/layui/images/face/22.gif
  40. BIN
      static/layui/images/face/23.gif
  41. BIN
      static/layui/images/face/24.gif
  42. BIN
      static/layui/images/face/25.gif
  43. BIN
      static/layui/images/face/26.gif
  44. BIN
      static/layui/images/face/27.gif
  45. BIN
      static/layui/images/face/28.gif
  46. BIN
      static/layui/images/face/29.gif
  47. BIN
      static/layui/images/face/3.gif
  48. BIN
      static/layui/images/face/30.gif
  49. BIN
      static/layui/images/face/31.gif
  50. BIN
      static/layui/images/face/32.gif
  51. BIN
      static/layui/images/face/33.gif
  52. BIN
      static/layui/images/face/34.gif
  53. BIN
      static/layui/images/face/35.gif
  54. BIN
      static/layui/images/face/36.gif
  55. BIN
      static/layui/images/face/37.gif
  56. BIN
      static/layui/images/face/38.gif
  57. BIN
      static/layui/images/face/39.gif
  58. BIN
      static/layui/images/face/4.gif
  59. BIN
      static/layui/images/face/40.gif
  60. BIN
      static/layui/images/face/41.gif
  61. BIN
      static/layui/images/face/42.gif
  62. BIN
      static/layui/images/face/43.gif
  63. BIN
      static/layui/images/face/44.gif
  64. BIN
      static/layui/images/face/45.gif
  65. BIN
      static/layui/images/face/46.gif
  66. BIN
      static/layui/images/face/47.gif
  67. BIN
      static/layui/images/face/48.gif
  68. BIN
      static/layui/images/face/49.gif
  69. BIN
      static/layui/images/face/5.gif
  70. BIN
      static/layui/images/face/50.gif
  71. BIN
      static/layui/images/face/51.gif
  72. BIN
      static/layui/images/face/52.gif
  73. BIN
      static/layui/images/face/53.gif
  74. BIN
      static/layui/images/face/54.gif
  75. BIN
      static/layui/images/face/55.gif
  76. BIN
      static/layui/images/face/56.gif
  77. BIN
      static/layui/images/face/57.gif
  78. BIN
      static/layui/images/face/58.gif
  79. BIN
      static/layui/images/face/59.gif
  80. BIN
      static/layui/images/face/6.gif
  81. BIN
      static/layui/images/face/60.gif
  82. BIN
      static/layui/images/face/61.gif
  83. BIN
      static/layui/images/face/62.gif
  84. BIN
      static/layui/images/face/63.gif
  85. BIN
      static/layui/images/face/64.gif
  86. BIN
      static/layui/images/face/65.gif
  87. BIN
      static/layui/images/face/66.gif
  88. BIN
      static/layui/images/face/67.gif
  89. BIN
      static/layui/images/face/68.gif
  90. BIN
      static/layui/images/face/69.gif
  91. BIN
      static/layui/images/face/7.gif
  92. BIN
      static/layui/images/face/70.gif
  93. BIN
      static/layui/images/face/71.gif
  94. BIN
      static/layui/images/face/8.gif
  95. BIN
      static/layui/images/face/9.gif
  96. 2
      static/layui/lay/modules/carousel.js
  97. 2
      static/layui/lay/modules/code.js
  98. 2
      static/layui/lay/modules/element.js
  99. 2
      static/layui/lay/modules/flow.js
  100. 2
      static/layui/lay/modules/form.js
  101. Some files were not shown because too many files have changed in this diff Show More

51
admin/index.php

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>ImgURL后台管理</title>
<meta name="generator" content="EverEdit" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" href="../static/layui/css/layui.css">
<link rel="stylesheet" href="../static/admin.css">
<script src = "../static/layui/layui.js"></script>
<script src = "../static/admin.js"></script>
</head>
<body>
<!--导航栏-->
<div id="menu">
<div class="layui-container">
<div class="layui-row">
<div class="layui-col-lg9 layui-col-md-offset1">
<div style = "float: left;">
<ul class="layui-nav" lay-filter="">
<li class="layui-nav-item"><a href="">首页</a></li>
<li class="layui-nav-item layui-this"><a href="">探索发现</a></li>
<li class="layui-nav-item"><a href="">捐赠版</a></li>
<li class="layui-nav-item"><a href="">帮助文档</a></li>
<li class="layui-nav-item"><a href="">关于</a></li>
</ul>
</div>
<div style = "float: right;">
<ul class="layui-nav">
<li class="layui-nav-item">
<a href="">回收站<span class="layui-badge">9</span></a>
</li>
<li class="layui-nav-item">
<a href=""><img src="http://t.cn/RCzsdCq" class="layui-nav-img">后台管理</a>
<dl class="layui-nav-child">
<dd><a href="javascript:;">修改信息</a></dd>
<dd><a href="javascript:;">安全管理</a></dd>
<dd><a href="javascript:;">退出</a></dd>
</dl>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!--导航栏END-->
</body>
</html>

7
config.php

@ -1,4 +1,11 @@ @@ -1,4 +1,11 @@
<?php
require_once( 'sdk/Medoo.php' );
use Medoo\Medoo;
$database = new medoo([
'database_type' => 'sqlite',
'database_file' => 'data/imgurl.db3'
]);
$config = array(
'domain' => 'http://localhost/imgurl/', //网站域名
'watermark' => 'false', //文字水印

BIN
data/imgurl.db3

Binary file not shown.

45
found.php

@ -4,21 +4,31 @@ @@ -4,21 +4,31 @@
include_once('./config.php');
//载入header
include_once('tpl/header.php');
require_once( 'sdk/Medoo.php' );
use Medoo\Medoo;
$database = new medoo([
'database_type' => 'sqlite',
'database_file' => 'data/imgurl.db3'
]);
//获取当前时间
$thetime = date('Y-m',time());
$query = "SELECT `id`,`dir` FROM `uploads` WHERE (`date` LIKE '%2018-01%') AND 'user' = 'user' ORDER BY random() LIMIT 10";
$datas = $database->query($query)->fetchAll();
//print_r($datas);
//var_dump($datas);
//var_dump( $database->log() );
//$datas = $database->select("uploads",[
// "id",
// "dir"
//],[
// "ORDER" => "random()",
// "LIMIT" => 10,
// "date[~]" => $thetime,
// "user" => 'user'
//]);
//var_dump( $database->log() );
$num = $database->count("uploads",["date[~]" => $thetime]);
$datas = $database->select("uploads",[
"id",
"dir"
],[
"ORDER" => "random()",
"LIMIT" => 10
]);
//如果图片大于10张
if($num > 10){
$num = 10;
}
//print_r($datas);
?>
@ -34,7 +44,7 @@ @@ -34,7 +44,7 @@
<table class="table table-striped">
<tbody>
<?php
for($i = 0;$i < 10;$i++) {
for($i = 0;$i < $num;$i++) {
//如果文件是空的,则终止循环
$imgdir = $datas[$i]['dir'];
?>
@ -44,13 +54,6 @@ @@ -44,13 +54,6 @@
echo "<a href = "."'".$config['domain'].$imgdir."' target = '_blank'>"."$imgdir</a>";
?>
</td>
<td>
<?php
if(isset($_COOKIE['uid'])) {
echo "<a href = \"javascript:;\" onclick = \"del('$fname[$i]',$i);\">删除</a>";
}
?>
</td>
</tr>
<?php } ?>
</tbody>

44
import.php

@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
<?php
include_once( 'config.php' );
$dir = $_GET['dir'];
$year = $_GET['year'];
$month = $_GET['month'];
$date = $year.$month;
$user = $_GET['user'];
$thedate = '20'.$year.'-'.$month.'-01';
//echo $thedate;
$dir = $dir.'/'.$date;
//echo $dir;
//exit;
$dir = new RecursiveDirectoryIterator($dir);
$arr = get_files($dir);
//print_r($arr);
$num = count($arr);
echo $num;
for($i=0;$i < $num;$i++){
$add = $database->insert("uploads",["dir" => $arr[$i],"date" => $thedate,"ip" => '127.0.0.1',"method" => 'localhost',"user" => $user]);
echo '导入成功!';
}
echo "共导入".$num;
//遍历目录
function get_files($dir) {
$files = array();
for (; $dir->valid(); $dir->next()) {
if ($dir->isDir() && !$dir->isDot()) {
if ($dir->haschildren()) {
$files = array_merge($files, get_files($dir->getChildren()));
};
}else if($dir->isFile()){
$files[] = $dir->getPathName();
}
}
return $files;
}
?>

4
recycle.php

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
//载入配置
include_once('./config.php');
//载入header
include_once('./header.php');
include_once('tpl/header.php');
//权限判断
$id = md5($config['username'].$config['password']);
$uid = $_COOKIE['uid'];
@ -98,5 +98,5 @@ @@ -98,5 +98,5 @@
<?php
//载入页脚
include_once('./footer.php');
include_once('tpl/footer.php');
?>

6
static/admin.css

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
#menu{
width:100%;
margin:0;
padding:0;
background-color:#393D49;
}

4
static/admin.js

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
//LayUI
layui.use('element', function(){
var element = layui.element;
});

2
static/embed.js

@ -21,6 +21,7 @@ $(document).ready(function() @@ -21,6 +21,7 @@ $(document).ready(function()
var tinypng = $("#tinypng").html(); //压缩状态
$("#loading").hide();
$("#relink").show();
//console.log(data);
var imginfo = new Function("return" + data)();
document.getElementById("linkurl").value = imginfo.linkurl;
document.getElementById("htmlurl").value = "<img src = '" + imginfo.linkurl + "' />";
@ -79,3 +80,4 @@ function compression(imgurl) { @@ -79,3 +80,4 @@ function compression(imgurl) {
return true;
});
}

2
static/layui/css/layui.css

File diff suppressed because one or more lines are too long

2
static/layui/css/layui.mobile.css

File diff suppressed because one or more lines are too long

2
static/layui/css/modules/code.css

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
/** layui-v2.2.5 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

2
static/layui/css/modules/laydate/default/laydate.css

File diff suppressed because one or more lines are too long

BIN
static/layui/css/modules/layer/default/icon-ext.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
static/layui/css/modules/layer/default/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

2
static/layui/css/modules/layer/default/layer.css

File diff suppressed because one or more lines are too long

BIN
static/layui/css/modules/layer/default/loading-0.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
static/layui/css/modules/layer/default/loading-1.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

BIN
static/layui/css/modules/layer/default/loading-2.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/layui/font/iconfont.eot

Binary file not shown.

459
static/layui/font/iconfont.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 231 KiB

BIN
static/layui/font/iconfont.ttf

Binary file not shown.

BIN
static/layui/font/iconfont.woff

Binary file not shown.

BIN
static/layui/images/face/0.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/layui/images/face/1.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
static/layui/images/face/10.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/layui/images/face/11.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/layui/images/face/12.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/layui/images/face/13.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
static/layui/images/face/14.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/layui/images/face/15.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/layui/images/face/16.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
static/layui/images/face/17.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
static/layui/images/face/18.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/layui/images/face/19.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
static/layui/images/face/2.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/layui/images/face/20.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/layui/images/face/21.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/layui/images/face/22.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
static/layui/images/face/23.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
static/layui/images/face/24.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
static/layui/images/face/25.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/layui/images/face/26.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
static/layui/images/face/27.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
static/layui/images/face/28.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/layui/images/face/29.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
static/layui/images/face/3.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
static/layui/images/face/30.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/layui/images/face/31.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/layui/images/face/32.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
static/layui/images/face/33.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/layui/images/face/34.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/layui/images/face/35.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/layui/images/face/36.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/layui/images/face/37.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/layui/images/face/38.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/layui/images/face/39.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
static/layui/images/face/4.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
static/layui/images/face/40.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/layui/images/face/41.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/layui/images/face/42.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
static/layui/images/face/43.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/layui/images/face/44.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/layui/images/face/45.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/layui/images/face/46.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/layui/images/face/47.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/layui/images/face/48.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/layui/images/face/49.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/layui/images/face/5.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
static/layui/images/face/50.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
static/layui/images/face/51.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/layui/images/face/52.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

BIN
static/layui/images/face/53.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/layui/images/face/54.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/layui/images/face/55.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/layui/images/face/56.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/layui/images/face/57.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/layui/images/face/58.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/layui/images/face/59.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
static/layui/images/face/6.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/layui/images/face/60.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
static/layui/images/face/61.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/layui/images/face/62.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/layui/images/face/63.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
static/layui/images/face/64.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
static/layui/images/face/65.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/layui/images/face/66.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
static/layui/images/face/67.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/layui/images/face/68.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/layui/images/face/69.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/layui/images/face/7.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/layui/images/face/70.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
static/layui/images/face/71.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
static/layui/images/face/8.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/layui/images/face/9.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

2
static/layui/lay/modules/carousel.js vendored

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
/** layui-v2.2.5 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['<button class="layui-icon '+u+'" lay-type="sub">'+("updown"===n.anim?"&#xe619;":"&#xe603;")+"</button>",'<button class="layui-icon '+u+'" lay-type="add">'+("updown"===n.anim?"&#xe61a;":"&#xe602;")+"</button>"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['<div class="'+c+'"><ul>',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("<li"+(n.index===e?' class="layui-this"':"")+"></li>")}),i.join("")}(),"</ul></div>"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a<n.index&&e.slide("sub",n.index-a)})},m.prototype.slide=function(e,i){var n=this,l=n.elemItem,u=n.config,c=u.index,m=u.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),l.eq(u.index).addClass(d),setTimeout(function(){l.eq(c).addClass(r),l.eq(u.index).addClass(r)},50)):(n.addIndex(i),l.eq(u.index).addClass(s),setTimeout(function(){l.eq(c).addClass(o),l.eq(u.index).addClass(o)},50)),setTimeout(function(){l.removeClass(a+" "+d+" "+s+" "+o+" "+r),l.eq(u.index).addClass(a),n.haveSlide=!1},300),n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a),n.haveSlide=!0,layui.event.call(this,t,"change("+m+")",{index:u.index,prevIndex:c,item:l.eq(u.index)}))},m.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){clearInterval(e.timer)}).on("mouseleave",function(){e.autoplay()}),i.elem.data("haveEvents",!0))},n.render=function(e){var i=new m(e);return i},e(t,n)});

2
static/layui/lay/modules/code.js vendored

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
/** layui-v2.2.5 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")),c.html('<ol class="layui-code-ol"><li>'+o.replace(/[\r\t\n]+/g,"</li><li>")+"</li></ol>"),c.find(">.layui-code-h3")[0]||c.prepend('<h3 class="layui-code-h3">'+(c.attr("lay-title")||e.title||"code")+(e.about?'<a href="'+l+'" target="_blank">layui.code</a>':"")+"</h3>");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss");

2
static/layui/lay/modules/element.js vendored

File diff suppressed because one or more lines are too long

2
static/layui/lay/modules/flow.js vendored

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
/** layui-v2.2.5 MIT License By https://www.layui.com */
;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon ">&#xe63e;</i>';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="<cite>加载更多</cite>",h=l('<div class="layui-flow-more"><a href="javascript:;">'+d+"</a></div>");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;s<t.lazyimg.elem.length;s++){var v=t.lazyimg.elem.eq(s),y=a?function(){return v.offset().top-n.offset().top+m}():v.offset().top;if(c(v,f),i=s,y>u)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});

2
static/layui/lay/modules/form.js vendored

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save