You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
539 B
27 lines
539 B
/** 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);
|
|
});
|