"use strict"; /// (function () { "use strict"; var Page = { // 鍔ㄦ€佸脊鍑 pageFade: function pageFade() { $(window).scroll(function () { var top = $(this).scrollTop(); //console.log(top); if (top >= 0 && top < 300) { $(".pageCell_StarProduct").css("opacity", 1).addClass("active"); } if (top >= 700 && top < 1200) { $(".pageCell_VideoShow.bg-t").addClass("animated bounceInLeft"); $(".pageCell_VideoShow.videoBg").addClass("animated bounceInLeft"); $(".pageCell_VideoShow.thumbsBg").addClass("animated bounceInUp"); $(".pageCell_VideoShow").css("opacity", 1).addClass("active"); } if (top >= 1200 && top < 1800) { $(".pageCell_CoreTechnology .cellTitle").addClass("animated bounceInLeft"); $(".pageCell_CoreTechnology").css("opacity", 1).addClass("active"); } if (top >= 1800 && top < 2400) { $(".pageCell_ClassicCase").css("opacity", 1).addClass("animated fadeInUp"); } if (top >= 2400 && top < 3000) { $(" .pageCell_UsereEvaluation .cellTitle").addClass("animated bounceInLeft"); $(".pageCell_UsereEvaluation").css("opacity", 1); $(".pageCell_UsereEvaluation .evaluateArea ul li").addClass("animated bounceIn"); } if (top >= 3000 && top < 3600) { $(".pageCell_AboutBoLang").css("opacity", 1).addClass("animated bounceInLeft"); } if (top >= 3600) { $(".pageCell_NewsCenter").css("opacity", 1).addClass("animated bounceInRight"); } }); } }; Page.pageFade(); })(); //棣栭〉杞挱 ajax({ url: "/customer/index/rotationChart", complete: function complete(xhr) { // console.log(xhr); var _list = xhr.responseJSON.data.list; var _listStr1 = '
'; var _listStr2 = '
'; console.log("骞垮憡杞挱:", _list); for (var i in _list) { if (_list[i].linkUrl.trim().length > 0) { _listStr1 += "\n
\n
\n \n \""\n \n
\n
"; } else { _listStr1 += "\n
\n
\n \""\n
\n
"; } _listStr2 += "
"; } $(".mainBanner").html(_listStr1 + _listStr2 + "
"); $(".mainBanner .dots dd").eq(0).addClass("active"); banner(); //鏄庢槦浜у搧 $(".ProductsContainer").html("\n
\n \n \"\u5BB6\u7528\u70ED\u6C34\"\n
\n
\n
\u5BB6\u7528\u70ED\u6C34
\n
\n
\n
\n
\n
\n \n \n
"); setTimeout(function () { $(".pageCell_StarProduct").css("opacity", 1).addClass("active"); }, 1500); } }); //瑙嗛灞曠ず var galleryTop = void 0; ajax({ url: "/customer/index/vedioList", complete: function complete(xhr) { var _list = xhr.responseJSON.data.list; var videoList = _list.map(function (item) { return { id: item.id, title: item.imgName, info: item.subject, coverUrl: item.imgPath, videoUrl: item.vedioPath, orderNum: item.orderNum }; }); console.log("瑙嗛灞曠ず", videoList); var videoShowSwiperTopStr = '
'; var videoShowSwiperThumbsStr = '
'; for (var i in videoList) { videoShowSwiperTopStr += "
\n
\n
" + videoList[i].title + "
\n

" + videoList[i].info + "

