luxiaotao1123
2021-04-08 91f2cd5b0f832091f654cce926585d2f05cad114
src/main/webapp/static/js/cool.js
@@ -150,4 +150,39 @@
            }
        }
    });
}
var tips2;
// 是否存在校验
function exist(id, domain, dom) {
    var param = {
        key: id,
        val: $('#'+ (dom ? dom : id)).val()
    };
    $.ajax({
        url: baseUrl+"/"+domain+"/check/column/auth",
        headers: {'token': localStorage.getItem('token')},
        data: JSON.stringify(param),
        dataType:'json',
        contentType:'application/json;charset=UTF-8',
        method: 'POST',
        success: function (res) {
            if (res.code === 200) {
                tips2 = layer.tips(
                    "<span style='color:red;'>不存在</span>",
                    '#'+(dom ? dom : id),
                    {
                        // tipsMore: true,
                        tips: [3,'#fff'],
                        time:0
                        ,area: 'auto'
                        ,maxWidth:500
                    });
            } else if (res.code === 403) {
                top.location.href = baseUrl+"/";
            } else if (res.code === 407) {
                layer.close(tips2);
            }
        }
    });
}