2 lines
36 KiB
JavaScript
2 lines
36 KiB
JavaScript
(function(){var He=/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent),_e=parseInt($(window).width()),ue=n("isnorelated")?parseInt(n("isnorelated")):0,ne=["/static/chatroom/js/xgplayer/xgplayer.js","/static/common/live/xgplayer-flv.js","/static/common/live/xgplayer-hls.js","/static/chatroom/video/playerreview.js"],me=["\u9762\u8BAE","2\u5343\u4EE5\u4E0B","2-3\u5343","3-4.5\u5343","4.5-6\u5343","6-8\u5343","0.8-1\u4E07","1-1.5\u4E07","1.5-2\u4E07","2-3\u4E07","3-4\u4E07","5\u4E07\u4EE5\u4E0A"],ge=["\u4E0D\u9650","1-2\u5E74","2-3\u5E74","3-5\u5E74","5\u5E74\u4EE5\u4E0A"],he=["\u4E0D\u9650","\u793E\u62DB","\u6821\u62DB"],xe=["\u4E0D\u9650","\u5168\u804C","\u517C\u804C"],ye=["\u4E0D\u9650","\u5C0F\u5B66","\u521D\u4E2D","\u9AD8\u4E2D","\u4E2D\u4E13","\u5927\u4E13","\u672C\u79D1","\u7855\u58EB","\u535A\u58EB","\u5176\u4ED6"],be=cdnPath=="//pre-static.1x.cn"?"https://pre.xx.cn":cdnPath=="//static.wxbig.cn"?location.origin:"https://test.1x.cn",we=parseInt(n("mobile")||n("mobile100")||0),B=n("targetServerNameForOverride")?"&targetServerNameForOverride="+n("targetServerNameForOverride"):"",Ae=n("p"),Be=n("r"),Ie=Ae&&Be?1:0,G=K("w")||K("kf")||Ie?parseInt(K("w")||K("kf")||Ie):0,cr=n("kf")?parseInt(n("kf")):0,h={},P=0,W=1,I=60,J,ke=0,E=0,se=we?0:1,$e,Se,Te,Ce,Le=4,b="",z=0,Ge=$(".curriculum").width(),We=(Ge-(Le-1)*12)/Le,V=[],j=0,R=!1;if(n("token")&&Pe("token",decodeURIComponent(n("token"))),n("vctoken")&&Pe("vctoken",decodeURIComponent(n("vctoken"))),!w("vxtoken")&&G&&(f()==1||f()==9)){window.localStorage.setItem("isreport",1),je();return}else if(!w("vxtoken")&&G&&!(f()==1||f()==9||f()==5)){window.localStorage.setItem("isreport",1),window.location.replace(be+"/pages/wxwebauthorize.html?infohref="+encodeURIComponent(decodeURIComponent(window.location.href)));return}else w("vxtoken")&&G?$.ajax({headers:{},type:"GET",url:"/api/vcard/getVCardInfo",data:{targetServerNameForOverride:n("targetServerNameForOverride")||void 0},dataType:"json",async:!1,success:function(r){if(r.code==200&&r.success){var e=r.data||{};h=e.vCardInfo||{},P=1,W=h.authMobile,window.localStorage.setItem("visitingCardIdStr",h.visitingCardIdStr||""),window.localStorage.setItem("visitingCardavatar",h.avatar||""),window.localStorage.setItem("visitingCardName",h.cardName||""),window.localStorage.setItem("visitingCardsex",h.sex||"")}else if(f()==1||f()==9){window.localStorage.setItem("isreport",1),je();return}else if(!(f()==1||f()==9||f()==5)){window.localStorage.setItem("isreport",1),window.location.replace(be+"/pages/wxwebauthorize.html?infohref="+encodeURIComponent(decodeURIComponent(window.location.href)));return}}}):w("token")&&$.ajax({headers:{token:w("token")},type:"GET",url:"/api/vcard/getVCardInfo",data:{targetServerNameForOverride:n("targetServerNameForOverride")||void 0},dataType:"json",async:!1,success:function(r){if(r.code==200&&r.success){var e=r.data||{};h=e.vCardInfo||{},P=1,W=h.authMobile,window.localStorage.setItem("visitingCardIdStr",h.visitingCardIdStr||""),window.localStorage.setItem("visitingCardavatar",h.avatar||""),window.localStorage.setItem("visitingCardName",h.cardName||""),window.localStorage.setItem("visitingCardsex",h.sex||"")}}});if(!(f()==5||window.frames.length!=parent.frames.length)&&!$("#customerService").length&&($(".sharesource").after("<div id='customerService'></div>"),document.write('<link rel="stylesheet" href="/portal/customerService/umi.css">'),document.write('<script type="text/javascript" charset="utf-8" src="/portal/customerService/umi.js"></script>')),(f()==4||f()==5||f()==1||f()==2)&&($(".head,.foot").remove(),f()==5&&($(".inforht").remove(),$(".inforpm").css({"margin-top":"14px"}))),!n("associated")&&location.pathname.indexOf("pubinfo")>-1&&(window.localStorage.appAdapt==="true"||window.localStorage.appAdapt===!0)&&($(".sharesource").after("<div id='pubinfobind'></div>"),document.write('<link rel="stylesheet" href="/portal/pubinfobind/umi.css">'),document.write('<script type="text/javascript" charset="utf-8" src="/portal/pubinfobind/umi.js"></script>')),n("associated")&&location.pathname.indexOf("pubinfo")>-1){var Je=new Base64,Ye=decodeURIComponent(n("associated")),Y=JSON.parse(Je.decode(Ye))||{};$e=Y.bindinfo||void 0,Se=Y.bindcourse||void 0,Te=Y.bindshop||void 0,Ce=Y.bindform||void 0}$(".coursemain img").each(function(r){var e=$(this),t,a;$("<img/>").attr("src",$(e).attr("src")).load(function(){t=this.width,a=this.height,t>=_e&&$(e).css("width","100%").css("height","auto"),t<1200&&$(e).css("width",t+"px").css("height",a+"px")})}),Date.prototype.format=function(r){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(r)&&(r=r.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var t in e)new RegExp("("+t+")").test(r)&&(r=r.replace(RegExp.$1,RegExp.$1.length==1?e[t]:("00"+e[t]).substr((""+e[t]).length)));return r};function ze(){$.ajax({type:"GET",headers:{token:w("token")},url:"/api/common/getHomepageDetail?projectid=41",contentType:"application/json",dataType:"json",data:{commonHomepageInfoId:D()||n("aid")||F(),infoId:$e,courseId:Se,shopId:Te,formId:Ce,targetServerNameForOverride:n("targetServerNameForOverride")||void 0},async:!0,success:function(r){if(!r.success)return r.code=="401"?layer.open({content:"\u8BE5\u8D44\u8BAF\u4EC5\u767B\u5F55\u7528\u6237\u67E5\u770B",btn:"\u786E\u5B9A",yes:function(i){layer.close(i),user.loginLayer(function(o){parseInt(o.code)==200&&ze()})}}):layer.open({content:"\u8D44\u8BAF\u4E0D\u5B58\u5728",btn:"\u786E\u5B9A"}),!1;var e=r.data,t=e.praiseCount||0;window.information_sourceType=rr(e.infoType),window.information_busType=e.infoType,window.information_sourceId=D()||n("aid")||F();var a=e.praised||!1,d=e.infoSource||{url:""},c=e.title,u=e.showTime?H(e.gmtModifiedTs||e.gmtCreate):"";if($("title").text(c),$(".inforht").text(c),d.url.indexOf("mp.weixin")>-1&&$(".coursemain").addClass("weixinBox"),e.infoType=="0"&&e.infoUrl&&window.location.replace(e.infoUrl),reportVisitLog&&reportVisitLog.init("","","",1),He)if(e.infoType=="2"){for(var v=e.employAreaList||[],x="",T,de=H(e.gmtModifiedTs||e.gmtCreate),O=0;O<v.length;O++)T=O>0?"/":"",x+=T+v[O].areaName;$(".inforpm").html('<span style="padding:0px 12px 0px 0px;border-right: 1px solid #999;">'+ge[parseInt(e.employExp)]+'\u5DE5\u4F5C\u7ECF\u9A8C</span><span style="padding:0px 12px;border-right: 1px solid #999;">'+ye[parseInt(e.employDegree)]+'</span><span style="padding: 0px 12px ;border-right: 1px solid #999;">'+xe[parseInt(e.employNature)]+'</span><span style="padding: 0px 12px ;border-right: 1px solid #999;">'+he[parseInt(e.employFrom)]+'</span><span style="padding: 0px 12px ;">'+de+"</span><div style='color:#FF5400;font-size:20px;margin-top:12px;'>"+me[parseInt(e.employWage)]+"/\u6708</div>"),$(".inforht,.inforpm").css("textAlign","left")}else{var u=e.showTime?H(e.gmtModifiedTs||e.gmtCreate):"";$(".inforpm").css("textAlign","left"),$(".inforpm").html('<span style="color:rgba(0,0,0,0.3);">'+u+"</span>"+(e.state=="4"||e.state=="5"?"":'<span style="float: inherit;margin-left:12px;" class="curshare">\u5206\u4EAB</span>'))}else if(e.infoType=="2"){for(var v=e.employAreaList||[],x="",T,de=H(e.gmtModifiedTs||e.gmtCreate),O=0;O<v.length;O++)T=O>0?"/":"",x+=T+v[O].areaName;$(".inforpm").html((x?'<span style="padding-right: 12px;border-right: 1px solid #999;">'+x+"</span>":"")+'<span style="padding:0px 12px;border-right: 1px solid #999;">'+ge[parseInt(e.employExp)]+'\u5DE5\u4F5C\u7ECF\u9A8C</span><span style="padding:0px 12px;border-right: 1px solid #999;">'+ye[parseInt(e.employDegree)]+'</span><span style="padding: 0px 12px ;border-right: 1px solid #999;">'+(parseInt(e.employNumber)?"\u62DB"+parseInt(e.employNumber)+"\u4EBA":"\u4E0D\u9650\u4EBA\u6570")+'</span><span style="padding: 0px 12px ;border-right: 1px solid #999;">'+xe[parseInt(e.employNature)]+'</span><span style="padding: 0px 12px ;border-right: 1px solid #999;">'+he[parseInt(e.employFrom)]+'</span><span style="padding: 0px 12px ;">'+de+"</span><span style='float:right;color:#FF5400;font-size:20px;'>"+me[parseInt(e.employWage)]+"/\u6708</span>"),$(".inforht,.inforpm").css("textAlign","left")}else $(".inforpm").html("<span>"+u+"</span>"+(e.state=="4"||e.state=="5"?"":'<span style="float: inherit;margin-left:12px;" class="curshare">\u5206\u4EAB</span>'));if(e.right){if(e.videoUrl){var _="",le=e.isVertical?e.computerPicPathVertical||[]:e.computerPicPath||[],Ue=e.thumb||"";le&&le.length&&(_=le[0].sourcePath),$(".coursemain").html(e.infoType=="1"||e.infoType=="15"?'<div style="margin-top:12px;margin-bottom: 12px;"><div style="margin:0 auto;" id="shortvideopreview"></div></div>'+e.introduce:(e.videoUrl&&e.videoId&&e.infoType=="6"||e.videoUrl&&e.videoId&&e.infoType=="0"?'<div style="margin-top:12px;margin-bottom: 12px;"><div style="margin:0 auto;" id="shortvideopreview"></div></div>':"")+e.detail),$("#shortvideopreview").css({"background-image":"url("+S((e.videoUrl&&e.videoId&&e.infoType=="6"||e.videoUrl&&e.videoId&&e.infoType=="0")&&Ue||_)+")","background-position":"center","background-size":"contain","background-repeat":"no-repeat"}),Qe(function(){var i=e.videoUrl,o={id:"shortvideopreview",url:i,autoplay:!1,poster:S((e.videoUrl&&e.videoId&&e.infoType=="6"||e.videoUrl&&e.videoId&&e.infoType=="0")&&Ue||_),ignores:["error"],playbackRate:""};init(o,function(){setTimeout(function(){$("#shortvideopreview").css({"background-image":"none"})},2e3)})})}else{var tr=(e.infoType=="1"||e.infoType=="4"||e.infoType=="12"||e.infoType=="15"?e.introduce:(e.infoType=="2"?"<p><b>\u62DB\u8058\u5185\u5BB9</b></p>":"")+e.detail).replace(/<script>/gi,q("<script>"));if($(".coursemain").html(tr),e.infoType=="3"||e.infoType=="10"||e.infoType=="8"||e.infoType=="9"){var Z=e.computerPicPath&&e.computerPicPath.length?e.computerPicPath[0]:{};Z&&($(".coursemain").html('<img title="'+Z.title+'" src="'+S(Z.sourcePath)+'" />').css({"text-align":"center"}),$(".inforht").text(Z.title))}else e.infoType=="2"}var M="<div class='infoSourcebox' >";if(d.name&&(M+="<span>\u6765\u6E90\uFF1A"+d.name+"</span>"),d.url){var ar=d.url.indexOf("http")<0?"//"+d.url:d.url;M+="<span>\u94FE\u63A5\uFF1A<a target='_blank' href='"+ar+"'>"+d.url+"</a></span>"}if(M+="</div>",(e.infoType=="0"||e.infoType=="1")&&!e.applyOriginal&&(M+="<div class='infostatementtipbtn' style='display: block;text-align:left; margin-top: 6px;'><div style='display: inline-block;cursor: pointer;background: rgba(255, 255, 255, 0.1);padding: 2px 6px;color: #999;font-size:12px;' class='infostatementtip'>\u24D8 \u514D\u8D23\u58F0\u660E</div></div><div style='font-size:12px;display:none;color: #999;' class='infotipscontent'>\u58F0\u660E\uFF1A\u672C\u5E73\u53F0\u53D1\u5E03\u7684\u5185\u5BB9\uFF08\u56FE\u7247\u3001\u89C6\u9891\u548C\u6587\u5B57\uFF09\u4EE5\u539F\u521B\u3001\u8F6C\u8F7D\u548C\u5206\u4EAB\u7F51\u7EDC\u5185\u5BB9\u4E3A\u4E3B\uFF0C\u5982\u679C\u6D89\u53CA\u4FB5\u6743\u8BF7\u5C3D\u5FEB\u544A\u77E5\uFF0C\u6211\u4EEC\u5C06\u4F1A\u5728\u7B2C\u4E00\u65F6\u95F4\u5220\u9664\u3002\u6587\u7AE0/\u89C6\u9891\u89C2\u70B9\u4E0D\u4EE3\u8868\u672C\u5E73\u53F0\u7ACB\u573A\uFF0C\u5982\u9700\u5904\u7406\u8BF7\u8054\u7CFB\u5BA2\u670D\u3002</div>"),!ue){var or='style="display:none"';M+="<div class='likesharebox' "+(e.state=="4"||e.state=="5"?or:"")+" ><div class='like "+(a?"likeactive":"")+(t?"":"nolikebtn")+"'>"+(t||" ")+"</div><div class='share'>\u5206\u4EAB</div></div>"}if(e.infoType=="14"){$(".sharesource").hide(),V=e.attachmentList||[];for(var ce=$("#plate-navcm").masonry({itemSelector:".box",gutter:12,isAnimated:!0,isResizeBound:!0}),A="",Ve="",Ne="",y=0;y<V.length;y++){var U=V[y];A+=' <div class="box" commonSourceId="'+U.commonSourceId+'" index="'+y+'" style="width:'+We+'px;">',A+=" <img src="+(cdnPath+U.sourcePath)+' data-errorcount="0" onerror="coverError("'+cdnPath+U.sourcePath+'")" >',A+="<div class='likebox'> <a commonSourceId='"+U.commonSourceId+"' index='"+y+"'></a> </div>",A+=" </div>",Ve+="<a commonSourceId='"+U.commonSourceId+"' index='"+y+"'></a>",Ne+="<a commonSourceId='"+U.commonSourceId+"' index='"+y+"' href='"+cdnPath+U.sourcePath+"?dpattch=true&fnattch="+U.title+"'></a>"}$(".albumbox .swiper-likebox").html(Ve),$(".albumbox .swiper-downbox").remove(),$(".albumbox").append('<div class="swiper-downbox">'+Ne+"</div>");var De=$(A);ce.append(De).masonry("appended",De),ce.imagesLoaded().progress(function(){ce.masonry("layout")}),$(".albumbox .swiper-likebox a").on("click",function(i){i.preventDefault(),i.stopPropagation();var o=$(this).attr("index"),l=$(this);l.hasClass("like")||reportVisitLog&&reportVisitLog.reportImageLog("14",{commonSourceId:$(".swiper-likebox a").eq(o).attr("commonSourceId"),pvid:b},function(s){s.success?(l.removeClass("like").addClass("like"),$(".albumbox #plate-navcm .box .likebox a").eq(parseInt(o)).removeClass("like").addClass("like")):layer.msg(s.message||"\u70B9\u8D5E\u5931\u8D25")})}),$(".albumbox .swiper-downbox a").on("click",function(i){var o=$(this).attr("index");reportVisitLog&&reportVisitLog.reportImageLog("98",{commonSourceId:$(".swiper-likebox a").eq(o).attr("commonSourceId"),pvid:b})});var Q=new Swiper(".swiper-container",{zoom:!0,width:window.innerWidth,virtual:!0,spaceBetween:20,pagination:{el:".swiper-pagination",type:"fraction"},on:{tap:function(){$(".swiper-likebox a").removeClass("active"),$(".swiper-downbox a").removeClass("active"),$("#origin-img").fadeOut("fast"),this.virtual.slides.length=0,this.virtual.cache=[],R=!1,reportVisitLog&&(reportVisitLog.reportImageLogtimeer&&clearTimeout(reportVisitLog.reportImageLogtimeer),reportVisitLog.reportImageLog("01",{commonSourceId:$(".swiper-likebox a").eq(z).attr("commonSourceId"),pvid:b}))},slideChangeTransitionEnd:function(i){$(".swiper-likebox a").removeClass("active").eq(this.activeIndex).addClass("active"),$(".swiper-downbox a").removeClass("active").eq(this.activeIndex).addClass("active"),reportVisitLog&&z!=this.activeIndex&&(reportVisitLog.reportImageLog("01",{commonSourceId:$(".swiper-likebox a").eq(z).attr("commonSourceId"),pvid:b}),b=reportVisitLog.getNum()+""+new Date().valueOf(),reportVisitLog.reportImageLog("00",{commonSourceId:$(".swiper-likebox a").eq(this.activeIndex).attr("commonSourceId"),pvid:b}),reportVisitLog.setTimereportImageLog(4,3,1,{commonSourceId:$(".swiper-likebox a").eq(this.activeIndex).attr("commonSourceId"),pvid:b})),z=this.activeIndex}}});$("#plate-navcm .box").on("click",function(i){i.preventDefault(),i.stopPropagation();var o=$(this).attr("index");for(j=parseInt(o),z=parseInt(o),y=0;y<V.length;y++)Q.virtual.appendSlide('<div class="swiper-zoom-container"><img src="'+cdnPath+V[y].sourcePath+'" /></div>');Q.slideTo(j,0,!1),$("#origin-img").fadeIn("fast"),$(".swiper-likebox a").eq(j).addClass("active"),$(".swiper-downbox a").eq(j).addClass("active"),R=!0,reportVisitLog&&(b=reportVisitLog.getNum()+""+new Date().valueOf(),reportVisitLog.reportImageLog("00",{commonSourceId:$(".swiper-likebox a").eq(z).attr("commonSourceId"),pvid:b}),reportVisitLog.setTimereportImageLog(4,3,1,{commonSourceId:$(".swiper-likebox a").eq(z).attr("commonSourceId"),pvid:b}))}),$("#plate-navcm .box .likebox a").on("click",function(i){i.preventDefault(),i.stopPropagation();var o=$(this).attr("index"),l=$(this);for(j=parseInt(o),z=parseInt(o),y=0;y<V.length;y++)Q.virtual.appendSlide('<div class="swiper-zoom-container"><img src="'+cdnPath+V[y].sourcePath+'" /></div>');Q.slideTo(j,0,!1),$("#origin-img").fadeIn("fast"),$(".swiper-likebox a").eq(j).addClass("active"),$(".swiper-downbox a").eq(j).addClass("active"),R=!0,reportVisitLog&&(b=reportVisitLog.getNum()+""+new Date().valueOf(),reportVisitLog.reportImageLog("00",{commonSourceId:$(".swiper-likebox a").eq(z).attr("commonSourceId"),pvid:b}),l.hasClass("like")||reportVisitLog.reportImageLog("14",{commonSourceId:$(".swiper-likebox a").eq(o).attr("commonSourceId"),pvid:b},function(s){s.success?(l.removeClass("like").addClass("like"),$(".albumbox .swiper-likebox a").eq(parseInt(o)).removeClass("like").addClass("like")):layer.msg(s.message||"\u70B9\u8D5E\u5931\u8D25")}),reportVisitLog.setTimereportImageLog(4,3,1,{commonSourceId:$(".swiper-likebox a").eq(z).attr("commonSourceId"),pvid:b}))}),$.ajax({type:"POST",headers:{token:w("token")},url:"/api/operate/getImagePraiseStateById?projectid=16"+B,contentType:"application/json",dataType:"json",data:JSON.stringify({busId:D()||n("aid")||F(),uvcid:localStorage.uvcid||"",visitingCardIdStr:localStorage.visitingCardIdStr||"",visitorSchoolId:reportVisitLog&&reportVisitLog.visitorSchoolId||"",visitorUserId:reportVisitLog&&reportVisitLog.visitorUserId||""}),async:!0,success:function(i){if(parseInt(i.code)==200)for(var o=i.data||{},l=o.list||[],s=0;s<l.length;s++){var p=l[s].commonSourceId;l[s].isPraised&&$(".albumbox a[commonsourceid='"+p+"']").removeClass("like").addClass("like")}}}),document.addEventListener("touchstart",function(i){i.touches.length>1&&R&&i.preventDefault()});var Fe=0;document.addEventListener("touchend",function(i){var o=new Date().getTime();o-Fe<=300&&i.preventDefault(),Fe=o},!1),document.addEventListener("touchmove",function(i){R&&i.preventDefault()})}else $(".curriculum .albumbox").hide(),$(".sharesource").html(M),$(".infostatementtipbtn").on("click",function(){$(this).hide().siblings(".infotipscontent").show()}),$(".infotipscontent").on("click",function(){$(this).hide().siblings(".infostatementtipbtn").show()});if(e.commonSources){$(".fotfer").show(),$(".naber").html(e.commonSources.length),e.commonSources.length==1&&$(".lones").hide();var C="";e.commonSources.forEach(function(i,o,l){var s=ir(i.sourceSuffix),p="/static/front/images/fileIcon/"+s+".png",m=Ze(i.sourceSize),k=i.previewUrl.replace(/\s+/g,"%20"),g=i.sourceName.replace(/\s+/g," ");C+='<a class="fuctdiv" title='+g+" href="+k+" >",C+="<img src="+S(p)+" />",C+="<div class='sourcecontent'>",C+="<p class='sourceName'>"+i.sourceName+"</p>",C+="<p>"+m+"</p>",C+="</div>",C+='<i class="nosder"></i>',C+="</a>"}),C&&(C+='<div style="clear: both;"></div>'),$(".fuwent").html(C)}var X="",ee="",re="",ie=[],te=[],ae=[],oe=0;if(!ue){var nr=e.relationMap||[];if(nr.forEach(function(i,o,l){i.relationType=="3"&&(oe=i.busId),i.relationType=="1"&&te.push(i),i.relationType=="2"&&ae.push(i),i.relationType=="4"&&ie.push(i)}),oe){$(".relation").html("<div class='relationformul'></div>");var mr=window.location.href.indexOf("html?")>=0?1:0,Me=er("formId="),pe=location.origin+location.pathname+Me+(Me?"&":"?")+"formId="+oe;history.replaceState?history.replaceState({},"",pe):location.href!=pe&&(location.href=pe);var sr={init:function(i){var o=this;window.formId=i,o.renderRoot()},renderRoot:function(){$(".relationformul").html('<div id="root"></div>'),$.getScript("/portal/umi.js")}};setTimeout(function(){sr.init(oe)},200)}te.length&&(ee+="<div class='relationinfoul'><div class='label'>\u70ED\u95E8\u6587\u7AE0</div>",te.forEach(function(i,o,l){var s=H(i.gmtCreate),p=i.isUrlInfo?(i.infoUrl||"").indexOf("http")<0?"//"+i.infoUrl:i.infoUrl||"":"",m=p||"/information/"+i.busId+".shtml";i.infoType=="19"&&(m="/business/shareHomepageImg.html?homepageId="+i.busId),i.infoType=="20"&&(m="/business/shareHomepageFile.html?homepageId="+i.busId),ee+="<div class='infoli'><div class='infotitle'><a target='_blank' href='"+m+"'>"+i.title.replace(/<script>/gi,q("<script>"))+"</a></div><div class='infointroduce'>"+i.introduce.replace(/<script>/gi,q("<script>"))+"</div><div class='infotime'>"+s+"</div></div>"}),ee+="</div>",$(".relation").append(ee)),ie.length&&(X+="<div class='relationcourseul'><div class='label'>\u7CBE\u9009\u8BFE\u7A0B</div><div class='relationcourseulflex'>",ie.forEach(function(i,o,l){var s=i.cover?i.cover:i.busInnerType==2||i.busInnerType==4?"/static/common/image/course/package.jpg":"/static/common/image/course/defult.jpg",p=parseInt(i.price)?"\xA5"+i.price/100:"\u514D\u8D39",m=i.busInnerType==2||i.busInnerType==4?"bundle":"info";X+="<a target='_blank' href='/pages/"+m+".html?cid="+i.busId+"'><div class='courseli'><div class='coursecover'><img src='"+S(s)+"' /></div><div class='coursebottom'><div class='courseprice'>"+p+"</div><div class='coursefl'>"+i.title.replace(/<script>/gi,q("<script>"))+"</div></div></div></a>"}),X+="</div></div>",$(".relation").append(X)),ae.length&&(re+="<div class='relationshopul'><div class='label'>\u597D\u7269\u63A8\u8350</div><div class='relationshopulflex'>",ae.forEach(function(i,o,l){var s=i.cover||"",o=s.lastIndexOf(".done")>=0?s.lastIndexOf(".done"):s.lastIndexOf("."),p=s?s.substring(0,o)+".jpg":"";if(!p){var m=i.coverList?JSON.parse(i.coverList):[];m&&m.length&&(p=m[0].sourcePath)}var k="",g=i.price?i.price.split(","):[],L=parseFloat(g&&g.length?g[0]:0),N=parseFloat(g&&g.length?g[g.length-1]:0);k=L||N?i.paymentType=="2"?(L||N)+"\u79EF\u5206":"\uFFE5"+(L||N)/100:"",re+="<a target='_blank' href='/shop/item.html?itemid="+i.busId+"'><div class='shopli'><div class='shopcover' style='background:url("+S(p)+") no-repeat;'></div><div class='shopbottom'><div class='shopprice'>"+k+"</div><div class='shopfl'>"+i.title.replace(/<script>/gi,q("<script>"))+"</div></div></div></a>"}),re+="</div></div>",$(".relation").append(re)),$.ajax({headers:{token:w("token")},type:"GET",url:"/api/common/getRelateHomepageInfos",data:{homepageInfoId:D()||n("aid")||F(),targetServerNameForOverride:n("targetServerNameForOverride")||void 0},dataType:"json",async:!0,success:function(i){var o=i.data||{},l="",s=ie.length+te.length+ae.length;if(i.code==200&&o.length&&s){var p=o[0]||{},m=p.isUrlInfo?(p.infoUrl||"").indexOf("http")<0?"//"+p.infoUrl:p.infoUrl||"":"",k=m||"/information/"+o[0].commonHomepageInfoId+".shtml",g='style="display:none"';if(l+='<div class="relateinfo" '+(e.state=="4"||e.state=="5"?g:"")+'><div class="prev"><a target="_blank" href="'+k+'">\u4E0A\u4E00\u7BC7 <span>'+o[0].title+"</span></a></div>",o.length>=2){var L=o[1]||{},N=L.isUrlInfo?(L.infoUrl||"").indexOf("http")<0?"//"+L.infoUrl:L.infoUrl||"":"",ve=N||"/information/"+o[1].commonHomepageInfoId+".shtml";l+='<div class="next"><a target="_blank" href="'+ve+'">\u4E0B\u4E00\u7BC7 <span>'+o[1].title+"</span></a></div>"}l+="</div>",$(".sharesource").append(l)}}})}}else $(".coursemain").html('<div style="background:url(/static/front/images/nodemation.png?v=01) no-repeat center;width:100%;height:400px;"></div>');var Ee="",Re=n("att")?decodeURIComponent(n("att")):"",gr=n("vcardId")?decodeURIComponent(n("vcardId")):"";Re&&($(".cardwxphonebtns").remove(),$.ajax({headers:{token:w("token")},type:"GET",url:"/api/common/getHpsAttInfo",data:{att:Re},dataType:"json",async:!1,success:function(i){if(i.code==200){var o=i.data||{},l=o.mobile||"",s=o.position||"",p=o.schoolName||"",m=o.wcQrImg||"",k=o.wxAccount||"",g=o.headPortrait||"",L=o.realName||o.nickname||o.loginName||"";Ee=o.vcardId||"";var N='<div class="cardwxphonebtns">'+(l?'<a class="cardphone"></a>':"")+(k||m?'<a class="cardwx"></a>':"")+"</div>";$("body").append(N),$(".mobileyzbox .mobileuser .cover img").length?$(".mobileyzbox .mobileuser .cover img").attr({src:S(g)}):window.yzmmodalface=g,$(".cardwxphonebtns .cardphone").on("click",function(){var ve=layer.open({type:1,title:"",skin:"layui-layer-antd nohasbtn",closeBtn:1,anim:2,area:"375px 310px",scrollbar:!1,shadeClose:!1,cancel:function(fe,lr){},success:function(fe){},content:"<div style='padding:20px 30px;width:354px;height:169px;box-sizing:border-box;'> <div style='display:flex;align-items:center;'> <div style='width:60px;height:60px;border-radius:50%;overflow:hidden;position: relative;margin-right: 16px;'><img style='width: 100%; height: 100%; position: absolute;top: 0px; left: 0px;' src='"+S(g)+"' /></div><div style='flex: 1; overflow: hidden;'><div style='font-size: 18px;color: #333333;margin-bottom: 14px;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>"+L+"<span style='font-size:16px;color:#666666;margin-left:13px;'>"+s+"</span></div><div style='font-size:16px;color:#666666;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>"+p+"</div></div></div><div style='font-size:16px;color:#333333;margin-top:30px;'>\u6B22\u8FCE\u54A8\u8BE2\uFF1A<span style='margin-left:10px;font-size:22px;color:#333333;'>"+l+"</span></div></div>"});reportVisitLog&&reportVisitLog.callaction("22","",l)}),$(".cardwxphonebtns .cardwx").on("click",function(){var ve=layer.open({type:1,title:"",skin:"layui-layer-antd nohasbtn",closeBtn:1,anim:2,area:"375px 310px",scrollbar:!1,shadeClose:!1,cancel:function(fe,lr){},success:function(fe){},content:"<div style='padding:30px 40px;width:354px;height:447px;box-sizing:border-box;'> <div style='display:flex;align-items:center;'> <div style='width:60px;height:60px;border-radius:50%;overflow:hidden;position: relative;margin-right: 16px;'><img style='width: 100%; height: 100%; position: absolute;top: 0px; left: 0px;' src='"+S(g)+"' /></div><div style='flex: 1; overflow: hidden;'><div style='font-size: 18px;color: #333333;margin-bottom: 14px;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>"+L+"<span style='font-size:16px;color:#666666;margin-left:13px;'>"+s+"</span></div><div style='font-size:16px;color:#666666;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'>"+p+"</div></div></div>"+(m?"<div style='font-size:16px;color:#333333;margin-top:30px;'> <div style='width:180px;height:180px;margin:0px auto;position: relative;'><img style='width: 100%; height: 100%; position: absolute;top: 0px; left: 0px;' src='"+S(m)+"' /></div> </div>":"")+(k?"<div style='font-size:16px;color:#333333;margin-top:30px; text-align: center;'>\u5FAE\u4FE1\u53F7\uFF1A<span style='margin-left:10px;font-size:22px;color:#333333;'>"+k+"</span></div>":"")+"<div style='font-size:16px;color:#333333;margin-top:30px; text-align: center;'>\u626B\u4E00\u626B\u52A0\u6211\u7684\u5FAE\u4FE1</div></div>"});reportVisitLog&&reportVisitLog.callaction("28")})}}}));var dr=parseInt(window.localStorage.isreport)||0;dr==1&&G&&(window.localStorage.setItem("isreport",2),reportVisitLog.callaction("24","","","",h.visitingCardIdStr,Ee,h.avatar,h.cardName,h.sex)),we&&!(P?W:(window.localStorage.notokencheckCode?parseInt(window.localStorage.notokencheckCode):0)||0)?Ke():(se=1,reportVisitLog.init()),$(".curshare").on("click",function(){qe()}),$(".likesharebox .share").on("click",function(){qe()}),(f()==4||f()==5)&&$(".likesharebox .share,.curshare").hide(),$(".likesharebox .like").on("click",function(){if(a){layer.open({content:"\u4E0D\u53EF\u91CD\u590D\u70B9\u8D5E",btn:"\u786E\u5B9A"});return}$.ajax({type:"POST",headers:{token:w("token")},url:"/api/common/infoPraise?projectid=16"+B,contentType:"application/json",dataType:"json",data:JSON.stringify({commonHomepageInfoId:D()||n("aid")||F()}),async:!0,success:function(i){parseInt(i.code)==200?(t+=1,a=!0,$(".likesharebox .like").text(t),$(".likesharebox .like").removeClass("likeactive").addClass("likeactive").removeClass("nolikebtn"),reportVisitLog&&reportVisitLog.callaction("14")):layer.open({content:i.message||"\u70B9\u8D5E\u5931\u8D25\uFF01",btn:"\u786E\u5B9A"})}})});function qe(){var i="/static/front/images/shareBackground.png",o=e.isVertical?e.computerPicPathVertical||[]:e.computerPicPath||[],l=o&&o.length?o[0].sourcePath:"",s={courseName:e.title,commonHomepageInfoId:D()||n("aid")||F(),cover:l||"/static/common/image/information/defult.jpg",introduce:e.introduce};s.userInfo=user.useInfo||{},s.iscourse=e.infoType=="1"?"shortvideo":e.infoType=="15"?"companypublicmovie":"information";var p=window.imgEditor,m=this,k=window.location.href;p.shareLayer(k,i,function(g){},s)}}})}$(function(){setTimeout(ze,10)});function Ke(r){var e='<div class="mobileyzbox"><div class="mobileuser"><div class="cover"><img src='+S(window.yzmmodalface||"/static/aroom/img/clueface.png")+' /></div></div><div class="usertext"><div class="triangle-up"></div>\u6DF1\u5165\u4E86\u89E3\u4E2D\uFF1F\u4E5F\u8BB8\u4F1A\u9700\u8981\u6211\u7684\u7B54\u7591\u8981\u70B9\uFF0C\u8BF7\u7559\u7ED9\u6211\u60A8\u7684\u8054\u7CFB\u65B9\u5F0F\u5427</div><div class="yzform"><div class="mobilebox"><input type="text" maxLength="11" placeholder="\u60A8\u7684\u624B\u673A\u53F7\u7801" /></div><div class="erroralert">\u8BF7\u8F93\u5165\u6B63\u786E\u624B\u673A\u53F7</div><div class="yzmbox"><input type="text" maxLength="10" placeholder="\u9A8C\u8BC1\u7801" /><div class="yzmbtn"><div>\u5DF2\u53D1\u9001(60)</div><a>\u53D1\u9001\u9A8C\u8BC1\u7801</a></div></div></div><div class="subbtn"><a>\u9A6C\u4E0A\u67E5\u770B</a></div></div>';if(!ke)var t=layer.open({type:1,title:"",skin:"layui-layer-antd nohasbtn mobileyzmodal",closeBtn:0,anim:2,area:"375px 310px",scrollbar:!1,shadeClose:!1,cancel:function(a,d){},success:function(a){ke=1,$(".mobileyzbox .mobilebox input").on("blur",function(d){var c=d.target.value||"";c&&!/^1\d{10}$/.test(c)?$(".mobileyzbox .erroralert").show():$(".mobileyzbox .erroralert").hide()}),$(".mobileyzbox .yzmbtn a").on("click",function(d){if(!E){var c=$(".mobileyzbox .mobilebox input").val();if(!c){layer.msg("\u8BF7\u8F93\u5165\u624B\u673A\u53F7");return}if(!/^1\d{10}$/.test(c)){layer.msg("\u8BF7\u8F93\u5165\u6B63\u786E\u624B\u673A\u53F7");return}var u=P?"/api/vcard/sendVerificationCode":"/api/vcard/sendVerificationCodeG";E=1,P?$.ajax({type:"GET",headers:{token:w("token")},url:u+"?projectid=74",contentType:"application/json",dataType:"json",data:{mobilePhone:c,uvcid:P?void 0:localStorage.uvcid||"",targetServerNameForOverride:n("targetServerNameForOverride")||void 0},async:!0,success:function(v){var x=v.data||{},T=x.vCardInfo||{};v.code==200&&v.success&&(I=60,J=setInterval(()=>{I<=0?(I=60,$(".mobileyzbox .yzmbtn a").show(),$(".mobileyzbox .yzmbtn div").hide(),clearInterval(J),E=0):(I=I-1,$(".mobileyzbox .yzmbtn a").hide(),$(".mobileyzbox .yzmbtn div").text("\u5DF2\u53D1\u9001("+I+")").show())},1e3))}}):$.ajax({type:"POST",headers:{token:w("token")},url:u+"?projectid=74"+B,contentType:"application/json",dataType:"json",data:JSON.stringify({mobilePhone:c,uvcid:P?void 0:localStorage.uvcid||""}),async:!0,success:function(v){var x=v.data||{},T=x.vCardInfo||{};v.code==200&&v.success&&(I=60,E=1,J=setInterval(()=>{I<=0?(I=60,$(".mobileyzbox .yzmbtn a").show(),$(".mobileyzbox .yzmbtn div").hide(),clearInterval(J),E=0):(I=I-1,$(".mobileyzbox .yzmbtn a").hide(),$(".mobileyzbox .yzmbtn div").text("\u5DF2\u53D1\u9001("+I+")").show())},1e3))}})}}),$(".mobileyzbox .subbtn a").on("click",function(d){var c=$(".mobileyzbox .mobilebox input").val(),u=$(".mobileyzbox .yzmbox input").val();if(!c){layer.msg("\u8BF7\u8F93\u5165\u624B\u673A\u53F7");return}if(!/^1\d{10}$/.test(c)){layer.msg("\u8BF7\u8F93\u5165\u6B63\u786E\u624B\u673A\u53F7");return}if(!u){layer.msg("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801");return}var v=P?"/api/vcard/checkVerifyCode":"/api/vcard/checkVerifyCodeG";$.ajax({type:"POST",headers:{token:w("token")},url:v+"?projectid=74"+B,contentType:"application/json",dataType:"json",data:JSON.stringify({code:u,mobilePhone:c,uvcid:P?void 0:localStorage.uvcid||""}),async:!0,success:function(x){parseInt(x.code)==200?(reportVisitLog&&!se&&reportVisitLog.init(),se=1,window.localStorage.setItem("notokencheckCode",1),W=1,reportVisitLog&&reportVisitLog.callaction("23","",c),layer.msg("\u9A8C\u8BC1\u6210\u529F"),layer.closeAll()):layer.msg(x.message)}})})},content:e})}function Ze(r){if(!r)return"";var e=1024;return r<e?r+"B":r<Math.pow(e,2)?(r/e).toFixed(2)+"KB":r<Math.pow(e,3)?(r/Math.pow(e,2)).toFixed(2)+"M":r<Math.pow(e,4)?(r/Math.pow(e,3)).toFixed(2)+"G":(r/Math.pow(e,4)).toFixed(2)+"T"}function pr(r){var e=r.replace(/([^.]*).([^.]*)$/g,"$1!medium.$2");return e}function K(r){var e=new RegExp("(^|&)"+r+"=([^&]*)(&|$)","i"),t=window.location.search.substr(1).match(e),a="";return t!=null&&(a=t[2]),e=null,t=null,a==null||a==""||a=="undefined"?"":a}function n(r){var e=new RegExp("(^|&)"+r+"=([^&]*)(&|$)"),t=window.location.search.substr(1).match(e);return t!=null?unescape(t[2]):null}function D(){for(var r=location.href.split("/"),e=0,t=r.length;e<t;e++){var a=r[e];if(a.indexOf(".shtml")>-1)return a.split(".shtml")[0]}return!1}function F(){for(var r=location.href.split("/"),e=0,t=r.length;e<t;e++){var a=r[e];if(a.indexOf(".html")>-1)return a.split(".html")[0]}return!1}function w(r){for(var e=document.cookie,t=e.split("; "),a=0;a<t.length;a++){var d=t[a].split("=");if(d[0]==r)return d[1]}return""}function Pe(r,e){var t=30,a=new Date;a.setTime(a.getTime()+t*24*60*60*30),document.cookie=r+"="+escape(e)+";path=/;expires="+a.toGMTString()}function Qe(r){var e=this;Oe(r)}function Oe(r){var e=this,t=ne.length;t?Xe(ne[0],function(){ne.shift(),Oe.call(e,r)}):r.call(e)}function Xe(r,e){var t=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.src=r+"?v="+new Date().valueOf(),typeof e=="function"&&(a.onload=a.onreadystatechange=function(){(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")&&(e(),a.onload=a.onreadystatechange=null)}),t.appendChild(a)}function f(){var r=navigator.userAgent.toLowerCase(),e=r.indexOf("wujiapp")>-1;if(window.__wxjs_environment==="miniprogram")return 4;if(r.match(/MicroMessenger/i)=="micromessenger"){var t={win:!1,mac:!1},a=navigator.platform;return t.win=a.indexOf("Win")==0,t.mac=a.indexOf("Mac")==0,t.win||t.mac?9:1}else return window.localStorage.appAdapt==="true"||window.localStorage.appAdapt===!0||e?5:n("channel")?n("channel"):/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)?2:3}function vr(r){var e=new window.URL(window.location.href);return e.searchParams.delete(r),e.href}function fr(r,e){var t=new window.URL(window.location.href);return t.searchParams.set(r,e),t.href}function er(r){for(var e=location.search,t=e.split("&"),a="",d=0,c=t.length;d<c;d++){var u=t[d];u.indexOf("?"+r)>-1?d+1!==c&&(a+="?"):u.indexOf(r)==0||(a+=a&&a!="?"?"&"+u:u)}return a}function rr(r){switch(r){case"0":return"1";case"1":return"2";case"2":return"8";case"7":return"9";case"6":return"10";case"5":return"11";case"4":return"12";case"3":return"13";case"11":return"16";case"8":return"19";case"9":return"18";case"10":return"17";case"13":return"21";case"14":return"22";case"15":return"23";default:return"0"}}function je(){var r="wxa09a4ca9fba61af1",e="wx60a208c13d8acea1",t="test.1x.cn";cdnPath=="//pre-static.1x.cn"&&(r="wxc0968245d91aaf85",e="wx60a208c13d8acea1",t="pre.xx.cn"),cdnPath=="//static.wxbig.cn"&&(r="wxc420bf93bbe26d62",e="wx1ae69c2e8734dd28",t="sys.wxdad.cn");var a=window.location.href,d=decodeURIComponent(decodeURIComponent(a)),c=d+(d.indexOf("?")>-1?"&":"?")+"noevxtoken=true",u=encodeURIComponent(c),v=window.frames.length!=parent.frames.length;$.ajax({headers:{token:w("token")},type:"GET",url:"/api/welink/wechat/qrCode/url",data:{targetServerNameForOverride:n("targetServerNameForOverride")||void 0,envTypeName:"official_account",sceneTypeName:"consulting",redirectUrl:u},dataType:"json",async:!1,success:function(x){if(x.code==200&&x.success){var T=x.data||{};T.url&&(v?window.parent.location.href=T.url:window.location.replace(T.url))}}})}function ur(r){var e,t=500,a=570,d=(window.screen.height-30-a)/2,c=(window.screen.width-10-t)/2;window.open(r,e,"height="+a+",innerHeight="+a+",width="+t+",innerWidth="+t+",top="+d+",left="+c+",toolbar=no,menubar=no,scrollbars=auto,resizable=no,location=no,status=no")}function ir(r){var e="1."+(r||"").toLowerCase(),t="unknow@2x";return/^\w+\.(docx|doc)$/.test(e)?t="-e-doc@2x":/^\w+\.(xlsx|xls)$/.test(e)?t="-e-xlsx@2x":/^\w+\.(pptx|ppt)$/.test(e)?t="-e-pptx@2x":/^\w+\.(pdf)$/.test(e)?t="-e-pdf@2x":/^\w+\.(jpg|jpeg|bmp|gif|png)$/.test(e)?t="image":/^\w+\.(avi|mov|rmvb|rm|flv|mp4|3gp)$/.test(e)?t="-e-mp4@2x":/^\w+\.(mp3)$/.test(e)?t="-e-music@2x":/^\w+\.(rar|zip|gz|7z)$/.test(e)&&(t="-e-zip@2x"),t}function q(r){var e=document.createElement("div");return e.innerText?e.innerText=r:e.textContent=r,e.innerHTML}function S(r){return(r||"").replace(/(^\s*)/g,"").indexOf("http")!=0&&(r||"").indexOf(cdnPath)<0&&(r||"").indexOf("data:image")!==0?cdnPath+r:r}function H(r,e){if(new Date(parseInt(r))=="Invalid Date"&&new Date(parseInt(r)*1e3)=="Invalid Date")return"--";new Date(parseInt(e))=="Invalid Date"&&new Date(parseInt(e)*1e3)=="Invalid Date"&&(e=Date.parse(new Date));var t=(e-r)/1e3;if(t<0)return"\u521A\u521A";if(t<60)return parseInt(t,10)+"\u79D2\u524D";if(t<3600)return parseInt(t/60,10)+"\u5206\u949F\u524D";if(t<24*3600)return parseInt(t/3600,10)+"\u5C0F\u65F6\u524D";if(t<7*24*3600)return parseInt(t/3600/24,10)+"\u5929\u524D";if(t<30*24*3600)return parseInt(t/3600/24/7,10)+"\u5468\u524D";if(t<365*24*3600)return parseInt(t/3600/24/30,10)+"\u4E2A\u6708\u524D";var a=new Date(parseInt(r)),d=parseInt(a.getMonth()+1)<10?"0"+(a.getMonth()+1):a.getMonth()+1,c=parseInt(a.getDate())<10?"0"+a.getDate():a.getDate(),u=parseInt(a.getHours())<10?"0"+a.getHours():a.getHours(),v=parseInt(a.getMinutes())<10?"0"+a.getMinutes():a.getMinutes();return a.getFullYear()+"-"+d+"-"+c+" "+u+":"+v}})();
|