补充文件
This commit is contained in:
30
public/static/system/js/common.js
Normal file
30
public/static/system/js/common.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/** common.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */
|
||||
layui.define(['layer'], function(exports) {
|
||||
"use strict";
|
||||
|
||||
var $ = layui.jquery,
|
||||
layer = layui.layer;
|
||||
|
||||
var common = {
|
||||
/**
|
||||
* 抛出一个异常错误信息
|
||||
* @param {String} msg
|
||||
*/
|
||||
throwError: function(msg) {
|
||||
throw new Error(msg);
|
||||
return;
|
||||
},
|
||||
/**
|
||||
* 弹出一个错误提示
|
||||
* @param {String} msg
|
||||
*/
|
||||
msgError: function(msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 5
|
||||
});
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
exports('common', common);
|
||||
});
|
||||
Reference in New Issue
Block a user