锘?(function () { setMenu(1); getSlider(); getProduct(); getNews(); addLog('缃戠珯-棣栭〉', '/Web/Index'); //搴曢儴鍏紬鍙蜂簩缁寸爜鍥剧墖鏍峰紡璋冭瘯 //$('.footer div .icon').find(".pos").slideDown(); }); //鑾峰彇杞挱鍐呭 function getSlider() { var url = '/Web/GetSolutionList?num=3' //鑾峰彇瑙e喅鏂规 $.getJSON(url, function (data) { if (data != null && data.length > 0) { url ='/Web/GetPicture?num=3&category=1' //鑾峰彇杞挱鍥剧墖 $.getJSON(url, function (d) { $.each(data, function (i, v) { var path = ''; if (d.length > i) { path = d[i].filepath.substring(1, d[i].filepath.length); } var html = '
'; html += '
'; html += '
'; html += '

' + v.title + '

'; html += '
' + v.introduction + '
'; html += ''; html += '
'; html += '
'; html += '
'; $('#slider').append(html); }); setSlider(); }); } }); } //鑾峰彇浜у搧鍐呭 function getProduct() { $('#product').html(''); url = '/Web/GetProductList?num=3' $.getJSON(url, function (data) { $.each(data, function (i, v) { var html = ''; $('#product').append(html); }); }); } //鑾峰彇鏂伴椈鍐呭 function getNews() { url = '/Web/GetNewsList?num=4' $.getJSON(url, function (data) { var html = ''; $.each(data, function (i, v) { if (i==0) { var a = ''; var filePath = '~/Content/web/images/gallery/news_1.jpg'; if (v.filepath != null) { filePath = v.filepath; } a += ''; a += ''; $('#fig_news').html(a); } if (i % 2 == 0) { html += '
'; } html += '
'; html += ''; html += '
'; if (i % 2 == 1) { html += '
'; } }); $('#news').append(html); }); } //璁剧疆杞挱 function setSlider() { //Main Slider Carousel if ($('.slider-carousel').length) { $('.slider-carousel').owlCarousel({ animateOut: 'fadeOut', animateIn: 'fadeIn', loop: true, margin: 0, nav: true, autoHeight: true, smartSpeed: 500, autoplay: 6000, //stopOnHover: true, //autoplay: true, //autoplaySpeed: 10000, //autoplayHoverPause: true, navText: ['', ''], responsive: { 0: { items: 1 }, 600: { items: 1 }, 800: { items: 1 }, 1024: { items: 1 }, 1200: { items: 1 } } }); } }