wsjdwjek 发表于 2025-6-25 16:22:03

为什么把edge浏览器中的代码注释掉还是一样运行

methods: {            nothingDoing: function () {                var that = this;                // 30分钟无任何操作,自动登出                var dateNow = Date.now();                var nothingDoingTime = Number(that.$cookies.get('nothingDoingTime'));                if (dateNow - nothingDoingTime > 1800000) {                  clearInterval(that.msHead.timer);                  that.msHead.timer = null;                  var domain = that.msHead.domain;                  if (domain === undefined || domain === null || domain.length === 0) {                        that.$cookies.remove('eleTokenId', '/');                  } else {                        that.$cookies.remove('eleTokenId', '/', domain);                  }                  window.location.replace('/');                  alert('为了保障您的数据安全,本系统30分钟内无任何操作,将自动登出!!!\n您的最后一次操作时间为:' + that.baseDateFormat("yyyy-MM-dd hh:mm:ss", new Date(nothingDoingTime).toString()) + '\n本次自动登出时间为:' + that.baseDateFormat("yyyy-MM-dd hh:mm:ss", new Date(dateNow).toString()));                }
注释掉后到时间还是跳出弹框
页: [1]
查看完整版本: 为什么把edge浏览器中的代码注释掉还是一样运行