diff --git a/web/public/js/utils.js b/web/public/js/utils.js index c9b8dc79..efbef7db 100644 --- a/web/public/js/utils.js +++ b/web/public/js/utils.js @@ -353,6 +353,9 @@ window.teaweb = { Swal: function () { return this.isPopup() ? window.parent.Swal : window.Swal; }, + hasPopup: function () { + return document.getElementsByClassName("swal2-container").length > 0 + }, success: function (message, callback) { var width = "20em"; if (message.length > 30) { diff --git a/web/views/@default/servers/server/log/index.js b/web/views/@default/servers/server/log/index.js index 3d234214..336511e5 100644 --- a/web/views/@default/servers/server/log/index.js +++ b/web/views/@default/servers/server/log/index.js @@ -8,6 +8,14 @@ Tea.context(function () { this.isLoaded = false this.load = function () { + // 如果有弹窗时,暂时不更新 + if (teaweb.hasPopup()) { + this.$delay(function () { + this.load() + }, 5000) + return + } + this.$post("$") .params({ serverId: this.serverId,