Compare commits
No commits in common. 'master' and 'wyy_branch' have entirely different histories.
master
...
wyy_branch
@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
=======
|
||||
>>>>>>> remotes/origin/develop
|
||||
<component name="FacetManager">
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
|
||||
</descriptors>
|
||||
<webroots>
|
||||
<root url="file://$MODULE_DIR$/web" relative="/" />
|
||||
</webroots>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> remotes/origin/develop
|
||||
=======
|
||||
>>>>>>> remotes/origin/develop
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="lib" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,118 +1,2 @@
|
||||
/** layui-v2.5.6 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 "></i>';
|
||||
|
||||
// 定义 load 方法,用于加载更多内容
|
||||
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), // 获取滚动容器元素,默认为 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();
|
||||
};
|
||||
|
||||
// 加载更多逻辑
|
||||
var g = function() {
|
||||
o = !0;
|
||||
h.find("a").html(t); // 显示加载动画
|
||||
"function" == typeof e.done && e.done(++c, p); // 如果有 done 方法,调用它
|
||||
};
|
||||
|
||||
// 初始化加载
|
||||
g();
|
||||
// 点击加载更多时,触发加载操作
|
||||
h.find("a").on("click", function() {
|
||||
l(this);
|
||||
i || o || g();
|
||||
});
|
||||
|
||||
// 如果启用了懒加载
|
||||
if (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 && f.width() && (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;
|
||||
|
||||
// 图片加载检查和设置
|
||||
var 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++;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 触发懒加载
|
||||
var f = function(e, o) {
|
||||
var f = a ? (o || n).height() : l(window).height(), m = n.scrollTop(), u = m + f;
|
||||
t.lazyimg.elem = l(r);
|
||||
if (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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 初次加载图片
|
||||
f();
|
||||
if (!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);
|
||||
});
|
||||
;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 "></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&&f.width()&&(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)});
|
||||
File diff suppressed because one or more lines are too long
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…
Reference in new issue