From dedb0f53e9ef324e0d627c882c0dcd05e73f8a56 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Wed, 7 Aug 2024 13:58:50 +0800 Subject: [PATCH] =?UTF-8?q?task#14504,kpi=E7=9A=84pc=E7=AB=AF=E9=80=82?= =?UTF-8?q?=E9=85=8Djs=E4=BB=A3=E7=A0=81=E5=BD=B1=E5=93=8D=E4=BA=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8C=82=E8=BD=BD=E7=9A=84H5=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=8F=AA=E7=BB=99window.location.pathname=3D?= =?UTF-8?q?=3D'/h5/supplier/dispatch/kpiIndex'=E5=8A=A0=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/public/index.html b/public/index.html index e3bf599e..6472438a 100644 --- a/public/index.html +++ b/public/index.html @@ -3,6 +3,7 @@ + @@ -34,11 +35,11 @@ // VConsole 默认会挂载到 `window.VConsole` 上 // let vConsole = new window.VConsole(); (function (doc, win) { + console.log("==window.location.pathname===",window.location.pathname) let docEl = doc.documentElement let resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize' recalc = function () { var clientWidth = docEl.clientWidth; - // console.log("clientWidth",clientWidth) if (!clientWidth) return; if (clientWidth < 400) { clientWidth = 400; @@ -48,13 +49,20 @@ if (!doc.addEventListener) return; var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); if (isMobile) {// 是移动端不变 - + // console.log("是移动端不变") }else{ - win.addEventListener(resizeEvt, recalc, false); - doc.addEventListener('DOMContentLoaded', recalc, false); + if(window.location.pathname=='/h5/supplier/dispatch/kpiIndex'){ + // console.log("执行了执行了") + win.addEventListener(resizeEvt, recalc, false); + doc.addEventListener('DOMContentLoaded', recalc, false); + } + /*else{ + console.log("走着了这种饿 ") + }*/ } - // console.log("isMobile",isMobile) })(document, window); + +