Browse Source

修改js报错

master
等你 2 months ago
parent
commit
1d7405d6cd
2 changed files with 16 additions and 8 deletions
  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 View File

45
     //     btnDownMenu.classList.add("btnShow");
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
     let url = new URL(window.location.href);
56
     let url = new URL(window.location.href);
54
     let anchor = url.hash.substring(1);
57
     let anchor = url.hash.substring(1);
97
     //   console.log(error)
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
   textAni() {
109
   textAni() {
107
     let mod = this.isMobile;
110
     let mod = this.isMobile;

+ 5
- 0
src/pages/index/index.less View File

891
       box-sizing: border-box;
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
 @media screen and (min-width:800px){
901
 @media screen and (min-width:800px){

Loading…
Cancel
Save