\n
\n
\n \n \n \n
\n
"; videoShowSwiperThumbsStr += "
\n
" + videoList[i].title + "
\n
"; } videoShowSwiperTopStr += "
\n
\n
"; videoShowSwiperThumbsStr += ""; $("#videoShowSwiperTop").html(videoShowSwiperTopStr); $("#videoShowSwiperThumbs").html(videoShowSwiperThumbsStr); $(".videoBox").bind("contextmenu", function () { return false; }); var galleryThumbs = new Swiper(".gallery-thumbs", { spaceBetween: 10, slidesPerView: 5, // loop: true, freeMode: true, watchSlidesVisibility: true, watchSlidesProgress: true }); galleryTop = new Swiper(".gallery-top", { // autoplay: true, loop: true, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev" }, thumbs: { swiper: galleryThumbs }, on: { slideChangeTransitionStart: function slideChangeTransitionStart() { //瑙嗛鍏ㄦ殏鍋 closeAllVideo(); } } }); } }); //鐐瑰嚮瑙嗛鎾斁 $(document).on("click", ".videoBox", function () { videoClick(this); }); //瑙嗛鎾斁 function videoClick(that) { //瑙嗛鍏ㄦ殏鍋 closeAllVideo(); //鍒ゆ柇鏈夋棤瑙嗛 if (that.length == 0) { return 0; } //褰撳墠瑙嗛寮€濮 var video = $(that).children("video").get(0); var openFlag = $(that).children("img"); openFlag.hide(); // 瑙嗛缁撴潫鏃堕棿 video.onended = function () { openFlag.show(); // 寮€鍚嚜鍔ㄥ垏鎹 galleryTop.autoplay.start(); }; // 鍘绘帀鐢讳腑鐢伙紝 video["disablePictureInPicture"] = true; video.play(); // 鍏抽棴鑷姩鍒囨崲 galleryTop.autoplay.stop(); } //瑙嗛鍏ㄦ殏鍋 function closeAllVideo() { //鍏朵粬鍏ㄦ殏鍋 var openFlagAll = $("#videoShowSwiperTop").find("img"); openFlagAll.show(); var videoAll = $("#videoShowSwiperTop").find("video"); for (var i = 0; i < videoAll.length; i++) { videoAll.eq(i).get(0).pause(); } } // 鎶€鏈垱鏂 ajax({ url: "/customer/index/technological", complete: function complete(xhr) { var _list = xhr.responseJSON.data.list; var _listStr = ""; console.log("鎶€鏈垱鏂?", _list); for (var i in _list) { if (_list[i].linkUrl.trim().length > 0) { _listStr += "
  • \n \n
    \n \"\n
    \n
    \n " + (_list[i].imgName || "") + "\n
    \n
    " + (_list[i].subject || "") + "
    \n
    \n
  • "; } else { _listStr += "
  • \n \n
    \n \"\n
    \n
    \n " + (_list[i].imgName || "") + "\n
    \n
    " + (_list[i].subject || "") + "
    \n
    \n
  • "; } } $(".TechnologyContainer ul").html(_listStr); } }); //缁忓吀妗堜緥 ajax({ url: "/customer/index/classic", complete: function complete(xhr) { var _list = xhr.responseJSON.data.list; var _listStr = ""; console.log("缁忓吀妗堜緥:", _list); for (var i in _list) { _listStr += "
  • \n \n \n \n
    \n
    \n

    \n
    \n
    " + _list[i].name + "
    \n
    \n
    \n
  • "; } $("#slideContainer").html(_listStr); } }); //鐢ㄦ埛璇勪环 ajax({ url: "/customer/index/userEvaluation", complete: function complete(xhr) { var _list = xhr.responseJSON.data.list; var _listStr = ""; console.log("鐢ㄦ埛璇勪环:", _list); for (var i in _list) { var _photo = _list[i].photos.split(",")[0]; var _photoStr = ""; if (_photo) { _photoStr = ''; } else { _photoStr = ''; } _listStr += "
  • \n
    " + (_list[i].productName || "") + "
    \n
    \n
    \n " + _photoStr + "\n
    \n
    \n

    " + (_list[i].userName || "") + "

    \n

    " + (_list[i].userProvince || "") + "-" + (_list[i].userCity || "") + "

    \n
    \n
    \n " + (_list[i].context || "") + "\n
    \n READ MORE\n
    \n
  • "; } $(".evaluateArea ul").html(_listStr); } }); //鏂伴椈涓績 ajax({ url: "/customer/index/newsList", complete: function complete(xhr) { var _list = xhr.responseJSON.data; console.log("鏂伴椈涓績:", _list); var _list1 = _list["浼佷笟鏂伴椈"]; var _list2 = _list["琛屼笟鍔ㄦ€?]; var _str1 = ""; var _str2 = ""; var _other1 = ""; var _other2 = ""; var _content1 = "
    \n
    \n \n \n \n
    \n
    \n

    " + (_list1[0].title || "") + "

    \n

    " + (_list1[0].showTime || "") + "

    \n
    \n " + (_list1[0].shortComment || "") + "\n
    \n MORE\n
    \n
    "; var _content2 = "
    \n
    \n \n \n \n
    \n
    \n

    " + (_list2[0].title || "") + "

    \n

    " + (_list2[0].showTime || "") + "

    \n
    \n " + (_list2[0].shortComment || "") + "\n
    \n MORE\n
    \n
    "; for (var i in _list1) { if (i > 0) { _other1 += "
  • \n \n

    " + (_list1[i].title || "") + "

    \n

    " + (_list1[i].showTime || "") + "

    \n
    \n
  • "; } } for (var _i in _list2) { if (_i > 0) { _other2 += "
  • \n \n

    " + (_list2[_i].title || "") + "

    \n

    " + (_list2[_i].showTime || "") + "

    \n
    \n
  • "; } } _str1 = "
  • \n
    \u4F01\u4E1A\u65B0\u95FB
    \n \n " + _content1 + "\n \n \n
  • "; _str2 = "
  • \n
    \u884C\u4E1A\u52A8\u6001
    \n \n " + _content2 + "\n \n \n
  • "; $(".cellInfo").html(_str1 + _str2); } });