#
luxiaotao1123
2020-11-17 f215a22829d7301535af73e02f91a9ad718e1b22
src/main/webapp/static/js/common.js
@@ -1,9 +1,4 @@
// 生产
// var baseUrl = "/wcs";
// 测试
var baseUrl = "";
// 系统运行状态
var systemRunning = true;
var baseUrl = "/jswcs";
// 赋值
function setVal(el, val) {
@@ -145,9 +140,9 @@
                    if (res.code === 200){
                        callback(res);
                    } else if (res.code === 403){
                        window.location.href = baseUrl+"/login";
                        parent.location.href = baseUrl+"/login";
                    }  else {
                        alert(res.msg);
                        layer.msg(res.msg, {icon: 2});
                    }
                },
                error: function (res, type) {
@@ -162,3 +157,15 @@
        return http
    }) : "object" == typeof module && module.exports ? module.exports = http : n.http = http
}(this);
/**
 * 获取url键值对
 */
function getUrlVal(key) {
    var reg = new RegExp('(^|&)' + key + '=([^&]*)(&|$)', 'i');
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
        return unescape(r[2]);
    }
    return null;
}