소스 검색

修改js报错

master
等你 2 달 전
부모
커밋
1d7405d6cd
2개의 변경된 파일16개의 추가작업 그리고 8개의 파일을 삭제
  1. 11
    8
      src/pages/common/js/Common.js
  2. 5
    0
      src/pages/index/index.less

+ 11
- 8
src/pages/common/js/Common.js 파일 보기

@@ -45,10 +45,13 @@ export default class Common {
45 45
     //     btnDownMenu.classList.add("btnShow");
46 46
     //   }
47 47
     // });
48
-    let logo = document.querySelector(".logo");
49
-    logo.addEventListener("click", (e) => {
50
-      window.requestUrl = './index.html';
48
+    let logos = document.querySelectorAll(".logo");
49
+    logos.forEach(function (logo) {
50
+      logo.addEventListener("click", (e) => {
51
+        window.requestUrl = './index.html';
52
+      });
51 53
     });
54
+    
52 55
     //锚点跳转
53 56
     let url = new URL(window.location.href);
54 57
     let anchor = url.hash.substring(1);
@@ -97,11 +100,11 @@ export default class Common {
97 100
     //   console.log(error)
98 101
     // }
99 102
 
100
-    document.onclick = function (e) {
101
-      if (wx && !wx.contains(e.target)) {
102
-        wx.classList.remove("wxShow");
103
-      }
104
-    };
103
+    // document.onclick = function (e) {
104
+    //   if (wx && !wx.contains(e.target)) {
105
+    //     wx.classList.remove("wxShow");
106
+    //   }
107
+    // };
105 108
   }
106 109
   textAni() {
107 110
     let mod = this.isMobile;

+ 5
- 0
src/pages/index/index.less 파일 보기

@@ -891,6 +891,11 @@
891 891
       box-sizing: border-box;
892 892
     }
893 893
   }
894
+  .product{
895
+    &>.text{
896
+      width: calc(100% - 100px);
897
+    }
898
+  }
894 899
   
895 900
 }
896 901
 @media screen and (min-width:800px){

Loading…
취소
저장