锘縱ar ProductType = 101;//浜у搧id $(function () { $('body').running(); console.log("鍒濆") BanNer(); basicShow() //producType() //TrainServiceType() //BrandStory(); homeNews(); //Produc(101); //Industrytype(); Companyinfo(); console.log("-----------------------------------------------------------"); }) function BanNer() { var Ban = Banner(); console.log(Ban); if (Ban.success) { var data = Ban.data; $.each(data, function (index, obj) { obj.PhotoPath = PathHttp() + "/" + obj.PhotoPath; }) document.getElementById("Banner").innerHTML = tmpText(data); // var img = ""; //for (var i = 0; i < data.length; i++) { // img +="
  • " // img += "" // img += "
  • " // console.log(data[i].PhotoPath) //} //$("#Banner ul").append(img); Slide(); } } function Companyinfo() { var Company = CompanyInfoList() if (Company.success) { var data = Company.data; $("#CompanyInfo").html(data.CompanyIntro); } } function basicShow() { var basic = BasicShow(); console.log(basic); if (basic.success) { var data = basic.data; $("#LogoPic img").attr("src", PathHttp() + data.BCompanyLogo + ""); $("#Hotline").html(data.BHotline) $("#FootTel").html(data.BHotline) $("#address").html("鍦板潃锛? + data.BCompanyAddress) $("#copyright").html("漏锔 鐗堟潈鎵€鏈夛細" + data.BCompanyName) } } function producType() { var Type = ProducType() console.log(Type); if (Type.success) { var data = Type.data document.getElementById("ProType").innerHTML = ProTypetmpText(data); //window.localStorage.ProDType=101 $("#ProType span").click(function () { $(this).addClass("cur").siblings().removeClass("cur") var index = $(this).parents('.tabmenu').find('.lk').index(this); //console.log("绱㈠紩sib:"); //console.log(index) var par = $(this).parents(".tabmenu").siblings(".tabwrap").find(".module").eq(index).show().siblings('.module').hide(); //console.log("parentsparentsparentsparentssib:"); //console.log(par) ProductType = $(this).attr("value"); $("#Pro_more").attr("value", ProductType) $("#Pro_more").attr("href", "ProductCenter.html?id=" + ProductType + "") //window.localStorage.ProDType = ProductType Produc(ProductType) }) } } function Produc(ProductType) { console.log("ProductTypeProductTypeProductTypeProductType:" + ProductType); var result = homeProducList(ProductType); if (result.success) { var data = result.data.DataList; $.each(data, function (index, obj) { var ProductPic = obj.ProductPic.split("$")[0]; obj.ProductPic = PathHttp() + "/" + ProductPic; }) //$.each(data, function (index, obj) { // if (index == 0) { // } // //window.open(); //}) console.log("dddddd:"); console.log(data); document.getElementById("ProductContext").innerHTML = ProductContexttmpText(data); } } function TrainServiceType() { var result = TrainServiceTypeList(); if (result.success) { var data = result.data; document.getElementById("TrainingService").innerHTML = TrainServicetmpText(data); } } function BrandStory() { var result = BrandStoryList(); if (result.success) { var data = result.data; $.each(data, function (index, obj) { obj.BrandStoryPic = PathHttp() + "/" + obj.BrandStoryPic; }) document.getElementById("BrandStory").innerHTML = BrandStorytmpText(data); } } function Industrytype() { var result = IndustryType(); if (result.success) { var data = result.data; document.getElementById("IndustryType").innerHTML = IndustryTypetmpText(data); } } function homeNews() { var firs = []; var right = []; var lower = []; var result = homeNewsList(); if (result.success) { var data = result.data.DataList; console.log(data) $.each(data, function (index, obj) { if (obj.NewsPic != "" && obj.NewsPic != null) { obj.NewsPic = PathHttp() + "/" + obj.NewsPic; } console.log("conconconconc:" + obj.NewsInfoContext); var info = LoopInfo(obj.NewsInfoContext); obj.NewsInfoContext = info }) console.log(data) for (var i = 0; i < 1; i++) { firs[i] = data[i] } var jj = -1; for (var j = 1; j <= 4; j++) { jj++; right[jj] = data[j] } var kk = -1; for (var k = 1; k <= 3; k++) { kk++; lower[kk] = data[k] } console.log("right") console.log(right) console.log("right") document.getElementById("rightNew").innerHTML = rightNewtmpText(right); document.getElementById("lowerNew").innerHTML = lowerNewtmpText(lower); document.getElementById("firstNew").innerHTML = firstNewtmpText(firs); } } function Jump(id) { if (id == 101) { window.location.href = "TrainingList.html?id=" + id; } else { window.location.href = "TrainingService.html?id=" + id; } } function Slide() { jQuery(".idx_ban .slidebox").slide({ titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "left", autoPlay: true }); jQuery(".idx_dt .scrolltop").slide({ titCell: ".hd ul", mainCell: ".bd ul", autoPage: true, effect: "top", autoPlay: false, vis: 4 }); var swiper = new Swiper('.idx_pro .swiper-container', { nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', paginationClickable: true, spaceBetween: 20, autoplay: false, slidesPerView: 4, slidesPerColumn: 2, autoplayDisableOnInteraction: false, observer: true, observeParents: true }); } function LoopInfo(Info) { if (Info != null && Info.trim()!="") { //console.log("杩涙潵浜嗗悧111111:" + Info) if (Info.indexOf("img src") > 0) { var Jies = Info.match(//)[1]; var PingJie = "" Info = Info.replace(PingJie, "") return LoopInfo(Info) } else if (Info.indexOf("img alt") > 0) { //console.log("杩涙潵浜嗗悧333333:" + Info) var Jies = Info.match(//)[1]; //console.log("杩涙潵浜嗗悧Jies333333:" + Jies) var PingJie = "" Info = Info.replace(PingJie, "") return LoopInfo(Info) } else { //console.log("InfoInfoInfoInfo:" + Info) return Info } } }