Selaa lähdekoodia

DOTA2切换效果修改

PC-20180523CIYM\Administrator 5 vuotta sitten
vanhempi
commit
adf3705c7f

+ 12 - 11
2019专题/1908DOTA2/src/_index.html

@@ -74,7 +74,7 @@
             </div>
         </div>
         <!-- 广告位 -->
-        <div class="g-zt-adv g-zt-inner">
+        <div class="g-zt-adv g-zt-inner zt-imgwrap-link">
             <img src="http://fed.webdev.ouj.com/1136x110" alt="" />
         </div>
         <!-- 赛程安排 -->
@@ -337,8 +337,17 @@
                 <div class="zt-mod_bd  rankMainTag scroeTwo">
                     <!-- rankMainTag -->
                     <div class="clearfix  score-nav-main">
-                        <div class="fl nav_item nav  active" data-mt="1">小组赛</div>
-                        <div class="fl nav_item nav" data-mt="2">淘汰赛</div>
+                        <div class="fl nav_item nav active" data-mt="2">淘汰赛</div>
+                        <div class="fl nav_item nav" data-mt="1">小组赛</div>
+                    </div>
+
+                    <div class="clearfix  score-nav-sub" data-type="statuList">
+                        <div class="fl nav_item_sub nav active " data-st="1">
+                            <span >A组</span>
+                        </div>
+                        <div class="fl nav_item_sub nav " data-st="2">
+                            <span>B组</span>
+                        </div>
                     </div>
 
                     <div class="clearfix  score-nav-sub" data-type="statuImg"> 
@@ -351,14 +360,6 @@
                     </div>
 
                     
-                    <div class="clearfix  score-nav-sub" data-type="statuList">
-                        <div class="fl nav_item_sub nav active " data-st="1">
-                            <span >A组</span>
-                        </div>
-                        <div class="fl nav_item_sub nav " data-st="2">
-                            <span>B组</span>
-                        </div>
-                    </div>
 
                     <!-- MainContent -->
                     <div class="score-rank-content scroe-content-two">

+ 12 - 11
2019专题/1908DOTA2/src/modules/page/index.js

@@ -181,19 +181,20 @@ var C = {
     initTab:function(){
         var isPc = !/Android|webOS|iPhone|Windows Phone|iPod|BlackBerry|SymbianOS/i.test(window.navigator.userAgent) && !/[\?&]pc(?:[=&].*|$)/.test(window.location.href)
         // console.log(isPc)
-        var mtIdOne = 1
+        var mtIdOne = parseInt($('.nav_item.active').attr('data-mt'))
         var subIdOne = 1
         var $conTwo = $('.scroe-content-two .score-content')
 
-        if(isPc){
-            $conTwo.eq(0).show()
-        }else{
-            $conTwo.eq(4).show()
-        }
+        // if(isPc){
+        //     $conTwo.eq(0).show()
+        // }else{
+        //     $conTwo.eq(4).show()
+        // }
+        $conTwo.eq(2).show()
 
-        $('[data-type=statuList]').show()
+        $('[data-type=statuImg]').show()
 
-        $(' .nav_item').on('mouseenter',function(){
+        $(' .nav_item').on('click',function(){
             $(this).addClass('active').siblings().removeClass('active')
             mtIdOne = $(this).attr('data-mt')
             if(parseInt(mtIdOne)==1){
@@ -208,7 +209,7 @@ var C = {
             show($conTwo)
         })
 
-        $(' .nav_item_sub span').on('mouseenter',function(){
+        $(' .nav_item_sub span').on('click',function(){
             $(this).parent().addClass('active').siblings().removeClass('active')
             subIdOne = $(this).parent().attr('data-st')
             show($conTwo)
@@ -217,7 +218,7 @@ var C = {
         function show($con){
             if(parseInt(mtIdOne) ==1&& parseInt(subIdOne) ==1){
                 if(!isPc){
-                    console.log('111')
+                    // console.log('111')
                     $con.eq(4).show().siblings().hide()
                 }else{
                     $con.eq(0).show().siblings().hide()
@@ -225,7 +226,7 @@ var C = {
             }
             if(parseInt(mtIdOne)==1&&parseInt(subIdOne) ==2){
                 if(!isPc){
-                    console.log('2222')
+                    // console.log('2222')
                     $con.eq(5).show().siblings().hide()
                 }else{
                     $con.eq(1).show().siblings().hide()

+ 3 - 0
2019专题/1908DOTA2/src/sass/global.scss

@@ -1163,6 +1163,9 @@ $vari: 750 / 640;
         background-position: center;
         min-width: 0px;
     }
+    .zt-imgwrap-link {
+        display: none;
+    }
     .zt-mod-score .score-content .winner-rank .looser_last {
         font-size: 16px;
     }