window.BASE_URL="//www.richful.com/rfapi/api/",window.Ajax={post:function(e,t,a){var i=window.localStorage.getItem("language");i="en"===i?i:"cn";var n=window.BASE_URL+e,o=Object.assign({},t);$.ajax({headers:{language:i},type:"POST",url:n,contentType:"application/json; charset=utf-8",data:JSON.stringify(o),dataType:"json",success:function(e){a&&a(e)}})},get:function(e,t,a){var i=window.localStorage.getItem("language");i="en"===i?i:"cn";var n=window.BASE_URL+e;t=Object.assign({},t),$.ajax({headers:{language:i},type:"GET",url:n,data:t,dataType:"json",success:function(e){a&&a(e)}})},getQueryString:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),a=window.location.search.substr(1).match(t);return null!=a?a[2]:null}},window.Services={GetYear:function(e){window.Ajax.get("news/getYear?yearType=news",{},e)},GetBanners:function(e,t){window.Ajax.get("banner/index?bannerType="+e,{},t)},GetNews:function(e,t){var a=Object.assign({categoryId:"",keywords:"",publishYear:"",publishMonth:"",page:1,pageSize:8},e);window.Ajax.get("news/getNewsInfoByCategoryId",a,t)},GetNewsDetail:function(e,t){window.Ajax.get("news/getNewsInfoById?id="+e,{},t)},GetOtherNews:function(e){var t=Object.assign({categoryId:1,keywords:"",publishYear:"",publishMonth:"",page:1,pageSize:3});window.Ajax.get("news/getNewsInfoByCategoryId",t,e)},GetSuperviseInfo:function(e,t){var a=Object.assign({keywords:"",publishYear:"",publishMonth:"",page:1,pageSize:10},e);window.Ajax.get("news/getSuperviseInfoList",a,t)},GetSuperviseInfoDetail:function(e,t){window.Ajax.get("news/getSuperviseById?id="+e,{},t)},GetOtherSupervise:function(e,t){var a=Object.assign({currentId:0,keywords:"",publishYear:"",publishMonth:""},e);window.Ajax.get("news/getNearSupervise",a,t)},GetCategories:function(e){window.Ajax.get("catgory/getCategoryList",{},e)},GetCategorieNews:function(e){window.Ajax.get("catgorynew/getCategoryList",{},e)},GetCategoryDetailByCategoryId:function(e,t){window.Ajax.get("catgory/getCategoryDetailByCategoryId?categoryId="+e,{},t)},GetProducts:function(e,t){var a=Object.assign({page:1,pageSize:10},e);window.Ajax.get("product/getproduct",a,t)},GetProducts2:function(e,t){window.Ajax.get("product/getproduct",e,t)},GetProductDetail:function(e,t){window.Ajax.get("product/getproductbyid?productId="+e,{},t)},GetJobType:function(e){window.Ajax.get("job/getCategoryList",{},e)},GetJobs:function(e,t){var a=Object.assign({page:1,pageSize:10},e);window.Ajax.get("job/joblist",a,t)},GetJobDetail:function(e,t){window.Ajax.get("job/getJobInfoById?jobId="+e,{},t)},GetToken:function(e){window.Ajax.get("basic/getimagecode",{},e)},GetValidImg:function(e){return window.BASE_URL+"basic/captcha.jpg?token="+e},onAddJob:function(e,t){var a=Object.assign({content:"",age:"",email:"",imageCode:"",jobName:"",mobile:"",realName:"",sex:"",token:""},e);window.Ajax.post("job/deliverJob",a,t)},GetJobInfo:function(e,t){window.Ajax.get("job/getJobInfoById?jobId="+e,{},t)},onAddMsg:function(e,t){var a=Object.assign({address:"",content:"",email:"",jobName:"",mobile:"",realName:""},e);window.Ajax.post("basic/sumbitMessage",a,t)},SearchChall:function(e,t){var a=Object.assign({keywords:"",page:1,pageSize:10},e);window.Ajax.get("basic/searchall",a,t)},GetNewCategoryList:function(e,t){var a=Object.assign({},e);window.Ajax.get("catgorynew/getCategoryList",a,t)},GetCity:function(e){window.Ajax.get("station/getCity",{},e)},GetProvince:function(e){window.Ajax.get("station/getProvince",{},e)},GetStation:function(e,t){var a=Object.assign({},e);window.Ajax.get("station/getAll",a,t)},GetCategory2And3List:function(e){window.Ajax.get("catgory/getCategory2And3List",{},e)}},window.Utils={formatDate:function(e){if(e){var t=new Date(e);return`${t.getFullYear()}年${t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1}月${t.getDate()<10?"0"+t.getDate():t.getDate()}日`}return""},getQueryString:function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),a=window.location.search.substr(1).match(t);return null!=a?a[2]:null},formatSubTitle:function(e){var t=e.replace(/<\/?[^>]*>/g,"").replace(/[ | ]*\n/g,"\n").replace(/ /gi,"");return t&&t.length>100?t.substring(0,100)+"...":t},setLangs:function(e,t,a){if(t=t||{},a=a||"PRODUCT_KEYS",e.length)for(var i=0;i '+t.categoryName+" "}));return' '+e.categoryName+"
"+t.join("")+"
"}));localStorage.getItem("language"),$("#navs_products").prepend(t.join("")),$("#navs_products").on("click",".nav-child-product",(function(){var e=$(this).data("value");e&&(location.href="lubricantAdditive.html?id="+e)}))},mobMenu:function(e){var t=$.map(e,(function(e){return''+e.categoryName+""}));$("#mob_products").html(t.join("")),$("#mob_products").on("click","li",(function(){var e=$(this).data("value");e&&(location.href="lubricantAdditive.html?id="+e)}))},h5IndexNews:function(e){var t=e.slice(0,3),a=$.map(t,(function(e,t){return'"}));$("#indexNews").html(a.join(""))},mobIndexNews:function(e){var t=e.slice(0,1),a=e.slice(1),i=$.map(a,(function(e,t){return''}));t.length&&($("#mob_news_first .mobile-news-title").text((1===t[0].newsCategoryId?"行业":"集团")+" "+window.Utils.formatDate(t[0].publisTime)),$("#mob_news_first .mobile-news-p").text(t[0].newsTitle),$("#mob_news_first .mobile-news-b").on("click",(function(){location.href="groupNewsDetail.html?id="+t[0].id}))),$("#mob_news_other").html(i.join("")).on("click",(function(){var e=$(this).data("value");location.href="groupNewsDetail.html?id="+e})),$("#mob_news_more").on("click",(function(){location.href="groupNews.html"}))},init:function(e){window.Pages.__app__.h5Menu(e),window.Pages.__app__.mobMenu(e)},initIndex:function(e){window.Pages.__app__.h5IndexNews(e),window.Pages.__app__.mobIndexNews(e)}},Navs:function(){window.Services.GetCategories((function(e){window.Pages.__app__.init(e.data)}))},NavsAsync:function(){var e=$.Deferred();return window.Services.GetCategories((function(t){e.resolve(t.data)})),e},NavsAsyncNew:function(){var e=$.Deferred();return window.Services.GetCategorieNews((function(t){e.resolve(t.data)})),e},index:function(){window.Pages.Navs(),localStorage.getItem("language"),window.Services.GetBanners(0,(function(e){if(console.log("🚀 ~ file: jquery.request.js:399 ~ window.Services.GetBanners ~ res:",e),e.data&&e.data.length>0){var t=$.map(e.data,(function(e){return''}));$("#indexBanners").html(t.join(""))}$("#indexBanners").on("click",".banner-list-item",(function(){location.href=$(this).data("value")})),new Swiper(".swiper-container",{pagination:".swiper-pagination",paginationClickable:!0,loop:!0,autoplay:5e3,autoplayStopOnLast:!0,bulletClass:"swiper-pagination-bullet",nextButton:".swiper-button-next",prevButton:".swiper-button-prev"})})),window.Services.GetNews({pageSize:4},(function(e){window.Pages.__app__.initIndex(e.data.list)}))},search:function(){window.Pages.Navs(),$("#job_first").on("click",(function(){$("#job_currPage").text(1),window.Pages.searchList({page:1})})),$("#job_prev").on("click",(function(){$("#job_pages").text();var e=$("#job_currPage").text();if(e>1){var t=e-1;$("#job_currPage").text(t),window.Pages.searchList({page:t})}})),$("#job_next").on("click",(function(){var e=$("#job_pages").text(),t=$("#job_currPage").text();if(e>t){var a=t-0+1;$("#job_currPage").text(a),window.Pages.searchList({page:a})}})),$("#job_last").on("click",(function(){var e=$("#job_pages").text();if(e!=$("#job_currPage").text()){var t=e;$("#job_currPage").text(t),window.Pages.searchList({page:t})}})),$("#nav_search_key_btn").on("click",(function(){window.Pages.searchList()})),$("#nav_search_panel").on("click",".search-content-title",(function(){var e=$(this).data("value"),t=$(this).data("type");"product"===t?location.href="catalogueDetail.html?id="+e:"job"===t?location.href="socialRecruitment.html?id="+e:"news"===t&&(location.href="groupNewsDetail.html?id="+e)})),$("#nav_search_panel").on("click",".search-content-content",(function(){var e=$(this).data("value"),t=$(this).data("type");"product"===t?location.href="catalogueDetail.html?id="+e:"job"===t?location.href="socialRecruitment.html?id="+e:"news"===t&&(location.href="groupNewsDetail.html?id="+e)})),window.Pages.searchList()},searchList(e){var t=Object.assign({keywords:$("#nav_search_key").val(),pageSize:4},e);window.Services.SearchChall(t,(function(e){console.log("🚀 ~ file: jquery.request.js:419 ~ window.Services.SearchChall ~ res:",e);var t=e.data.list,a=$.map(t,(function(e,t){return"product"===e.dispType?''+(t+1)+".[产品]"+e.title+'
'+window.Utils.formatSubTitle(e.content)+"
":"news"===e.dispType?''+(t+1)+".[新闻]"+e.title+'
'+window.Utils.formatSubTitle(e.content)+"
":''+(t+1)+".[招聘]"+e.title+'
'+window.Utils.formatSubTitle(e.content)+"
"}));$("#nav_search_panel").html(a.join("")),$("#job_count, #all_count").text(e.data.totalCount),$("#job_pages").text(e.data.totalPage),$("#job_currPage").text(e.data.currPage)}))},companyProfile:function(){window.Pages.Navs()},corporateCulture:function(){window.Pages.Navs()},history:function(){window.Pages.Navs()},groupNews:function(){window.Pages.Navs(),window.Pages.groupNewsList({categoryId:1},"new1"),window.Pages.groupNewsList({categoryId:2},"new2")},groupNewsList:function(e,t){var a=Object.assign({keywords:$("#keywords").val()},e);window.Services.GetNews(a,(function(e){var a=$.map(e.data.list,(function(e,a){var i="";a%4==0&&(i+='"),i}));$("#job_count").text(e.data.totalCount),$("#job_pages").text(e.data.totalPage),$("#job_currPage").text(e.data.currPage),$("#"+t).html(a.join("")).on("click","."+t+"-item",(function(){var e=$(this).data("value");location.href="groupNewsDetail.html?id="+e}))}))},groupNewsContent:function(){window.Pages.Navs();var e=window.Utils.getQueryString("id"),t="",a="",i="",n="",o=localStorage.getItem("language");1==e?(i="en"==o?"group news":"集团新闻",n="/assets/images/news/lb2.jpg"):(i="en"==o?"industry dynamicChart":"行业动态",n="/assets/images/news/industry3.png"),$(".group-news-title").html(i),$(".news-change-img").attr("src",n),window.Services.GetYear((function(e){var i=$.map(e.data,(function(e){return''+e+"
"}));$("#selectItems").html(i.join("")),$("#select").on("click",(function(){$("#selectItems").toggle()})),$("#selectItems div").on("click",(function(){const e=$(this).data("value");t=e,$("#select span").text($(this).text()),$("#selectItems").hide()})),$("#select1").on("click",(function(){$("#selectItems1").toggle()})),$("#selectItems1 div").on("click",(function(){const e=$(this).data("value");a=e,$("#select1 span").text($(this).text()),$("#selectItems1").hide()}))})),$("#job_first").on("click",(function(){$("#job_currPage").text(1),window.Pages.groupNewsList({page:1,publishYear:t,publishMonth:a,categoryId:e},"new1")})),$("#job_prev").on("click",(function(){$("#job_pages").text();var i=$("#job_currPage").text();if(i>1){var n=i-1;$("#job_currPage").text(n),window.Pages.groupNewsList({page:n,publishYear:t,publishMonth:a,categoryId:e},"new1")}})),$("#job_next").on("click",(function(){var i=$("#job_pages").text(),n=$("#job_currPage").text();if(i>n){var o=n-0+1;$("#job_currPage").text(o),window.Pages.groupNewsList({page:o,publishYear:t,publishMonth:a,categoryId:e},"new1")}})),$("#job_last").on("click",(function(){var i=$("#job_pages").text();if(i!=$("#job_currPage").text()){var n=i;$("#job_currPage").text(n),window.Pages.groupNewsList({page:n,publishYear:t,publishMonth:a,categoryId:e},"new1")}})),window.Pages.groupNewsList({page:1,categoryId:e},"new1"),$("#job-panel").on("click",".job-btn",(function(){var e=$(this).data("value");location.href="groupNewsDetail.html?id="+e})),$("#search").on("click",(function(){window.Pages.groupNewsList({page:1,publishYear:t,publishMonth:a,categoryId:e},"new1")}))},groupNewsDetail:function(){window.Pages.Navs(),$("#backList").on("click",(function(){history.go(-1)}));var e=14;$("#btn_small").on("click",(function(){e=e>10?e-2:e,$("#content").find("p").css({fontSize:e+"px"})})),$("#btn_default").on("click",(function(){e=14,$("#content").find("p").css({fontSize:e+"px"})})),$("#btn_big").on("click",(function(){e+=2,$("#content").find("p").css({fontSize:e+"px"})}));var t=window.Utils.getQueryString("id");window.Services.GetNewsDetail(t,(function(e){console.log("🚀 ~ file: jquery.request.js:369 ~ window.Services.GetNewsDetail ~ res:",e.data),$("#title").html(e.data.newsTitle),$("#content").html(e.data.newsContent),$("#date").html(e.data.publisTime),e.data.topImage&&$("#logoSrc").attr("src",e.data.topImage)})),window.Services.GetOtherNews((function(e){var a=[];$.each(e.data.list,(function(e,i){i.id!=t&&a.push(i)}));var i=a.length>0?a[0]:null,n=a.length>1?a[1]:null;i&&($("#pre .detail-more-text").css({cursor:"pointer"}).text(i.newsTitle),$("#pre").on("click",(function(){i.id&&(location.href="groupNewsDetail.html?id="+i.id)}))),n&&($("#next .detail-more-text").css({cursor:"pointer"}).text(n.newsTitle),$("#next").on("click",(function(){n.id&&(location.href="groupNewsDetail.html?id="+n.id)})))}))},lubricantAdditive:function(){window.Pages.NavsAsync().then((function(e){console.log("data",e),window.Pages.__app__.init(e);var t=0,a=window.Utils.getQueryString("id"),i=(a||"").split("-"),n=parseInt(i[0])||"",o=parseInt(i[1])||"";e.forEach((function(e){n!==e.id&&n===e.relatedId&&(n=e.id,o=e.childs[0].id,a=n+"-"+o)})),a&&(window.Pages.lubricantAdditiveNavs(e,0,a),e.length&&window.Pages.lubricantAdditiveList(e,a),$("#tab1").on("click",".lubrican-tab",(function(){t=$(this).data("idx"),a=$(this).data("value"),console.log("index",t),$("#tab1 .lubrican-tab").removeClass("lubrican-tab-active"),$("#tab1 .lubrican-tab:eq("+t+")").addClass("lubrican-tab-active"),window.Pages.lubricantAdditiveNavs(e,t,a),window.Pages.lubricantAdditiveList(e,a),location.href="lubricantAdditive.html?id="+a})),$("#tab1").on("click","li",(function(){a=$(this).data("value"),location.href="lubricantAdditiveDetail.html?id="+a})))}))},lubricantAdditiveNavs:function(e,t,a){t=t||0;var i=a?a.split("-")[0]:0,n=a?a.split("-")[1]:0,o=null,s=[];$.each(e,(function(e,a){var l=$.map(a.childs,(function(a,i){return n&&n==a.id&&(t=e,o=a),{selected:n&&n==a.id,value:a.id,label:a.categoryName}}));s.push({value:a.id,selected:a.id==i,label:a.categoryName,childs:l})}));var l='';return $.each(s,(function(e,t){l+='0?t.childs[0].value:0)+'" class="lubrican-tab'+(t.value==i?" lubrican-tab-active":"")+'">'+t.label+""})),l+="
",l+='',l+="
",$.each(s,(function(e,t){t.selected&&$.each(t.childs,(function(e,a){t.selected&&(l+=(a.selected?'- ':'
- ')+a.label+"
")}))})),l+="
",l+='
',l+="
",$("#tab1").html(l),o},lubricantAdditiveList:function(e,t){var a=null;for(let i=0;i'),i+='",t%3==2&&(i+=""),i}));$("#panel").html(i.join(""))}},lubricantAdditiveDetail:function(){window.Pages.NavsAsync().then((function(e){window.Utils.setLangs(e),window.Pages.__app__.init(e);var t=window.Utils.getQueryString("id"),a=t.split("-"),i={categoryId1:a[0],categoryId2:a[1]};window.Pages.lubricantAdditiveDetailNav(e,0,t),window.Pages.lubricantAdditiveDetailList(i,e)}))},lubricantAdditiveDetailNav:function(e,t,a){var i=window.Pages.lubricantAdditiveNavs(e,0,a);i&&($("#panel_ycontent").show(),$("#panel_yimg").hide(),$("#nav_remark_yy").html(i.remark),$("#logoSrc").attr("src",i.topImage)),$("#tab1").on("click",".lubrican-tab",(function(){index=$(this).data("idx"),a=$(this).data("value"),$("#tab1 .lubrican-tab").removeClass("lubrican-tab-active"),$("#tab1 .lubrican-tab:eq("+index+")").addClass("lubrican-tab-active"),location.href="lubricantAdditive.html?id="+a})),$("#tab1").on("click","li",(function(){a=$(this).data("value"),location.href="lubricantAdditiveDetail.html?id="+a}))},lubricantAdditiveDetailList:function(e,t){$("#panel_yy").html(''),window.Services.GetCategoryDetailByCategoryId(e.categoryId2,(function(t){for(var a=t.data,i=[],n=0;n'+$.map(t,(function(t){return console.log("🚀 ~ file: jquery.request.js:1371 ~ htmlItem ~ item:",e,t),''})).join("")+""}));console.log("🚀 ~ file: jquery.request.js:1007 ~ html ~ html:",o),$("#panel_yy").html(o.join(""))}))},catalogue:function(){window.Pages.NavsAsync().then((function(e){window.Pages.__app__.init(e)}));var e=window.Ajax.getQueryString("id"),t=e?"NavsAsync":"NavsAsyncNew";window.Pages[t]().then((function(t){console.log("🚀 ~ file: jquery.request.js:1087 ~ window.Pages[nextFunc] ~ data:",t);var a="",i=[];t.length>0&&$.each(t,(function(t,n){var o=n.childs.length>0?n.childs[0].id:"";a+="",a+=' ',a+=(null!=n.childs.find((t=>t.id==e))?'
'+n.categoryName+"
",a+='
',a+='
',a+="
",a+="
",n.childs.length>0&&(a+='',$.each(n.childs,(function(t,i){a+='- ',a+=(i.id==e?'
',a+='
'+i.categoryName+"
",a+='
',a+="
",a+="
",a+=" "})),a+="
"),a+="",i.push(''+n.categoryName+"")})),$("#left_navs").html(a),$("#mobile-catalogue").html(i.join("")),$(".L2, .L3").hide(),t.length>0&&$(".catalogue-top").text(t[0].categoryName),t.length>0&&$(".classification-list").html($.map(t[0].childs,(function(e){return''+e.categoryName+""}))),$("#mobile-catalogue").on("click",".catalogue-mobile-item1",(function(e){var a=$(this).data("value").split("-"),i=null;for(let e=0;e'+e.categoryName+""}))));var n=a[0];window.Pages.catalogueList({categoryNewId1:n,categoryId2:""},t,!0),e.stopPropagation()})),$("#left_navs").on("click",".catalogue-left-item1",(function(e){$(".L2").hide();const t=$(this).parent().find(".catalogue-left-icon1");var a="/assets/images/down.png"===$(t).find("img").attr("src"),i=a?"/assets/images/right.png":"/assets/images/down.png";$(".catalogue-left-icon1").find("img").attr("src","/assets/images/down.png"),$(t).find("img").attr("src",i),a?$(t).parent().parent().find("ul").show():$(t).parent().parent().find("ul").hide()})),$("#left_navs").on("click",".catalogue-left-icon1",(function(e){$(".L2").hide();var t="/assets/images/down.png"===$(this).find("img").attr("src"),a=t?"/assets/images/right.png":"/assets/images/down.png";$(".catalogue-left-icon1").find("img").attr("src","/assets/images/down.png"),$(this).find("img").attr("src",a),t?$(this).parent().parent().find("ul").show():$(this).parent().parent().find("ul").hide()})),$("#left_navs").on("click",".catalogue-left-icon2",(function(e){$(".L3").hide();var t="/assets/images/down.png"===$(this).find("img").attr("src"),a=t?"/assets/images/right.png":"/assets/images/down.png";$(".catalogue-left-icon2").find("img").attr("src","/assets/images/down.png"),$(this).find("img").attr("src",a),t?$(this).parent().parent().find("ul").show():$(this).parent().parent().find("ul").hide()})),$("#left_navs").on("click",".catalogue-left-item2",(function(e){var a=$(this).data("value").split("-");categoryId1=a[0],categoryId2=a[1];var i=null;for(let e=0;e1){var a=e-1;$("#job_currPage").text(a),window.Pages.catalogueList({page:a,keywords:$("#search").val()},t)}})),$("#job_next").on("click",(function(){var e=$("#job_pages").text(),a=$("#job_currPage").text();if(e>a){var i=a-0+1;$("#job_currPage").text(i),window.Pages.catalogueList({page:i,keywords:$("#search").val()},t)}})),$("#job_last").on("click",(function(){var e=$("#job_pages").text();if(e!=$("#job_currPage").text()){var a=e;$("#job_currPage").text(a),window.Pages.catalogueList({page:a,keywords:$("#search").val()},t)}})),$("#search_btn").on("click",(function(){var e=$("#search").val();window.Pages.catalogueList({keywords:e},t)})),window.Pages.catalogueList({},t)}))},lubricantAdditiveCatalogueData:function(e){window.Services.GetCategorieNews((function(t){var a=t.data,i=_.flattenDeep(function e(t,a,i){return t.reduce((function(t,n){return n.level=a,n.ids=i.concat(n.id),t.concat(n).concat(e(n.childs||[],a+1,i.concat(n.id)))}),[])}(a,1,[]));window.flatdata=i;var n="",o=[],s=(location.hash||"").replace("#","").split("-");function l(e){var t=(_.find(i,{id:parseInt(e)})||{}).childs||[],a=$.map(t,(function(e){return['",e.categoryName,""].join("")})).join("");$(".classification-list").html(a)}function c(e,t){var i=e.attr("level"),n=e.attr("cid"),o={};o["categoryNewId"+i]=n,window.Pages.catalogueListByLubricantAdditive(o,a),t&&l(n)}function r(){window.Pages.catalogueListByLubricantAdditive(void 0,a,!0)}if(a.length>0&&$.each(a,(function(t,a){var i=a.childs||[],l=a.childs.length>0?a.childs[0].id:"";n+='',n+=' ',n+=(null!=a.childs.find((t=>t.id==e))?'
'+a.categoryName+"
",i.length&&(n+='
',n+='
',n+="
"),n+="
",a.childs.length>0&&(n+='',$.each(a.childs,(function(e,t){var i=t.childs||[];n+='- ',n+=(t.id,'
'),n+='
'+t.categoryName+"
",n+='
',i.length&&(n+='
'),n+="
",n+="
",i.length&&(n+='',$.each(i,(function(e,t){n+='- ',n+=(t.id,'
'),n+='
'+t.categoryName+"
",n+='
',n+="
",n+="
",n+=" "})),n+="
")})),n+="
"),n+="",o.push(''+a.categoryName+"")})),$("#left_navs").html(n),$("#mobile-catalogue").html(o.join("")),$(".L2, .L3").hide(),$("#mobile-catalogue").on("click",".catalogue-mobile-item1",(function(e){$(".catalogue-top").text($(this).html()),window.Pages.catalogueListByLubricantAdditive({categoryNewId1:$(this).attr("data-value")},a)})),$(".classification-list").on("click",".classification-item",(function(){c($(this))})),$("#left_navs").on("click",".catalogue-left-item",(function(){var e=$(this),t=e.next("ul");if(t.length){t.toggle();var a=t.is(":hidden");e.find("img").prop("src",a?"/assets/images/down.png":"/assets/images/right.png")}else $("#left_navs .catalogue-left-item").removeClass("actived"),$("#left_navs .catalogue-left-text").removeClass("actived"),e.addClass("actived");c(e.parent("li"),!0)})),$("#search_btn").on("click",(function(){var e=$("#search").val();window.Pages.catalogueListByLubricantAdditive({keywords:e},a)})),$("#job_first").on("click",(function(){window.Pages.currentPagination.page=1,r()})),$("#job_prev").on("click",(function(){1!==window.Pages.currentPagination.page&&(window.Pages.currentPagination.page--,r())})),$("#job_next").on("click",(function(){window.Pages.currentPagination.page!==window.Pages.totalPage&&(window.Pages.currentPagination.page++,r())})),$("#job_last").on("click",(function(){window.Pages.currentPagination.page!==window.Pages.totalPage&&(window.Pages.currentPagination.page=window.Pages.totalPage,r())})),_.compact(s).length){let e=s[0],t=s[1],n=e||t;var d=_.find(i,{id:parseInt(n)});if(d||(d=_.find(i,{relatedId:parseInt(n)})),d){l(d.id);var g={};g["categoryNewId"+d.level]=n,window.Pages.catalogueListByLubricantAdditive(g,a),$.each(d.ids,(function(e,t){$('#left_navs [cid="'+t+'"] > ul').toggle()}))}}else if(a.length){var u=a[0].id;l(u),window.Pages.catalogueListByLubricantAdditive({categoryNewId1:u},a)}}))},lubricantAdditiveCatalogue:function(){var e=window.Ajax.getQueryString("id");window.Pages.NavsAsync().then((function(e){window.Pages.__app__.init(e)})),window.Pages.lubricantAdditiveCatalogueData(e)},catalogueIcons:function(e,t){var a={HTML5:{},MOBLIE:{}};return t.ico1&&t.ico2?a.HTML5='':a.HTML5='',t.ico2?a.MOBLIE='':a.MOBLIE='',a},catalogueList:function(e,t,a){var i=Object.assign({categoryNewId1:"",categoryNewId2:"",keywords:"",page:1,pageSize:10},e),n=localStorage.getItem("language"),o="",s="",l="";window.Services.GetProducts(i,(function(e){var a=e.data.list,c=e.data.totalCount||0;console.log("🚀 ~ LV3:",a),"en"==n?(o="product description",l="Filter Total "+c+" Products"):(o="查看产品说明",l="筛选 共"+c+"个产品"),$("#product-filter").html(l);var r=$.map(a,(function(e){return e.categoryId1,e.categoryId2,''+((s=window.Pages.catalogueIcons(t,e)).HTML5||"")+'
'+e.productName+'
'+o+'
'})),d=$.map(a,(function(e){return e.categoryId1,e.categoryId2,s=window.Pages.catalogueIcons(t,e),''}));$("#job_count").text(e.data.totalCount),$("#job_pages").text(e.data.totalPage),$("#job_currPage").text(e.data.currPage),$("#right_panel").html(r.join("")),$("#right_panel_mobile").html(d.join("")),$("#right_panel").on("click",".catalogue-btn",(function(){var e=$(this).data("value");location.href="catalogueDetail.html?id="+e})),$("#right_panel_mobile").on("click",".search-mobile-box",(function(){var e=$(this).data("value");location.href="catalogueDetail.html?id="+e})),""==i.categoryNewId1&&""==i.categoryNewId2||i.categoryNewId2}))},currentPagination:{},totalPage:0,catalogueListByLubricantAdditive:function(e,t,a){if(e.categoryNewId1){let t=parseInt(e.categoryNewId1),a=_.find(flatdata,{id:t});a||(a=_.find(flatdata,{relatedId:t})),a&&(e.categoryNewId1=a.id)}if(e.categoryNewId2){let t=parseInt(e.categoryNewId2),a=_.find(flatdata,{id:t});a||(a=_.find(flatdata,{relatedId:t})),a&&(e.categoryNewId2=a.id)}window.location.hash=[e.categoryNewId1||"",e.categoryNewId2||""].join("-"),a?e=window.Pages.currentPagination:window.Pages.currentPagination=Object.assign({page:1,pageSize:10},e);var i=localStorage.getItem("language"),n="",o="";window.Services.GetProducts2(window.Pages.currentPagination,(function(e){var a=e.data.list,s=e.data.totalCount||0;window.Pages.totalPage=e.data.totalPage,o="en"==i?"Filter Total "+s+" Products":"筛选 共"+s+"个产品",$("#product-filter").html(o);var l=$.map(a,(function(e){return e.categoryId1,e.categoryId2,''+((n=window.Pages.catalogueIcons(t,e)).HTML5||"")+'
'+e.productName+"
"})),c=$.map(a,(function(e){return e.categoryId1,e.categoryId2,n=window.Pages.catalogueIcons(t,e),'"}));$("#job_count").text(e.data.totalCount),$("#job_pages").text(e.data.totalPage),$("#job_currPage").text(e.data.currPage),$("#right_panel").html(l.join("")),$("#right_panel_mobile").html(c.join("")),$("#right_panel").on("click",".catalogue-btn",(function(){var e=$(this).data("value");location.href="catalogueDetail.html?id="+e})),$("#right_panel_mobile").on("click",".search-mobile-box",(function(){var e=$(this).data("value");location.href="catalogueDetail.html?id="+e}))}))},catalogueDetail:function(){window.Pages.Navs(),$("#call_back").on("click",(function(){history.go(-1)}));var e=Utils.getQueryString("id");window.Services.GetProductDetail(e,(function(e){console.log("🚀 ~ file: jquery.request.js:1733 ~ window.Services.GetProductDetail ~ res:",e),window.Utils.setLangs([e.data],{},"CATALOGUE_DETAIL_KEY"),e.data.categorynewName1?$("#navTitle1").text(e.data.categorynewName1):$("#navTitle1").parent().remove(),e.data.categorynewName2?$("#navTitle2").text(e.data.categorynewName2):$("#navTitle2").parent().remove(),e.data.categorynewName3?$("#navTitle3").text(e.data.categorynewName3):$("#navTitle3").parent().remove(),$("#title").text(e.data.productName),$("#desc").text(e.data.productCode||""),$("#content1").html(e.data.content||""),$("#content2").html(e.data.config||""),$("#content3").html(e.data.packageInfo||"")}))},talentPolicy:function(){window.Pages.Navs()},resumeDelivery:function(){window.Pages.Navs();var e="",t={content:"",age:"",email:"",imageCode:"",jobName:"",mobile:"",realName:"",sex:"",token:""};window.Services.GetToken((function(a){t.token=a.data,e=a.data;var i=window.Services.GetValidImg(a.data);$("#validImg").attr("src",i)})),$("#sex").on("click",(function(){$("#sexItems").toggle()})),$("#sexItems div").on("click",(function(){const e=$(this).data("value");t.sex=e,$("#sex span").text($(this).text()),$("#sexItems").hide()})),$("#changeImage, #validImg").on("click",(function(){window.Services.GetToken((function(a){t.token=a.data,e=a.data;var i=window.Services.GetValidImg(a.data);$("#validImg").attr("src",i)}))})),$("#btnSubmit").on("click",(function(){t.realName=$("#realName").val(),t.mobile=$("#mobile").val(),t.email=$("#email").val(),t.jobName=$("#jobName").val(),t.age=$("#age").val(),console.log("🚀 ~ file: jquery.request.js:1321 ~ $ ~ param.sex:",t.sex),t.content=$("#content").val(),t.imageCode=$("#imageCode").val(),t.token=e;var a=!0;$(".inp, #sex, #content, #imageCode").removeClass("error"),t.realName||($("#realName").addClass("error"),a=!1),t.mobile||($("#mobile").addClass("error"),a=!1),t.email||($("#email").addClass("error"),a=!1),t.jobName||($("#jobName").addClass("error"),a=!1),""!==t.sex&&void 0!==t.sex&&null!==t.sex||($("#sex").addClass("error"),a=!1),t.age||($("#age").addClass("error"),a=!1),t.content||($("#content").addClass("error"),a=!1),t.imageCode||($("#imageCode").addClass("error"),a=!1),a&&window.Services.onAddJob(t,(function(e){0===e.code||0===e.errno?($("#realName").val(""),$("#mobile").val(""),$("#email").val(""),$("#jobName").val(""),$("#age").val(""),$("#content").val(""),$("#imageCode").val(""),$("#sex span").text("性别"),t={content:"",age:"",email:"",imageCode:"",jobName:"",mobile:"",realName:"",sex:"",token:""},layer.msg("提交成功")):layer.msg(e.msg||e.errmsg)}))})),$("#btnReset").on("click",(function(){$(".inp, #sex, #content, #imageCode").removeClass("error"),$("#realName").val(""),$("#mobile").val(""),$("#email").val(""),$("#jobName").val(""),$("#age").val(""),$("#content").val(""),$("#imageCode").val(""),$("#sex span").text("性别"),t={content:"",age:"",email:"",imageCode:"",jobName:"",mobile:"",realName:"",sex:"",token:""}}))},interactiveCommunication:function(){window.Pages.Navs()},regulatoryDynamics:function(){window.Pages.Navs();var e="",t="";window.Services.GetYear((function(a){var i=$.map(a.data,(function(e){return''+e+"
"}));$("#selectItems").html(i.join("")),$("#select").on("click",(function(){$("#selectItems").toggle()})),$("#selectItems div").on("click",(function(){const t=$(this).data("value");e=t,$("#select span").text($(this).text()),$("#selectItems").hide()})),$("#select1").on("click",(function(){$("#selectItems1").toggle()})),$("#selectItems1 div").on("click",(function(){const e=$(this).data("value");t=e,$("#select1 span").text($(this).text()),$("#selectItems1").hide()}))})),$("#job_first").on("click",(function(){$("#job_currPage").text(1),window.Pages.regulatoryDynamicsList({page:1,publishYear:e,publishMonth:t})})),$("#job_prev").on("click",(function(){$("#job_pages").text();var a=$("#job_currPage").text();if(a>1){var i=a-1;$("#job_currPage").text(i),window.Pages.regulatoryDynamicsList({page:i,publishYear:e,publishMonth:t})}})),$("#job_next").on("click",(function(){var a=$("#job_pages").text(),i=$("#job_currPage").text();if(a>i){var n=i-0+1;$("#job_currPage").text(n),window.Pages.regulatoryDynamicsList({page:n,publishYear:e,publishMonth:t})}})),$("#job_last").on("click",(function(){var a=$("#job_pages").text();if(a!=$("#job_currPage").text()){var i=a;$("#job_currPage").text(i),window.Pages.regulatoryDynamicsList({page:i,publishYear:e,publishMonth:t})}})),window.Pages.regulatoryDynamicsList({page:1}),$("#job-panel").on("click",".job-btn",(function(){var e=$(this).data("value");location.href="regulatoryDynamicsDetail.html?id="+e})),$("#search").on("click",(function(){window.Pages.regulatoryDynamicsList({page:1,publishYear:e,publishMonth:t})}))},regulatoryDynamicsList:function(e){var t=Object.assign({keywords:$("#keywords").val(),publishYear:$("#publishYear").val(),publishMonth:$("#publishMonth").val()},e);window.Services.GetSuperviseInfo(t,(function(e){var t=e.data.list,a=$.map(t,(function(e){return'"}));$("#job_count").text(e.data.totalCount),$("#job_pages").text(e.data.totalPage),$("#job_currPage").text(e.data.currPage),$("#job-panel").html(a.join(""))}))},regulatoryDynamicsDetail:function(){window.Pages.Navs();var e=window.Utils.getQueryString("id");window.Services.GetSuperviseInfoDetail(e,(function(e){$("#title").html(e.data.newsTitle||e.data.newTitle||""),$("#content").html(e.data.newsContent||"")})),window.Services.GetOtherSupervise({currentId:e},(function(e){const t=e.data.pre,a=e.data.next;t&&($("#pre .re-detail-more").text(t.newsTitle),$("#pre").on("click",(function(){t.id&&(location.href="regulatoryDynamicsDetail.html?id="+t.id)}))),a&&($("#next .re-detail-more").css({cursor:"pointer"}).text(a.newsTitle),$("#next").on("click",(function(){a.id&&(location.href="regulatoryDynamicsDetail.html?id="+a.id)})))}))},socialRecruitment:function(){window.Pages.Navs(),window.Services.GetJobType((function(e){var t;t="en"==localStorage.getItem("language")?'Categories:
All
':'职位分类:
所有
';var a=$.map(e.data,(function(e){return''+e.categoryName+"
"}));$("#job_tab").html(t+a.join(""))})),$("#job_tab").on("click",".hd:gt(0)",(function(){$("#job_tab .hd").removeClass("hd-active");var e=$(this).addClass("hd-active").data("value");$("#job_currPage").text(1),window.Pages.socialRecruitmentList({page:1,categoryId:e})})),$("#job_first").on("click",(function(){$("#job_currPage").text(1),window.Pages.socialRecruitmentList({page:1,categoryId:$("#job_tab .hd-active").data("value")})})),$("#job_prev").on("click",(function(){$("#job_pages").text();var e=$("#job_currPage").text();if(e>1){var t=e-1;$("#job_currPage").text(t),window.Pages.socialRecruitmentList({page:t,categoryId:$("#job_tab .hd-active").data("value")})}})),$("#job_next").on("click",(function(){var e=$("#job_pages").text(),t=$("#job_currPage").text();if(e>t){var a=t-0+1;$("#job_currPage").text(a),window.Pages.socialRecruitmentList({page:a,categoryId:$("#job_tab .hd-active").data("value")})}})),$("#job_last").on("click",(function(){var e=$("#job_pages").text();if(e!=$("#job_currPage").text()){var t=e;$("#job_currPage").text(t),window.Pages.socialRecruitmentList({page:t,categoryId:$("#job_tab .hd-active").data("value")})}})),window.Pages.socialRecruitmentList({page:1,categoryId:$("#job_tab .hd-active").data("value")}),$("#job-panel").on("click",".table-body",(function(){var e=$(this).find(".job_detail").text();e="+"==e?"-":"+",$(this).find(".job_detail").text(e),$(this).next().slideToggle("slow")})),$("#job-panel").on("click",".job-btn",(function(){var e=$(this).data("value");location.href="resumeDelivery.html?id="+e}))},socialRecruitmentList:function(e){window.Services.GetJobs(e,(function(e){console.log("🚀 ~ file: jquery.request.js:249 ~ window.Services.GetJobType ~ res:",e);var t=localStorage.getItem("language"),a="岗位职责:",i="Job requirements:",n="Resume Delivery";"en"==t?(a="Job responsibilities:",i="Job requirements:",n="Resume Delivery"):(a="岗位职责:",i="任职要求:",n="简历投递");var o=e.data.list,s=$.map(o,(function(e){return''+(e.jobName||"")+'
'+(e.categoryName||"")+'
'+(e.hcCount||"")+'
+
'+a+'
'+(e.jobDuty||"")+'
'+i+'
'+(e.jobRequire||"")+'
'+n+'
'}));$("#job_count").text(e.data.totalCount),$("#job_pages").text(e.data.totalPage),$("#job_currPage").text(e.data.currPage),$("#job-panel").html(s.join(""))}))},contactUs:function(){window.Pages.Navs()},onlineMessage:function(){window.Pages.Navs();var e={content:"",address:"",email:"",imageCode:"",jobName:"",mobile:"",realName:""};window.Services.GetToken((function(t){t.data,e.token=t.data;var a=window.Services.GetValidImg(t.data);$("#validImg").attr("src",a)})),$("#changeImage, #validImg").on("click",(function(){window.Services.GetToken((function(t){e.token=t.data,t.data;var a=window.Services.GetValidImg(t.data);$("#validImg").attr("src",a)}))})),$("#btnSubmit").on("click",(function(){e.realName=$("#realName").val(),e.mobile=$("#mobile").val(),e.email=$("#email").val(),e.jobName=$("#jobName").val(),e.address=$("#address").val(),e.content=$("#content").val(),e.imageCode=$("#imageCode").val();var t=!0;$(".inp, #content, #imageCode").removeClass("error"),e.realName||($("#realName").addClass("error"),t=!1),e.mobile||($("#mobile").addClass("error"),t=!1),e.email||($("#email").addClass("error"),t=!1),e.jobName||($("#jobName").addClass("error"),t=!1),e.address||($("#address").addClass("error"),t=!1),e.content||($("#content").addClass("error"),t=!1),e.imageCode||($("#imageCode").addClass("error"),t=!1),t&&window.Services.onAddMsg(e,(function(t){0===t.code||0===t.errno?($("#realName").val(""),$("#mobile").val(""),$("#email").val(""),$("#jobName").val(""),$("#address").val(""),$("#content").val(""),$("#imageCode").val(""),e={content:"",email:"",imageCode:"",jobName:"",mobile:"",realName:"",addresss:""},layer.msg("提交成功")):layer.msg(t.msg||t.errmsg)}))})),$("#btnReset").on("click",(function(){$(".inp, #content, #imageCode").removeClass("error"),$("#realName").val(""),$("#mobile").val(""),$("#email").val(""),$("#jobName").val(""),$("#address").val(""),$("#content").val(""),$("#imageCode").val(""),e={content:"",email:"",imageCode:"",jobName:"",mobile:"",realName:"",addresss:""}}))},map:function(){var e,t=[],a=[];function i(){console.log(e),"en"==localStorage.getItem("language")?function(){e?(console.log(a.length),console.log(t.length),e.remove(a)):e=new AMap.Map("map-detail",{zoom:3,center:[130.057346,17.778263],resizeEnable:!0,expandZoomRange:!0,lang:"en"});for(var i=new AMap.InfoWindow({offset:new AMap.Pixel(0,-30)}),n=0;n0&&(n=t[0].point.split("|")[0],o=t[0].point.split("|")[1]);var s=new BMap.Point(n,o);e.centerAndZoom(s,5),window.map=e}(),e.enableDragging(),e.enableScrollWheelZoom(),e.enableDoubleClickZoom(),e.enableKeyboard(),function(){var t=new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_LARGE});e.addControl(t);var a=new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});e.addControl(a)}(),function(){for(var a=0;a'+i.stationName+"
"+l+i.phone+"
"+s+i.province+i.city+(i.area||"")+(i.address||""),point:i.latitude+"|"+i.longitude,isOpen:0,icon:{w:23,h:25,l:23,t:21,x:9,lb:12}}),a+='',a+='
',a+='
',a+="\t"+i.stationName+"",a+="
",a+="
"+s+i.province+i.city+(i.area||"")+(i.address||"")+"
",a+="
"+l+i.phone+"
",a+="
"}))}i(),$("#mapBox").html(a).on("click",".map-box-item",(function(){var e=$(this).data("value");console.log("🚀 ~ file: jquery.request.js:2099 ~ $ ~ json:",e)}))})),window.Services.GetCity((function(e){var t=e.data,a=$.map(t,(function(e){return'"})).join("");$("#txtCity").append(a),$("#txtCity").easyDropDown("destroy"),$("#txtCity").easyDropDown(),window.Services.GetProvince((function(e){var t=e.data;$("#txtProvince").append($.map(t,(function(e){return'"})).join("")),$("#txtProvince").easyDropDown("destroy"),$("#txtProvince").easyDropDown()}))})),$("#searchMap").on("click",(function(){var e=$("#txtCity").val(),a=$("#txtProvince").val();window.Services.GetStation({city:e,province:a},(function(e){var a="";if(0===e.errno){t=[];var n=e.data;$.each(n,(function(e,i){t.push({id:i.id,title:i.stationName,content:''+i.stationName+"
电话:"+i.phone+"
地址:"+i.province+i.city+(i.area||"")+(i.address||""),point:i.latitude+"|"+i.longitude,isOpen:0,icon:{w:23,h:25,l:23,t:21,x:9,lb:12}}),a+='',a+='
',a+='
',a+="\t"+i.stationName+"",a+="
",a+="
"+s+i.province+i.city+(i.area||"")+(i.address||"")+"
",a+="
"+l+i.phone+"
",a+="
"}))}$("#mapBox").html(a),i()}))}))}},$((function(){window.PAGE_MENU_CLASS&&($(".menu-list-right").find("."+window.PAGE_MENU_CLASS).addClass("menu-active"),$(".mobile-menu").find("."+window.PAGE_MENU_CLASS).addClass("mobile-left-line"))}));