#
Junjie
22 小时以前 ce0cabc072420dc6dc6c3f8957ec73455a8fd04b
src/main/webapp/static/js/common.js
@@ -68,9 +68,21 @@
    if (child == null){
        child = false;
    }
    var param = (child?parent.window:window).location.href.split("?")[1];
    if (null != param) {
        var resourceId = param.split("=")[1];
    var targetWindow = child ? parent.window : window;
    var search = targetWindow.location.search || "";
    var resourceId = null;
    if (search) {
        if (typeof URLSearchParams !== "undefined") {
            resourceId = new URLSearchParams(search).get("resourceId");
        }
        if (resourceId == null || resourceId === "") {
            var match = search.replace(/^\?/, "").match(/(?:^|&)resourceId=([^&]*)/i);
            resourceId = match ? decodeURIComponent(match[1]) : null;
        }
    }
    if (resourceId != null && resourceId !== "") {
        $.ajax({
            url: baseUrl+"/power/menu/"+resourceId+"/auth",
            headers: {'token': localStorage.getItem('token')},