$(function () { if($("#swiper-index").size()>0){ console.log($(".banner-img").height()) $("#swiper-index .swiper-slide").css("height",$(".banner-img").height()); $("#bannervideo").show().css("height",$(".banner-img").height()); greeSite.initSwiperImg("#swiper-index .banner-img", 2.04); console.log($(".banner-img").height()) } //index greeSite.bannerShow('#swiper-index','.swiper-pagination-index',true); $("#swiper-index").css("height",$(".banner-img").height()); //news greeSite.bannerNews('#swiper-index-news','.swiper-pagination-news',true); $(".swiper-slide-bg,.swiper-slide-bg-item").css({ height:$(window).height() }) }); (function(){ let close=document.getElementById("p1"); let open=document.getElementById("p2"); let m=document.querySelector("#bannervideo"); let c=function(){ m.muted=false; close.style.display="none"; open.style.display="block"; } if(close){ close.addEventListener("click",c,false); } let o=function(){ m.muted=true; close.style.display="block"; open.style.display="none"; } if(open){ open.addEventListener("click",o,false); } })(); //详情参数组装数据 var getHotProductParams = function(form,modelId){ var obj = {}; var formArray = $(form).serializeArray(); $.each(formArray, function () { if (obj[this.name] !== undefined) { if (!obj[this.name].push) { obj[this.name] = [obj[this.name]]; } obj[this.name].push(this.value || ''); } else { obj[this.name] = this.value || ''; } }); obj.modelId = modelId; console.log("getDetailsParams-",obj) return obj; }; var getHotProduct = function(o){ var id = $(o).attr("data-id"); $(".tab-pane-s").html('
'); $('.nav-tabs-category-item').parent().removeClass("active"); $(o).parent().addClass("active"); renderHotProductHtml(productData[id]); }; //详情参数 var renderHotProductHtml = function(res){ var html = '
    '; // //
  1. // //
    // //
    //

    1级文字
    2级文字

    //
    //

    1级文字
    2级文字

    // 了解更多 //
    //
    // //
  2. //
  3. // //
    // //
    //

    1级文字
    2级文字

    //
    //

    1级文字
    2级文字

    // 了解更多 //
    //
    // //
  4. $.each(res, function(i, v) { if(i==0){ if(v.href!== undefined && v.href!=''){ html += '
  5. '; html += ' '; html += '
    '; html += ' '; html += '
    '; html += '

    '+v.title+'
    '+v.remarks+'

    '; html += '
    '; html += '

    '+v.title+'
    '+v.remarks+'

    '; html += ' 了解更多'; html += '
    '; html += '
    '; html += '
  6. '; }else{ html += '
  7. '; //html += ' '; html += '
  8. '; } }else{ if(v.href!== undefined && v.href!=''){ html += '
  9. '; html += ' '; html += '
    '; html += ' '; html += '
    '; html += '

    '+v.title+'
    '+v.remarks+'

    '; html += '
    '; html += '

    '+v.title+'
    '+v.remarks+'

    '; html += ' 了解更多'; html += '
    '; html += '
    '; html += '
  10. '; }else{ html += '
  11. '; //html += ' '; html += '
  12. '; } } }); html += '
'; setTimeout(function(){ $(".tab-pane-s").empty().html(html); },100); };