Browse Source

Merge remote-tracking branch 'origin/scale0414' into testNew

zhouna 4 years ago
parent
commit
c7b68ada5e

+ 8 - 6
src/css/homeStatic.less

@@ -2,7 +2,8 @@
 
 .staticWrap {
   .staticTopCenter {
-    width: 800px;
+    width: 58.6%;
+    max-width: 800px;
     margin: 0 auto;
     text-align: center;
     padding-top: 130px;
@@ -14,7 +15,8 @@
   .staticTopLogo {
     margin-bottom: 40px;
     img {
-      width: 500px;
+      width: 62.4%;
+      max-width: 800px;
     }
   }
   .staticTopTab {
@@ -26,7 +28,7 @@
       display: inline-block;
       font-size: 16px;
       color: #fff;
-      margin: 0 20px;
+      margin: 0 1.3vw;
       cursor: pointer;
       padding-bottom: 2px;
       border-bottom: 2px solid #2A9BD5;
@@ -36,7 +38,7 @@
     }
   }
   .staticTopSearch {
-    width: 800px;
+    width: 100%;
     height: 60px;
     line-height: 60px;
     background-color: #fff;
@@ -76,11 +78,11 @@
     text-align: center;
     margin:80px 0 50px 0;
     color: #333;
-    font-size: 30px;
+    font-size: 2.7vw;
     font-weight: bold;
   }
   .staticBg {
-    width: 800px;
+    width: 62.4%;
     margin: 0 auto;
     img {
       width: 100%;

+ 4 - 4
src/css/searchStaticList.less

@@ -4,11 +4,11 @@
   position: absolute;
   width: 100%;
   height: 100%;
-  min-width: 900px;
+  /*min-width: 900px;*/
   padding: 60px 20px 20px;
   box-sizing: border-box;
   background-color: #DDE2E4;
-  overflow: auto;
+  /*overflow: auto;*/
   .staticMainWrap {
     background-color: #fff;
     padding: 0 60px 20px 60px;
@@ -48,7 +48,7 @@
       display: inline-block;
       font-size: 16px;
       color: #333;
-      margin: 0 20px;
+      margin: 0 1.5vw;
       cursor: pointer;
       padding-bottom: 2px;
     }
@@ -57,7 +57,7 @@
     }
   }
   .staticTopSearch {
-    width: 800px;
+    width: 73.3%;
     height: 50px;
     line-height: 50px;
     background-color: #fff;

File diff suppressed because it is too large
+ 2 - 2
src/html/homeStatic.html


+ 4 - 3
src/js/searchStaticList.js

@@ -18,7 +18,7 @@ $(function(){
   initData()
   getAllTypes()
   getSearchList()
-  getTabData(curPage)
+  getTabData()
 });
 //tab
 function renderTab(data){
@@ -28,6 +28,7 @@ function renderTab(data){
       str += `<li class="${i==0?'tabFst':''}" data-id="${element.val}">${element.name}</li>`
     }
     $('.staticTopTab ul').html(str)
+    $('.staticTopTab li[data-id='+searchType+']').css({color:'#2A9BD5'}).siblings().css({color:'#333'});
     $(".staticTopTab li").click(function(){
       searchType = $(this).attr('data-id')
       $(this).css({color:'#2A9BD5'}).siblings().css({color:'#333'})
@@ -74,7 +75,7 @@ function getTabData(){
         const totalPage = data.pages;
         const totalNum = data.total;
         renderList(tabList);
-        if(totalPage > 1){
+        if(totalNum > 0){
             renderPagination(totalPage,Number(curPage),totalNum)
         } else{
             $('.pagination').html("")
@@ -111,7 +112,7 @@ function renderList(tabList){
     $('.resultItem').click(function(){
         let name = $(this).attr('data-name')
         let type = $(this).attr('data-type')
-        window.location.href = `./staticInfo.html?name=${name}&type=${type}`
+        window.open(`./staticInfo.html?name=${name}&type=${type}`);
     })
 }
 function initData(){

+ 2 - 3
src/js/staticInfoOut.js

@@ -190,14 +190,13 @@ function bindTabClick(){
     const moduleName = $(this).attr("data-module")
     const display = $(`.${moduleName}`).css("display")
       $(".titleCont .title").html($(this).attr('data-title'));
-    if(display == "none"){
+    //if(display == "none"){
       $(".activeTab").removeClass("activeTab")
       $(this).addClass("activeTab")
       $(".container").css("display","none")
-  
       $(`.${moduleName}`).css("display","block")
       $(`.${moduleName} .infos`).scrollTop(0)
-    }
+    //}
   })
   $("#openWin").on("click",function(){
     const type= getUrlArgObject('type');