diff --git a/js/public.js b/js/public.js index 179864d..707fc92 100644 --- a/js/public.js +++ b/js/public.js @@ -21,7 +21,6 @@ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, conte beforeSend: beforeFn, contentType: contentType || "application/x-www-form-urlencoded; charset=utf-8", success: function (data) { - // closeWindowOpen(); if (data.code === 401) { closeWindowOpen(); } @@ -263,7 +262,7 @@ function checkValue(value) { // 页面401关闭页面 function closeWindowOpen() { - top.layer.confirm('登录已过期,请点击确定后重新登录!', { + let layerIndex = top.layer.confirm('登录已过期,请点击确定后重新登录!', { btn: ['确认', '取消'], 'title': '操作提示', move:false, @@ -272,6 +271,7 @@ function closeWindowOpen() { } }, function () { window.close(); + top.layer.close(layerIndex); }, function () { window.close(); });