/** * created by 熊晨名 on 2019/6/19. */ //###########官网品牌简介组件##########1 comps.brandoverview = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.brandoverviewlist = config.brandoverviewlist; } comps.brandoverview.prototype.init = function() { var that =this; var brandoverviewlist = this.brandoverviewlist ; if (this.needasyncinit) { if(brandoverviewlist != '' && brandoverviewlist.length > 0) { var compdivele = $(".brandoverview_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < brandoverviewlist.length ; i++) { var compdivconleele = compdivele.clone(); var string = brandoverviewlist[i]; compdivconleele.find(".brandoverview_name").first().html(string.name); compdivconleele.find(".brandoverview_remark").first().html(string.remark); if (string.imgsrc != null) { compdivconleele.find(".brandoverview_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele.find(".brandoverview_a").first().attr("href",string.jumpurl); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########官网品牌简介组件########## //###########企业全部荣誉组件##########2 comps.allhonor = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.allhonorlist = config.allhonorlist; } comps.allhonor.prototype.init = function() { var that =this; var allhonorlist = this.allhonorlist ; if (this.needasyncinit) { if(allhonorlist != '' && allhonorlist.length > 0) { //对list进行排序 allhonorlist.sort(function(a,b){ return a.sequence-b.sequence; }); var compdivele = $(".allhonor_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < allhonorlist.length ; i++) { var compdivconleele = compdivele.clone(); var string = allhonorlist[i]; compdivconleele.find(".allhonor_name").first().html(string.name); compdivconleele.find(".allhonor_remark").first().html(string.remark); if (string.imgsrc != null) { compdivconleele.find(".allhonor_img").first().attr("src",string.imgsrc); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########企业全部荣誉组件########## //###########首页头部链接跳转组件##########3 comps.jumpterm = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.jumptermlist = config.jumptermlist; } comps.jumpterm.prototype.init = function() { var that =this; var jumptermlist = this.jumptermlist ; if (this.needasyncinit) { if(jumptermlist != '' && jumptermlist.length > 0) { var compelediv2 = $(".jumpterm_div_a"); var compelediv3 = $(".jumpterm_span"); $("#"+that.compid+"_div_div").html(""); var jump = jumptermlist.length; for (var i = 0 ; i < jumptermlist.length ; i++) { var compdivconleele2 = compelediv2.clone(); var compdivconleele3 = compelediv3.clone(); var string = jumptermlist[i]; compdivconleele2.html(string.name); console.log(compdivconleele2); if (string.jumpurl != null) { compdivconleele2.attr("href",string.jumpurl); } if (i != jump-1){ compdivconleele3.html(">"); }else { compdivconleele3.html(""); } $("#"+that.compid+"_div_div").append(compdivconleele2); $("#"+that.compid+"_div_div").append(compdivconleele3); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########首页头部链接跳转组件########## //###########企业文化组件##########4 comps.enterpriseculture = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.enterpriseculturelist = config.enterpriseculturelist; } comps.enterpriseculture.prototype.init = function() { var that =this; var enterpriseculturelist = this.enterpriseculturelist ; if (this.needasyncinit) { if(enterpriseculturelist != '' && enterpriseculturelist.length > 0) { var compdivele = $(".enterpriseculture_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < enterpriseculturelist.length ; i++) { var compdivconleele = compdivele.clone(); var string = enterpriseculturelist[i]; compdivconleele.find(".enterpriseculture_name").first().html(string.name); compdivconleele.find(".enterpriseculture_remark").first().html(string.remark); if (string.imgsrc != null) { compdivconleele.find(".enterpriseculture_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele.find(".enterpriseculture_a").first().attr("href",string.jumpurl); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########企业文化组件########## //###########工作推荐组件##########5 comps.joboffer = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.jobofferlist = config.jobofferlist; } comps.joboffer.prototype.init = function() { var that =this; var jobofferlist = this.jobofferlist ; if (this.needasyncinit) { if(jobofferlist != '' && jobofferlist.length > 0) { var compdivele = $(".joboffer_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < jobofferlist.length ; i++) { var compdivconleele = compdivele.clone(); var string = jobofferlist[i]; compdivconleele.find(".joboffer_name").first().html(string.name); compdivconleele.find(".joboffer_remark1").first().html(string.remark1); compdivconleele.find(".joboffer_remark2").first().html(string.remark2); if (string.imgsrc != null) { compdivconleele.find(".joboffer_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele.find(".joboffer_a").first().attr("href",string.jumpurl); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########工作推荐组件########## //###########自助服务组件##########6 comps.selfservice = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.selfservicelist = config.selfservicelist; } comps.selfservice.prototype.init = function() { var that =this; var selfservicelist = this.selfservicelist ; if (this.needasyncinit) { if(selfservicelist != '' && selfservicelist.length > 0) { var compdivele = $(".selfservice_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < selfservicelist.length ; i++) { var compdivconleele = compdivele.clone(); var string = selfservicelist[i]; compdivconleele.find(".selfservice_name").first().html(string.name); compdivconleele.find(".selfservice_remark1").first().html(string.remark1); compdivconleele.find(".selfservice_remark2").first().html(string.remark2); if (string.imgsrc != null) { compdivconleele.find(".selfservice_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele.find(".selfservice_a").first().attr("href",string.jumpurl); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########自助服务组件########## //###########联系我们组件##########7 comps.connectus = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.connectuslist = config.connectuslist; } comps.connectus.prototype.init = function() { var that =this; var connectuslist = this.connectuslist ; /*if (this.needasyncinit) { if(connectuslist != '' && connectuslist.length > 0) { var compdivele = $(".connectus_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < connectuslist.length ; i++) { var compdivconleele = compdivele.clone(); var string = connectuslist[i]; compdivconleele.find(".connectus_name").first().html(string.name); compdivconleele.find(".connectus_remark1").first().html(string.remark1); if (string.imgsrc != null) { compdivconleele.find(".connectus_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele.find(".connectus_a").first().attr("href",string.jumpurl); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } }*/ // $(".connectus_show").click(function(){ // $(".contan-float").show(); // }); // $(".contan-float").click(function () { // $(this).hide() // }) utils.ajaxloadcomplate(that); } comps.connectus.prototype.bindevent = function() { } //###########联系我们组件########## //###########管家服务组件##########8 comps.housekeeper = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.housekeeperlist = config.housekeeperlist; } comps.housekeeper.prototype.init = function() { var that =this; var housekeeperlist = this.housekeeperlist ; if (this.needasyncinit) { if(housekeeperlist != '' && housekeeperlist.length > 0) { var compelediv2 = $(".housekeeper_img_big_div"); var compelediv3 = $(".housekeeper_div_div"); $("#"+that.compid+"_div_div").html(""); for (var i = 0 ; i < housekeeperlist.length ; i++) { var string = housekeeperlist[i]; if (i == 0){ var compdivconleele2 = compelediv2.clone(); if (string.imgsrc != null) { compdivconleele2.find(".housekeeper_img_big").first().attr("src",string.imgsrc); } $("#"+that.compid+"_div").append(compdivconleele2); }else { var compdivconleele3 = compelediv3.clone(); if (string.imgsrc != null) { compdivconleele3.find(".housekeeper_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele3.find(".housekeeper_a").first().attr("href",string.jumpurl); } compdivconleele3.find(".housekeeper_name").first().html(string.name); $("#"+that.compid+"_div_div").append(compdivconleele3); } } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########管家服务组件########## //###########保修承诺书及收费标准组件##########9 comps.guarantee = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.guaranteelist = config.guaranteelist; } comps.guarantee.prototype.init = function() { var that =this; var guaranteelist = this.guaranteelist ; if (this.needasyncinit) { if(guaranteelist != '' && guaranteelist.length > 0) { var compdivele = $(".guarantee_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < guaranteelist.length ; i++) { var compdivconleele = compdivele.clone(); var string = guaranteelist[i]; compdivconleele.find(".guarantee_name").first().html(string.name); compdivconleele.find(".guarantee_jumpname").first().html(string.jumpurlname); if (string.imgsrc != null) { compdivconleele.find(".guarantee_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele.find(".guarantee_a").first().attr("href",string.jumpurl); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########保修承诺书及收费标准组件########## //###########全程无忧服务组件##########10 comps.wholeeasy = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.wholeeasylist = config.wholeeasylist; } comps.wholeeasy.prototype.init = function() { var that =this; var wholeeasylist = this.wholeeasylist ; if (this.needasyncinit) { if(wholeeasylist != '' && wholeeasylist.length > 0) { var compdivele = $(".wholeeasy_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < wholeeasylist.length ; i++) { var compdivconleele = compdivele.clone(); var string = wholeeasylist[i]; compdivconleele.find(".wholeeasy_name").first().html(string.name); compdivconleele.find(".wholeeasy_remark").first().html(string.remark); if (string.imgsrc != null) { compdivconleele.find(".wholeeasy_img").first().attr("src",string.imgsrc); } if (string.jumpurl != null) { compdivconleele.find(".wholeeasy_a").first().attr("href",string.jumpurl); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } if($(window).width() <= 992) { servicewindow() } $(window).resize(function () { if($(window).width() <= 992) { servicewindow() } }) function servicewindow () { $('.service-window .flexslider').flexslider({ controlscontainer:".slider_fullscreen2", animation: "slide", animationloop: true, pauseonaction: true, pauseonhover: false, slideshowspeed: 4000, animationduration: 600, }); } utils.ajaxloadcomplate(that); } //###########全程无忧服务组件########## //###########标题描述组件##########11 comps.titledescription = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.title = config.title; } comps.titledescription.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_title").html(that.title); $("#"+that.compid+"_remark").html(that.remark); } utils.ajaxloadcomplate(that); } //###########标题描述组件########## //###########客户咨询组件##########12 comps.clientconsultation = function(config) { this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.clientconsultationlist = config.clientconsultationlist; } comps.clientconsultation.prototype.init = function() { var that =this; var clientconsultationlist = this.clientconsultationlist ; if (this.needasyncinit) { if(clientconsultationlist != '' && clientconsultationlist.length > 0) { var compdivele = $(".clientconsultation_div").first(); $("#"+that.compid+"_div").html(""); for (var i = 0 ; i < clientconsultationlist.length ; i++) { var compdivconleele = compdivele.clone(); var string = clientconsultationlist[i]; compdivconleele.find(".clientconsultation_name").first().html(string.name); if (string.imgsrc != null) { compdivconleele.find(".clientconsultation_img").first().attr("src",string.imgsrc); } if (string.jumpurlname != null) { compdivconleele.find(".clientconsultation_jumpurlname").first().html(string.jumpurlname); } if (string.remark != null) { compdivconleele.find(".clientconsultation_remark").first().html(string.remark); } if (string.jumpurl != null) { compdivconleele.find(".clientconsultation_a").first().attr("href",string.jumpurl); }else { compdivconleele.find(".clientconsultation_a").first().attr("class","hidden"); } $("#"+that.compid+"_div").append(compdivconleele); } $("#"+that.compid+"_describe").html(decodeuri($.base64.decode(content))); } } utils.ajaxloadcomplate(that); } //###########客户咨询组件##########