';
$("#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
});
}
}
'+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+='
'+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()
}
});