文章内容:
=len){ $("."+classname).find(".more").css("显示","无"); }else{ $("."+classname).find(".more").css("display","flex"); } $("."+classname).find("li").each(function(i){ if(i>=tiaoshu){ $(this).css("display","none") }else{ $(this).css("display","block") } }) $("."+classname).find(".more").click(function(){ moreadd++; zongtiaoshu=zongtiaoshu+index; if (zongtiaoshu>=len){ $("."+classname).find(".more").css("display","none"); }else{ $("."+classname).find(" .more").css("display","flex"); } $("."+classname).find("li").each(function(i){ if(i>=zongtiaoshu){ $( this).css("display","none") }else{ $(this).css("display","block") } }) if(moreadd>=2){ $("."+classname) .find(".more").css("display","none"); } }) } //精选下图片设置16比9 function setPageImgfun(className){ var columnlihwidth = $(className).width( ); var columnliheight=columnlihwidth*9/16; $(className).css({'height':columnliheight+'px'}); $(className).find("a img").css({'height':columnliheight+'px'}); } function getCookie1(name) { var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)) return unescape(arr[2]);否则返回 null } function shuju(){ var guid1 = guid ; var serviceId1 = “tvcctv”; var recordtimeing = new Date().getTime(); var url = '//api.cntv.cn/video/videoinfoByGuid?guid='+guid1+'&serviceId='+serviceId1+''; $.ajax({ url: url, dataType: "jsonp", jsonp: "cb", cache:true, jsonpCallback:"aa"+guid, 错误: function () { }, success: function (data) { { sun (data.fc, data.sc,guid1,serviceId1); } } });函数 sun(fc,sc,guid1,serviceId1) { var channel_id_a = video_ad_channel_id; var utdid_a = getCookie1("cna"); varchannel_id_a = video_ad_channel_id; var album_iddd= videoalbumId; var recordtimeing = new Date().getTime(); var url ='//api.cntv.cn/list/getPCRecommend?utdid='+encodeURIComponent(utdid_a)+'&guid='+guid1+'&type=0&channel_id='+channel_id_a+'&serviceId='+serviceId1+'&fc='+编码URIComponent(fc)+'&sc='+encodeURIComponent(sc); var html = ''; var rec_list = ''; var 产品 =“”; var rec_type=""; $.ajax({ url: url, 缓存:true, dataType: "jsonp", jsonp: "cb", jsonpCallback:"bb"+guid, 错误: function () { $("#BottomPageUniversal18897_con04").hide() ; }, 成功: function (data) { if(typeof (data.errcode) !="undefined"){ $("#BottomPageUniversal18897_con04").hide(); return; } if(data.data.list.length = = 0){ $("#BottomPageUniversal18897_con04").hide(); }else{ for (var i = 1; i
分类:
标签:
留言