diff --git a/index.html b/index.html
index e9c056f..8eb6c33 100644
--- a/index.html
+++ b/index.html
@@ -19,13 +19,14 @@
-
-
-
-
-
-
-
+
+
-
@@ -65,6 +66,7 @@
- 个人中心
- 基本资料
- 安全设置
+ - 皮肤动画
-
diff --git a/js/okadmin.js b/js/okadmin.js
index 1316778..92583ed 100644
--- a/js/okadmin.js
+++ b/js/okadmin.js
@@ -300,6 +300,13 @@ layui.use(["element", "layer", "okUtils", "okTab", "okLayer"], function () {
});
});
+ /**
+ * 弹窗皮肤
+ */
+ $("#alertSkin").click(function () {
+ okLayer.open("皮肤动画", "pages/system/alertSkin.html", "50%", "45%", function (layero) {}, function () {});
+ });
+
/**
* 退出操作
*/
diff --git a/lib/layui/lay/okmodules/okLayer.js b/lib/layui/lay/okmodules/okLayer.js
index bdb5236..68f4f8e 100644
--- a/lib/layui/lay/okmodules/okLayer.js
+++ b/lib/layui/lay/okmodules/okLayer.js
@@ -1,13 +1,13 @@
"use strict";
layui.define(["layer"], function (exports) {
- var okLayer = {
+ let okLayer = {
/**
* confirm()函数二次封装
* @param content
* @param yesFunction
*/
confirm: function (content, yesFunction) {
- var options = {skin: okLayer.skinChoose(), icon: 3, title: "提示", anim: okLayer.animChoose()};
+ let options = {skin: okLayer.skinChoose(), icon: 3, title: "提示", anim: okLayer.animChoose()};
layer.confirm(content, options, yesFunction);
},
/**
@@ -17,7 +17,7 @@ layui.define(["layer"], function (exports) {
* @param width
* @param height
* @param successFunction
- * @param endFunction
+ * @param endFunction
*/
open: function (title, content, width, height, successFunction, endFunction) {
layer.open({
@@ -30,7 +30,7 @@ layui.define(["layer"], function (exports) {
content: content,
zIndex: layer.zIndex,
skin: okLayer.skinChoose(),
- success: successFunction,
+ success: successFunction,
end: endFunction
});
},
@@ -42,37 +42,37 @@ layui.define(["layer"], function (exports) {
time: 1000,
// 绿色勾
greenTick: function (content, callbackFunction) {
- var options = {icon: 1, time: okLayer.msg.time, anim: okLayer.animChoose()};
+ let options = {icon: 1, time: okLayer.msg.time, anim: okLayer.animChoose()};
layer.msg(content, options, callbackFunction);
},
// 红色叉
redCross: function (content, callbackFunction) {
- var options = {icon: 2, time: okLayer.msg.time, anim: okLayer.animChoose()};
+ let options = {icon: 2, time: okLayer.msg.time, anim: okLayer.animChoose()};
layer.msg(content, options, callbackFunction);
},
// 黄色问号
yellowQuestion: function (content, callbackFunction) {
- var options = {icon: 3, time: okLayer.msg.time, anim: okLayer.animChoose()};
+ let options = {icon: 3, time: okLayer.msg.time, anim: okLayer.animChoose()};
layer.msg(content, options, callbackFunction);
},
// 灰色锁
grayLock: function (content, callbackFunction) {
- var options = {icon: 4, time: okLayer.msg.time, anim: okLayer.animChoose()};
+ let options = {icon: 4, time: okLayer.msg.time, anim: okLayer.animChoose()};
layer.msg(content, options, callbackFunction);
},
// 红色哭脸
redCry: function (content, callbackFunction) {
- var options = {icon: 5, time: okLayer.msg.time, anim: okLayer.animChoose()};
+ let options = {icon: 5, time: okLayer.msg.time, anim: okLayer.animChoose()};
layer.msg(content, options, callbackFunction);
},
// 绿色笑脸
greenLaugh: function (content, callbackFunction) {
- var options = {icon: 6, time: okLayer.msg.time, anim: okLayer.animChoose()};
+ let options = {icon: 6, time: okLayer.msg.time, anim: okLayer.animChoose()};
layer.msg(content, options, callbackFunction);
},
// 黄色感叹号
yellowSigh: function (content, callbackFunction) {
- var options = {icon: 7, time: okLayer.msg.time, anim: okLayer.animChoose()};
+ let options = {icon: 7, time: okLayer.msg.time, anim: okLayer.animChoose()};
layer.msg(content, options, callbackFunction);
}
},
@@ -81,8 +81,8 @@ layui.define(["layer"], function (exports) {
* @returns {string}
*/
skinChoose: function () {
- var storage = window.localStorage;
- var skin = storage.getItem("skin");
+ let storage = window.localStorage;
+ let skin = storage.getItem("skin");
if (skin == 1) {
// 灰白色
return "";
@@ -94,7 +94,7 @@ layui.define(["layer"], function (exports) {
return "layui-layer-lan";
} else if (!skin || skin == 4) {
// 随机颜色
- var skinArray = ["", "layui-layer-molv", "layui-layer-lan"];
+ var skinArray = ["", "layui-layer-molv", "layui-layer-lan"];
return skinArray[Math.floor(Math.random() * skinArray.length)];
}
},
@@ -103,11 +103,11 @@ layui.define(["layer"], function (exports) {
* @returns {number}
*/
animChoose: function () {
- var storage = window.localStorage;
- var anim = storage.getItem("anim");
- var animArray = ["0", "1", "2", "3", "4", "5", "6"];
+ let storage = window.localStorage;
+ let anim = storage.getItem("anim");
+ let animArray = ["0", "1", "2", "3", "4", "5", "6"];
if (animArray.indexOf(anim) > -1) {
- // 用户选择的动画
+ // 用户选择的动画
return anim;
} else if (!anim || anim == 7) {
// 随机动画
diff --git a/lib/layui/lay/okmodules/okUtils.js b/lib/layui/lay/okmodules/okUtils.js
index 3f1a20d..626161b 100644
--- a/lib/layui/lay/okmodules/okUtils.js
+++ b/lib/layui/lay/okmodules/okUtils.js
@@ -133,6 +133,32 @@ layui.define(["layer"], function (exprots) {
if (new RegExp("(" + k + ")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
+ },
+ number: {
+ /**
+ * 判断是否为一个正常的数字
+ * @param num
+ */
+ isNumber: function (num) {
+ if (num && !isNaN(num)) {
+ return true;
+ }
+ return false;
+ },
+ /**
+ * 判断一个数字是否包括在某个范围
+ * @param num
+ * @param begin
+ * @param end
+ */
+ isNumberWith: function (num, begin, end) {
+ if (this.isNumber(num)) {
+ if (num >= begin && num <= end) {
+ return true;
+ }
+ return false;
+ }
+ },
}
};
exprots("okUtils", okUtils);
diff --git a/pages/system/alertSkin.html b/pages/system/alertSkin.html
new file mode 100644
index 0000000..1567b59
--- /dev/null
+++ b/pages/system/alertSkin.html
@@ -0,0 +1,97 @@
+
+
+
+
+ 皮肤动画
+
+
+
+
+
+
+
+
+ 顶部导航
+ 皮肤动画
+
+
+
+
+
+
+
+
+
+
+
+
+