|
@@ -45,72 +45,11 @@ String.prototype.mytrim = function(){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 随时提issues
|
|
|
-function initTab(){
|
|
|
- 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 subIdOne = 1
|
|
|
- var $conTwo = $('.scroe-content-two .score-content')
|
|
|
-
|
|
|
- if(isPc){
|
|
|
- $conTwo.eq(0).show()
|
|
|
- }else{
|
|
|
- $conTwo.eq(4).show()
|
|
|
- }
|
|
|
-
|
|
|
- $('[data-type=statuList').show()
|
|
|
-
|
|
|
- $('.scroeTwo .nav_item').on('mouseenter',function(){
|
|
|
- $(this).addClass('active').siblings().removeClass('active')
|
|
|
- mtIdOne = $(this).attr('data-mt')
|
|
|
- if(mtIdOne==1){
|
|
|
- $('[data-type=statuImg').hide()
|
|
|
- $('[data-type=statuList').show()
|
|
|
- }else{
|
|
|
- $('[data-type=statuImg').show()
|
|
|
- $('[data-type=statuList').hide()
|
|
|
- }
|
|
|
- show($conTwo)
|
|
|
- })
|
|
|
-
|
|
|
- $('.scroeTwo .nav_item_sub').hover(function(){
|
|
|
- $(this).addClass('active').siblings().removeClass('active')
|
|
|
- subIdOne = $(this).attr('data-st')
|
|
|
- show($conTwo)
|
|
|
- })
|
|
|
-
|
|
|
- function show($con){
|
|
|
- console.log(mtIdOne,subIdOne)
|
|
|
- if(parseInt(mtIdOne) ==1&& parseInt(subIdOne) ==1){
|
|
|
- if(!isPc){
|
|
|
- console.log('111')
|
|
|
- $con.eq(4).show().siblings().hide()
|
|
|
- }else{
|
|
|
- $con.eq(0).show().siblings().hide()
|
|
|
- }
|
|
|
- }
|
|
|
- if(parseInt(mtIdOne)==1&&parseInt(subIdOne) ==2){
|
|
|
- if(!isPc){
|
|
|
- console.log('2222')
|
|
|
- $con.eq(5).show().siblings().hide()
|
|
|
- }else{
|
|
|
- $con.eq(1).show().siblings().hide()
|
|
|
- }
|
|
|
- }
|
|
|
- if(parseInt(mtIdOne)==2&&parseInt(subIdOne) ==1){
|
|
|
- $con.eq(2).show().siblings().hide()
|
|
|
- }
|
|
|
- if(parseInt(mtIdOne)==2&&parseInt(subIdOne) ==2){
|
|
|
- $con.eq(3).show().siblings().hide()
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
|
|
|
|
|
|
var V = {
|
|
|
init : function(){
|
|
|
- initTab()
|
|
|
+ // initTab()
|
|
|
},
|
|
|
initScroll : function(){
|
|
|
var $sidebar = $(".zt-mod-sidebar"),$sidebarLink = $(".zt-mod-sidebar a"),$sidebarList = $(".zt-mod-sidebar li")
|
|
@@ -157,7 +96,8 @@ var C = {
|
|
|
C.initSidebar()
|
|
|
C.initRankTag()
|
|
|
C.initTeam(isPc)
|
|
|
- C.initWordLimit(isPc)
|
|
|
+ C.initTab()
|
|
|
+
|
|
|
},
|
|
|
initRankTag : function(){
|
|
|
new Tag('.rankMainTag')
|
|
@@ -221,7 +161,6 @@ var C = {
|
|
|
$("body").on("click",".zt-mod-team .ext-close",function(){
|
|
|
$list.removeClass("is-open")
|
|
|
})
|
|
|
-
|
|
|
if(!isPc){
|
|
|
var list = $(' #news .zt-list-video li')
|
|
|
for(var i = list.length-1;i>list.length-3;i--){
|
|
@@ -235,17 +174,79 @@ var C = {
|
|
|
|
|
|
|
|
|
},
|
|
|
- initWordLimit:function(isPc){
|
|
|
- var limitWord = 0
|
|
|
- limitWord= isPc?34:24
|
|
|
- var cname = $('.video-item h4');
|
|
|
- for (var i = 0; i < cname.length; i++) {
|
|
|
- var nowLength = cname[i].innerHTML.length;
|
|
|
- if (nowLength > limitWord) {
|
|
|
- cname[i].innerHTML = cname[i].innerHTML.substr(0, limitWord) + '...';
|
|
|
- }
|
|
|
- }
|
|
|
+ // 随时提issues
|
|
|
+ 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 subIdOne = 1
|
|
|
+ var $conTwo = $('.scroe-content-two .score-content')
|
|
|
+
|
|
|
+ if(isPc){
|
|
|
+ $conTwo.eq(0).show()
|
|
|
+ }else{
|
|
|
+ $conTwo.eq(4).show()
|
|
|
+ }
|
|
|
+
|
|
|
+ $('[data-type=statuList]').show()
|
|
|
+
|
|
|
+ $('.scroeTwo .nav_item').on('mouseenter',function(){
|
|
|
+ $(this).addClass('active').siblings().removeClass('active')
|
|
|
+ mtIdOne = $(this).attr('data-mt')
|
|
|
+ if(parseInt(mtIdOne)==1){
|
|
|
+ $('[data-type=statuImg]').hide()
|
|
|
+ $('[data-type=statuList]').show()
|
|
|
+ }else{
|
|
|
+ $('[data-type=statuImg]').show()
|
|
|
+ $('[data-type=statuList]').hide()
|
|
|
+ }
|
|
|
+ subIdOne = 1
|
|
|
+ show($conTwo)
|
|
|
+ })
|
|
|
+
|
|
|
+ $('.scroeTwo .nav_item_sub').on('mouseenter',function(){
|
|
|
+ $(this).addClass('active').siblings().removeClass('active')
|
|
|
+ subIdOne = $(this).attr('data-st')
|
|
|
+ show($conTwo)
|
|
|
+ })
|
|
|
+
|
|
|
+ function show($con){
|
|
|
+ if(parseInt(mtIdOne) ==1&& parseInt(subIdOne) ==1){
|
|
|
+ if(!isPc){
|
|
|
+ console.log('111')
|
|
|
+ $con.eq(4).show().siblings().hide()
|
|
|
+ }else{
|
|
|
+ $con.eq(0).show().siblings().hide()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(parseInt(mtIdOne)==1&&parseInt(subIdOne) ==2){
|
|
|
+ if(!isPc){
|
|
|
+ console.log('2222')
|
|
|
+ $con.eq(5).show().siblings().hide()
|
|
|
+ }else{
|
|
|
+ $con.eq(1).show().siblings().hide()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(parseInt(mtIdOne)==2&&parseInt(subIdOne) ==1){
|
|
|
+ $con.eq(2).show().siblings().hide()
|
|
|
+ }
|
|
|
+ if(parseInt(mtIdOne)==2&&parseInt(subIdOne) ==2){
|
|
|
+ $con.eq(3).show().siblings().hide()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ // initWordLimit:function(isPc){
|
|
|
+ // var limitWord = 0
|
|
|
+ // limitWord= isPc?34:24
|
|
|
+ // var cname = $('.video-item h4');
|
|
|
+ // for (var i = 0; i < cname.length; i++) {
|
|
|
+ // var nowLength = cname[i].innerHTML.length;
|
|
|
+ // if (nowLength > limitWord) {
|
|
|
+ // cname[i].innerHTML = cname[i].innerHTML.substr(0, limitWord) + '...';
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
V.init();
|