admin
2021-01-28 8c1c003c60d2f27b3c55e248451caeec7f2b5631
service-daylucky/src/main/resources/static/js/common.js
@@ -10,6 +10,7 @@
                    , common.layuiElement = layui.element
                    , common.layuiLayer = layui.layer
                    , common.layuiForm = layui.form;
                ;
                common.layuiForm.verify({
                    decimal: [/^(?:[1-9][0-9]*\.[0-9]+|0\.(?!0+$)[0-9]+|0)$/, '请输入数字'],
                    integer: [/^\+?[1-9][0-9]*$/, '请输入正整数'],
@@ -133,8 +134,26 @@
            error(msg) {
                layer.msg(msg, {icon: 5, anim: 6});
            }
        },
        saveTempData: function (key, value) {
            layui.data('temp', {
                key: key
                , value: value
            });
        },
        getTempData: function (key) {
            var local = layui.data('temp');
            if (local) {
                return local[key];
            }
            return null;
        },
        removeTempData: function (key) {
            layui.data('temp', {
                key: key
                ,remove: true
            });
        }
    }
;