$(function(){ qx(); $(".swiper-slide").each(function(){ if($(this).hasClass("on")){ var a = $(this); queryByType($(this).attr("data-val")); } }) $(".swiper-slide").click(function(){ $(this).siblings().removeClass("on"); $(this).addClass("on"); }) }) function queryByType(type){ $.ajax({ url:"/front/ajax_querySoftwareByType.do", type:"POST", data:{ "type":type }, success:function(data){ var str = "" var dataNew = eval('(' + data + ')'); if(dataNew.msg.length == 0){ $("#phoneUl").html(str); $("#rjId").html(str); } $.each(dataNew.msg,function(i,n){ if(type == 48){ str+= '
  • '; str+= '
    '; str+= '
    '; str+= '
    '; str+= '

    '+n.title+'

    '; /*var script = document.createElement('script') script.type = 'text/html' var div = document.createElement('div') div.innerHTML = n.content script.appendChild(div) n.content = script.innerText*/ str+= '
    '+n.content+'
    '; str+= '
    '; str+= '
    '; if(!isEmpty(n.single1) || !isEmpty(n.single2)){ str+= '

    最新版本号

    '; str+= '
    '; if(!isEmpty(n.single1)){ str+= '

    '; str+= 'IOS:'+n.single1+''; str+= '

    '; } if(!isEmpty(n.single2)){ str+= '

    '; str+= '安卓:'+n.single2+''; str+= '

    '; } } str+= '
    '; str+= '
    '; str+= '
    '; if(!isEmpty(n.file2)){ str+= '下载说明书'; } str+= '
    '; str+= '
    '; str+= '
    '; str+= '
  • '; $("#phoneUl").html(str); $(".p_list").each(function(){ $(this).html($(this).text()); }); if($(".p_list").length>0){ $(".p_list").mCustomScrollbar({}); } $(".software_list").hide(); $(".phone_list").show(); imgratio(); }else{ str += '
  • '; str += '
    '; str += '
    '; str += '
    '; str += '
    '; str += '

    '+n.title+'

    '; str += '
    '; str += '
    '; str += '
    '; /* var script = document.createElement('script') script.type = 'text/html' var div = document.createElement('div') div.innerHTML = n.content script.appendChild(div) n.content = script.innerText*/ str += '

    '+n.content+'

    '; str += '

    '+n.name+'

    '; str += '
    '; str += '
    '; str += '
    '; str += '

    更新时间:'+formateDate(n.lastTime.time)+'

    '; str += '

    软件大小:'+n.subheading+'

    '; str += '

    版本:'+n.author+'

    '; str += '

    MD5号:'+n.copyFrom+'

    '; str += '
    '; str += '
    '; if(!isEmpty(n.workExperience) && !isEmpty(n.file1)){ str += '
    '; str += '本地下载'; str += '电信下载'; str += '
    '; } if(isEmpty(n.workExperience) && !isEmpty(n.file1)){ str += '
    '; // str += '上海电信'; str += '本地下载'; str += '
    '; } if(!isEmpty(n.workExperience) && isEmpty(n.file1)){ str += '
    '; str += '电信下载'; //str += '杭州双线'; str += '
    '; } str += '
    '; str += '
    '; str += '
    '; str += '
  • '; $(".phone_list").hide(); $("#rjId").html(str); $(".p01").each(function(){ $(this).html($(this).text()); }); $(".software_list").show(); imgratio(); T_layer(); } }) } }) } function xzcs(t){ public_clicks($(t).attr("data-id")); } function public_clicks(id){ $.ajax({ url:"/front/ajax_clicks.do", type:"POST", data:{ "id":id }, success:function(data){ if($("#clicksCId").val() == 225){ $(".browse").append(data); } } }); } function downloadGo(i){ $("#xzId").attr("href",$(i).attr("data-url")); $("#xzId").attr("download",$(i).attr("data-name")); $("#xzId").attr("data-id",$(i).attr("data-id")); $(".tac_soft").show(); } function qx(){ var i = 0; $(".swiper-slide").each(function(){ if($(this).hasClass("on")){ i += 1; } }); if(i == 0){ $(".swiper-slide").eq(0).addClass("on"); } $("#xzId").attr("href",""); $("#xzId").attr("download",""); $("#xzId").attr("data-id",""); } function formateDate(timestamp){ var date = new Date(timestamp); var Y = date.getFullYear() + '-'; var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; var D = (date.getDate() < 10 ? '0'+(date.getDate()) : date.getDate()) + ' '; var h = (date.getHours() < 10 ? '0'+(date.getHours()) : date.getHours()) + ':'; var m = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':'; var s = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds()); return Y+M+D; }