WWWQQCOM
  • 暂无更新,休息一会儿

    • |
    • |
    • |
    • |

    • |
    • |
    • |
    • |
    • |

    • |
    • |
    • |
    • |
    • |
    • |
    • |
    • |




    /

    更换频道

    /

    '); djakDataTempArr.push('
    '); djakDataTempArr.push('
    '); djakDataTempArr.push('
    |
    '); djakDataTempArr.push('
    '); djakDataTempArr.push('
    '); document.getElementById("djakContent").innerHTML = djakDataTempArr.join(""); $("#dajiaaikanloading").hide(); $("#dajiaikanrefresh").show(); }); $("#dajiaikanrefresh").bind("click",function(){ $(this).unbind(); djakcur++; if(djakcur >= 2){ djakcur = 0; } $("#dajiaikanmore").attr("href",djakMore[djakcur]); djakInit(); return false; }); } //快报 function aioTabsCallback(data){ if(data.key == "kb"){//快报数据 //大家爱看位置快报 var kuaibaoDataTempArr = []; kuaibaoDataTempArr.push('
    '+data.value['text'][0].data[0].title+'
    '); kuaibaoDataTempArr.push('

    '); kuaibaoDataTempArr.push(''+data.value['text'][0].data[0].title+''); kuaibaoDataTempArr.push('

    '); kuaibaoDataTempArr.push('
    '); document.getElementById("kuaibaoContent").innerHTML = kuaibaoDataTempArr.join(""); //订阅位置快报 var kuaibaoDataTempArr2 = []; kuaibaoDataTempArr2.push('
    '+data.value['text'][1].data[0].title+'
    '); kuaibaoDataTempArr2.push('

    '); kuaibaoDataTempArr2.push(''+data.value['text'][1].data[0].title+''); kuaibaoDataTempArr2.push('

    '); kuaibaoDataTempArr2.push('
    '); document.getElementById("dyContent").innerHTML = kuaibaoDataTempArr2.join(""); if($("#dy").hasClass("contentModBig")){ $("#dy .bd .contentRight").show(); }else{ $("#dy .bd .contentRight").hide(); } QQ.LoadScript("http://mini2015.qq.com/ssitojson.htm?newssh.htm&random="+Math.random(), function(){}); }else if(data.key == "newssh"){//社会数据 var shehuiDataTempArr = []; shehuiDataTempArr.push('
    '+data.value['pic-text'][1].data[0].title+'
    '); shehuiDataTempArr.push('

    '); shehuiDataTempArr.push(''+data.value['pic-text'][1].data[0].title+''); shehuiDataTempArr.push('

    '); shehuiDataTempArr.push('
    '); document.getElementById("newsshContent").innerHTML = shehuiDataTempArr.join(""); if($("#newssh").hasClass("contentModBig")){ $("#newssh .bd .contentRight").show(); }else{ $("#newssh .bd .contentRight").hide(); } QQ.LoadScript("http://mini2015.qq.com/ssitojson.htm?mil.htm&random="+Math.random(), function(){}); }else if(data.key == "mil"){//军事数据 $("#history .bd .imgArea").html(''+data.value['pic-text'][1].data[0].title+''); $("#history .bd .txtArea h3").html(''+data.value['pic-text'][1].data[0].title+''); var milDataTempRightArr = []; for(var i=0;i<5;i++){ if(data.value.text[i].data.length != 1){ for(var n=0;n'+data.value.text[i].data[n].title+''); if(n != data.value.text[i].data.length - 1){ milDataTempRightArr.push(' '); } } }else{ milDataTempRightArr.push(''+data.value.text[i].data[0].title+''); } $("#history .bd .contentRight ul").children().eq(i)[0].innerHTML = milDataTempRightArr.join(""); milDataTempRightArr = []; } var milDataTempLeftArr = []; for(var i=0;i<3;i++){ if(data.value.text[i+7].data.length != 1){ for(var n=0;n'+data.value.text[i+7].data[n].title+''); if(n != data.value.text[i+7].data.length - 1){ milDataTempLeftArr.push(' '); } } }else{ milDataTempLeftArr.push(''+data.value.text[i+7].data[0].title+''); } $("#history .bd .contentLeft ul").children().eq(i)[0].innerHTML = milDataTempLeftArr.join(""); milDataTempLeftArr = []; } QQ.LoadScript("http://mini2015.qq.com/ssitojson.htm?games.htm&random="+Math.random(), function(){}); }else if(data.key == "games"){//游戏数据 $("#games .bd .contentRight .imgArea").html(''+data.value['pic-text'][2].data[0].title+''); $("#games .bd .contentRight .txtArea h3").html(''+data.value['pic-text'][2].data[0].title+''); var gamesDataTempRightArr = []; for(var i=8;i<12;i++){ if(data.value.text[i].data.length != 1){ gamesDataTempRightArr.push('
  • '); for(var n=0;n'+data.value.text[i].data[n].title+''); if(n != data.value.text[i].data.length - 1){ gamesDataTempRightArr.push(' '); } } gamesDataTempRightArr.push('
  • '); }else{ gamesDataTempRightArr.push('
  • '+data.value.text[i].data[0].title+'
  • '); } } for(var i=13;i<15;i++){ if(data.value.text[i].data.length != 1){ gamesDataTempRightArr.push('
  • '); for(var n=0;n'+data.value.text[i].data[n].title+''); if(n != data.value.text[i].data.length - 1){ gamesDataTempRightArr.push(' '); } } gamesDataTempRightArr.push('
  • '); }else{ gamesDataTempRightArr.push('
  • '+data.value.text[i].data[0].title+'
  • '); } } $("#games .bd .contentRight ul")[0].innerHTML = gamesDataTempRightArr.join(""); if($("#games").hasClass("contentModBig")){ $("#games .bd .contentRight").show(); }else{ $("#games .bd .contentRight").hide(); } } } function kuaibaoInit(){ QQ.LoadScript("http://mini2015.qq.com/ssitojson.htm?kb.htm&random="+Math.random(), function(){}); } /*星座运势*/ var astroToday = "白羊座"; var astroArr = 0; var astroYunshi = "80"; var astroUrl = "http://data.astro.qq.com/dayastro/70/70503/index.shtml"; var astroContent = ""; QQ.LoadScript("http://app.data.qq.com/?umod=astro&act=astro&t=18&jsonp=1&func=qqastro", function(){ }); function qqastro(obj){ if(QQ.localData.get("astroCustom")){ astroArr = QQ.localData.get("astroCustom"); }else{ if(nowTimeMonth == 3 && nowTimeDay >= 21 || nowTimeMonth == 4 && nowTimeDay <= 19){ astroToday = "白羊座"; astroArr = 0; }else if(nowTimeMonth == 4 && nowTimeDay >= 20 || nowTimeMonth == 5 && nowTimeDay <= 20){ astroToday = "金牛座"; astroArr = 1; }else if(nowTimeMonth == 5 && nowTimeDay >= 21 || nowTimeMonth == 6 && nowTimeDay <= 21){ astroToday = "双子座"; astroArr = 2; }else if(nowTimeMonth == 6 && nowTimeDay >= 22 || nowTimeMonth == 7 && nowTimeDay <= 22){ astroToday = "巨蟹座"; astroArr = 3; }else if(nowTimeMonth == 7 && nowTimeDay >= 23 || nowTimeMonth == 8 && nowTimeDay <= 22){ astroToday = "狮子座"; astroArr = 4; }else if(nowTimeMonth == 8 && nowTimeDay >= 23 || nowTimeMonth == 9 && nowTimeDay <= 22){ astroToday = "处女座"; astroArr = 5; }else if(nowTimeMonth == 9 && nowTimeDay >= 23 || nowTimeMonth == 10 && nowTimeDay <= 23){ astroToday = "天秤座"; astroArr = 6; }else if(nowTimeMonth == 10 && nowTimeDay >= 24 || nowTimeMonth == 11 && nowTimeDay <= 22){ astroToday = "天蝎座"; astroArr = 7; }else if(nowTimeMonth == 11 && nowTimeDay >= 23 || nowTimeMonth == 12 && nowTimeDay <= 21){ astroToday = "射手座"; astroArr = 8; }else if(nowTimeMonth == 12 && nowTimeDay >= 22 || nowTimeMonth == 1 && nowTimeDay <= 19){ astroToday = "摩羯座"; astroArr = 9; }else if(nowTimeMonth == 1 && nowTimeDay >= 20 || nowTimeMonth == 2 && nowTimeDay <= 18){ astroToday = "水瓶座"; astroArr = 10; }else if(nowTimeMonth == 2 && nowTimeDay >= 19 || nowTimeMonth == 3 && nowTimeDay <= 20){ astroToday = "双鱼座"; astroArr = 11; } } astroYunshi = Number(obj[astroArr].fortune[0].content.replace("%","")); astroUrl = "http://data.astro.qq.com/"+obj[astroArr].url; astroContent = obj[astroArr].fortune[8].content.substring(0, 45)+'...'; $(".rightXingzuoyunshi .xingzuoSelect").children().eq(astroArr).attr("selected","selected"); $("#astroIcon").attr("href",astroUrl); astroPosition = -(astroArr*50) + "px"; $("#astroIcon").css("background-position","left "+astroPosition); if(astroYunshi >= 95){ $(".yunshi").width(80); }else if(astroYunshi >= 85){ $(".yunshi").width(72); }else if(astroYunshi >= 75){ $(".yunshi").width(64); }else if(astroYunshi >= 65){ $(".yunshi").width(56); }else if(astroYunshi >= 55){ $(".yunshi").width(48); }else if(astroYunshi >= 45){ $(".yunshi").width(40); }else if(astroYunshi >= 35){ $(".yunshi").width(32); }else if(astroYunshi >= 25){ $(".yunshi").width(24); }else if(astroYunshi >= 15){ $(".yunshi").width(16); }else if(astroYunshi >= 5){ $(".yunshi").width(8); }else if(astroYunshi >= 0){ $(".yunshi").width(0); } $(".rightXingzuoyunshi .ft p").html(obj[astroArr].fortune[8].content.substring(0, 45)+'...'); /*添加下拉框事件*/ $(".rightXingzuoyunshi .xingzuoSelect").bind("change",function(){ astroYunshi = Number(obj[$(this).val()].fortune[0].content.replace("%","")); if(astroYunshi >= 95){ $(".yunshi").width(80); }else if(astroYunshi >= 85){ $(".yunshi").width(72); }else if(astroYunshi >= 75){ $(".yunshi").width(64); }else if(astroYunshi >= 65){ $(".yunshi").width(56); }else if(astroYunshi >= 55){ $(".yunshi").width(48); }else if(astroYunshi >= 45){ $(".yunshi").width(40); }else if(astroYunshi >= 35){ $(".yunshi").width(32); }else if(astroYunshi >= 25){ $(".yunshi").width(24); }else if(astroYunshi >= 15){ $(".yunshi").width(16); }else if(astroYunshi >= 5){ $(".yunshi").width(8); }else if(astroYunshi >= 0){ $(".yunshi").width(0); } astroUrl = "http://data.astro.qq.com/"+obj[$(this).val()].url; $("#astroIcon").attr("href",astroUrl); astroPosition = -($(this).val()*50) + "px"; $("#astroIcon").css("background-position","left "+astroPosition); $(".rightXingzuoyunshi .ft p").html(obj[$(this).val()].fortune[8].content.substring(0, 45)+'...'); /*记录选中星座*/ QQ.localData.set("astroCustom", $(this).val()); }); } var userInfoName = ""; /*一键登录数据*/ function loginAll(obj){ if(obj.result == 0){ $("#loginedGray").show(); $("#loginGray").hide(); MblogTotalnum = obj.info.Mblog.totalnum; MblogMsgnum = obj.info.Mblog.msgnum; MblogAtnum = obj.info.Mblog.atnum; MblogFansnum = obj.info.Mblog.fansnum; QZoneTotalnum = obj.info.QZone.totalnum; QZonePassivenum = obj.info.QZone.passivenum; QZoneInitnum = obj.info.QZone.initnum; QZoneAboutnum = obj.info.QZone.aboutnum; QMailTotalnum = obj.info.QMail.totalnum; QMailInboxnum = obj.info.QMail.inboxnum; QMailBottlenum = obj.info.QMail.bottlenum; QMailGmailnum = obj.info.QMail.gmailnum; QMailDmailnum = obj.info.QMail.dmailnum; //DingyueTotalnum = obj.info.Article; userInfoName = obj.nick.replace(//,">"); $("#newsMoreBtn a").html("您有未读新闻,点击查看"); QQ.localData.set("nick", userInfoName); userInfoFace = obj.Face; userInfoVip = obj.Vip; if(MblogTotalnum){ if(MblogTotalnum > 99){ $("#weiboGrayNumLayout").html("99"); }else{ $("#weiboGrayNumLayout").html(MblogTotalnum); } $("#weiboGrayNum").show(); if(MblogMsgnum != ""){ $("#msgGrayNum").html(MblogMsgnum); $("#msgGrayLi").show(); } if(MblogAtnum != ""){ $("#atGrayNum").html(MblogAtnum); $("#atGrayLi").show(); } if(MblogFansnum != ""){ $("#fansGrayNum").html(MblogFansnum); $("#fansGrayLi").show(); } }else{ $("#weiboGrayTitle").html("点击查看腾讯微博"); $("#weiboGrayTitle").css("border:0"); } if(QZoneTotalnum){ if(QZoneTotalnum > 99){ $("#qzoneGrayNumLayout").html("99"); }else{ $("#qzoneGrayNumLayout").html(QZoneTotalnum); } $("#qzoneGrayNum").show(); if(QZonePassivenum != ""){ $("#passiveGrayNum").html(QZonePassivenum); $("#passiveGrayLi").show(); } if(QZoneInitnum != ""){ $("#InitGrayNum").html(QZoneInitnum); $("#InitGrayLi").show(); } if(QZoneAboutnum != ""){ $("#AboutGrayNum").html(QZoneAboutnum); $("#AboutGrayLi").show(); } }else{ $("#qzoneGrayTitle").html("点击查看QQ空间"); $("#qzoneGrayTitle").css("border:0"); } if(QMailTotalnum){ if(QMailTotalnum > 99){ $("#mailGrayNumLayout").html("99"); }else{ $("#mailGrayNumLayout").html(QMailTotalnum); } $("#mailGrayNum").show(); weiDu = QMailTotalnum - QMailInboxnum - QMailBottlenum - QMailGmailnum - QMailDmailnum; if(QMailInboxnum != ""){ if(weiDu != 0){ $("#inboxGrayNum").html(Number(QMailInboxnum) + Number(weiDu)); $("#inboxGrayLi").show(); }else{ $("#inboxGrayNum").html(QMailInboxnum); $("#inboxGrayLi").show(); } }else if(weiDu != 0){ $("#inboxGrayNum").html(weiDu); $("#inboxGrayLi").show(); } if(QMailBottlenum != ""){ $("#bottleGrayNum").html(QMailBottlenum); $("#bottleGrayLi").show(); } if(QMailGmailnum != ""){ $("#gmailGrayNum").html(QMailGmailnum); $("#gmailGrayLi").show(); } if(QMailDmailnum != ""){ $("#gmailGrayNum").html(QMailDmailnum); $("#dmailGrayLi").show(); } if(QMailInboxnum == "" && QMailBottlenum == "" && QMailGmailnum == "" && QMailDmailnum == ""){ $("#mailGrayTitle").html("点击查看QQ邮箱"); $("#mailGrayTitle").css("border:0"); } }else{ $("#mailGrayTitle").html("点击查看QQ邮箱"); $("#mailGrayTitle").css("border:0"); } /* if(DingyueTotalnum){ $("#dingyueGrayLi").show(); if(DingyueTotalnum > 99){ //$("#dingyueGrayNumLayout").html("99"); $("#dingyueGrayLiNum").html(DingyueTotalnum); }else{ //$("#dingyueGrayNumLayout").html(DingyueTotalnum); $("#dingyueGrayLiNum").html(DingyueTotalnum); } //$("#dingyueGrayNum").show(); }else{ $("#dingyueGrayTitle").html("点击进入我的订阅"); $("#dingyueGrayTitle").css("border:0"); } */ $("#userNameGray").html("你好,"+userInfoName); $("#loginGrayLayoutImg").attr("src",userInfoFace); if(userInfoVip){ $("#userVipLayout").html("VIP"+userInfoVip); $("#userVipLayout").show(); $("#userVipHead").show(); } $("#loginGrayOut").bind("click",function(){ setTimeout(function(){ login.loginOut(); },5); }); //添加图标的mouseover事件 $("#loginGrayIconLogin").bind("mouseover",function(){ $("#loginGraySmart").show(); }); $("#loginGrayIconLogin").bind("mouseout",function(){ $("#loginGraySmart").hide(); }); $("#dingyueGrayIconLogin").bind("mouseover",function(){ $("#dingyueGraySmart").show(); }); $("#dingyueGrayIconLogin").bind("mouseout",function(){ $("#dingyueGraySmart").hide(); }); $("#mailGrayIconLogin").bind("mouseover",function(){ $("#mailGraySmart").show(); }); $("#mailGrayIconLogin").bind("mouseout",function(){ $("#mailGraySmart").hide(); }); $("#qzoneGrayIconLogin").bind("mouseover",function(){ $("#qzoneGraySmart").show(); }); $("#qzoneGrayIconLogin").bind("mouseout",function(){ $("#qzoneGraySmart").hide(); }); $("#weiboGrayIconLogin").bind("mouseover",function(){ $("#weiboGraySmart").show(); }); $("#weiboGrayIconLogin").bind("mouseout",function(){ $("#weiboGraySmart").hide(); }); QQ.LoadScript("http://i.match.qq.com/dy/mynewsnum?callback=articleNum&ran="+Math.random(),function(){}); //订阅数据接口 QQ.LoadScript("http://mat1.gtimg.com/finance/js/st/p/qq/q_fin_v20151019135558.js?ran="+Math.random(),function(){ __.app.qindex.pStock.init(); }); ipMe.init(); }else{ QQ.LoadScript("http://mat1.gtimg.com/finance/js/st/p/qq/q_fin_v20151019135558.js?ran="+Math.random(),function(){ __.app.qindex.pStock.init(); }); ipMe.init(); $("#newsMoreBtn a").html("您有未读新闻,点击查看"); /* if(QQ.localData.get("nick")){ }*/ } } function ilikeFunc(obj){ if(obj.code == 0){ if(obj.data.today.length != 0 || obj.data.week.length != 0 || obj.data.early.length != 0){ if(obj.data.today.length != 0){ var iliketodayArr = []; for(var i=0;i'); } } $("#iliketoday").html('
    今日
    ' + iliketodayArr.join("")); $("#iliketoday").show(); $("#ilikeSmartNo").attr("id","ilikeSmart"); $("#ilikeTitle").css("text-indent:0px"); } if(obj.data.week.length != 0){ var ilikeweekArr = []; for(var i=0;i'); } } $("#ilikeweek").html('
    本周
    ' + ilikeweekArr.join("")); $("#ilikeweek").show(); $("#ilikeSmartNo").attr("id","ilikeSmart"); $("#ilikeTitle").css("text-indent:0px"); } if(obj.data.early.length != 0){ var ilikeearlyArr = []; for(var i=0;i'); } } $("#ilikeearly").html('
    更早
    ' + ilikeearlyArr.join("")); $("#ilikeearly").show(); $("#ilikeSmartNo").attr("id","ilikeSmart"); $("#ilikeTitle").css("text-indent:0px"); } $("#ilikeTitle").html('最近收藏:'); $("#ilikeContent").show(); } $("#ilikeIcon").bind("mouseover",function(){ $("#ilikeFloat").show(); }); $("#ilikeIcon").bind("mouseout",function(){ $("#ilikeFloat").hide(); }); } } function articleNum(obj){ if(obj.code == 0){ DingyueTotalnum = obj.data.total; if(DingyueTotalnum){ $("#dingyueGrayLi").show(); if(DingyueTotalnum > 99){ $("#dingyueGrayLiNum").html(DingyueTotalnum); }else{ $("#dingyueGrayLiNum").html(DingyueTotalnum); } }else{ $("#dingyueGrayTitle").html("点击进入我的订阅"); $("#dingyueGrayTitle").css("border:0"); } }else{ $("#dingyueGrayTitle").html("点击进入我的订阅"); $("#dingyueGrayTitle").css("border:0"); $("#dingyueGrayLiNum").hide(); } } function getExpires(a){//a:hour var expires=new Date(new Date().getTime()+(a?a:1)*3600*1000); return expires; } var nowTimeYear = serverTime.getFullYear(); var nowTimeMonth = serverTime.getMonth() + 1; var nowTimeDay = serverTime.getDate(); var nowTimeWeek = serverTime.getDay(); var nowTimeHour = serverTime.getHours(); var nowTimeMinute = serverTime.getMinutes(); var nowTimeSecond = serverTime.getSeconds(); var nowWeek = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]; var navMap ={ "上海市":"navShanghai", "重庆市":"navChongqing", "广东省":"navGuangdong", "陕西省":"navShanxi", "四川省":"navSichuan", "福建省":"navFujian", "河南省":"navHenan", "湖北省":"navHubei", "湖南省":"navHunan", "辽宁省":"navLiaoning", "江苏省":"navJiangsu", "浙江省":"navZhejiang" } var newsMap ={ "北京市":{ "url":"http://bj.jjj.qq.com/", "bossZone":"beijingnewstab", "title":"北京新闻" }, "天津市":{ "url":"http://tj.jjj.qq.com/", "bossZone":"tianjinnewstab", "title":"天津新闻" }, "河北省":{ "url":"http://hb.jjj.qq.com/", "bossZone":"hebeinewstab", "title":"河北新闻" }, "上海市":{ "url":"http://sh.qq.com/", "bossZone":"shnewstab", "title":"上海新闻" }, "重庆市":{ "url":"http://cq.qq.com/", "bossZone":"cqnewstab", "title":"重庆新闻" }, "广东省":{ "url":"http://gd.qq.com/", "bossZone":"gdnewstab", "title":"广东新闻" }, "陕西省":{ "url":"http://xian.qq.com/", "bossZone":"xiannewstab", "title":"陕西新闻" }, "四川省":{ "url":"http://cd.qq.com/", "bossZone":"cdnewstab", "title":"四川新闻" }, "福建省":{ "url":"http://fj.qq.com/", "bossZone":"fjnewstab", "title":"福建新闻" }, "河南省":{ "url":"http://henan.qq.com/", "bossZone":"henannewstab", "title":"河南新闻" }, "湖北省":{ "url":"http://hb.qq.com/", "bossZone":"hbnewstab", "title":"湖北新闻" }, "湖南省":{ "url":"http://hn.qq.com/", "bossZone":"hunannewstab", "title":"湖南新闻" }, "辽宁省":{ "url":"http://ln.qq.com/", "bossZone":"lnnewstab", "title":"辽宁新闻" }, "江苏省":{ "url":"http://js.qq.com/", "bossZone":"jsnewstab", "title":"江苏新闻" }, "浙江省":{ "url":"http://zj.qq.com/", "bossZone":"zjnewstab", "title":"浙江新闻" } } /* var newsMap ={ "北京市":"北京新闻", "天津市":"天津新闻", "河北省":"河北新闻", "上海市":"上海新闻", "重庆市":"重庆新闻", "广东省":"广东新闻", "陕西省":"陕西新闻", "四川省":"四川新闻", "福建省":"福建新闻", "河南省":"河南新闻", "湖北省":"湖北新闻", "湖南省":"湖南新闻", "辽宁省":"辽宁新闻", "江苏省":"江苏新闻", "浙江省":"浙江新闻" } */ var newsInfoMap ={ "上海市":"/ninja/newsShanghaiContent_public.htm", "重庆市":"/ninja/newsChongqingContent_public.htm", "广东省":"/ninja/newsGuangdongContent_public.htm", "陕西省":"/ninja/newsShanxiContent_public.htm", "四川省":"/ninja/newsSichuanContent_public.htm", "福建省":"/ninja/newsFujianContent_public.htm", "河南省":"/ninja/newsHenanContent_public.htm", "湖北省":"/ninja/newsHubeiContent_public.htm", "湖南省":"/ninja/newsHunanContent_public.htm", "辽宁省":"/ninja/newsLiaoningContent_public.htm", "江苏省":"/ninja/newsJiangsuContent_public.htm", "浙江省":"/ninja/newsZhejiangContent_public.htm", "北京市":"/ninja/newsBeijingContent_public.htm", "天津市":"/ninja/newsTianjinContent_public.htm", "河北省":"/ninja/newsHebeiContent_public.htm" } var tuanDifangMap ={ "上海市":"/v/sh/www_shanghai_pic.htm", "重庆市":"/v/cq/www_chongqing_pic.htm", "广东省":"/v/gd/www_guangdong_pic.htm", "陕西省":"/v/xian/www_shanxi_pic.htm", "四川省":"/v/cd/www_sichuan_pic.htm", "福建省":"/v/fj/www_fujian_pic.htm", "河南省":"/v/henan/www_henan_pic.htm", "湖北省":"/v/hb/www_hubei_pic.htm", "湖南省":"/v/hn/www_hunan_pic.htm", "辽宁省":"/v/ln/www_liaoning_pic.htm", "江苏省":"/v/jiangsu/www_jiangsu_pic.htm", "浙江省":"/v/zj/www_zhejiang_pic.htm" } var tuanMap ={ "合肥市":"合肥市", //"福州市":"福州市", //"厦门市":"厦门市", //"东莞市":"东莞市", //"广州市":"广州市", //"深圳市":"深圳市", "桂林市":"桂林市", "兰州市":"兰州市", "贵阳市":"贵阳市", "保定市":"保定市", //"洛阳市":"洛阳市", //"郑州市":"郑州市", "海口市":"海口市", "三亚市":"三亚市", //"武汉市":"武汉市", //"长沙市":"长沙市", "哈尔滨市":"哈尔滨市", "长春市":"长春市", "常州市":"常州市", "南京市":"南京市", "南昌市":"南昌市", //"大连市":"大连市", //"沈阳市":"沈阳市", "呼和浩特市":"呼和浩特市", "银川市":"银川市", "西宁市":"西宁市", //"成都市":"成都市", "济南市":"济南市", "青岛市":"青岛市", "大同市":"大同市", "太原市":"太原市", //"西安市":"西安市", "台北":"台北", "乌鲁木齐市":"乌鲁木齐市", "拉萨市":"拉萨市", "昆明市":"昆明市", "石家庄市":"石家庄市", "南宁市":"南宁市", "丽江市":"丽江市", "苏州市":"苏州市", "香港":"香港", "澳门":"澳门", "北京市":"北京市" //"杭州市":"杭州市", //"温州市":"温州市", //"重庆市":"重庆市", //"上海市":"上海市" //"天津市":"天津市" } var tuanTitleMap ={ "上海市":"上海·生活", "重庆市":"重庆·生活", "广东省":"广东·生活", "陕西省":"陕西·生活", "四川省":"四川·生活", "福建省":"福建·生活", "河南省":"河南·生活", "湖北省":"湖北·生活", "湖南省":"湖南·生活", "辽宁省":"辽宁·生活", "江苏省":"江苏·生活", "浙江省":"浙江·生活", "山西省":"山西生活", "安徽省":"安徽生活", "贵州省":"贵州生活", "云南省":"云南生活", "吉林省":"吉林生活", "天津市":"天津生活", "北京市":"北京生活", "河北省":"河北生活" } var tuanTxtMap ={ "上海市":"/v/sh/www_shanghai_txt.htm", "重庆市":"/v/cq/www_chongqing_txt.htm", "广东省":"/v/gd/www_guangdong_txt.htm", "陕西省":"/v/xian/www_shanxi_txt.htm", "四川省":"/v/cd/www_sichuan_txt.htm", "福建省":"/v/fj/www_fujian_txt.htm", "河南省":"/v/henan/www_henan_txt.htm", "湖北省":"/v/hb/www_hubei_txt.htm", "湖南省":"/v/hn/www_hunan_txt.htm", "辽宁省":"/v/ln/www_liaoning_txt.htm", "江苏省":"/v/jiangsu/www_jiangsu_txt.htm", "浙江省":"/v/zj/www_zhejiang_txt.htm" } var liveMap ={ "北京市":"/ninja/liveBeijing_NOINCLUDE_WITHOUTPULL.htm", //"河北省":"/ninja/liveHbei_NOINCLUDE_WITHOUTPULL.htm", //"天津市":"/ninja/liveTianjinNew_NOINCLUDE_WITHOUTPULL.htm", "上海市":"/ninja/liveShanghai_NOINCLUDE_WITHOUTPULL.htm", "重庆市":"/ninja/liveChongqing_NOINCLUDE_WITHOUTPULL.htm", "广东省":"/ninja/liveGuangdong_NOINCLUDE_WITHOUTPULL.htm", "陕西省":"/ninja/liveShanxi_NOINCLUDE_WITHOUTPULL.htm", "四川省":"/ninja/liveSichuan_NOINCLUDE_WITHOUTPULL.htm", "福建省":"/ninja/liveFujian_NOINCLUDE_WITHOUTPULL.htm", "河南省":"/ninja/liveHenan_NOINCLUDE_WITHOUTPULL.htm", "湖北省":"/ninja/liveHubei_NOINCLUDE_WITHOUTPULL.htm", "湖南省":"/ninja/liveHunan_NOINCLUDE_WITHOUTPULL.htm", "辽宁省":"/ninja/liveLiaoning_NOINCLUDE_WITHOUTPULL.htm", "江苏省":"/ninja/liveJiangsu_NOINCLUDE_WITHOUTPULL.htm", "浙江省":"/ninja/liveZhejiang_NOINCLUDE_WITHOUTPULL.htm", "山西省":"/ninja/liveTaiyuan_NOINCLUDE_WITHOUTPULL.htm", "安徽省":"/ninja/liveAnhui_NOINCLUDE_WITHOUTPULL.htm", "贵州省":"/ninja/liveGuizhou_NOINCLUDE_WITHOUTPULL.htm", "吉林省":"/ninja/liveJilin_NOINCLUDE_WITHOUTPULL.htm", "云南省":"/ninja/liveYunnan_NOINCLUDE_WITHOUTPULL.htm" } var meishiMap ={ "北京市":"/ninja/meishiBeijing_NOINCLUDE_WITHOUTPULL.htm", //"天津市":"/ninja/meishiTianjin_NOINCLUDE_WITHOUTPULL.htm", //"河北省":"/ninja/meishiHebei_NOINCLUDE_WITHOUTPULL.htm", "上海市":"/ninja/meishiShanghai_NOINCLUDE_WITHOUTPULL.htm", "重庆市":"/ninja/meishiChongqing_NOINCLUDE_WITHOUTPULL.htm", "广东省":"/ninja/meishiGuangdong_NOINCLUDE_WITHOUTPULL.htm", "陕西省":"/ninja/meishiShanxi_NOINCLUDE_WITHOUTPULL.htm", "四川省":"/ninja/meishiSichuan_NOINCLUDE_WITHOUTPULL.htm", "福建省":"/ninja/meishiFujian_NOINCLUDE_WITHOUTPULL.htm", "河南省":"/ninja/meishiHenan_NOINCLUDE_WITHOUTPULL.htm", "湖北省":"/ninja/meishiHubei_NOINCLUDE_WITHOUTPULL.htm", "湖南省":"/ninja/meishiHunan_NOINCLUDE_WITHOUTPULL.htm", "辽宁省":"/ninja/meishiLiaoning_NOINCLUDE_WITHOUTPULL.htm", "江苏省":"/ninja/meishiJiangsu_NOINCLUDE_WITHOUTPULL.htm", "浙江省":"/ninja/meishiZhejiang_NOINCLUDE_WITHOUTPULL.htm" } var houseTitleMap ={ "北京市":"北京房产 / 腾讯看房", "上海市":"上海房产 / 腾讯看房", "四川省":"成都房产 / 腾讯看房", "重庆市":"重庆房产 / 腾讯看房", "福建省":"福州房产 / 腾讯看房", "厦门市":"厦门房产 / 腾讯看房", "广东省":"广州房产 / 腾讯看房", "深圳市":"深圳房产 / 腾讯看房", "珠海市":"珠海房产 / 腾讯看房", "河南省":"郑州房产 / 腾讯看房", "湖北省":"武汉房产 / 腾讯看房", "湖南省":"长沙房产 / 腾讯看房", "陕西省":"西安房产 / 腾讯看房", "辽宁省":"沈阳房产 / 腾讯看房", "江苏省":"南京房产 / 腾讯看房", "杭州市":"杭州房产 / 腾讯看房", "佛山市":"佛山房产 / 腾讯看房", "惠州市":"惠州房产 / 腾讯看房", "东莞市":"东莞房产 / 腾讯看房", "中山市":"中山房产 / 腾讯看房", "江门市":"江门房产 / 腾讯看房", "天津市":"天津房产 / 腾讯看房", "石家庄市":"石家庄房产 / 腾讯看房" } var houseMap ={ "天津市":"/ninja/houseTianjinContent_public.htm", "石家庄市":"/ninja/houseShijiazhuangContent_public.htm", "北京市":"/ninja/houseBeijingContent_public.htm", "上海市":"/ninja/houseShanghaiContent_public.htm", "四川省":"/ninja/houseChengduContent_public.htm", "重庆市":"/ninja/houseChongqingContent_public.htm", "福建省":"/ninja/houseFuzhouContent_public.htm", "厦门市":"/ninja/houseXiamenContent_public.htm", "广东省":"/ninja/houseGuangzhouContent_public.htm", "深圳市":"/ninja/houseShenzhenContent_public.htm", "珠海市":"/ninja/houseZhuhaiContent_public.htm", "河南省":"/ninja/houseZhengzhouContent_public.htm", "湖北省":"/ninja/houseWuhanContent_public.htm", "湖南省":"/ninja/houseChangshaContent_public.htm", "陕西省":"/ninja/houseXianContent_public.htm", "辽宁省":"/ninja/houseShenyangContent_public.htm", "江苏省":"/ninja/houseNanjingContent_public.htm", "杭州市":"/ninja/houseHangzhouContent_public.htm", "佛山市":"/ninja/houseFoshanContent_public.htm", "惠州市":"/ninja/houseHuizhouContent_public.htm", "东莞市":"/ninja/houseDongguanContent_public.htm", "中山市":"/ninja/houseZhongshanContent_public.htm", "江门市":"/ninja/houseJiangmenContent_public.htm" /* "浙江省":"/v/househangzhou/www_hangzhou_house.htm", "莆田市":"/v/house_fuzhou/www_fuzhou_house.htm", "宁德市":"/v/house_fuzhou/www_fuzhou_house.htm", "南平市":"/v/house_fuzhou/www_fuzhou_house.htm", "三明市":"/v/house_fuzhou/www_fuzhou_house.htm", "漳州市":"/v/house_xiamen/www_xiamen_house.htm", "泉州市":"/v/house_xiamen/www_xiamen_house.htm", "龙岩市":"/v/house_xiamen/www_xiamen_house.htm", "惠州市":"/v/house_shenzhen/www_shenzhen_house.htm", "东莞市":"/v/house_shenzhen/www_shenzhen_house.htm", "中山市":"/v/house_zhuhai/www_zhuhai_house.htm", "江门市":"/v/house_zhuhai/www_zhuhai_house.htm", */ } var autoMap ={ "广东省":"/v/auto/www_auto_gd.htm", "湖北省":"/v/auto/www_auto_hb.htm", "重庆市":"/v/auto/www_auto_cq.htm" } var autoPriceMap ={ "北京市":"54", "上海市":"321", "重庆市":"55", "西安市":"296", "武汉市":"173", "长沙市":"179", "南京市":"220", "沈阳市":"262", "郑州市":"161", "成都市":"302", "杭州市":"395", "宁波市":"400", "广州市":"68", "深圳市":"78", "东莞市":"66", "佛山市":"67", "中山市":"82", "福州市":"56", "泉州市":"61", "济南市":"337", "青岛市":"342", "南昌市":"235", "合肥市":"46", "长春市":"243", "大连市":"254", "厦门市":"63", "哈尔滨市":"208", "石家庄市":"200", "太原市":"328" } var autoPriceBossMap ={ "北京市":"CAR_JIANGJIA_BEIJING", "上海市":"CAR_JIANGJIA_SHANGHAI", "重庆市":"CAR_JIANGJIA_CHONGQING", "西安市":"CAR_JIANGJIA_XIAN", "武汉市":"CAR_JIANGJIA_WUHAN", "长沙市":"CAR_JIANGJIA_CHANGSHA", "南京市":"CAR_JIANGJIA_NANJING", "沈阳市":"CAR_JIANGJIA_SHENYANG", "郑州市":"CAR_JIANGJIA_ZHENGZHOU", "成都市":"CAR_JIANGJIA_CHENGDU", "杭州市":"CAR_JIANGJIA_HANGZHOU", "宁波市":"CAR_JIANGJIA_NINGBO", "广州市":"CAR_JIANGJIA_GUANGZHOU", "深圳市":"CAR_JIANGJIA_SHENZHEN", "东莞市":"CAR_JIANGJIA_DONGGUAN", "佛山市":"CAR_JIANGJIA_FOSHAN", "中山市":"CAR_JIANGJIA_ZHONGSHAN", "福州市":"CAR_JIANGJIA_FUZHOU", "泉州市":"CAR_JIANGJIA_QUANZHOU", "济南市":"CAR_JIANGJIA_JINAN", "青岛市":"CAR_JIANGJIA_QINGDAO", "南昌市":"CAR_JIANGJIA_NANCHANG", "合肥市":"CAR_JIANGJIA_HEFEI", "长春市":"CAR_JIANGJIA_CHANGCHUN", "大连市":"CAR_JIANGJIA_DALIAN", "厦门市":"CAR_JIANGJIA_XIAMEN", "哈尔滨市":"CAR_JIANGJIA_HAERBIN", "石家庄市":"CAR_JIANGJIA_SHIJIAZHUANG", "太原市":"CAR_JIANGJIA_TAIYUAN" } var difangPuguangMap ={ "上海市":"shexp", "重庆市":"cqexp", "广东省":"gdexp", "陕西省":"xianexp", "四川省":"cdexp", "福建省":"fjexp", "河南省":"henanexp", "湖北省":"hbexp", "湖南省":"hunanexp", "辽宁省":"lnexp", "江苏省":"jsexp", "浙江省":"zjexp" } var difangTabMap ={ "上海市":"shtexp", "重庆市":"cqtexp", "广东省":"gdtexp", "陕西省":"xiantexp", "四川省":"cdtexp", "福建省":"fjtexp", "河南省":"henantexp", "湖北省":"hbtexp", "湖南省":"hunantexp", "辽宁省":"lntexp", "江苏省":"jstexp", "浙江省":"zjtexp" } var provincialCapitalMap ={ "安徽省":"合肥市", "福建省":"福州市", "甘肃省":"兰州市", "广东省":"广州市", "贵州省":"贵阳市", "海南省":"海口市", "河北省":"石家庄市", "河南省":"郑州市", "黑龙江省":"哈尔滨市", "湖北省":"武汉市", "湖南省":"长沙市", "吉林省":"长春市", "江苏省":"南京市", "江西省":"南昌市", "辽宁省":"沈阳市", "青海省":"西宁市", "山东省":"济南市", "山西省":"太原市", "陕西省":"西安市", "四川省":"成都市", "云南省":"昆明市", "浙江省":"杭州市", "台湾省":"台北市", "广西":"南宁市", "内蒙古":"呼和浩特市", "西藏":"拉萨市", "宁夏":"银川市", "新疆":"乌鲁木齐市", "北京市":"北京市", "上海市":"上海市", "重庆市":"重庆市", //"天津市":"天津市", "香港":"香港市", "澳门":"澳门市" } var cityCode = { "北京市":{ "北京市":{} }, "上海市":{ "上海市":{} }, "天津市":{ "天津市":{} }, "重庆市":{ "重庆市":{} }, "河北省":{ "石家庄市":{}, "唐山市":{}, "秦皇岛市":{}, "邯郸市":{}, "邢台市":{}, "保定市":{}, "张家口市":{}, "承德市":{}, "沧州市":{}, "廊坊市":{}, "衡水市":{} }, "山西省":{ "太原市":{}, "大同市":{}, "阳泉市":{}, "长治市":{}, "晋城市":{}, "朔州市":{}, "晋中市":{}, "运城市":{}, "忻州市":{}, "临汾市":{}, "吕梁市":{} }, "内蒙古":{ "呼和浩特市":{}, "包头市":{}, "乌海市":{}, "赤峰市":{}, "通辽市":{}, "鄂尔多斯市":{}, "呼伦贝尔市":{}, "巴彦淖尔市":{}, "乌兰察布市":{}, "锡林郭勒盟":{}, "阿拉善盟":{}, "兴安盟":{} }, "江苏省":{ "南京市":{}, "无锡市":{}, "徐州市":{}, "常州市":{}, "苏州市":{}, "南通市":{}, "连云港市":{}, "淮安市":{}, "盐城市":{}, "扬州市":{}, "镇江市":{}, "泰州市":{}, "宿迁市":{} }, "安徽省":{ "合肥市":{}, "芜湖市":{}, "蚌埠市":{}, "淮南市":{}, "马鞍山市":{}, "淮北市":{}, "铜陵市":{}, "安庆市":{}, "黄山市":{}, "滁州市":{}, "阜阳市":{}, "宿州市":{}, "巢湖市":{}, "六安市":{}, "亳州市":{}, "池州市":{}, "宣城市":{} }, "山东省":{ "济南市":{}, "青岛市":{}, "淄博市":{}, "枣庄市":{}, "东营市":{}, "潍坊市":{}, "烟台市":{}, "威海市":{}, "济宁市":{}, "泰安市":{}, "日照市":{}, "莱芜市":{}, "临沂市":{}, "德州市":{}, "聊城市":{}, "滨州市":{}, "菏泽市":{} }, "辽宁省":{ "沈阳市":{}, "大连市":{}, "鞍山市":{}, "抚顺市":{}, "本溪市":{}, "丹东市":{}, "锦州市":{}, "营口市":{}, "阜新市":{}, "辽阳市":{}, "盘锦市":{}, "铁岭市":{}, "朝阳市":{}, "葫芦岛市":{} }, "吉林省":{ "长春市":{}, "吉林市":{}, "四平市":{}, "辽源市":{}, "通化市":{}, "白山市":{}, "松原市":{}, "白城市":{}, "延边州":{} }, "黑龙江省":{ "哈尔滨市":{}, "齐齐哈尔市":{}, "鸡西市":{}, "鹤岗市":{}, "双鸭山市":{}, "大庆市":{}, "伊春市":{}, "牡丹江市":{}, "佳木斯市":{}, "七台河市":{}, "黑河市":{}, "绥化市":{}, "大兴安岭地区":{} }, "浙江省":{ "杭州市":{}, "宁波市":{}, "温州市":{}, "嘉兴市":{}, "湖州市":{}, "绍兴市":{}, "金华市":{}, "衢州市":{}, "舟山市":{}, "台州市":{}, "丽水市":{} }, "江西省":{ "南昌市":{}, "景德镇市":{}, "萍乡市":{}, "九江市":{}, "新余市":{}, "鹰潭市":{}, "赣州市":{}, "吉安市":{}, "宜春市":{}, "抚州市":{}, "上饶市":{} }, "福建省":{ "福州市":{}, "厦门市":{}, "莆田市":{}, "三明市":{}, "泉州市":{}, "漳州市":{}, "南平市":{}, "龙岩市":{}, "宁德市":{} }, "湖北省":{ "武汉市":{}, "黄石市":{}, "襄樊市":{}, "十堰市":{}, "荆州市":{}, "宜昌市":{}, "荆门市":{}, "鄂州市":{}, "孝感市":{}, "黄冈市":{}, "咸宁市":{}, "随州市":{}, "恩施州":{}, "仙桃市":{}, "天门市":{}, "潜江市":{}, "神农架林区":{} }, "湖南省":{ "长沙市":{}, "株洲市":{}, "湘潭市":{}, "衡阳市":{}, "邵阳市":{}, "岳阳市":{}, "常德市":{}, "张家界市":{}, "益阳市":{}, "郴州市":{}, "永州市":{}, "怀化市":{}, "娄底市":{}, "湘西州":{} }, "河南省":{ "郑州市":{}, "开封市":{}, "洛阳市":{}, "平顶山市":{}, "焦作市":{}, "鹤壁市":{}, "新乡市":{}, "安阳市":{}, "濮阳市":{}, "许昌市":{}, "漯河市":{}, "三门峡市":{}, "南阳市":{}, "商丘市":{}, "信阳市":{}, "周口市":{}, "驻马店市":{}, "济源市":{} }, "广东省":{ "广州市":{}, "深圳市":{}, "珠海市":{}, "汕头市":{}, "韶关市":{}, "河源市":{}, "梅州市":{}, "惠州市":{}, "汕尾市":{}, "东莞市":{}, "中山市":{}, "江门市":{}, "佛山市":{}, "阳江市":{}, "湛江市":{}, "茂名市":{}, "肇庆市":{}, "清远市":{}, "潮州市":{}, "揭阳市":{}, "云浮市":{} }, "广西":{ "南宁市":{}, "柳州市":{}, "桂林市":{}, "梧州市":{}, "北海市":{}, "防城港市":{}, "钦州市":{}, "贵港市":{}, "玉林市":{}, "百色市":{}, "贺州市":{}, "河池市":{}, "来宾市":{}, "崇左市":{} }, "海南省":{ "海口市":{}, "三亚市":{}, "五指山市":{}, "琼海市":{}, "儋州市":{}, "文昌市":{}, "万宁市":{}, "东方市":{}, "澄迈县":{}, "定安县":{}, "屯昌县":{}, "临高县":{}, "白沙黎族自治县":{} }, "四川省":{ "成都市":{}, "自贡市":{}, "攀枝花市":{}, "泸州市":{}, "德阳市":{}, "绵阳市":{}, "广元市":{}, "遂宁市":{}, "内江市":{}, "乐山市":{}, "南充市":{}, "宜宾市":{}, "广安市":{}, "达州市":{}, "眉山市":{}, "雅安市":{}, "巴中市":{}, "资阳市":{}, "阿坝州":{}, "甘孜州":{}, "凉山州":{} }, "贵州省":{ "贵阳市":{}, "六盘水市":{}, "遵义市":{}, "安顺市":{}, "铜仁地区":{}, "毕节地区":{}, "黔西南州":{}, "黔东南州":{}, "黔南州":{} }, "云南省":{ "昆明市":{}, "曲靖市":{}, "玉溪市":{}, "保山市":{}, "昭通市":{}, "丽江市":{}, "思茅市":{}, "临沧市":{}, "文山州":{}, "红河州":{}, "西双版纳州":{}, "楚雄州":{}, "大理州":{}, "德宏州":{}, "怒江州":{}, "迪庆州":{} }, "西藏":{ "拉萨市":{}, "那曲地区":{}, "昌都地区":{}, "山南地区":{}, "日喀则地区":{}, "阿里地区":{}, "林芝地区":{} }, "陕西省":{ "西安市":{}, "铜川市":{}, "宝鸡市":{}, "咸阳市":{}, "渭南市":{}, "延安市":{}, "汉中市":{}, "榆林市":{}, "安康市":{}, "商洛市":{} }, "甘肃省":{ "兰州市":{}, "金昌市":{}, "白银市":{}, "天水市":{}, "嘉峪关市":{}, "武威市":{}, "张掖市":{}, "平凉市":{}, "酒泉市":{}, "庆阳市":{}, "定西市":{}, "陇南市":{}, "临夏州":{}, "甘南州":{} }, "宁夏":{ "银川市":{}, "石嘴山市":{}, "吴忠市":{}, "固原市":{}, "中卫市":{} }, "青海省":{ "西宁市":{}, "海东地区":{}, "海北州":{}, "黄南州":{}, "海南州":{}, "果洛州":{}, "玉树州":{}, "海西州":{} }, "新疆":{ "乌鲁木齐市":{}, "克拉玛依市":{}, "吐鲁番地区":{}, "哈密地区":{}, "和田地区":{}, "阿克苏地区":{}, "喀什地区":{}, "克孜勒苏柯州":{}, "巴音郭楞州":{}, "昌吉州":{}, "博尔塔拉州":{}, "伊犁州":{}, "塔城地区":{}, "阿勒泰地区":{}, "石河子市":{}, "阿拉尔市":{} }, "香港":{ "香港":{} }, "澳门":{ "澳门":{} }, "台湾省":{ "台北":{}, "高雄":{}, "台中":{}, "花莲":{}, "基隆":{}, "嘉义":{}, "金门":{}, "连江":{}, "苗栗":{}, "南投":{}, "澎湖":{}, "屏东":{}, "台东":{}, "台南":{}, "桃园":{}, "新竹":{}, "宜兰":{}, "云林":{}, "彰化":{} } } //地方站要闻页卡隐藏推广位 function updateStatus(){ if( $('#newsH2').css('display') != 'none' || $("#newsQuanguoH2").hasClass('selected') ){ $("#diaocha").show(); $("#kangzhan70").show(); }else{ $("#diaocha").hide(); $("#kangzhan70").hide(); } } var ipMe = { pro:'北京市', city:'', newscheck:function(proName){ if(newsMap[proName]){ var ajaxNews = new Ajax({ headers:{"If-Modified-Since":0}, url:newsInfoMap[proName], method:"get" }); ajaxNews.onComplete = function(responseObject){ $("#newsDifangH2").attr("href",newsMap[proName]["url"]); $("#newsDifangH2").attr("bossZone",newsMap[proName]["bossZone"]); $("#newsDifangH2").html(newsMap[proName]["title"]); $("#newsDifangH2").addClass("select"); $("#newsDifangH2").show(); $("#newsInfo").html(responseObject.textString); }; ajaxNews.start(); $("#newsH2").hide(); $("#qq-tabs2").show(); bossPuguang(difangTabMap[proName],"page"); }else{ $("#newsH2").show(); $("#qq-tabs2").hide(); $("#newsInfoQuanguo").show(); $("#newsInfo").hide(); } }, weathercheck:function(proName,cityName,type){ QQ.LoadScript("http://mat1.gtimg.com/www/js/qq2012/weatherNew_1.6.js",function(){ if(weatherMap[proName]){ if(weatherMap[proName][cityName]){ weatherId = weatherMap[proName][cityName]; }else{ weatherId = weatherMap[proName]["_"]; } }else{ weatherId = weatherMap["defaultCity"]; } var weatherCityMap ={ "weatherCityWind":{ "0":{ "Dir":"", "Power":"微风" }, "1":{ "Dir":"东北风", "Power":"3-4级" }, "2":{ "Dir":"东风", "Power":"4-5级" }, "3":{ "Dir":"东南风", "Power":"5-6级" }, "4":{ "Dir":"南风", "Power":"6-7级" }, "5":{ "Dir":"西南风", "Power":"7-8级" }, "6":{ "Dir":"西风", "Power":"8-9级" }, "7":{ "Dir":"西北风", "Power":"9-10级" }, "8":{ "Dir":"北风", "Power":"10-11级" }, "9":{ "Dir":"旋转不定", "Power":"11-12级" } }, "weatherCityIcon":{ "default":{ "big":"http://mat1.gtimg.com/weather/weatherIco/midImg/", "mid":"http://mat1.gtimg.com/www/images/qq2012/weather/icon35/", "small":"http://mat1.gtimg.com/www/images/qq2012/weather/" }, "00":{ "icon":"m0.png", "weatherTxt":"晴" }, "01":{ "icon":"m1.png", "weatherTxt":"多云" }, "02":{ "icon":"m2.png", "weatherTxt":"阴" }, "03":{ "icon":"m3.png", "weatherTxt":"阵雨" }, "04":{ "icon":"m4.png", "weatherTxt":"雷阵雨" }, "05":{ "icon":"m4.png", "weatherTxt":"雷阵雨并伴有冰雹" }, "06":{ "icon":"m6.png", "weatherTxt":"雨夹雪" }, "07":{ "icon":"m7.png", "weatherTxt":"小雨" }, "08":{ "icon":"m8.png", "weatherTxt":"中雨" }, "09":{ "icon":"m9.png", "weatherTxt":"大雨" }, "10":{ "icon":"m10.png", "weatherTxt":"暴雨" }, "11":{ "icon":"m17.png", "weatherTxt":"大暴雪" }, "12":{ "icon":"m17.png", "weatherTxt":"特大暴雪" }, "13":{ "icon":"m14.png", "weatherTxt":"阵雪" }, "14":{ "icon":"m14.png", "weatherTxt":"小雪" }, "15":{ "icon":"m16.png", "weatherTxt":"中雪" }, "16":{ "icon":"m16.png", "weatherTxt":"大雪" }, "17":{ "icon":"m17.png", "weatherTxt":"暴雪" }, "18":{ "icon":"m18.png", "weatherTxt":"雾" }, "19":{ "icon":"m6.png", "weatherTxt":"冻雨" }, "20":{ "icon":"m20.png", "weatherTxt":"沙尘暴" }, "21":{ "icon":"m8.png", "weatherTxt":"小雨-中雨" }, "22":{ "icon":"m9.png", "weatherTxt":"中雨-大雨" }, "23":{ "icon":"m10.png", "weatherTxt":"大雨-暴雨" }, "24":{ "icon":"m10.png", "weatherTxt":"暴雨-大暴雨" }, "25":{ "icon":"m10.png", "weatherTxt":"大暴雨-特大暴雨" }, "26":{ "icon":"m16.png", "weatherTxt":"小雪-中雪" }, "27":{ "icon":"m16.png", "weatherTxt":"中雪-大雪" }, "28":{ "icon":"m17.png", "weatherTxt":"大雪-暴雪" }, "29":{ "icon":"m29.png", "weatherTxt":"浮尘" }, "30":{ "icon":"m29.png", "weatherTxt":"扬沙" }, "31":{ "icon":"m20.png", "weatherTxt":"强沙尘暴" }, "32":{ "icon":"m9.png", "weatherTxt":"飑" }, "33":{ "icon":"m33.png", "weatherTxt":"龙卷风" }, "34":{ "icon":"m14.png", "weatherTxt":"弱高吹雪" }, "35":{ "icon":"m18.png", "weatherTxt":"轻雾" }, "53":{ "icon":"m29.png", "weatherTxt":"霾" } }, "living":{ 'cl': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '天气晴朗,空气清新,是您晨练的大好时机。' }, { 'type': '较适宜', 'info': '较适宜晨练,某些气象条件会对晨练产生一定影响,但影响不大。' }, { 'type': '较不宜', 'info': '某些气象因素对晨练造成不利影响,较不宜晨练。' }, { 'type': '不适宜', 'info': '气象因素非常不利于室外锻炼,请尽量避免户外晨练。'}], 'cy': [{ 'type': '', 'info': '' }, { 'type': '炎热', 'info': '薄型T恤衫。' }, { 'type': '热舒适', 'info': '短套装、T恤夏季服装。' }, { 'type': '舒适', 'info': '长袖服装。' }, { 'type': '凉舒适', 'info': '薄型套装等春秋过渡装。'},{ 'type': '温凉', 'info': '夹衣或西服套装加薄羊毛衫。' }, { 'type': '凉', 'info': '厚外套加毛衣等春秋服装。' }, { 'type': '冷', 'info': '棉衣加羊毛衫等冬季服装。' }, { 'type':'寒冷','info': '厚羽绒服等隆冬服装。'}], 'gm': [{ 'type': '', 'info': '' }, { 'type': '少发', 'info': '各项气象条件适宜,发生感冒机率较低。' }, { 'type': '较易发', 'info': '较易发生感冒,体质较弱的朋友请注意适当防护。' }, { 'type': '易发', 'info': '发生感冒机率较大,请加强自我防护避免感冒。'}, { 'type': '极易发', 'info': '极易发生感冒,请特别注意增加衣服保暖防寒避免感冒。'}], 'xc': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '适宜洗车,未来持续两天无雨天气较好,适合擦洗汽车。' }, { 'type': '较适宜', 'info': '较适宜洗车,未来一天无雨,风力较小,较适合擦洗汽车。' }, { 'type': '较不宜', 'info': '较不宜洗车,擦洗一新的汽车可能会蒙上污垢。'}, { 'type': '不宜', 'info': '不宜洗车,路上的泥水可能会再次弄脏您的爱车。'}], 'zs': [{ 'type': '无', 'info': '温度不高,其他各项气象条件适宜,中暑机率极低。' }, { 'type': '少发', 'info': '气温偏高,有可能中暑,体质较弱的朋友请注意防暑降温,避免长时间在日光下暴晒或在高温环境中工作。' }, { 'type': '较易', 'info': '气温较高,较易中暑,体弱者请避免长时间在日光下暴晒或在高温环境中工作。' }, { 'type': '容易', 'info': '气温很高,热气逼人,容易中暑,请注意防暑降温,避免长时间在日光下暴晒或在高温环境中工作。'}, { 'type': '极易', 'info': '气温极高,热浪滚滚,极易中暑,请注意防暑降温,避免在高温环境中工作。'}], 'zwx': [{ 'type': '', 'info': '' }, { 'type': '最弱', 'info': '属弱紫外线辐射天气,无需特别防护。若长期在户外,建议涂擦SPF在8-12之间的防晒护肤品。' }, { 'type': '弱', 'info': '紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。' }, { 'type': '中等', 'info': '属中等强度紫外线辐射天气,外出时建议涂擦SPF高于15、PA+的防晒护肤品,戴帽子、太阳镜。'}, { 'type': '强', 'info': '紫外线辐射强,建议涂擦SPF20左右、PA++的防晒护肤品。避免在10点至14点暴露于日光下。'}, { 'type': '很强', 'info': '紫外线辐射极强,建议涂擦SPF20以上、PA++的防晒护肤品,尽量避免暴露于日光下。'}], 'ls': [{ 'type': '', 'info': '' }, { 'type': '极适宜', 'info': '极适宜晾晒,请抓紧时机晾晒。' }, { 'type': '适宜', 'info': '适宜晾晒,赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧!' }, { 'type': '基本适宜', 'info': '午后温暖的阳光仍能满足你驱潮消霉杀菌的晾晒需求。'}, { 'type': '不太适宜', 'info': '气象要素对晾晒有影响,不太适宜晾晒。若非晾晒不可,请尽量选择通风的地点。'}, { 'type': '不适宜', 'info': '不适宜晾晒。如果非晾晒不可,请在室内进行并关牢门窗。'}], 'kqwr': [{ 'type': '', 'info': '' }, { 'type': '优', 'info': '非常有利于空气污染物稀释、扩散和清除,可在室外正常活动。' }, { 'type': '良', 'info': '有利于空气污染物稀释、扩散和清除,可在室外正常活动。' }, { 'type': '中', 'info': '对空气污染物稀释、扩散和清除无明显影响,易感人群应适当减少室外活动时间。'}, { 'type': '较差', 'info': '较不利于空气污染物稀释、扩散和清除,请适当减少室外活动时间。'}, { 'type': '差', 'info': '不利于空气污染物稀释、扩散和清除,请尽量避免在室外长时间活动。'}], 'ly': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '明媚阳和微风伴您一路同行,适宜旅游。' }, { 'type': '较适宜', 'info': '虽然会多云或有风,但仍是出行游玩的好时机,较适宜旅游。' }, { 'type': '一般', 'info': '可能出现阴天、大风、阵雨或沙尘等天气,将会给出行带来一些不便,旅游指数一般。'}, { 'type': '较不宜', 'info': '可能出现雨雪,强风,大雾等天气,人体在户外会感觉不舒适,将会给出行带来很多不便,较不适宜出游。'}, { 'type': '不适宜', 'info': '可能出现较大的雨雪,强风,冻雨,沙尘暴等天气,对出行造成一定困难,不适宜旅游。'}], 'kt': [{ 'type': '', 'info': '' },{ 'type': '长时间开启', 'info': '闷热,您需长时间开启制冷空调来降温除湿。' }, { 'type': '部分时间开启', 'info': '天气热,建议您在适当的时候开启制冷空调来降低温度。' }, { 'type': '少部分时间', 'info': '中午的时候您将会感到有点热,因此建议在午后较热时开启制冷空调。' }, { 'type': '较少开启', 'info': '您将感到很舒适,一般不需要开启空调。'}, { 'type': '开启制暖空调', 'info': '冷,适当开启制暖空调调节室内温度。'}], 'dy': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '非常适宜垂钓,风和日丽的天气将陪伴你度过愉快的垂钓时光。' }, { 'type': '较适宜', 'info': '较适合垂钓,气象条件对垂钓会产生一定影响,但影响不大。' }, { 'type': '不适宜', 'info': '天气不好,不适合垂钓,请选择别的娱乐方式。'}], 'fs': [{ 'type': '', 'info': '' },{ 'type': '弱', 'info': '长期在户外,建议涂擦SPF在8-12之间的防晒护肤品。' }, { 'type': '较弱', 'info': '建议涂擦SPF在12-15之间,PA+的防晒护肤品。' }, { 'type': '中等', 'info': '建议涂擦SPF指数高于15,PA+的防晒护肤品。' }, { 'type': '强', 'info': '外出时应加强防护,建议涂擦SPF在15—20之间PA++的防晒护肤品。'}, { 'type': '极强', 'info': '外出时应特别加强防护,建议涂擦SPF20以上,PA++的防晒护肤品,并随时补涂。'}], 'gj': [{ 'type': '适宜', 'info': '天气条件很适合逛街,可以尽情享受逛街的乐趣。' }, { 'type': '较适宜', 'info': '气象要素对逛街有一定影响,比较适宜逛街。' }, { 'type': '较不宜', 'info': '天气条件不适宜逛街,应尽量避免外出逛街。' }, { 'type': '不适宜', 'info': '气象条件不适合逛街,请尽量选择室内活动。'}], 'hc': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '天气晴朗,温度适宜,非常适合划船或嬉玩各种水上运动。' }, { 'type': '较适宜', 'info': '较适宜划船,有些气象因素对划船会产生些影响,但影响不大。' }, { 'type': '不适宜', 'info': '不适宜划船,建议选择别的娱乐方式或采取必要措施。'}], 'jt': [{ 'type': '', 'info': '' },{ 'type': '良好', 'info': '交通气象条件良好,车辆可以正常行驶。' }, { 'type': '较好', 'info': '交通气象条件较好,但不适宜高速行驶,司机应更加集中注意力,保持车距。' }, { 'type': '一般', 'info': '交通气象条件一般,刹车距离延长,事故易发期,注意车距,务必小心驾驶。' }, { 'type': '较差', 'info': '交通气象条件较差,事故高发期,车辆应低速行驶。'}, { 'type': '很差', 'info': '交通气象条件很差,车辆行驶缓慢,尽量减少出行。'}], 'ys': [{ 'type': '', 'info': '' }, { 'type': '不带伞', 'info': '降水概率很低,因此您在出门的时候无须带雨伞。' }, { 'type': '带伞', 'info': '将有阵雨或阵雪,如果您要短时间外出的话可不必带雨伞。' }, { 'type': '带伞', 'info': '有小雨或小雪或中雪,在短时间外出可收起雨伞,但最好还是带上雨伞。'}, { 'type': '带伞', 'info': '会有较大的雨雪天气,您在外出的时候一定要带雨伞,以免被雨水淋湿。'}], 'mf': [{ 'type': '', 'info': '' }, { 'type': '极适宜', 'info': '各项气象条件都适宜美发,这为您的头发创造一个健康、洁净的生长环境。' }, { 'type': '适宜', 'info': '有某项气象因素会影响您的秀发生长,请注意保养。 ' }, { 'type': '一般', 'info': '气象条件对美发有一定影响,注意保养您的美发,细心呵护!'}], 'ysh': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '天气晴朗,你可以尽情外出享受夜生活的乐趣,不用担心天气会来捣乱。' }, { 'type': '较适宜', 'info': '虽然有风或有雨雪天气出现,但只要提前有所准备,您仍然可以享受夜生活的乐趣。' }, { 'type': '较不宜', 'info': '天气会使人体在户外感觉不舒适,建议夜生活最好在室内进行。'}], 'ffz': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '这种天气去放风筝既可以舒展筋骨,又可放松身心。' }, { 'type': '较适宜', 'info': '选择合适的地点,还是较适宜放风筝的。' }, { 'type': '不宜', 'info': '气象条件不适宜放风筝。'}], 'hz': [{ 'type': '', 'info': '' }, { 'type': '保湿防龟裂', 'info': '天气寒冷,多补水,选用滋润保湿型化妆品,使用润唇膏。' }, { 'type': '保湿', 'info': '皮肤易缺水,用保湿型霜类化妆品,使用润唇膏。' }, { 'type': '控油', 'info': '建议用露质面霜打底,水质无油粉底霜,透明粉饼,粉质胭脂。'}, { 'type': '防晒', 'info': '天气炎热,易出汗,建议使用防脱水防晒指数高的化妆品,经常补粉。'}], 'fh': [{ 'type': '', 'info': '' }, { 'type': '凉', 'info': '室外活动注意适当增减衣物。' }, { 'type': '冷', 'info': '室外活动要穿厚实一点,年老体弱者要适当注意保暖。' }, { 'type': '寒冷', 'info': '室外活动要注意保暖,可戴手套与帽子。' }, { 'type': '非常寒冷', 'info': '室外活动注意保暖防寒,可戴厚手套和帽子,年老体弱者避免长时间外出。' }, { 'type': '严寒', 'info': '着羽绒服、皮大衣仍感到寒冷,室外活动须戴厚棉、皮手套和帽子。' }, { 'type': '冰冻严寒', 'info': '极易造成裸露皮肤冻伤,尽量避免野外作业和外出。' }, { 'type': '', 'info': '' }, { 'type': '微凉', 'info': '温度未达到风寒所需的低温,稍作防寒准备即可。'}], 'xq': [{ 'type': '', 'info': '' }, { 'type': '好', 'info': '天气晴朗,阳光灿烂,空气温润,和风飘飘,美好的天气会带来一天接踵而来的好心情。' }, { 'type': '较好', 'info': '温度舒适,您会觉得精神振奋,意气风发,心情舒畅。' }, { 'type': '较差', 'info': '天气阴沉或有雾,会感觉莫名的压抑,情绪低落。'}, { 'type': '差', 'info': '天气阴沉有雨或有沙尘,闷热潮湿的空气会让人感到胸闷,心情糟糕。'}], 'yd': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '天气较好,且紫外线辐射不强,适宜户外运动。' }, { 'type': '较适宜', 'info': '较适宜在户内低强度运动,户外运动需防晒避风。' }, { 'type': '较不宜', 'info': '受大风,气压,强紫外线,过高或过低的气温等天气影响,较不宜运动'}], 'yh': [{ 'type': '', 'info': '' }, { 'type': '适宜', 'info': '天气晴朗,风和日丽,适宜与情人约会。' }, { 'type': '较适宜', 'info': '天气不会有太大的影响,你仍然可以有一个愉快的约会。' }, { 'type': '较不适宜', 'info': '会有影响人体舒适的不好天气出现,室外约会可能会让恋人们受些苦,最好在温暖的室内促膝谈心'}, { 'type': '不适宜', 'info': '天气会对人体有较大影响,外出约会还可能会败兴而归,男士请别约美眉逛街。'}] } } try{ QQ.LoadScript("http://weather.gtimg.cn/city/" + weatherId + ".js?ref=qqIndex&ran="+Math.random(),function(){ var weatherCityName = __weather_city["bi_name"]; if(weatherCityName == "西安(陕西)"){ weatherCityName = "西安"; }else if(weatherCityName == "邢台市"){ weatherCityName = "邢台"; }else if(weatherCityName == "绍兴市"){ weatherCityName = "绍兴"; }else if(weatherCityName == "襄樊"){ weatherCityName = "襄阳"; } $("#weatherMoreAirLink").attr("href","http://weather.news.qq.com/cityaqi.htm?icity=" + weatherId); //天气浮层空气质量增加跳转链接 var weatherTemperatureMath = __weather_city["sk_tp"]; var weatherCityIcon = weatherCityMap["weatherCityIcon"]["default"]["big"]+weatherCityMap["weatherCityIcon"][__weather_city["sk_wt"]]["icon"]; var weatherCityTxt = weatherCityMap["weatherCityIcon"][__weather_city["sk_wt"]]["weatherTxt"]; var weatherCityWindDir = weatherCityMap["weatherCityWind"][__weather_city["sk_wd"]]["Dir"]; var weatherCityWindPower = weatherCityMap["weatherCityWind"][__weather_city["sk_wp"]]["Power"]; //nowTimeHour = nowTimeHour + 8; if(nowTimeHour<20 && nowTimeHour >4){ var weatherIcon = weatherMap["weatherIcon"][__weather_city.sk_wt]["day"]; }else{ var weatherIcon = weatherMap["weatherIcon"][__weather_city.sk_wt]["night"]; } //if(__weather_city.wk[0][0].ts.substring(8,10) == __weather_city.wk[0][0].te.substring(8,10)){ //alert("ts="+new Date(("2013-5-2 8:00:00").replace(/\-/g, "/")).getTime()); //alert("te="+parseInt(new Date(__weather_city.wk[0][0].te).getTime()/1000/3600/24)); if(parseInt(new Date(__weather_city.wk[0][0].ts.replace(/\-/g, "/")).getTime()/1000/3600/24) == parseInt(new Date(__weather_city.wk[0][0].te.replace(/\-/g, "/")).getTime()/1000/3600/24)){ if(__weather_city.wk[0][0].tmin!="NULL"){ var weatherFutureTemperature01 = __weather_city.wk[0][0].tmin; }else{ var weatherFutureTemperature01 = __weather_city.wk[0][0].tmax; } var weatherFutureIcon01 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][0].wt]["icon"]; var weatherMoreIcon01 = weatherCityMap["weatherCityIcon"]["default"]["mid"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][0].wt]["icon"]; var weatherFutureTxt01 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][0].wt]["weatherTxt"]; if(__weather_city.wk[0][1].tmin!="NULL"){ var weatherFutureTemperature02 = __weather_city.wk[0][1].tmin; }else{ var weatherFutureTemperature02 = __weather_city.wk[0][1].tmax; } var weatherFutureIcon02 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][1].wt]["icon"]; var weatherFutureTxt02 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][1].wt]["weatherTxt"]; if(__weather_city.wk[0][2].tmin!="NULL"){ var weatherFutureTemperature03 = __weather_city.wk[0][2].tmin; }else{ var weatherFutureTemperature03 = __weather_city.wk[0][2].tmax; } var weatherFutureIcon03 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][2].wt]["icon"]; var weatherMoreIcon03 = weatherCityMap["weatherCityIcon"]["default"]["mid"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][2].wt]["icon"]; var weatherFutureTxt03 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][2].wt]["weatherTxt"]; if(__weather_city.wk[0][3].tmin!="NULL"){ var weatherFutureTemperature04 = __weather_city.wk[0][3].tmin; }else{ var weatherFutureTemperature04 = __weather_city.wk[0][3].tmax; } var weatherFutureIcon04 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][3].wt]["icon"]; var weatherFutureTxt04 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][3].wt]["weatherTxt"]; if(__weather_city.wk[0][4].tmin!="NULL"){ var weatherFutureTemperature05 = __weather_city.wk[0][4].tmin; }else{ var weatherFutureTemperature05 = __weather_city.wk[0][4].tmax; } var weatherFutureIcon05 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][4].wt]["icon"]; var weatherMoreIcon05 = weatherCityMap["weatherCityIcon"]["default"]["mid"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][3].wt]["icon"]; var weatherFutureTxt05 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][4].wt]["weatherTxt"]; if(__weather_city.wk[0][5].tmin!="NULL"){ var weatherFutureTemperature06 = __weather_city.wk[0][5].tmin; }else{ var weatherFutureTemperature06 = __weather_city.wk[0][5].tmax; } var weatherFutureIcon06 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][5].wt]["icon"]; var weatherFutureTxt06 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][5].wt]["weatherTxt"]; }else{ var weatherFutureTemperature01 = __weather_city.sk_tp; var weatherMoreIcon01 = weatherCityMap["weatherCityIcon"]["default"]["mid"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][0].wt]["icon"]; var weatherFutureTxt01 = weatherCityMap["weatherCityIcon"][__weather_city.sk_wt]["weatherTxt"]; if(__weather_city.wk[0][0].tmin!="NULL"){ var weatherFutureTemperature02 = __weather_city.wk[0][0].tmin; }else{ var weatherFutureTemperature02 = __weather_city.wk[0][0].tmax; } var weatherFutureIcon02 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][0].wt]["icon"]; var weatherFutureTxt02 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][0].wt]["weatherTxt"]; if(__weather_city.wk[0][1].tmin!="NULL"){ var weatherFutureTemperature03 = __weather_city.wk[0][1].tmin; }else{ var weatherFutureTemperature03 = __weather_city.wk[0][1].tmax; } var weatherFutureIcon03 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][1].wt]["icon"]; var weatherMoreIcon03 = weatherCityMap["weatherCityIcon"]["default"]["mid"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][2].wt]["icon"]; var weatherFutureTxt03 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][1].wt]["weatherTxt"]; if(__weather_city.wk[0][2].tmin!="NULL"){ var weatherFutureTemperature04 = __weather_city.wk[0][2].tmin; }else{ var weatherFutureTemperature04 = __weather_city.wk[0][2].tmax; } var weatherFutureIcon04 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][2].wt]["icon"]; var weatherFutureTxt04 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][2].wt]["weatherTxt"]; if(__weather_city.wk[0][3].tmin!="NULL"){ var weatherFutureTemperature05 = __weather_city.wk[0][3].tmin; }else{ var weatherFutureTemperature05 = __weather_city.wk[0][3].tmax; } var weatherFutureIcon05 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][3].wt]["icon"]; var weatherMoreIcon05 = weatherCityMap["weatherCityIcon"]["default"]["mid"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][3].wt]["icon"]; var weatherFutureTxt05 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][3].wt]["weatherTxt"]; if(__weather_city.wk[0][4].tmin!="NULL"){ var weatherFutureTemperature06 = __weather_city.wk[0][4].tmin; }else{ var weatherFutureTemperature06 = __weather_city.wk[0][4].tmax; } var weatherFutureIcon06 = weatherCityMap["weatherCityIcon"]["default"]["small"]+weatherCityMap["weatherCityIcon"][__weather_city.wk[0][4].wt]["icon"]; var weatherFutureTxt06 = weatherCityMap["weatherCityIcon"][__weather_city.wk[0][4].wt]["weatherTxt"]; } $("#ipWeather").html(weatherCityName); $("#ipWeather").width($("#ipWeather").html().length*12); $("#weatherTemperature").html(weatherTemperatureMath + "℃"); $("#weatherIcon").attr("style","background:url(" weatherIcon ") no-repeat;_background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='" weatherIcon "');"); $("#weatherLayout").width($("#weatherTemperature").width()+$("#weatherIcon").width()+$("#ipWeather").width()+20); $("#weatherLayout").show(); $("#weatherMoreCity").html(weatherCityName); $("#weatherMoreTxt").html(weatherCityTxt); $("#weatherMoreLink").attr("href",encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())); //天气浮层增加跳转链接 if(__weather_city.zs_kqwr > 5){ __weather_city.zs_kqwr = 5; } $("#weatherMoreTem").html(weatherTemperatureMath + "℃"); $("#weatherMoreTodayIcon").attr("style","background:url(" weatherMoreIcon01 ") no-repeat;_background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='" weatherMoreIcon01 "');"); $("#weatherMoreTodayHighest").html(weatherFutureTemperature01); $("#weatherMoreTodayLowest").html(weatherFutureTemperature02); $("#weatherMoreTomorrowIcon").attr("style","background:url(" weatherMoreIcon03 ") no-repeat;_background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='" weatherMoreIcon03 "');"); $("#weatherMoreTomorrowHighest").html(weatherFutureTemperature03); $("#weatherMoreTomorrowLowest").html(weatherFutureTemperature04); $("#weatherMoreAfterTomorrowIcon").attr("style","background:url(" weatherMoreIcon05 ") no-repeat;_background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='" weatherMoreIcon05 "');"); $("#weatherMoreAfterTomorrowHighest").html(weatherFutureTemperature05); $("#weatherMoreAfterTomorrowLowest").html(weatherFutureTemperature06); window.cityrank = function(data){ var airHas = false; for(var i = 0, len = data.length; i < len; i ++){ if(data[i].id == weatherId){ $("#weatherMoreAirTxt").html(data[i].quality); $("#weatherMoreAirPmTxt").html(data[i].pm2_5); airHas = true; break; } } if(!airHas){ $("#weatherMoreAirTxt").html("暂无数据"); $("#weatherMoreAirPmTxt").html("暂无数据"); } } QQ.LoadScript("http://weather.gtimg.cn/aqi/cityrank.json",function(){}); /* if(type == 0){ weatherCityNameDefault = weatherCityName; weatherTemperatureMathDefault = weatherTemperatureMath; weatherIconDefault = weatherIcon; weatherCityTxtDefault = weatherCityTxt; weatherTemperatureMathDefault = weatherTemperatureMath; weatherMoreIcon01Default = weatherMoreIcon01; weatherFutureTemperature01Default = weatherFutureTemperature01; weatherFutureTemperature02Default = weatherFutureTemperature02; weatherMoreIcon03Default = weatherMoreIcon03; weatherFutureTemperature03Default = weatherFutureTemperature03; weatherFutureTemperature04Default = weatherFutureTemperature04; weatherMoreIcon05Default = weatherMoreIcon05; weatherFutureTemperature05Default = weatherFutureTemperature05; weatherFutureTemperature06Default = weatherFutureTemperature06; weatherMoreAirTxtDefault = $("#weatherMoreAirTxt").html(); } */ }); }catch(e){} //http://weather.gtimg.cn/qqindex/01010101.js?ref=qqIndex }); }, locationCustomInit:function(proName,cityName){ var weatherMoreCitySelectUlArr = []; $("#ipSetProvince").html(proName); $("#weatherMoreCitySelectUl").html(""); for(var key in cityCode[proName]){ weatherMoreCitySelectUlArr.push("
  • "+key+"
  • "); } $("#weatherMoreCitySelectUl").html(weatherMoreCitySelectUlArr.join("")); $("#ipSetCity").html($("#weatherMoreCitySelectUl").children().first().children().first().html()); }, locationCustom:function(proName,cityName,defaultPro,defaultCity){ var weatherMoreOverTime = ""; var weatherMoreOutTime = ""; var weatherMoreProviceSelectBind = ""; var weatherMoreCitySelectBind = ""; $("#weatherLayout").bind("mouseover",function(){ weatherMoreOverTime = setTimeout(function(){ if($("#weatherMore").is(":hidden") == true){ } $("#weatherMore").show(); },500); if(weatherMoreOutTime){ clearTimeout(weatherMoreOutTime); } }); $("#weatherLayout").bind("mouseout",function(){ if(weatherMoreOverTime){ clearTimeout(weatherMoreOverTime); } weatherMoreOutTime = setTimeout(function(){ $("#weatherMoreProviceSelect").hide(); $("#weatherMoreCitySelect").hide(); $("#weatherMore").hide(); $("#weatherMore").removeClass("weatherMoreFlipped"); },1000); }); $("#weatherMoreReset").bind("click",function(){ $("#weatherMore").removeClass("weatherMoreFlipped"); ipMe.weathercheck(defaultPro,defaultCity,1); ipMe.locationCustomInit(defaultPro,defaultCity); ipMe.newscheck(defaultPro); ipMe.housecheck(defaultPro,defaultCity); //ipMe.autocheck(defaultPro); ipMe.autoPriceCheck(defaultCity); ipMe.tuancheck(defaultPro,defaultCity); ipMe.meishicheck(defaultPro); QQ.localData.remove("customProvince"); QQ.localData.remove("customCity"); QQ.localData.remove("customNewsProvince"); QQ.localData.remove("customNewsCity"); updateStatus(); }); $("#ipSetProvince").bind("click",function(e){ e = e||window.event; var target = e.target||e.srcElement; if('function' === typeof e.preventDefault){ e.preventDefault(); e.stopPropagation(); }else{ e.returnValue = false; e.cancelBubble = true; } $("#weatherMoreProviceSelect").show(); setTimeout(function(){ weatherMoreProviceSelectBind = $(document).bind("_click",function(){ $("#weatherMoreProviceSelect").hide(); if(weatherMoreProviceSelectBind){ $(document).unbind("click",weatherMoreProviceSelectBind); } }); },100); }); $("#ipSetCity").bind("click",function(e){ e = e||window.event; var target = e.target||e.srcElement; if('function' === typeof e.preventDefault){ e.preventDefault(); e.stopPropagation(); }else{ e.returnValue = false; e.cancelBubble = true; } $("#weatherMoreCitySelect").show(); setTimeout(function(){ weatherMoreCitySelectBind = $(document).bind("_click",function(){ $("#weatherMoreCitySelect").hide(); if(weatherMoreCitySelectBind){ $(document).unbind("click",weatherMoreCitySelectBind); } }); },100); }); $("#weatherMoreProviceSelect").bind("click",function(e){ e = e||window.event; var target = e.target||e.srcElement; if('A' !== target.nodeName){return false;} $("#weatherMoreProviceSelect").hide(); $("#ipSetProvince").html(target.innerHTML); $("#weatherMoreCitySelectUl").html(""); for(var key in cityCode[target.innerHTML]){ $("#weatherMoreCitySelectUl").append("
  • "+key+"
  • "); } $("#ipSetCity").html($("#weatherMoreCitySelectUl").children().first().children().first().html()); }); $("#weatherMoreCitySelectUl").bind("click",function(e){ e = e||window.event; var target = e.target||e.srcElement; if('A' !== target.nodeName){return false;} $("#weatherMoreCitySelect").hide(); $("#ipSetCity").html(target.innerHTML); }); $("#weatherMoreSet").bind("click",function(){ $("#weatherMore").addClass("weatherMoreFlipped"); }); $("#weatherMoreNewsCheckbox").bind("click",function(){ if($("#weatherMoreNewsCheckbox").hasClass("weatherMoreNewsYes")){ $("#weatherMoreNewsCheckbox").removeClass("weatherMoreNewsYes"); }else{ $("#weatherMoreNewsCheckbox").addClass("weatherMoreNewsYes"); } }); $("#weatherMoreSubmit").bind("click",function(){ $("#weatherMore").removeClass("weatherMoreFlipped"); var personalProvince = $("#ipSetProvince").html(); ipProvince = $("#ipSetProvince").html(); var personalCity = $("#ipSetCity").html(); if($("#weatherMoreNewsCheckbox").hasClass("weatherMoreNewsYes")){ ipMe.weathercheck(personalProvince,personalCity); ipMe.newscheck(personalProvince); ipMe.housecheck(personalProvince,personalCity); //ipMe.autocheck(personalProvince); ipMe.autoPriceCheck(personalCity); ipMe.tuancheck(personalProvince,personalCity); ipMe.meishicheck(personalProvince); QQ.localData.set("customNewsProvince", personalProvince); QQ.localData.set("customNewsCity", personalCity); }else{ ipMe.weathercheck(personalProvince,personalCity); } QQ.localData.set("customProvince", personalProvince); QQ.localData.set("customCity", personalCity); updateStatus(); }); $("#weatherMoreCancel").bind("click",function(){ $("#weatherMore").removeClass("weatherMoreFlipped"); }); }, tuancheck:function(proName,cityName){ if(liveMap[proName]){ //地方站 var ajaxTuan = new Ajax({ headers:{"If-Modified-Since":0}, url:liveMap[proName], parameters:{"random":Math.random()}, method:"get" }); ajaxTuan.onComplete = function(responseObject){ $("#liveInfo").html(responseObject.textString); }; ajaxTuan.start(); $("#tuangouH2").html(tuanTitleMap[proName]); }else{ //非地方站 //团购信息 if(tuanMap[cityName]){ tuanCity = encodeURI(tuanMap[cityName]).toLowerCase(); }else{ if(provincialCapitalMap[proName]){ tuanCity = encodeURI(provincialCapitalMap[proName]).toLowerCase(); }else{ tuanCity = encodeURI("其他市").toLowerCase(); } } var ajaxTuan = new Ajax({ headers:{"If-Modified-Since":0}, url:"http://www.qq.com/c/tuangouInfo20120917.htm", parameters:{"random":Math.random(),"city":tuanCity}, method:"get" }); ajaxTuan.onComplete = function(responseObject){ $("#tuangouInfo").html(responseObject.textString); }; ajaxTuan.start(); //生活服务文字链 var ajaxTuangouTxt = new Ajax({ headers:{"If-Modified-Since":0}, url:"/ninja/liveserverContent.htm", parameters:{"random":Math.random()}, method:"get" }); ajaxTuangouTxt.onComplete = function(responseObject){ $("#tuangouTxt").html(responseObject.textString); }; ajaxTuangouTxt.start(); //生活服务标题 $("#tuangouH2").html(''); } }, meishicheck:function(proName){ if(meishiMap[proName]){ var ajaxMeishiInfo = new Ajax({ headers:{"If-Modified-Since":0}, url:meishiMap[proName], parameters:{"random":Math.random()}, method:"get" }); ajaxMeishiInfo.onComplete = function(responseObject){ $("#qqMeishi").html(responseObject.textString); $("#gongyi").hide(); $("#qqMeishi").show(); }; ajaxMeishiInfo.start(); }else{ $("#qqMeishi").hide(); $("#gongyi").show(); } }, housecheck:function(proName,cityName){ houseUrl = ""; if(houseMap[cityName]){ houseUrl = houseMap[cityName]; }else if(houseMap[proName]){ houseUrl = houseMap[proName]; }else{ houseUrl = "/ninja/houseQuanguoContent_public.htm"; } if(houseUrl != ""){ var ajaxHouse = new Ajax({ headers:{"If-Modified-Since":0}, url:houseUrl, parameters:{"random":Math.random()}, method:"get" }); ajaxHouse.onComplete = function(responseObject){ $("#house .bd").html(responseObject.textString); if($("#house").hasClass("contentModBig")){ $("#house .bd .contentRight").show(); }else{ $("#house .bd .contentRight").hide(); } if(houseTitleMap[cityName]){ $("#house .hd h2").html(houseTitleMap[cityName]); }else if(houseTitleMap[proName]){ $("#house .hd h2").html(houseTitleMap[proName]); }else{ $("#house .hd h2").html(' / '+data.data[i].serial_info[n].sserial_amount+'万'+data.data[i].serial_info[n].sserial_price+'万剩'+data.data[i].serial_info[n].sserial_enddays+'天'); } $("#autoLowPriceUl").html(autoPriceArr.join("")); break; } } } } window.autoLowPriceDefault = function(data){ if(data.code == 0){ for(var i = 0, len = data.data.length; i < len; i ++){ if(data.data[i].cityid == 0){ var autoPriceArr = []; for(var n = 0; n < 3; n++){ autoPriceArr.push('
  • '+data.data[i].serial_info[n].sserial_name+''+data.data[i].serial_info[n].sserial_amount+'万'+data.data[i].serial_info[n].sserial_price+'万剩'+data.data[i].serial_info[n].sserial_enddays+'天
  • '); } $("#autoLowPriceUl").html(autoPriceArr.join("")); break; } } } } if(autoPriceMap[cityName]){ QQ.LoadScript("http://www.qq.com/c/lowprice.js?callback=autoLowPrice&random="+Math.random(),function(){}); }else{ QQ.LoadScript("http://www.qq.com/c/lowprice.js?callback=autoLowPriceDefault&random="+Math.random(),function(){}); } }, init:function(){ //拉取用户订制 var param = encodeURI('{"busi_id":"tubd_sub_23","busi_subid":""}'); QQ.LoadScript('http://i.match.qq.com/interface/getsub?callback=customOrder¶=' + param + '&random='+Math.random(),function(){}); var _self = this; _self.pro = "北京市"; _self.city = "北京市"; var customProvince = QQ.localData.get("customProvince"); var customCity = QQ.localData.get("customCity"); var customNewsProvince = QQ.localData.get("customNewsProvince"); var customNewsCity = QQ.localData.get("customNewsCity"); customIpProvince = customNewsProvince; //var ipCookie = QQ.Cookie.get("ipCookie"); $("#ipWeather").bind("click",function(){ registerZone2({bossZone:'weather',url:encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())},1); window.open(encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())); }); $("#weatherIcon").bind("click",function(){ registerZone2({bossZone:'weather',url:encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())},1); window.open(encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())); }); $("#weatherTemperature").bind("click",function(){ registerZone2({bossZone:'weather',url:encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())},1); window.open(encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())); }); $("#weatherMoreFutureCon").bind("click",function(){ registerZone2({bossZone:'weather',url:encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())},1); window.open(encodeURI("http://weather.news.qq.com/qresult.htm?acity" + $("#ipWeather").html())); }); if(window.location.toString().indexOf('qq.com') != -1){ QQ.LoadScript("http://fw.qq.com/ipaddress?ran="+Math.random(),function(){ if (typeof(IPData) != "undefined") { _self.ip = IPData[0]; _self.pro = IPData[2]; ipProvince = IPData[2]; switch(IPData[2]){ case '北京市': _self.city = IPData[2]; break; case '上海市': _self.city = IPData[2]; break; case '重庆市': _self.city = IPData[2]; break; case '天津市': _self.city = IPData[2]; break; case '香港': _self.city = IPData[2]; break; case '澳门': _self.city = IPData[2]; break; default: _self.city = IPData[3]; } } _self.locationCustom(_self.pro,_self.city,_self.pro,_self.city); if(customProvince != null && customCity != null){ _self.weathercheck(customProvince,customCity); _self.locationCustomInit(customProvince,customCity); }else{ _self.weathercheck(_self.pro,_self.city,0); _self.locationCustomInit(_self.pro,_self.city); } if(customNewsProvince != null && customNewsCity != null){ ipProvince = customNewsProvince; _self.newscheck(customNewsProvince); _self.housecheck(customNewsProvince,customNewsCity); //_self.autocheck(customNewsProvince); _self.autoPriceCheck(customNewsCity); _self.tuancheck(customNewsProvince,customNewsCity); _self.meishicheck(customNewsProvince); }else{ _self.newscheck(_self.pro); _self.housecheck(_self.pro,_self.city); //_self.autocheck(_self.pro,_self.city); _self.autoPriceCheck(_self.city); _self.tuancheck(_self.pro,_self.city); _self.meishicheck(_self.pro); } }); }else if(customProvince != null && customCity != null){ _self.weathercheck(customProvince,customCity); _self.locationCustom(_self.pro,_self.city,_self.pro,_self.city); _self.locationCustomInit(customProvince,customCity); if(customNewsProvince != null && customNewsCity != null){ ipProvince = customNewsProvince; _self.newscheck(customNewsProvince); //_self.autocheck(customNewsProvince); _self.autoPriceCheck(customNewsCity); _self.tuancheck(customNewsProvince,customNewsCity); _self.meishicheck(customNewsProvince); _self.housecheck(customNewsProvince,customNewsCity); } }else{ _self.weathercheck(_self.pro,_self.city); _self.locationCustom(_self.pro,_self.city,_self.pro,_self.city); _self.locationCustomInit(_self.pro,_self.city); _self.newscheck(_self.pro); //_self.autocheck(_self.pro); _self.autoPriceCheck(_self.city); _self.tuancheck(_self.pro,_self.city); _self.meishicheck(_self.pro); _self.housecheck(_self.pro,_self.city); } } } var login = { loginCheck:function(){ if(QQ.Cookie.get("skey")){ uin = Number(QQ.Cookie.get("uin").substring(1)); skey = QQ.Cookie.get("skey"); try{ QQ.LoadScript("http://qfwd.qq.com/?uin=" + uin + "&skey=" + skey + "&func=loginAll&refresh=0&ran="+Math.random(), function(){}, "utf-8"); }catch(e){} }else{ ipMe.init(); $("#newsMoreBtn a").html("您有未读新闻,点击查看"); /* if(QQ.localData.get("nick")){ }*/ QQ.LoadScript("http://mat1.gtimg.com/finance/js/st/p/qq/q_fin_v20151019135558.js?ran="+Math.random(),function(){}); } }, loginOut:function(){ var _this = this; QQ.LoadScript("https://ui.ptlogin2.qq.com/js/ptloginout.js",function(){ pt_logout.logout(function(n){ if(n){ _this.loginGrayOutCall(); _this.loginOutCall(); } }); }); }, loginGrayOutCall:function(){ //一键登录灰度订阅重置 $("#dingyueGrayTitle").html("订阅:"); DingyueTotalnum = undefined; //$("#dingyueGrayNum").hide(); $("#dingyueGraySmart").hide(); $("#dingyueGrayLi").hide(); //一键登录灰度邮箱重置 $("#mailGrayTitle").html("QQ邮箱:"); $("#mailGrayNum").hide(); $("#inboxGrayLi").hide(); $("#bottleGrayLi").hide(); $("#gmailGrayLi").hide(); $("#dmailGrayLi").hide(); //一键登录灰度空间重置 $("#qzoneGrayTitle").html("QQ空间:"); $("#qzoneGrayNum").hide(); $("#passiveGrayLi").hide(); $("#InitGrayLi").hide(); $("#AboutGrayLi").hide(); //一键登录灰度微博重置 $("#weiboGrayTitle").html("腾讯微博:"); $("#weiboGrayNum").hide(); $("#msgGrayLi").hide(); $("#atGrayLi").hide(); $("#fansGrayLi").hide(); //一键登录灰度登录重置 $("#loginGraySmart").hide(); $("#userVipLayout").hide(); $("#userVipHead").hide(); $("#loginedGray").hide(); $("#loginGray").show(); }, loginOutCall:function(){ DingyueTotalnum = undefined; QQ.LoadScript("http://mat1.gtimg.com/finance/js/st/p/qq/q_fin_v20151019135558.js?ran="+Math.random(),function(){ __.app.qindex.pStock.clearCookie(); }); }, loginSuccess:function(){ document.getElementById("layoutBg").style.display = "none"; document.getElementById("login_div").style.left = "-9999px"; $("#loginedGray").show(); $("#loginGray").hide(); login.loginCheck(); } } var Tab = function(){ this.initialize.apply(this, arguments);}; Tab.prototype = { initialize: function(options, onchange){ this.onchange = onchange || null; this.setOptions(options); this.binding(); }, setOptions: function(options){ this.tabElement = options.tabElement || null; this.contentElement = options.contentElement || null; this.currentClass = options.currentClass || 'selected'; this.eventType = options.eventType || 'onclick'; this.defaultIndex = options.defaultIndex || 0; this.deferTime = Math.abs(options.deferTime) || 0; this.mateAttribute = options.mateAttribute || null; this.tabTimer = null; this.targetCache = null; this.instance = []; }, binding: function(){ // add by behindli var behindli_filterNodes = function (nodes) { var _arr = []; for ( var i = 0, iLen = nodes.length; i < iLen; i ++ ) { if ( nodes[i].nodeType !== 8) { _arr.push(nodes[i]); } } return _arr; } var tabs = behindli_filterNodes(this.tabElement.children), contents = behindli_filterNodes(this.contentElement.children), i = tabs.length, that = this, di = (this.defaultIndex%i+i)%i; if( i != contents.length ) throw new Error("tabs numbers or contents numbers erorr!"); for(;i--;){ if(this.mateAttribute){ var j=contents.length, att = tabs[i].getAttribute(this.mateAttribute); while(j--){ if(contents[j].getAttribute(this.mateAttribute) == att){ tabs[i].setAttribute('index', j); break; } } }else{ tabs[i].setAttribute('index', i); } } tabs[di].className = that.currentClass; var contentIndex = tabs[di].getAttribute('index'); contents[contentIndex].style.display = 'block'; this.targetCache = tabs[di]; if(that.onchange){ that.onchange(that, di, tabs[di], contents[contentIndex]); } this.tabElement[this.eventType] = function(e){ e = e||window.event; var target = e.target||e.srcElement; if(this != target.parentNode){ return;} window.clearTimeout(that.tabTimer); that.tabTimer = window.setTimeout((function(target){ return function(){ var index = target.getAttribute('index'); var cacheIndex = that.targetCache.getAttribute('index'); if(index != cacheIndex){ target.className = that.currentClass; contents[index].style.display = 'block'; that.targetCache.className = ''; contents[cacheIndex].style.display = 'none'; that.targetCache = target; if(that.onchange){ that.onchange(that, index, target, contents[index]);} } }; })(target), that.deferTime); if('function' === typeof e.preventDefault){ e.preventDefault(); e.stopPropagation(); }else{ e.returnValue = false; e.cancelBubble = true; } return false; }; if(that.deferTime>0){ that.tabElement.onmouseout = function(){ window.clearTimeout(that.tabTimer); }; } } }; //new Tab({tabElement:document.getElementById('qq-tabs1'), contentElement:document.getElementById('qq-contents1'), eventType:'onmouseover'}); new Tab({tabElement:document.getElementById('qq-tabs2'), contentElement:document.getElementById('qq-contents2'), eventType:'onmouseover', deferTime:150},function(that,index){ //要闻 if(index == 1){ bossPuguang(difangTabMap[ipProvince],"tab"); } updateStatus(); }); /* new Tab({tabElement:document.getElementById('qq-tabs3'), contentElement:document.getElementById('qq-contents3'), eventType:'onmouseover', deferTime:150}); var eduNum = document.getElementById('qq-tabs4').children.length; var eduRan = Math.floor(Math.random()*eduNum); new Tab({tabElement:document.getElementById('qq-tabs4'), contentElement:document.getElementById('qq-contents4'), eventType:'onmouseover', defaultIndex:eduRan}, function(that,index){ if(index == 0){ document.getElementById('qq-tabs4').getElementsByTagName("li")[0].style.width = "67px"; }else{ document.getElementById('qq-tabs4').getElementsByTagName("li")[0].style.width = "70px"; } }); */ document.getElementById('jrrb').className = ""; //今日热播 document.getElementById('qq-contents5').getElementsByTagName("div")[0].className = "undis"; /* var dateTime = new Date(), index=0; */ var dateTime = serverTime, index=0; var week = dateTime.getDay(), hours = dateTime.getHours(), minutes = dateTime.getMinutes(); /*if((week == 5 && hours >= 17) || week == 6 || (week == 0 && hours < 23)){ index = 2; }else */ //if(dateTime.getHours() >= 10 && dateTime.getHours() < 22){ /* if(dateTime.getHours() >= 18 || dateTime.getHours() < 6){ index = 1; } */ if(week == 5 && hours > 20){ index = 2; }else if(week == 5 && hours == 20 && minutes >= 30){ index = 2; }else if(hours >= 18 || hours < 6){ index = 1; } new Tab({tabElement:document.getElementById('qq-tabs5'), contentElement:document.getElementById('qq-contents5'), eventType:'onmouseover', deferTime:150, defaultIndex:index}, function(that,index){ if(index == 1){ defaultPuguang("vartsexp",1787); }else if(index == 2){ defaultPuguang("zyexp",1787); } }); new Tab({tabElement:document.getElementById('qq-tabs6'), contentElement:document.getElementById('qq-contents6'), eventType:'onmouseover', defaultIndex:1}); //汽车产品库 //new Tab({tabElement:document.getElementById('qq-tabs7'), contentElement:document.getElementById('qq-contents7'), eventType:'onmouseover'}); //汽车旅游 function defaultPuguang(sOp,iTy){ var userUin = ""; if(QQ.Cookie.get("o_cookie")){ userUin = Number(QQ.Cookie.get("o_cookie")); } var defaultPuguangImage = new Image(1,1); defaultPuguangImage.src="http://btrace.qq.com/collect?sIp=&iQQ=" + userUin + "&sBiz=new.qq.com&sOp=" + sOp + "&iSta=&iTy=" + iTy + "&iFlow=&district=&ran=" + Math.random(); } function bossPuguang(provice,type){ var userUin = ""; if(QQ.Cookie.get("o_cookie")){ userUin = Number(QQ.Cookie.get("o_cookie")); } var bossPuguangImage = new Image(1,1); bossPuguangImage.src="http://btrace.qq.com/collect?sIp=&iQQ=" + userUin + "&sBiz=&sOp=" + type + "&iSta=&iTy=1557&iFlow=&district=" + provice +"&ran=" + Math.random(); } //产品导航扩展 function productNavMore(){ var pronavTime = ""; var productFloatBtnBoolen = 0; $("#productNav").bind("mouseover",function(){ if(pronavTime){ clearTimeout(pronavTime); } if($("#productFloatBtn").attr("class") == "productFloatBtn" && productFloatBtnBoolen == 0){ $("#productFloatBtn").attr("class","productFloatBtnHover"); $("#productFloatBtn").attr("bossZone","prounford"); productFloatBtnBoolen = 1; } }); $("#productNav").bind("mouseout",function(){ pronavTime = setTimeout(function(){ productFloatBtnBoolen = 0; $("#productFloat").hide(); $("#productFloat").css({"width":"0px"}); $("#productFloatLayout").css({"width":"14px","right":"279px"}); $("#productFloatBtn").attr("class","productFloatBtn"); },250); }); $("#productFloatBtn").bind("click",function(){ if($(this).hasClass("productFloatBtnHover")){ defaultPuguang("proopen",1787); $("#productFloat").show(); $("#productFloatLayout").css({"width":"364px","right":"278px"}); $('#productFloat').animate({ width: 350 }, 250, function() { }); $("#productFloatBtn").attr("class","productFloatBtnClicked"); }else if($("#productFloatBtn").hasClass("productFloatBtnClicked")){ defaultPuguang("profold",1787); $('#productFloat').animate({ width: 0 }, 250, function() { }); $('#productFloatLayout').animate({ width: 14 }, 250, function() { }); $("#productFloatBtn").attr("class","productFloatBtn"); } }); } //二维码 var erweimaNewsBoolen = true; function erweimaNews(){ if($("#erweima")){ if(document.body.clientWidth >= 1230 && erweimaNewsBoolen){ $("#erweima").show(); $("#shutDown").bind("click",function(){ $("#erweima").hide(); erweimaNewsBoolen = false; }); }else{ $("#erweima").hide(); } } if($("#erweimaBeta")){ if(document.body.clientWidth >= 1230 && erweimaNewsBoolen){ $("#erweimaBeta").show(); $("#shutDownBeta").bind("click",function(){ $("#erweimaBeta").hide(); erweimaNewsBoolen = false; }); }else{ $("#erweimaBeta").hide(); } } } /* $(window).bind("resize",function(){ erweimaNews(); }); */ function erweimaHide(){ /* if($("#erweima")){ $("#erweima").hide(); } if($("#erweimaBeta")){ $("#erweimaBeta").hide(); } erweimaNewsBoolen = false; */ } function contains(parentNode, childNode) { if (parentNode.contains) { return parentNode != childNode && parentNode.contains(childNode); } else { return !!(parentNode.compareDocumentPosition(childNode) & 16); } } function checkHover(e,target){ if (getEvent(e).type=="mouseover") { return !contains(target,getEvent(e).relatedTarget||getEvent(e).fromElement) && !((getEvent(e).relatedTarget||getEvent(e).fromElement)===target); } else { return !contains(target,getEvent(e).relatedTarget||getEvent(e).toElement) && !((getEvent(e).relatedTarget||getEvent(e).toElement)===target); } } function getEvent(e){ return e||window.event; } //要闻区数据初始化 function newsInit(){ QQ.LoadScript("http://i.match.qq.com/qhome/ninjayw?val=tubd_qhome_yw&random="+Math.random(),function(){ if(tubd_qhome_yw.code == 0){ var tubdYwArr = []; for(var i=0; i<8; i++){ if(tubd_qhome_yw.hot[i].is_locked && tubd_qhome_yw.hot[i].is_locked == "2"){ tubdYwArr.push('
  • '); for(var n=0; n'+tubd_qhome_yw.hot[i].items[n].title+''); if(tubd_qhome_yw.hot[i].items[n].ext){ //竖线 if(tubd_qhome_yw.hot[i].items[n].ext.split == "1"){ //竖线 tubdYwArr.push(' | '); }else{ tubdYwArr.push(' '); } }else{ tubdYwArr.push(' '); } } tubdYwArr.push('
  • '); }else{ tubdYwArr.push('
  • '+tubd_qhome_yw.hot[i].title+'
  • '); } } $("#newsContent01 ul").html(tubdYwArr.join("")); $("#newsContent01 ul li:first a").addClass("Q-bold").addClass("qm_c_3"); tubdYwArr = []; $("#newsContent02 .imgArea").html(''+tubd_qhome_yw.hot[8].title+''); $("#newsContent02 .txtArea h3").html(''+tubd_qhome_yw.hot[8].title+''); for(var i=9; i<17; i++){ if(tubd_qhome_yw.hot[i].is_locked && tubd_qhome_yw.hot[i].is_locked == "2"){ tubdYwArr.push('
  • '); for(var n=0; n'+tubd_qhome_yw.hot[i].items[n].title+''); if(tubd_qhome_yw.hot[i].items[n].ext){ //竖线 if(tubd_qhome_yw.hot[i].items[n].ext.split == "1"){ //竖线 tubdYwArr.push(' | '); }else{ tubdYwArr.push(' '); } }else{ tubdYwArr.push(' '); } } tubdYwArr.push('
  • '); }else{ tubdYwArr.push('
  • '+tubd_qhome_yw.hot[i].title+'
  • '); } } $("#newsContent02 ul").html(tubdYwArr.join("")); tubdYwArr = []; $("#newsContent03 .imgArea").html(''+tubd_qhome_yw.hot[17].title+''); $("#newsContent03 .txtArea h3").html(''+tubd_qhome_yw.hot[17].title+''); for(var i=0; i<9; i++){ if(tubd_qhome_yw.gxh[i].is_locked && tubd_qhome_yw.gxh[i].is_locked == "2"){ tubdYwArr.push('
  • '); for(var n=0; n'+tubd_qhome_yw.gxh[i].items[n].title+''); if(tubd_qhome_yw.gxh[i].items[n].ext){ //竖线 if(tubd_qhome_yw.gxh[i].items[n].ext.split == "1"){ //竖线 tubdYwArr.push(' | '); }else{ tubdYwArr.push(' '); } }else{ tubdYwArr.push(' '); } } tubdYwArr.push('
  • '); }else{ tubdYwArr.push('
  • '+tubd_qhome_yw.gxh[i].title+'
  • '); } } $("#newsContent03 ul").html(tubdYwArr.join("")); tubdYwArr = []; $("#newsContent04 .imgArea").html(''+tubd_qhome_yw.gxh[9].title+''); $("#newsContent04 .txtArea h3").html(''+tubd_qhome_yw.gxh[9].title+''); for(var i=10; i<18; i++){ if(tubd_qhome_yw.gxh[i].is_locked && tubd_qhome_yw.gxh[i].is_locked == "2"){ tubdYwArr.push('
  • '); for(var n=0; n'+tubd_qhome_yw.gxh[i].items[n].title+''); if(tubd_qhome_yw.gxh[i].items[n].ext){ //竖线 if(tubd_qhome_yw.gxh[i].items[n].ext.split == "1"){ //竖线 tubdYwArr.push(' | '); }else{ tubdYwArr.push(' '); } }else{ tubdYwArr.push(' '); } } tubdYwArr.push('
  • '); }else{ tubdYwArr.push('
  • '+tubd_qhome_yw.gxh[i].title+'
  • '); } } $("#newsContent04 ul").html(tubdYwArr.join("")); tubdYwArr = []; $("#newsContent05 .imgArea").html(''+tubd_qhome_yw.gxh[18].title+''); $("#newsContent05 .txtArea h3").html(''+tubd_qhome_yw.gxh[18].title+''); for(var i=19; i<27; i++){ if(tubd_qhome_yw.gxh[i].is_locked && tubd_qhome_yw.gxh[i].is_locked == "2"){ tubdYwArr.push('
  • '); for(var n=0; n'+tubd_qhome_yw.gxh[i].items[n].title+''); if(tubd_qhome_yw.gxh[i].items[n].ext){ //竖线 if(tubd_qhome_yw.gxh[i].items[n].ext.split == "1"){ //竖线 tubdYwArr.push(' | '); }else{ tubdYwArr.push(' '); } }else{ tubdYwArr.push(' '); } } tubdYwArr.push('
  • '); }else{ tubdYwArr.push('
  • '+tubd_qhome_yw.gxh[i].title+'
  • '); } } $("#newsContent05 ul").html(tubdYwArr.join("")); var NewsRemind = { init: function(config){ var that = this; this.messageBox = config.messageBox; this.upperLimit = config.upperLimit || 12; // 随机数上限 this.lowerLimit = config.lowerLimit || 9; // 随机数下限 this.maxCount = config.maxCount || 18; // 最大新闻量 this.isPutTop = config.isPutTop && true; // 小黄条是否置顶 this.startSecond = (config.startSecond || 20)*1000; // 多少秒后显示 this.holdSecond = config.holdSecond || 3600; // 点两次后保持的时间,单位秒 if(!this.isPutTop){ $('#newsContent05').insertBefore('#newsContent03'); $('#newsContent04').insertBefore('#newsContent03'); $('#newsMoreBtn').insertBefore('#newsContent05'); $('#newsContent04 div').attr('bosszone', 'recomheadline3'); $('#newsContent04 ul').attr('bosszone', 'recommend3'); $('#newsContent05 div').attr('bosszone', 'recomheadline4'); $('#newsContent05 ul').attr('bosszone', 'recommend4'); } var dateTime = new Date(); var lastDay = dateTime.getFullYear() + '-' + (dateTime.getMonth()+1) + '-' + dateTime.getDate(); if(lastDay == QQ.localData.get('lastDay')){ this.firstCount = parseInt( QQ.localData.get('newsRMS') ); }else{ QQ.localData.set('lastDay', lastDay); // 生成随机数 this.firstCount = parseInt(Math.random()*(that.upperLimit-that.lowerLimit+1)+that.lowerLimit); QQ.localData.set('newsRMS', this.firstCount); } this.twiceCount = 0; window.setTimeout(function(){ var lastTS = QQ.localData.get('lastTS'), count=that.firstCount; var isLoadFirst = QQ.localData.get('isLoadFirst'); if(isLoadFirst == 'YES'){ that.twiceCount = that.maxCount - that.firstCount; count = that.twiceCount; } if(lastTS){ var currentTS = parseInt(new Date().getTime()/1000); if(currentTS-parseInt(lastTS) >= that.holdSecond){ that.messageBox.innerHTML = that.getInfoByCount( count ); $("#newsMoreBtn").show(); defaultPuguang("EXnewsmore1",1787); QQ.localData.remove('lastTS'); } }else{ // 显示小黄条 that.messageBox.innerHTML = that.getInfoByCount( count ); $("#newsMoreBtn").show(); defaultPuguang("EXnewsmore1",1787); } }, that.startSecond); this.messageBox.onclick = function(e){ if(this.getElementsByTagName('A').length <= 0){ return; } var len = $("#newsContent05 ul")[0].children.length; // 第一次点击20秒后再次显示小黄条 if(that.twiceCount == 0){ window.setTimeout(function(){ // 显示小黄条 that.messageBox.innerHTML = that.getInfoByCount( that.twiceCount ); $("#newsMoreBtn").show(); }, that.startSecond); var count = num = that.firstCount-9; while(count > 0){ $("#newsContent04 ul").append( $("#newsContent05 ul").children().eq(len-num) ); count--; } $("#newsContent04").slideDown(); QQ.localData.set('isLoadFirst', 'YES'); // 数据上报 if(that.isPutTop){ defaultPuguang("newsmore1",1445); }else{ defaultPuguang("newsmore3",1445); } }else{ var lastTS = String(parseInt(new Date().getTime()/1000)); QQ.localData.set('lastTS', lastTS); if(len > that.twiceCount-1){ $("#newsContent05 li:gt(" + (that.twiceCount-2) + ')').remove(); } $("#newsContent05").slideDown(); QQ.localData.remove('isLoadFirst'); // 数据上报 if(that.isPutTop){ defaultPuguang("newsmore2",1445); }else{ defaultPuguang("newsmore4",1445); } } that.twiceCount = that.maxCount - that.firstCount; //$(this).hide(); that.messageBox.innerHTML = '暂无更新,休息一会儿'; }; }, getInfoByCount: function(count){ //return '您有' + count + '条未读新闻,点击查看'; return '您有未读新闻,点击查看'; }, showNews: function(count){ } }; (function(){ var cookieGet = QQ.Cookie.get; var uinStr = cookieGet("uin") || cookieGet("luin") || cookieGet("pt2qquin") || cookieGet("o_cookie") || ""; uinStr = parseInt(Number(uinStr.replace("o",""))).toString(); var config = {messageBox:document.getElementById('newsMoreBtn'), isPutTop:true, lowerLimit:9, upperLimit:9, holdSecond:3600}; /* if(uinStr && parseInt(parseInt(uinStr/1000)%10) > 4 ){ config.isPutTop = false; }*/ //NewsRemind.init(config); })(); $("#newsMoreBtn").bind("click",function(){ $("#newsContent04").slideDown(); $("#newsMoreBtn2").show(); $(this).hide(); var lastTS = String(parseInt(new Date().getTime()/1000)); QQ.localData.set('lastTS', lastTS); }); $("#newsMoreBtn2").bind("click",function(){ $("#newsContent05").slideDown(); $("#newsMoreBtn3").show(); $(this).hide(); }); setTimeout(function(){ var lastTS = QQ.localData.get('lastTS'); if(lastTS){ var currentTS = parseInt(new Date().getTime()/1000); if(currentTS-parseInt(lastTS) >= 3600){ $("#newsMoreBtn").show(); defaultPuguang("EXnewsmore1",1787); QQ.localData.remove('lastTS'); } }else{ $("#newsMoreBtn").show(); defaultPuguang("EXnewsmore1",1787); } },20000); } }); } var orderCurrentArr = []; //当前板块排列顺序 //上传订制顺序回调 function orderUpdateFun(){ } //上传订制顺序 function orderUpdate(n){ if(n == 0){ //清除订制顺序 var param = encodeURI('{"subobj":{"busi_id":"tubd_sub_23","busi_subid":"","data":[{"k":["none"]}]},"oper":"set"}'); QQ.LoadScript('http://i.match.qq.com/interface/sub?para=' + param + '&callback=orderUpdateFun&random='+Math.random(),function(){}); }else{ //获取当前排列顺序并上传 var orderArr = []; for(var i=1; i<5; i++){ orderArr.push($("#contentLayout0"+i).children().first().attr("id")); } for(var i=1; i<5; i++){ orderArr.push($("#contentLayout0"+i).children().eq(1).attr("id")); } for(var i=5; i<9; i++){ $("#contentLayout0"+i+" .contentMod").each(function(){ if($(this).attr("id")){ orderArr.push($(this).attr("id")); } }); } var orderStr = '["' + orderArr.join('","') + '"]'; var param = encodeURI('{"subobj":{"busi_id":"tubd_sub_23","busi_subid":"","data":[{"k":' + orderStr + '}]},"oper":"set"}'); QQ.LoadScript('http://i.match.qq.com/interface/sub?para=' + param + '&callback=orderUpdateFun&random='+Math.random(),function(){}); //http://i.match.qq.com/interface/sub?para={"subobj":{"busi_id":"tubd_sub_23","busi_subid":"","data":[{"k":["ent","astro","fashion","book"]}]},"oper":"set"} } } //获取订制排序 function customOrder(obj){ if(obj.code == 0){ //成功返回18个订制顺序 if(obj.data.length != 0 && obj.data[0].k.length == 18){ var finalArr = obj.data[0].k; //频道顺序数组 orderInit(finalArr); //板块排序 orderCurrentArr = finalArr; //添加订制事件 orderEvent(); }else{ //拉取用户兴趣频道 QQ.LoadScript("http://i.match.qq.com/qhome/uinterest?num=4&callback=contentInit&random="+Math.random(),function(){}); } }else{ //拉取用户兴趣频道 QQ.LoadScript("http://i.match.qq.com/qhome/uinterest?num=4&callback=contentInit&random="+Math.random(),function(){}); } } //获取兴趣频道排序 function contentInit(obj){ var defaultArr = ["finance","sports","ent","tech","auto","house","book","cul","fashion","dajia","astro","edu","kid","history","games","dy","newssh","rufodao"]; //所有频道数组 var fixedArr = ["finance","sports","ent"]; //固定展开三大频道 var contentArr = ["tech","auto","house","book","cul","fashion","dajia","astro","edu","kid","history","games","dy","newssh","rufodao"]; //去除固定展开三大频道数组 var interestArr = []; //兴趣频道数组 var interestChanel = ""; //四大频道之外的兴趣频道 var finalArr = []; //无最高兴趣的最终频道数组 if(obj.num != "undefined" && obj.num != 0){ //有兴趣频道 for(var i=0; i 0 ){ box.find(".orderContent").show(); return; } var id = box.parent().parent().attr('id'); var selects = [], config=ColTailor.config; for(var i=0, len=config.length; i' + config[i].name + ''); }else{ selects.push('
  • ' + config[i].name + '
  • '); } } var orderContent = document.createElement('div'); orderContent.className = 'orderContent'; orderContent.style.display = 'block'; orderContent.innerHTML = '

    选择替换当前频道

    \
    \
    \
      ' + selects.join('') + '
    \

    恢复成默认

    \
    '; box.append(orderContent); if(box.parent().parent().attr("id") == box.parent().parent().parent().children().last().attr("id")){ //判断板块是否在最右侧 box.find(".orderContent").addClass("orderContentRight"); } }); }); // 频道订制委托事件 $('.orderLayout').on('click', 'li', function(){ if($(this).children().first().hasClass("s")){ }else{ if(QQ.Cookie.get("skey")){ //判断是否登录 var turnBefore = 0, turnAfter = 0; //当前板块和要交换板块在数组中的索引值 for(var n=0, len=orderTempArr.length; n 0){ picFocusNum -= 3024; } $('#picFocusUl').animate({ left: picFocusNum }, 500, function() { $(".picFocus .hd .btn").children().removeClass("current"); $(".picFocus .hd .btn").children().eq(Math.abs(picFocusNum/1008)).addClass("current"); lock = false; }); }); $("#visualdown").bind("click",function(){ if(lock){ return; } lock = true; var picFocusNum = Number($("#picFocusUl").css("left").replace("px","")) - 1008; if(picFocusNum < -2016){ picFocusNum += 3024; } $('#picFocusUl').animate({ left: picFocusNum }, 500, function() { $(".picFocus .hd .btn").children().removeClass("current"); $(".picFocus .hd .btn").children().eq(Math.abs(picFocusNum/1008)).addClass("current"); lock = false; }); }); $("#visual .btn div").bind("click",function(){ if(lock){ return; } lock = true; that = $(this); $('#picFocusUl').animate({ left: -1008*$(this).index() }, 500, function() { $(".picFocus .hd .btn div").removeClass("current"); that.addClass("current"); defaultPuguang("change",1445); lock = false; }); }); } //设为首页 function homeSet(){ var browserName=navigator.userAgent.toLowerCase(); if(/theworld/i.test(browserName)){ document.getElementById("homeSet").href += "#theworld"; }else if(/lbbrowser/i.test(browserName)){ document.getElementById("homeSet").href += "#lbbrowser"; }else if(/bidubrowser/i.test(browserName)){ document.getElementById("homeSet").href += "#bidubrowser"; }else if(/se 2.x/i.test(browserName)){ document.getElementById("homeSet").href += "#sougou"; }else if(/360se/i.test(browserName)){ document.getElementById("homeSet").href += "#browser360"; }else if(/qqbrowser/i.test(browserName)){ document.getElementById("homeSet").href += "#qqbrowser"; }else if(/maxthon/i.test(browserName)){ document.getElementById("homeSet").href += "#aoyou"; }else if(/msie/i.test(browserName) && !/opera/.test(browserName)){ document.getElementById("homeSet").href += "#ie"; }else if(/firefox/i.test(browserName)){ document.getElementById("homeSet").href += "#firefox"; }else if(/opera/i.test(browserName)){ document.getElementById("homeSet").href += "#opera"; }else if(/webkit/i.test(browserName) &&!(/chrome/i.test(browserName) && /webkit/i.test(browserName) && /mozilla/i.test(browserName))){ document.getElementById("homeSet").href += "#safari"; }else if(/chrome/i.test(browserName) && /webkit/i.test(browserName) && /mozilla/i.test(browserName)){ document.getElementById("homeSet").href += "#chrome"; } } //搜狗脚本 function sogouInit(){ /* $("#searchBtn").bind("mouseover",function(){ $(this).addClass("searchBtnHover"); }); $("#searchBtn").bind("mouseout",function(){ $(this).removeClass("searchBtnHover"); }); */ //QQ.LoadScript("http://mat1.gtimg.com/www/js/qq2012/suggestion_1.2.0_sogou.min.js",function(){ QQ.LoadScript("http://mat1.gtimg.com/www/js/qq2012/suggestion_1.1.7_sogou.min.js",function(){ var frm = document.forms['soso_search_box']; sososmart.init(frm,true,"sogou-wsse-3f7bcd0b3ea822680001"); //第一参数表单对象,第二个参数 点击自动提示元素是否自动搜索,第三个参数 搜狗接口统计参数 //sogouGray(); }); } //平台检测 function platformCheck(){ if(navigator.platform == "Mac68K" || navigator.platform == "MacPPC" || navigator.platform == "Macintosh" || navigator.platform == "MacIntel"){ //mac系统 $("#select").addClass("macSelect"); } } //字体适配 function fontCheck(){ if(navigator.platform == "Win32" || navigator.platform == "Windows"){ //windows系统 if($("#guess").width() != 86){ //没有微软雅黑字体 $("body").addClass("noYahei"); } } if(navigator.platform == "Mac68K" || navigator.platform == "MacPPC" || navigator.platform == "Macintosh" || navigator.platform == "MacIntel"){ //mac系统 $("body").addClass("mac"); } } //字体切换 function fontTurn(){ if(window.location.toString().indexOf('type=song') != -1){ //切换成宋体 $("body").addClass("song"); $("#diaocha").find("a").attr("href","http://exp.qq.com/ur/?urid=12565"); } } /*返回顶部*/ function toTopHide(){ if(document.documentElement.scrollTop+document.body.scrollTop > 400){ if(!(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent)))){ document.getElementById("fankui").style.display = "block"; document.getElementById("homeSet").style.display = "block"; document.getElementById("toTop").style.display = "block"; document.getElementById("minidown").style.display = "block"; } }else{ document.getElementById("fankui").style.display = "none"; document.getElementById("homeSet").style.display = "none"; document.getElementById("toTop").style.display = "none"; document.getElementById("minidown").style.display = "none"; } } /*移动设备隐藏自选股浮层*/ function stockMobile(){ if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry|iPad/i.test(navigator.userAgent)){ $("#top-smartbox-du-sx-result").hide(); $("#stocksearch").hide(); } } /*房产产品库smartbox*/ function houseProduct(){ if($("#smartbox_form_1")){ QQ.LoadScript("http://mat1.gtimg.com/www/js/qq2012/smartboxRewrite1.7.js",function(){ $('#smartbox_form_1').empty(); createSmartbox("smartbox_form_1"); }); } } /*教育产品库*/ function getid(v){return document.getElementById(v)}; //提交查询的 function goQuery(){ var alertMsg = ['请输入院校名称','请输入院校名称']; var selectItem = getid("select").selectedIndex; if (getid("txt").value == ''||getid("txt").value == '院校名称' ||getid("txt").value == '院校中/英文名称' ){ alert(alertMsg[selectItem]); getid("txt").focus(); return false; }else if (getid("txt").value.length > 200){ alert(alertMsg[selectItem]+"太长"); getid("txt").focus(); return false; } if (selectItem == 0){ var queryTemp = getid("txt").value; if (/gecko/.test(window.navigator.userAgent.toLowerCase())){ queryTemp = encodeURI(queryTemp); } window.open(getid("select").value + "?query=" + queryTemp + "&page=1"); }else if(selectItem == 1){ var queryTemp = getid("txt").value; if (/gecko/.test(window.navigator.userAgent.toLowerCase())){ queryTemp = encodeURI(queryTemp); } window.open(getid("select").value + "?school=" + queryTemp); }else{ getid("seach").submit(); } return false; } //初始化输入框-获得焦点的 function focusVerify(){ var alertMsg = ['院校名称','院校中/英文名称']; var selectItem = getid("select").selectedIndex; if (getid("txt").value == alertMsg[selectItem]){ //是默认值,将其值空 getid("txt").value = ''; } } //初始化输入框-失去焦点的 function blurVerify(){ var alertMsg = ['院校名称','院校中/英文名称']; var selectItem = getid("select").selectedIndex; if (getid("txt").value == '') { //是默认值,将其值空 getid("txt").value = alertMsg[selectItem]; } } function ints(n){ var op = getid("select").getElementsByTagName("option"); switch (n){ case 0: getid("txt").value = "院校名称"; getid("txt").name="query"; break; case 1: getid("txt").value = "院校中/英文名称"; getid("txt").name="query"; break; } for(var i=0;i0) { I1 = I1.replace('--','-'); } return I1; } function arraySearch(l1,l2){ for (var name in PinYin){ if (PinYin[name].indexOf(l1)!=-1) { return name; break; } } return false; } function get_cur_pinyin(content) { var fn = Cn2PinYin; var arr = []; var ch; for(var i=0,n=content.length; i"龥")?ch:fn(ch); } return arr.join(""); } var AutoSiteSearch={ search_url:"http://cgi.data.auto.qq.com/php/search.php", auto_url:"http://data.auto.qq.com/", cur_keyword:"", is_presskeyword:false, init_keyword_str:"车型名称/拼音", ad_keyword_str:"车型名称/拼音", all_inputlist_num:0, cur_inputlist_num:0, parameter:function(name){ var reg=new RegExp("([\?|&])"+ name +"=([^&]*)"); if (reg.test(location.href)) return decodeURIComponent(RegExp.$2.replace(/\+/g, " ")); return ""; }, $:function(s){ return(typeof s=='object')?s:document.getElementById(s); }, bind:function(el,evt,fn){ if(el.attachEvent){ el.attachEvent("on"+evt,fn); }else if(el.addEventListener){ el.addEventListener(evt,fn,false); }else{ el["on"+evt]=fn; } },//$(s) Browser:{ ie:/msie/.test(window.navigator.userAgent.toLowerCase()), moz:/gecko/.test(window.navigator.userAgent.toLowerCase()), opera:/opera/.test(window.navigator.userAgent.toLowerCase()), safari:/safari/.test(window.navigator.userAgent.toLowerCase()) }, JsLoader:{ load: function(sUrl, fCallback, chset) { var _script = document.createElement("script"); _script.setAttribute("type", "text/javascript"); _script.setAttribute("src", sUrl); if (chset) _script.setAttribute("charset", chset); else _script.setAttribute("charset", "gb2312"); document.getElementsByTagName("head")[0].appendChild(_script); if (AutoSiteSearch.Browser.ie) { _script.onreadystatechange = function() { if (this.readyState=="loaded" || this.readyState=="complete") { fCallback(); } }; } else if (AutoSiteSearch.Browser.moz) { _script.onload = function() { fCallback(); }; } else { fCallback(); } } }, is_InArray:function(arr,val) { for(var i=0;i=AutoSiteSearch.all_inputlist_num) { id=AutoSiteSearch.all_inputlist_num; } if(id<=0) { id=0; } if(AutoSiteSearch.$('input_item_'+id)) { for(i=1;i<(AutoSiteSearch.all_inputlist_num+1);i++) { AutoSiteSearch.$('input_item_'+i).className=''; } AutoSiteSearch.$('input_item_'+id).className="focus2"; AutoSiteSearch.cur_inputlist_num=id; } }, open_smartbox:function() { var keyword=AutoSiteSearch.$('id_keyword').value; AutoSiteSearch.search_smartbox(keyword); return false; }, close_smartbox:function() { AutoSiteSearch.cur_inputlist_num=0; AutoSiteSearch.close_single_smartbox(); return false; alert("sony close"); }, close_single_smartbox:function() { var item=AutoSiteSearch.$('search_inputlist'); if(typeof(item)!=null && item.style.display != 'none') { item.style.display="none"; } return true; }, search_smartbox:function(keyword) { AutoSiteSearch.all_inputlist_num=0; AutoSiteSearch.cur_inputlist_num=0; if(keyword!='' && keyword!=AutoSiteSearch.init_keyword_str) { //先转换为拼音 keyword=get_cur_pinyin(keyword.toLowerCase().replace(/\s/,'')); //再进行比对 var tmp_html_str=''; AutoSiteSearch.$('search_inputlist').innerHTML=tmp_html_str; AutoSiteSearch.$('search_inputlist').style.display="block"; }else{ AutoSiteSearch.close_smartbox(); } }, mouseover_item:function(id) { for(i=1;i<(AutoSiteSearch.all_inputlist_num+1);i++) { AutoSiteSearch.$('input_item_'+i).className=''; } AutoSiteSearch.$('input_item_'+id).className='focus2'; AutoSiteSearch.cur_inputlist_num=id; return false; }, click_inputlist_item:function(item,id){ AutoSiteSearch.cur_inputlist_num=item; for(i=1;i<(AutoSiteSearch.all_inputlist_num+1);i++) { AutoSiteSearch.$('input_item_'+i).className=''; } AutoSiteSearch.close_smartbox(); AutoSiteSearch.search_keyword_v2(id); return false; }, search_keyword_v2:function(id) { var cur_id=parseInt(id,10); if(isNaN(cur_id) || cur_id==0) { return false; } BossLinkAutoSearch(31,cur_id,""); //关键字搜索中选择了某个推荐车系 var search_tmp_str=AutoSiteSearch.auto_url+"car_serial/"+cur_id+"/index.shtml"; window.open(search_tmp_str); return false; }, blur_keyword:function(item) { if(item.value=='') { item.value=AutoSiteSearch.ad_keyword_str; } if(item.value==AutoSiteSearch.ad_keyword_str||item.value=='') { item.style.color='gray'; } return true; }, init_py_list:function(){ var py_list_url="http://js.data.auto.qq.com/car_public/template/serial_py.js"; AutoSiteSearch.JsLoader.load(py_list_url,function(){ if(typeof(_autoapp_site_serial_py_json)!="undefined") { //如果正常调入,那么执行转换拼音函数初始化功能。 //set_pinyin_init(); } }); }, cancel_event:function(evt) { evt=evt||window.event; if(evt.preventDefault){ evt.stopPropagation(); evt.preventDefault(); }else{ evt.returnValue=false; evt.cancelBubble=true; } }, click_keyword:function(obj,evt) { BossLinkAutoSearch(30,0,""); //点击了关键字搜索框 AutoSiteSearch.cancel_event(evt); if(obj.value==AutoSiteSearch.ad_keyword_str) { obj.value=''; obj.style.color="black"; } AutoSiteSearch.open_smartbox(); return false; }, gb_substr:function(str,len) { if (len == null || len <= 0) { return ""; } var str_len = str.length; if(len >= str_len * 2) { return str; } var get_len = 0; for (;get_len < str_len && len > 0; get_len++) { if (str.charCodeAt(get_len) > 255 || str.charCodeAt(get_len) < 0) { len -= 2; }else{ len--; } } if (len < 0) { get_len -= 1; } if (get_len == str_len) { return str; }else{ return str.substr(0,get_len); } }, gb_length:function(str) { return str.replace(/[^\x00-\xff]/gi,'xx').length; } }; //订阅板块过滤?字符 function dyReplace(){ $("#dy a").each(function(){$(this).html($(this).html().replace("?",""))}); } //娱乐个性化灰度 function entPersonal(){ if($("#ent .contentRight").is(":hidden")){ }else{ var uinStr = QQ.Cookie.get("uin") || QQ.Cookie.get("luin") || QQ.Cookie.get("pt2qquin") || QQ.Cookie.get("o_cookie") || ""; uinStr = parseInt(Number(uinStr.replace("o",""))).toString(); /* if(window.location.toString().indexOf('qq=') != -1){ var qqTest = window.location.toString().substring(window.location.toString().indexOf('qq=')+3); uinStr = qqTest; } var uinBetaArr = ["57166400","517310403","270961575","532745901","69311328","14497563","1211042752","534665556","1160153028","434553806","960289793","1092603568","1254908228","2993768685","805768748","1587194124","840041635","6612201","393002292","1137247079","1656379013","2298753329","1142702209","690054798","403863641","89219370","405676994"]; var uinBetaArrLen = uinBetaArr.length; for(var i=0;i'+obj.data[0].title+''); $("#ent .contentLeft .txtArea h3").html(''+obj.data[0].title+''); var entLeftDataArr = []; for(var i=1;i<7;i++){ if(obj.data[i].is_locked && obj.data[i].is_locked == "2"){ entLeftDataArr.push('
  • '); for(var n=0; n'+obj.data[i].items[n].title+''); if(obj.data[i].items[n].ext){ //竖线 if(obj.data[i].items[n].ext.split == "1"){ //竖线 entLeftDataArr.push(' | '); }else{ entLeftDataArr.push(' '); } }else{ entLeftDataArr.push(' '); } } entLeftDataArr.push('
  • '); }else{ entLeftDataArr.push('
  • '+obj.data[i].title+'
  • '); } } $("#ent .contentLeft ul").html(entLeftDataArr.join("")); var entRightDataArr = []; for(var i=7;i<16;i++){ if(obj.data[i].is_locked && obj.data[i].is_locked == "2"){ entRightDataArr.push('
  • '); for(var n=0; n'+obj.data[i].items[n].title+''); if(obj.data[i].items[n].ext){ //竖线 if(obj.data[i].items[n].ext.split == "1"){ //竖线 entRightDataArr.push(' | '); }else{ entRightDataArr.push(' '); } }else{ entRightDataArr.push(' '); } } entRightDataArr.push('
  • '); }else{ entRightDataArr.push('
  • '+obj.data[i].title+'
  • '); } } $("#ent .contentRight ul").html(entRightDataArr.join("")); } } function fashionCallback(obj){ if(obj.code ==0){ $("#fashion .contentLeft .imgArea").html(''+obj.data[0].title+''); $("#fashion .contentLeft .txtArea h3").html(''+obj.data[0].title+''); var fashionLeftDataArr = []; for(var i=1;i<7;i++){ if(obj.data[i].is_locked && obj.data[i].is_locked == "2"){ fashionLeftDataArr.push('
  • '); for(var n=0; n'+obj.data[i].items[n].title+''); if(obj.data[i].items[n].ext){ //竖线 if(obj.data[i].items[n].ext.split == "1"){ //竖线 fashionLeftDataArr.push(' | '); }else{ fashionLeftDataArr.push(' '); } }else{ fashionLeftDataArr.push(' '); } } fashionLeftDataArr.push('
  • '); }else{ fashionLeftDataArr.push('
  • '+obj.data[i].title+'
  • '); } } $("#fashion .contentLeft ul").html(fashionLeftDataArr.join("")); if($("#fashion .contentRight").is(":hidden")){ }else{ $("#fashion .contentRight .imgArea").html(''+obj.data[0].title+''); $("#fashion .contentRight .txtArea h3").html(''+obj.data[7].title+''); var fashionRightDataArr = []; for(var i=8;i<14;i++){ if(obj.data[i].is_locked && obj.data[i].is_locked == "2"){ fashionRightDataArr.push('
  • '); for(var n=0; n'+obj.data[i].items[n].title+''); if(obj.data[i].items[n].ext){ //竖线 if(obj.data[i].items[n].ext.split == "1"){ //竖线 fashionRightDataArr.push(' | '); }else{ fashionRightDataArr.push(' '); } }else{ fashionRightDataArr.push(' '); } } fashionRightDataArr.push('
  • '); }else{ fashionRightDataArr.push('
  • '+obj.data[i].title+'
  • '); } } $("#fashion .contentRight ul").html(fashionRightDataArr.join("")); } } } function autoCallback(obj){ if(obj.code ==0){ $("#auto .contentLeft .imgArea").html(''+obj.data[0].title+''); $("#auto .contentLeft .txtArea h3").html(''+obj.data[0].title+''); var autoLeftDataArr = []; for(var i=1;i<7;i++){ if(obj.data[i].is_locked && obj.data[i].is_locked == "2"){ autoLeftDataArr.push('
  • '); for(var n=0; n'+obj.data[i].items[n].title+''); if(obj.data[i].items[n].ext){ //竖线 if(obj.data[i].items[n].ext.split == "1"){ //竖线 autoLeftDataArr.push(' | '); }else{ autoLeftDataArr.push(' '); } }else{ autoLeftDataArr.push(' '); } } autoLeftDataArr.push('
  • '); }else{ autoLeftDataArr.push('
  • '+obj.data[i].title+'
  • '); } } $("#auto .contentLeft ul").html(autoLeftDataArr.join("")); var autoPriceConArr0 = []; for(var i=0;i<6;i++){ autoPriceConArr0.push('
  • '+obj.price.data[1][i].title+'
  • '); } var autoPriceConArr1 = []; for(var i=0;i<6;i++){ autoPriceConArr1.push('
  • '+obj.price.data[2][i].title+'
  • '); } var autoPriceConArr2 = []; for(var i=0;i<6;i++){ autoPriceConArr2.push('
  • '+obj.price.data[3][i].title+'
  • '); } var autoPriceConArr3 = []; for(var i=0;i<6;i++){ autoPriceConArr3.push('
  • '+obj.price.data[4][i].title+'
  • '); } $("#qq-contents6").children().eq(0).find("ul").html(autoPriceConArr0.join("")); $("#qq-contents6").children().eq(1).find("ul").html(autoPriceConArr1.join("")); $("#qq-contents6").children().eq(2).find("ul").html(autoPriceConArr2.join("")); $("#qq-contents6").children().eq(3).find("ul").html(autoPriceConArr3.join("")); var autoInterId = obj.price.intere_id; $("#qq-tabs6 a").removeClass("selected"); $("#qq-contents6 div").hide(); new Tab({tabElement:document.getElementById('qq-tabs6'), contentElement:document.getElementById('qq-contents6'), eventType:'onmouseover', defaultIndex:autoInterId}); } } //搜狗灰度 function sogouGray(){ var uinStr = QQ.Cookie.get("uin") || QQ.Cookie.get("luin") || QQ.Cookie.get("pt2qquin") || QQ.Cookie.get("o_cookie") || ""; uinStr = parseInt(Number(uinStr.replace("o",""))).toString(); if(uinStr.charAt(uinStr.length-4) == 1 || uinStr.charAt(uinStr.length-4) == 2 || uinStr.charAt(uinStr.length-4) == 3){ //搜狗灰度1;QQ倒数第四位为1、2、3 document.getElementById("searchBtn").className = "sougouGray"; document.getElementById("sougouTxt").style.width = "200px"; document.getElementById("searchTxt").style.width = "315px"; document.getElementById("searchBtn").onclick = function(){ registerZone2({bossZone:'searchbutton_g1',url:''},1); } document.getElementById("sogouLogoLink").onclick = function(){ registerZone2({bossZone:'searchlogo_g1',url:''},1); } document.getElementById("sogouLogoLink").href = "https://www.sogou.com/?pid=sogou-wsse-3f7bcd0b3ea82268-0002"; document.getElementById("searchForm").setAttribute("action","https://www.sogou.com/sogou?pid=sogou-wsse-3f7bcd0b3ea82268-0002&ie=utf-8&query="); return false; }else if(uinStr.charAt(uinStr.length-4) == 4 || uinStr.charAt(uinStr.length-4) == 5 || uinStr.charAt(uinStr.length-4) == 6){ //搜狗灰度2;QQ倒数第四位为4、5、6 document.getElementById("searchBtn").className = "sougouGray2"; document.getElementById("sougouTxt").style.width = "212px"; document.getElementById("searchTxt").style.width = "327px"; document.getElementById("searchBtn").onclick = function(){ registerZone2({bossZone:'searchbutton_g2',url:''},1); } document.getElementById("sogouLogoLink").onclick = function(){ registerZone2({bossZone:'searchlogo_g2',url:''},1); } document.getElementById("sogouLogoLink").href = "https://www.sogou.com/?pid=sogou-wsse-3f7bcd0b3ea82268-0003"; document.getElementById("searchForm").setAttribute("action","https://www.sogou.com/sogou?pid=sogou-wsse-3f7bcd0b3ea82268-0003&ie=utf-8&query="); return false; }else{ document.getElementById("searchForm").setAttribute("action","https://www.sogou.com/sogou?pid=sogou-wsse-3f7bcd0b3ea82268-0001&ie=utf-8&query="); } } $(function(){ //安全网络、社会主义、举报广告轮播 (function(){ var _adScrollBtn = $("#adScrollBtn"), _adScroll = $(".adScroll"), _num = 0, _id = [$("#jbBox"),$("#wlaqBox")], _gglbsj, _lbjg = 3000;//轮播间隔时间 _gglbsj = setInterval(gglb,_lbjg); function gglb(){//广告轮播函数 if(_num < 1){ _id[_num].fadeOut(300,function(){ _id[_num + 1].fadeIn(300); _adScrollBtn.find("span").removeClass("now").eq(_num + 1).addClass("now"); _num++; }); }else{ _id[_id.length - 1].fadeOut(300,function(){ _id[0].fadeIn(300); _adScrollBtn.find("span").removeClass("now").eq(0).addClass("now"); _num = 0; }); }; }; _adScroll.mouseenter(function(){ clearInterval(_gglbsj); }).mouseleave(function(){ _gglbsj = setInterval(gglb,_lbjg); }); //点击切换 _adScrollBtn.find("span").each(function(idx){ $(this).click(function(){ clearInterval(_gglbsj); for(var i=0;i<2;i++){ _id[i].hide(); }; _id[idx].fadeIn(300); _adScrollBtn.find("span").removeClass("now").eq(idx).addClass("now"); _num = idx; }) }); })(); //社会主义核心价值观公益广告轮播 /* (function(){ var _jbBox = $("#jbBox"),_gyBox = $("#gyBox"),_gyBoxShow = QQ.localData.get('gyBoxShow'); if(_gyBoxShow != 0 && _gyBoxShow != 1){ _gyBox.show(); QQ.localData.set('gyBoxShow','1'); }else{ if(_gyBoxShow == 0){ _jbBox.hide(); _gyBox.show(); QQ.localData.set('gyBoxShow','1'); }else{ _jbBox.show(); _gyBox.hide(); QQ.localData.set('gyBoxShow','0'); } } })(); */ //曝光异常排查 defaultPuguang("checkup",2128); //订阅板块过滤?字符 //dyReplace(); //终端检测 platformCheck(); //字体切换 //fontTurn(); //字体适配 //fontCheck(); //移动设备隐藏自选股浮层 //stockMobile(); //返回顶部 $(window).scroll(function(){ toTopHide(); $("#toTop").click(function(){ window.scrollTo(0,0); return false; }); }); //频道导航更多 navMore(); //要闻区数据初始化 if(window.location.toString().indexOf('page_preview.ninja.webdev.com') == -1){ //newsInit(); } //搜狗脚本 sogouInit(); //大家爱看初始化 //djakInit(); //快报、社会、军事初始化 kuaibaoInit(); //产品导航扩展 productNavMore(); //登录态检查 login.loginCheck(); //频道内容初始化 //房产定向 //houseIpInit(); //视觉焦点 picFocusInit(); //设为首页 homeSet(); //二维码 //erweimaNews(); //房产产品库smartbox houseProduct(); //教育产品库初始化 ints(0); //汽车产品库 AutoSiteSearch.init_py_list(); //移动端左右留白 if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){ document.getElementsByTagName("body")[0].style.minWidth = "1028px"; }; }); // NBA比赛 (function () { var curTime = serverTime.getTime(); //var curTime = new Date().getTime(); var t = window.location.href.split('t=')[1]; var api = { calendar : 'http://sportswebapi.qq.com/tools/calendar', list : 'http://sportswebapi.qq.com/kbs/list' } // 查询数据 var todayHasGame = false; var today; var maxUlWidth; $.ajax({ url: api.calendar, dataType: 'jsonp', data : { competitionId : 100000, webVersion : 1, from : 'kbs_web', _t : new Date().getTime() }, jsonp: 'callback', jsonpCallback:'responseData',//jsonp回调函数名称 success: function(data){ //today = data[1].today; today = t? t : data[1].today; var gameData = data[1].data; for(var i in gameData) { if(gameData[i].date == today) { getList(); } } }, error: function(data){ } }); function getList() { $.ajax({ url: api.list, dataType: 'jsonp', data : { columnId : 100000, startTime : today, endTime : today, from : 'qshou_nba', _t : new Date().getTime() }, jsonp: 'callback', jsonpCallback:'responseData',//jsonp回调函数名称 success: function(data){ list = data.data[today]; var len = list.length; var gameLen = 0; if(len > 0) { var sHtml = ''; for(var i = 0; i < len; i ++ ) { var time = Format(list[i].startTime); // 当前时间 未到 比赛时间 if(curTime < time) { gameLen ++; var startTimeLen= list[i].startTime.length; sHtml += ''+ '
  • '+ ''+ '
  • '; } } if(gameLen > 1) { //多场比赛 sHtml = sHtml + sHtml; maxUlWidth = gameLen * 206; $('#nbaGameUl').css('width', maxUlWidth * 2 + 'px'); $('#nbaGameUl').html(sHtml); $('#nbaSaicheng').show(); $('#nbaSaichengContent').scrollLeft(maxUlWidth); bindEvt(); }else if(gameLen == 1){ // 一场比赛 无滑动 $('#nbaSaicheng .nbaBtnLeft').hide(); $('#nbaSaicheng .nbaBtnRight').hide(); $('#nbaGameUl').html(sHtml); $('#nbaSaicheng').show(); }else{ // 无比赛 不展示 } } }, error: function(data){ } }); } // "2015-10-12 07:00:00" ==> 10/12/2015 07:00:00 => 毫秒数 function Format(str) { var arr = str.split(' '); var arrYMD = arr[0].split('-') var newTime = arrYMD[1] + '/'+arrYMD[2]+'/'+arrYMD[0] + ' ' + arr[1] var time = new Date(newTime).getTime(); return time; } function bindEvt() { var st; var ul = $('#nbaGameUl'); var div = $('#nbaSaichengContent'); $('#sportsNba').delegate('.nbaBtnLeft', 'click', function() { if(div.is(":animated")) { return; } if(st) { clearTimeout(st); } var sl = div.scrollLeft(); div.animate( {scrollLeft : (sl - 206)}, 'normal', 'swing', function () { if(div.scrollLeft() == 0) { div.scrollLeft(maxUlWidth) } st = setTimeout(slide,5000); } ); }); $('#sportsNba').delegate('.nbaBtnRight', 'click', function() { if(div.is(":animated")) { return; } if(st) { clearTimeout(st); } var sl = div.scrollLeft(); div.animate( {scrollLeft : (sl + 206)}, 'normal', 'swing', function () { if(div.scrollLeft() == (2*maxUlWidth - 206)) { div.scrollLeft(maxUlWidth -206) } st = setTimeout(slide,5000); } ); }); function slide() { var sl = div.scrollLeft(); div.animate( {scrollLeft : (sl + 206)}, 'normal', 'swing', function () { if(div.scrollLeft() == (2*maxUlWidth - 206)) { div.scrollLeft(maxUlWidth -206) } st = setTimeout(slide,5000); } ); } st = setTimeout(slide,5000); } }());