//###########文字标题组件########### comps.literalcomp = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.title = config.title; this.remark = config.remark; } comps.literalcomp.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_title").html(that.title); $("#"+that.compid+"_remark").html(that.remark); } utils.ajaxloadcomplate(that); } //###########标题列表组件########### comps.listtitle = function(option) { this.compid = option.compid; this.needasyncinit = option.needasyncinit; this.imgsrc = option.imgsrc; this.defineurl = option.defineurl; this.definewidth = option.definewidth; this.defineheight = option.defineheight; this.alt = option.alt; } comps.listtitle.prototype.getquerystring = function(name) { var reg = new regexp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null)return unescape(r[2]); return null; } comps.listtitle.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_img").attr("src",that.imgsrc); if(that.definewidth != 0){ $("#"+that.compid+"_img").attr("width",that.definewidth); } if(that.defineheight != 0){ $("#"+that.compid+"_img").attr("height",that.defineheight); } $("#"+that.compid+"_img").attr("alt",that.alt); } that.bindsomeevent(); utils.ajaxloadcomplate(that); } comps.listtitle.prototype.bindsomeevent=function(){ var that=this; $("#"+that.compid+"_a").click(function(){ if(that.defineurl != "" && that.defineurl != null){ window.open(contextpath+that.defineurl); } }) } //===================================================二级标题组件===================================================== comps.sublitlecomp = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.title = config.title; this.jumpname = config.jumpname; this.jumpurl = config.jumpurl; } comps.sublitlecomp.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_title").html(that.title); if (that.jumpurl != '') { $("#"+that.compid+"_a").attr("href",that.jumpurl).attr("target","_blank"); if (that.jumpname != '') { $("#"+that.compid+"_a").html(that.jumpname); } } else { $("#"+that.compid+"_a").remove(); } } utils.ajaxloadcomplate(that); } //====================================================官网公司实力展示开始============================================ comps.websitestrength = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.imagelistmodels = config.imagelistmodels; } comps.websitestrength.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid + "_div"); var sondiv = productele.find(".websitestrength_div"); productele.html(""); var imagelist = that.imagelistmodels; for (var i = 0; i < imagelist.length; ++i) { var image = imagelist[i]; var newdiv = sondiv.clone(); var websitestrengthname = newdiv.find("#" +compid +"_name"); var websitestrengthintroduce = newdiv.find("#" +compid +"_introduce"); var websitestrengtha = newdiv.find("#" +compid +"_a"); var websitestrengthimg = newdiv.find("#" +compid +"_img"); websitestrengthname.html(image.name); websitestrengthintroduce.html(image.introduce); var jumpurl = image.jumpurl; if (jumpurl== 'undifined'){ websitestrengtha.prop("href", jumpurl); }else { websitestrengtha.prop("href", "#"); } websitestrengthimg.prop("src", image.imgsrc); productele.append(newdiv); } } utils.ajaxloadcomplate(that); } //====================================================官网公司实力展示结束============================================ //====================================================公司简介展示开始============================================ comps.webintroduction = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.webintroductionlist = config.webintroductionlist; } comps.webintroduction.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid + "_div"); var sondiv = $("#"+compid+"_divson"); productele.html(""); var webintroductionlist = that.webintroductionlist; for (var i = 0; i < webintroductionlist.length; ++i) { var introduction = webintroductionlist[i]; var newdiv = sondiv.clone(); var introductionname = newdiv.find("#" +compid +"_name"); var introductionintroduce = newdiv.find("#" + compid +"_introduce"); var introductiona = newdiv.find("#" + compid +"_a"); var introductionimg = newdiv.find("#" + compid +"_img"); introductionname.html(introduction.name); introductionintroduce.html(introduction.introduce); var jumpurl = introduction.jumpurl; if (jumpurl== 'undifined'){ introductiona.prop("href", jumpurl); }else { introductiona.prop("href", "#"); } introductionimg.prop("src", introduction.imgsrc); productele.append(newdiv); } } utils.ajaxloadcomplate(that); } //====================================================公司简介展示结束============================================ //====================================================频道标题组件=====================start======================= comps.channeltitlecomp = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.title = config.title; this.remark = config.remark; this.defineurl = config.defineurl; } comps.channeltitlecomp.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_name").html(that.title); $("#"+that.compid+"_defineurl").html(that.remark); $("#"+that.compid+"_defineurl").attr("href", that.defineurl); } utils.ajaxloadcomplate(that); } //====================================================频道标题组件=====================end======================= //====================================================网点信息组件开始=================strst======================== comps.siteinfomation = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.steinfomationlist = config.steinfomationlist; } comps.siteinfomation.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#"+compid+"_div"); var sondiv = $("#"+compid+"_divson"); productele.html(""); var steinfomationlist = that.steinfomationlist; for (var i = 0; i < steinfomationlist.length; ++i) { var introduction = steinfomationlist[i]; var newdiv = sondiv.clone(); var introductionname = newdiv.find("#" +compid +"_name"); var introductionintroduce = newdiv.find("#" + compid +"_introduce"); var introductiona = newdiv.find("#" + compid +"_a"); var introductionimg = newdiv.find("#" + compid +"_img"); introductionname.html(introduction.name); introductionintroduce.html(introduction.introduce); var jumpurl = introduction.jumpurl; if (jumpurl== 'undifined'){ introductiona.prop("href", jumpurl); }else { introductiona.prop("href", "#"); } introductionimg.prop("src", introduction.imgsrc); productele.append(newdiv); } } utils.ajaxloadcomplate(that); } //====================================================网点信息组件结束================end========================= //====================================================战略合作组件开始=================strst======================== comps.cooperation = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.styletype = config.styletype; this.cooperationlist = config.cooperationlist; } comps.cooperation.prototype.init = function() { debugger; var that =this; var compid= that.compid; if (this.needasyncinit) { $("#"+compid+"_div").empty(); if(0 == that.styletype){ var compelediv = $("#"+compid+"_div1"); var compeledivclone = compelediv.clone(); var compeledivrow = compeledivclone.find("#"+compid+"_div_row").first(); var compelediv2 = compeledivrow.find(".cooperation_div1").first(); var compelediv2clone = compelediv2.clone(); compeledivrow.empty(); var cooperationlist = that.cooperationlist; if (cooperationlist != null && cooperationlist.length > 0) { for (var i = 0 ; i < cooperationlist.length ; i++) { var cooperation = cooperationlist[i]; var compele2clone = compelediv2clone.clone(); if (cooperation.jumpurl != '') { compele2clone.select(".band-company-a").first().attr("href",cooperation.jumpurl) .attr("target","_blank"); }else { compele2clone.select(".band-company-a").first().attr("href","/") .attr("target","_blank"); } if (cooperation.imgsrc != '') { compele2clone.select(".band-company-img").first().attr("src",cooperation.imgsrc); } compeledivrow.append(compele2clone); } } $("#"+compid+"_div").append(compeledivclone); } else { var compelediv = $("#"+compid+"_div2"); var compeledivclone = compelediv.clone(); var compeledivrow = compeledivclone.find("#"+compid+"_div_row2").first(); var compelediv2 = compeledivrow.find(".cooperation_div2").first(); var compelediv2clone = compelediv2.clone(); compeledivrow.empty(); var cooperationlist = that.cooperationlist; if (cooperationlist != null && cooperationlist.length > 0) { for (var i = 0 ; i < cooperationlist.length ; i++) { var cooperation = cooperationlist[i]; var compele2clone = compelediv2clone.clone(); if (cooperation.jumpurl != '') { compele2clone.select(".band-company-a2").first().attr("href",cooperation.jumpurl) .attr("target","_blank"); }else { compele2clone.select(".band-company-a2").first().attr("href","/") .attr("target","_blank"); } if (cooperation.imgsrc != '') { compele2clone.select(".band-company-img2").first().attr("src",cooperation.imgsrc); } compeledivrow.append(compele2clone); } } $("#"+compid+"_div").append(compeledivclone); } } utils.ajaxloadcomplate(that); } //====================================================战略合作组件结束================end========================= //====================================================服务网点组件结束================start========================= comps.servicesite = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.title = config.title; this.remark = config.remark; this.defineurl = config.defineurl; } comps.servicesite.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_name").html(that.title); $("#"+that.compid+"_a").html(that.remark); $("#"+that.compid+"_a").attr("href",that.defineurl); } utils.ajaxloadcomplate(that); } //====================================================服务网点组件结束================end========================= //====================================================企业荣誉组件开始=================strst======================== comps.enterprisehonors = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.enterprisehonorlist = config.enterprisehonorlist; } comps.enterprisehonors.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var maxdiv = $("#" +compid + "_maxdiv"); var mindiv = $("#" +compid + "_mindiv"); var maxfirstdiv = maxdiv.find(".col-md-6"); var minfirstdiv = mindiv.find(".col-md-3"); maxdiv.html(""); mindiv.html(""); var enterprisehonorlist = that.enterprisehonorlist; for (var i = 0; i < enterprisehonorlist.length; ++i) { var enterprisehonor = enterprisehonorlist[i]; var maxfirstdivclone = maxfirstdiv.clone(); var minfirstdivclone = minfirstdiv.clone(); var imgtype = enterprisehonor.type; if (imgtype != "undefined" && imgtype == "1"){ var introductiona = maxfirstdivclone.find(".m-pic"); var introductionimg = maxfirstdivclone.find(".wobble-horizontal"); var jumpurl = enterprisehonor.jumpurl; if (jumpurl== 'undifined'){ introductiona.prop("href", jumpurl); }else { introductiona.prop("href", "#"); } introductionimg.prop("src", enterprisehonor.imgsrc); maxdiv.append(maxfirstdivclone); }else { var introductiona = minfirstdivclone.find(".m-pic"); var introductionimg = minfirstdivclone.find(".wobble-vertical"); var jumpurl = enterprisehonor.jumpurl; if (jumpurl== 'undifined'){ introductiona.prop("href", jumpurl); }else { introductiona.prop("href", "#"); } introductionimg.prop("src", enterprisehonor.imgsrc); mindiv.append(minfirstdivclone); } } } utils.ajaxloadcomplate(that); } //====================================================企业荣誉组件结束================end========================= //====================================================品牌实力组件开始=================strst======================== comps.brandpowercomp = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.imagelistmodels = config.imagelistmodels; } comps.brandpowercomp.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid + "_div"); var sondiv = productele.find(".col-xs-6"); productele.html(""); var imagelistmodels = that.imagelistmodels; for (var i = 0; i < imagelistmodels.length; ++i) { var image = imagelistmodels[i]; var newdiv = sondiv.clone(); var defineurl = newdiv.find("#" + compid +"_defineurl"); var introductionimg = newdiv.find("#" + compid +"_img"); var name = newdiv.find("#"+ compid +"_name"); var jumpurl = image.jumpurl; if (jumpurl== 'undifined'){ defineurl.prop("href", jumpurl); }else { defineurl.prop("href", "#"); } introductionimg.prop("src", image.imgsrc); name.html(image.name); productele.append(newdiv); } } utils.ajaxloadcomplate(that); } //====================================================品牌实力组件结束================end========================= //====================================================招聘渠道组件开始=================strst======================== comps.recruitmentchannels = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.imagelistmodels = config.imagelistmodels; } comps.recruitmentchannels.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid +"_div"); var sondiv = productele.find(".col-xs-6").first(); productele.html(""); var imagelistmodels = that.imagelistmodels; for (var i = 0; i < imagelistmodels.length; ++i) { var image = imagelistmodels[i]; var newdiv = sondiv.clone(); if (1 == i) { newdiv.removeclass("col-md-push-2").addclass("col-md-push-3").addclass("checkbox0"); } var title_a = newdiv.find("#" + compid +"_a"); var title_img = newdiv.find("#" + compid +"_img"); var title_name = newdiv.find("#" + compid +"_name"); var jumpurl = image.jumpurl; if (jumpurl== 'undifined'){ title_a.prop("href", jumpurl); }else { title_a.prop("href", "#"); } title_img.prop("src", image.imgsrc); title_name.html(image.name); productele.append(newdiv); } } utils.ajaxloadcomplate(that); } //====================================================招聘渠道组件结束================end========================= //====================================================员工福利组件开始=================strst======================== comps.employeebenefits = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.imagelistmodellist = config.imagelistmodellist; } comps.employeebenefits.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid ); var sondiv = productele.find(".col-xs-12").first(); var sondivmin = productele.find(".col-xs-6").first(); productele.html(""); var imagelist = []; var imagelistmodels = that.imagelistmodellist; for (var i = 0; i < imagelistmodels.length; ++i) { var image = imagelistmodels[i]; var imgtype = image.imgtype; if (imgtype != null && imgtype == '1'){ var newdiv = sondiv.clone(); var title_a = newdiv.find("#" + compid +"_a"); var title_img = newdiv.find("#" + compid +"_img"); var title_name = newdiv.find("#" + compid +"_name"); var title_introduce = newdiv.find("#" + compid +"_introduce"); var jumpurl = image.jumpurl; if (jumpurl== 'undifined'){ title_a.prop("href", jumpurl); }else { title_a.prop("href", "#"); } title_img.prop("src", image.imgsrc); title_name.html(image.name); title_introduce.html(image.introduce); productele.append(newdiv); }else { imagelist.push(imagelistmodels[i]); } } for (var i = 0; i < imagelist.length; ++i) { var imagemin = imagelist[i]; var newdivs = sondivmin.clone(); var title_a = newdivs.find("#" + compid +"_a_1"); var title_img = newdivs.find("#" + compid +"_img_1"); var title_name = newdivs.find("#" + compid +"_name_1"); var title_introduce = newdivs.find("#" + compid +"_introduce_1"); var jumpurl = imagemin.jumpurl; if (jumpurl== 'undifined'){ title_a.prop("href", jumpurl); }else { title_a.prop("href", "#"); } title_img.prop("src", imagemin.imgsrc); var name = imagemin.name; title_name.html(name); title_introduce.html(imagemin.introduce); productele.append(newdivs); } } settimeout(function () { aos.init({ disable: function () { var maxwidth = 992; return window.innerwidth < maxwidth; }, }); }, 0) utils.ajaxloadcomplate(that); } //====================================================员工福利组件结束================end========================= //====================================================社会责任组件开始=================strst======================== comps.socialtaskcomp = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.socialtaskdtolist = config.socialtaskdtolist; } comps.socialtaskcomp.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid + "_div"); var compfirstli = productele.children().first(); productele.html(""); var socialtasklist = that.socialtaskdtolist; for (var i = 0; i < socialtasklist.length; ++i) { var socialtask = socialtasklist[i]; var compfirstliclone = compfirstli.clone(); var socialtask_name = compfirstliclone.find("#" + compid + "_name"); var socialtask_time = compfirstliclone.find("#" + compid + "_time"); var socialtask_message = compfirstliclone.find("#" + compid + "_message"); var socialtask_option = compfirstliclone.find("#" + compid + "_option"); var socialtask_img = compfirstliclone.find("#" + compid + "_img"); var imgsrc = socialtask.imgsrc; socialtask_img.prop("src", imgsrc); var socialtaskname = ''; if (socialtask.contentname != "undefined" && socialtask.contentname != '') { socialtaskname = socialtask.contentname; } socialtask_name.html(socialtaskname); var socialtasktime = ''; if (socialtask.contenttime != "undefined" && socialtask.contenttime != '') { socialtasktime = socialtask.contenttime; } socialtask_time.html(socialtasktime); var socialtaskmessage = ''; if (socialtask.content != "undefined" && socialtask.content != '') { socialtaskmessage = socialtask.content; } socialtask_message.html(socialtaskmessage); var socialtaskoption = '/'; if (socialtask.skipurl != "undefined" && socialtask.skipurl != '') { socialtaskoption = socialtask.skipurl; } socialtask_option.prop("href",socialtaskoption); productele.append(compfirstliclone); } utils.ajaxloadcomplate(that); } } //====================================================社会责任组件结束================end========================= //====================================================责任切换组件开始=================strst======================== comps.channelswitchcomp = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.channelswitchdtolist = config.channelswitchdtolist; } comps.channelswitchcomp.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid + "_div"); var compfirstli = productele.children().first(); productele.html(""); var channelswitchlist = that.channelswitchdtolist; for (var i = 0; i < channelswitchlist.length; ++i) { var channelswitch = channelswitchlist[i]; var compfirstliclone = compfirstli.clone(); var channelswitch_name = compfirstliclone.find("#" + compid + "_name"); var channelswitch_time = compfirstliclone.find("#" + compid + "_time"); var channelswitch_message = compfirstliclone.find("#" + compid + "_message"); var channelswitch_option = compfirstliclone.find("#" + compid + "_option"); var channelswitch_img = compfirstliclone.find("#" + compid + "_img"); var imgsrc = channelswitch.imgsrc; channelswitch_img.prop("src", imgsrc); var channelswitchname = ''; if (channelswitch.contentname != "undefined" && channelswitch.contentname != '') { channelswitchname = channelswitch.contentname; } channelswitch_name.html(channelswitchname); var channelswitchtime = ''; if (channelswitch.contenttime != "undefined" && channelswitch.contenttime != '') { channelswitchtime = channelswitch.contenttime; } channelswitch_time.html(channelswitchtime); var channelswitchmessage = ''; if (channelswitch.content != "undefined" && channelswitch.content != '') { channelswitchmessage = channelswitch.content; } channelswitch_message.html(channelswitchmessage); var channelswitchoption = '/'; if (channelswitch.skipurl != "undefined" && channelswitch.skipurl != '') { channelswitchoption = channelswitch.skipurl; } channelswitch_option.prop("href",channelswitchoption); productele.append(compfirstliclone); } utils.ajaxloadcomplate(that); } that.bindevent(); } comps.channelswitchcomp.prototype.bindevent=function(){ $('.band_slider .flexslider').flexslider({ controlscontainer:".slider_fullscreen_control", animation: "slide", animationloop: false, slideshow: false, pauseonaction: true, pauseonhover: false, animationduration: 600, directionnav: true, start: function () { var flexh = $('.flexslider .m-pic').height(); /* console.log(flexh);*/ $('.band-solid-bottom').height(flexh-64); } }) $(window).resize(function () { var flexh = $('.flexslider .m-pic').height(); $('.band-solid-bottom').height(flexh-64); }) } //====================================================责任切换组件结束================end========================= //====================================================工作机会baner结束================start========================= comps.workbanner = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.imgsrc = config.imgsrc; } comps.workbanner.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_img").prop("src", that.imgsrc); } utils.ajaxloadcomplate(that); } //====================================================工作机会baner结束================end========================= //====================================================品牌介绍地图结束================start========================= comps.mapsection = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.imgsrc = config.imgsrc; this.title = config.title; } comps.mapsection.prototype.init = function() { var that =this; if (this.needasyncinit) { $("#"+that.compid+"_img").prop("src", that.imgsrc); $("#"+that.compid+"_title").html(that.title); } utils.ajaxloadcomplate(that); } //====================================================品牌介绍地图结束================end========================= //====================================================公司理念组件开始=================strst======================== comps.companydirection = function(config){ this.compid = config.compid; this.needasyncinit = config.needasyncinit; this.companydirectionlist = config.companydirectionlist; } comps.companydirection.prototype.init = function() { var that =this; var compid= that.compid; if (this.needasyncinit) { var productele = $("#" + compid +"_div"); var sondiv = productele.find(".col-xs-12").first(); productele.html(""); var companydirectionlist = that.companydirectionlist; for (var i = 0; i < companydirectionlist.length; ++i) { var companydirection = companydirectionlist[i]; var newdiv = sondiv.clone(); var title_logo = newdiv.find("#" + compid +"_logo"); var title_img = newdiv.find("#" + compid +"_img"); var title_title = newdiv.find("#" + compid +"_title"); var title_describe = newdiv.find("#" + compid +"_describe"); var title = companydirection.title; if (title == 'undifined'){ title_title.html(""); }else { title_title.html(title); } var describe = companydirection.describe; if (describe == 'undifined'){ title_describe.html(""); }else { title_describe.html(describe); } title_logo.prop("src", companydirection.logosrc); title_img.prop("src", companydirection.imgsrc); productele.append(newdiv); } } utils.ajaxloadcomplate(that); } //====================================================公司理念组件结束================end=========================