'; $("#slide").append(galhtml); if(data.eventExposure!=''){ $("body").append('') } }, error:function(){ }, timeout:2800, complete:function(){    lunboload(); } }) } //轮播图js var ind01index=0; var isFlag=true; var setmove; var ind01_silde_lenght; var ind01_silde; var ind01index_cur=""; var ind01_left; var ind01_right; function lunboload(){ ind01_silde=$(".xinwen18886_ind01 .list_con .silde"); ind01_silde_lenght=$(".xinwen18886_ind01 .list_con .silde").length; ind01_left=$(".xinwen18886_ind01 .leftbtn"); ind01_right=$(".xinwen18886_ind01 .rightbtn"); if(ind01_silde_lenght<2){ $(".xinwen18886_ind01 .page").hide(); $(".xinwen18886_ind01 .btn").hide(); }else{ $(".xinwen18886_ind01 .page .all").html(ind01_silde_lenght); $(".xinwen18886_ind01 .page").show(); $(".xinwen18886_ind01 .btn").show(); } ind01_right.click(function(){ ind01index++; if(ind01index>=ind01_silde_lenght){ ind01index=0; } ind01move(ind01index); }) ind01_left.click(function(){ ind01index--; if(ind01index<0){ ind01index=ind01_silde_lenght-1; } ind01move(ind01index); }) //微信分享点击 $(".xinwen18886_ind01 .list_con .silde").each(function(index, element) { if($(this).find(".right_text").attr("data-guid") != ""){ $(this).find(".right_text h3 a").attr("target",""); $(this).find(".right_text h3 a").removeAttr("href") $(this).find(".right_text h3 a").attr("onclick","javascript:videoplay('"+$(this).find(".right_text").attr("data-guid")+"')"); $(this).find(".right_text p a").attr("target",""); $(this).find(".right_text p a").removeAttr("href") $(this).find(".right_text p a").attr("onclick","javascript:videoplay('"+$(this).find(".right_text").attr("data-guid")+"')"); $(this).find(".image a").attr("target",""); $(this).find(".image a").removeAttr("href") $(this).find(".image a").attr("onclick","javascript:videoplay('"+$(this).find(".right_text").attr("data-guid")+"')"); $(this).find(".image").append('') } //分享内容修改 $(this).find(".share a").click(function(){ var href=$(".xinwen18886_ind01 .list_con .silde").eq(index).attr("dataurl"); var title=$(".xinwen18886_ind01 .list_con .silde").eq(index).find(".right_text h3 a").text(); var brief=$(".xinwen18886_ind01 .list_con .silde").eq(index).find(".right_text p a").text(); var shaimg=$(".xinwen18886_ind01 .list_con .silde").eq(index).find(".image img").attr("src"); if(href==undefined){ href="http://news.cctv.com/" } shareObj.shareUrl = href; shareObj.shareTitle = title; shareObj.pic = "https://"+shaimg.split("//")[1] shareObj.summary =brief; if($(this).hasClass("weixin")){ if($(this).parents(".share").find(".ind01cntvshare_weixin").length>0){ $(".ind01cntvshare_weixin").remove() }else{ requireQrcode2(index,href) } } }) }); $("#slide").hover(function(){ clearInterval(setmove); },function(){ clearInterval(setmove); setmove = setInterval(function(){ ind01index++; if(ind01index>=ind01_silde_lenght){ ind01index=0; } ind01move(ind01index); },5000) }) $(".xinwen18886_ind01 .btn").hover(function(){ clearInterval(setmove); },function(){ clearInterval(setmove); setmove = setInterval(function(){ ind01index++; if(ind01index>=ind01_silde_lenght){ ind01index=0; } ind01move(ind01index); },500) }) setmove = setInterval(function(){ ind01index++; if(ind01index>=ind01_silde_lenght){ ind01index=0; } ind01move(ind01index) },5000) $('.xinwen18886_ind01 .list_con .silde .nesting li').each(function(){ $(this).on("mouseenter",function(){ $(this).find(".text").addClass("hover"); $(this).find(".text").stop().animate({'height':'203px'},300); }).on("mouseleave",function(){ var _that=$(this); setTimeout(function(){ _that.find(".text").removeClass("hover"); },250) $(this).find(".text").stop().animate({'height':'36px'},300); }) }) var isHttps = location.href.substr(0, 5) == "https" ? "true": "false"; } function ind01move(index){ if(isFlag && index != ind01index_cur){ ind01_silde.stop(true,true); if(ind01_silde.eq(index).find('.nesting').length==1){ ind01_silde.eq(index).find('.nesting ul li').each(function(i){ ind01_silde.eq(index).find('.nesting ul li').eq(i).find('.img_nes img').attr('src',ind01_silde.eq(index).find('.nesting ul li').eq(i).find('.img_nes img').attr('data-src')); }) ind01_silde.eq(index).find('.image a').addClass("noClick"); ind01_silde.eq(index).find('.image a').attr("href","javascript:;"); ind01_silde.eq(index).find('.nesting .list01').css({'top':'-238px'}); ind01_silde.eq(index).find('.nesting .list02').css({'bottom':'-238px'}); ind01_silde.eq(index).find('.nesting .list01').stop().animate({'top':'0px'},300); ind01_silde.eq(index).find('.nesting .list02').stop().animate({'bottom':'0px'},300); } ind01_silde.eq(index).find('.image img').attr('src',ind01_silde.eq(index).find('.image img').attr('data-src')); ind01_silde.eq(ind01index_cur).fadeOut(400) ind01_silde.eq(index).fadeIn(500); $(".xinwen18886_ind01 .page .now").html(index+1) ind01index_cur = index; } } var playerParas function videoplays(guid){ $("#video").html(""); playerParas = { divId: "video", /*播放器容器id,必填项*/ w: 785, /*播放器宽度,必填项*/ h: 440, /*播放器高度,必填项*/ t: "news", /*台名称,比如news,sports,tv等,必填项*/ videoCenterId: guid, /*视频生产中心guid,必填项*/ br: "", /*设置默认码率*/ id: "null", /*可填null,必填项*/ videoId: "VIDE100215108600", /*视频集id*/ url: "", /*视频页面url,如http://tv.cntv.cn/video/C18472/a28126e5e0424a44af6a9bc4c5a47742*/ articleId: "", /*文章id*/ filePath: "", /*文件路径*/ sysSource: "", /*视频来源*/ channelId: "", /*可为空*/ scheduleId: "C18472000001", /*关键字*/ isLogin: "", /*用户中心相关,是否登录*/ userId: "C18472000001", /*用户中心相关,用户登录id*/ isDefaultPreImage: "false", /*是否默认从vdn取图,非自动播放情况下才有效*/ isAutoPlay: "true", /*是否自动播放,只有false为不自动播放,其它值为自动播放*/ posterImg: "", /*播放器前贴图片*/ isAudio: "false", /*是否是音频播放器,为true表示是音频,false表示是视频*/ isHttps: "isHttps", /*是否https视频,true是,false不是*/ wmode: "opaque", /*flash播放器的窗口模式,默认为opaque*/ wideMode: "normal", /*flash播放器的窗口模式,默认为opaque*/ setupOn: "false", /*是否显示设置按钮,默认为false*/ playerType : "vod_h5", /*播放器类型,vod表示普通播放器*/ drm:"true", webFullScreenOn: "false" , /*是否显示全屏按钮,默认true表示显示*/ h5:{ userRecordEnab:false } }; createVodPlayer(playerParas); $(".xinwen18886_ind01 .video_con").show(); $("xinwen18886_ind01").css("z-index",'99') isFlag=false; clearInterval(setmove); $("#slide").unbind("hover") } function tellPageWhenFullScreen(flashplayer_video){ $(".xinwen18886_ind01").css("z-index","1000"); $(".xinwen18886_ind01 .btn").hide(); } function tellPageWhenNomalScreen(flashplayer_video){ $(".xinwen18886_ind01").removeAttr("style") $(".xinwen18886_ind01 .btn").show(); } function videoplay(guid){ if(typeof(playerParas)!="undefined"){ if(playerParas._isH5 !== undefined && playerParas._isH5){ player = vodh5player.namespace.getVodPlayer(); if(player && !player.isDisposed_){ // dispose vodh5player.namespace.dispose(player); videoplays(guid) } }else{ if(typeof destroyH5VodHls!=="undefined" && typeof vodPlayerObjs!=="undefined" && vodPlayerObjs["video"]) { destroyH5VodHls(vodPlayerObjs["video"], "destroyplayer"); //divId为播放器容器id } document.getElementById("video").innerHTML = ""; //divId为播放器容器id videoplays(guid) } }else{ videoplays(guid) } } function videoclose(){ isFlag=true; $("#video").html(""); $(".xinwen18886_ind01 .video_con").hide(); $("xinwen18886_ind01").attr("style","") $("#slide").hover(function(){ clearInterval(setmove); },function(){ clearInterval(setmove); setmove = setInterval(function(){ ind01index++; if(ind01index>=ind01_silde_lenght){ ind01index=0; } ind01move(ind01index); },5000) }) clearInterval(setmove); setmove = setInterval(function(){ ind01index++; if(ind01index>=ind01_silde_lenght){ ind01index=0; } ind01move(ind01index) },5000) } function requireQrcode2(index,url) { if ($("#codeqr").length > 1) { $("#codeqr").show() } else { createTableCode2(index,url) } function createTableCode2(index,url) { $(".ind01cntvshare_weixin").remove(); var ss = '
'; ss += '
'; ss += '
'; ss += '
'; ss += "
"; ss += '
扫一扫 分享到微信
'; ss += "
"; $(".xinwen18886_ind01 .list_con .silde").eq(index).find(".right_text .share").append(ss); var ua = "canvas"; if (navigator.userAgent.indexOf("MSIE") > -1) { ua = "table" } jQuery("#codeqr").qrcode({ render: ua, foreground: "#000", background: "#FFF", width: 102, height: 102, text: shareObj.shareUrl }); } }
'; dataStr+='
  • '+oldList[oldList.length-1].show_time+'
    直播中
  • '; dataStr+='
  • '+programArray[0].show_time+'
    未开始
  • '; break; }else if(programArray[i].start_time<=nowTime&&programArray[i].end_time>nowTime){//今天直播中 if(i=="0"){ dataStr+=''; } }else if(programArray[programArray.length-1].end_time<=nowTime){ //今天已结束 dataStr+=''; break; } } $("#move"+channelIndex).html(dataStr); } }); } function loadpage(channelNames,channelIndex){ if(channelNames.indexOf(",")>0){ var cb=channelNames.split(",")[0] }else{ var cb="t"; } var url="//api.cntv.cn/List/getListByPageid?id="+channelNames+"&kind=a&n=1&p=1&serviceId=pcnews" $.ajax({ type:"get", url:url, cache:true, dataType:'jsonp', jsonp:"cb", jsonpCallback:cb, success:function(data){ var datalist=data.data.list if(datalist[0].title.length>28){ var title=datalist[0].title.substr(0,27)+"..."; }else{ var title=datalist[0].title; } var str=''+title+'' if(datalist[0].desc!=""&&datalist[0].desc!=undefined){ if(datalist[0].desc.length>60){ var desc=datalist[0].desc.substr(0,60)+"..." }else{ var desc=datalist[0].desc; } var str1=''+desc+''; }else{ var str1=''; } $("#move"+channelIndex).find("h3").html(str); $("#move"+channelIndex).find("p").html(str1); } }); } $('#cheeselist .move').mouseleave(function() { if(iconClose){ iconClose = false; executionClose(Order02); } }); function executionOpen(order,cctvidname,icon_index){ var icon_01 = 0; if(order == 20){var time = 6;}else{var time = 20;} var timing = setInterval(function(){ if (icon_01 < order.length) { $('#cheeselist .list' + order[icon_01]).find(".tet").animate({'width':'0px'},50,function(){ $(this).parent('.list').hide(); }); icon_01 = icon_01 + 1; }else { clearInterval(timing); } },20); } function executionClose(order){ var icon_02 = 0; var time=30; var timing = setInterval(function(){ if(icon_02 < order.length){ var tetWidth; if(order[icon_02] == 13 || order[icon_02] == 8 ){ tetWidth = '218px'; }else{ tetWidth = '109px'; } $('#cheeselist .list.list'+order[icon_02]).css({'z-index':'3'}).show(); $('#cheeselist .list.list'+order[icon_02]).find('.tet').stop(false).animate({'width':tetWidth},20); icon_02 = icon_02 + 1; }else{ clearInterval(timing); $('#cheeselist .list').attr('style',''); $('#cheeselist .tet').attr('style',''); $('#cheeselist .move'+icon_index).hide(); setTimeout(function(){qiclick = true;iconClose = true;},300); } },time); }

      点击加载更多

      '+title+'

      '+titlekapian+'

      '+brief+'

      '+datalist[i].focus_date.substr(0,10)+''; if(datalist[i].keywords!=""){ var keyword=datalist[i].keywords; var reg = new RegExp(" ","g"); var tagArrayBak = keyword.replace(reg," "); var keyword = tagArrayBak.split(" "); if(keyword.length<3){ var len=keyword.length }else{ var len=3; } for(var n=0;n'+keyword[n]+''; } } str+='
      '; }else{ if(datalist[i].brief.length>160){ var brief=datalist[i].brief.substr(0,158)+"..."; }else{ var brief=datalist[i].brief; } str+='

      '+title+'

      '+titlekapian+'

      '+brief+'

      '+datalist[i].focus_date.substr(0,10)+''; if(datalist[i].keywords!=""){ var keyword=datalist[i].keywords; var reg = new RegExp(" ","g"); var tagArrayBak = keyword.replace(reg," "); var keyword = tagArrayBak.split(" "); if(keyword.length<3){ var len=keyword.length }else{ var len=3; } for(var n=0;n'+keyword[n]+''; } } str+='
      '; } } $("#newslist").append(str); Echo.init({ offset: 0, //离可视区域多少像素的图片可以被加载 throttle:10 //图片延时多少毫秒加载 }); //微信分享点击 $(".xinwen18886_ind04 .con ul li").each(function(i){ $(this).find(".share a").unbind("click") $(this).find(".share a").click(function(){ var href=$(".xinwen18886_ind04 .con ul li").eq(i).find(".title a").attr("href"); var title=$(".xinwen18886_ind04 .con ul li").eq(i).find(".title a").text(); var brief=$(".xinwen18886_ind04 .con ul li").eq(i).find(".brief a").text(); var shaimg=$(".xinwen18886_ind04 .con ul li").eq(i).find(".image img").attr("src"); if(shaimg==undefined){ shaimg="" } shareObj.shareUrl = href; shareObj.shareTitle = title; shareObj.pic = "https://"+shaimg.split("//")[1] shareObj.summary =brief; if($(this).hasClass("weixin")){ if($(this).parents(".share").find(".ind04cntvshare_weixin").length>0){ $(".ind04cntvshare_weixin").remove() }else{ $(".xinwen18886_ind04 .con ul li").eq(i).css("z-index","999").siblings().css("z-index","1") requireQrcode1(i,href) } } }) }) } //点击加载更多 $(".xinwen18886_ind04 .more").click(function(){ if(jiazai){ jiazai=false; page++; $(".xinwen18886_ind04 .more").addClass("cur") $(".xinwen18886_ind04 .more p").html("正在加载..."); setTimeout(function(){ loadlist(page); },500) } })
      '; ss += '
      '; ss += "
      "; ss += '
      扫一扫 分享到微信
      '; ss += "
      "; $(".xinwen18886_ind04 .con ul li").eq(index).find(".share").append(ss); var ua = "canvas"; if (navigator.userAgent.indexOf("MSIE") > -1) { ua = "table" } jQuery("#codeqr1").qrcode({ render: ua, foreground: "#000", background: "#FFF", width: 102, height: 102, text: url }); } } $('body').click(function(e) { var target = $(e.target); if(!target.is('#codeqr1')&&!target.is('.xinwen18886_ind04 .con ul li .bottom .share a.weixin')){ $(".ind04cntvshare_weixin").remove() } if(!target.is('#codeqr')&&!target.is('.xinwen18886_ind01 .list_con .silde .right_text .share a.weixin')){ $(".ind01cntvshare_weixin").remove() } });
      按住画面可拖动小窗
      '; $(".xinwen18886_ind05").prepend(_html); if(data.eventExposure!=''){ $("body").append(''); } }) } }