2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
(function(){var ce=parseInt($(window).width()),T=cdnPath=="//pre-static.1x.cn"?"https://pre.xx.cn":cdnPath=="//static.wxbig.cn"?location.origin:"https://test.1x.cn",de=s("targetServerNameForOverride")?"&targetServerNameForOverride="+s("targetServerNameForOverride"):"",y=k("w")||k("kf")?parseInt(k("w")||k("kf")):0,ve=s("kf")?parseInt(s("kf")):0,c={},N=0,U=1;if(s("token")&&F("token",decodeURIComponent(s("token"))),s("vctoken")&&F("vctoken",decodeURIComponent(s("vctoken"))),!p("vxtoken")&&y&&(o()==1||o()==9)){M();return}else if(!p("vxtoken")&&y&&!(o()==1||o()==9||o()==5)){window.location.replace(T+"/pages/wxwebauthorize.html?infohref="+encodeURIComponent(decodeURIComponent(window.location.href)));return}else p("vxtoken")&&y?$.ajax({headers:{},type:"GET",url:"/api/vcard/getVCardInfo",data:{targetServerNameForOverride:s("targetServerNameForOverride")||void 0},dataType:"json",async:!1,success:function(a){if(a.code==200&&a.success){var t=a.data||{};c=t.vCardInfo||{},N=1,U=c.authMobile,window.localStorage.setItem("visitingCardIdStr",c.visitingCardIdStr||""),window.localStorage.setItem("visitingCardavatar",c.avatar||""),window.localStorage.setItem("visitingCardName",c.cardName||""),window.localStorage.setItem("visitingCardsex",c.sex||"")}else if(o()==1||o()==9){M();return}else if(!(o()==1||o()==9||o()==5)){window.location.replace(T+"/pages/wxwebauthorize.html?infohref="+encodeURIComponent(decodeURIComponent(window.location.href)));return}}}):p("token")&&$.ajax({headers:{token:p("token")},type:"GET",url:"/api/vcard/getVCardInfo",data:{targetServerNameForOverride:s("targetServerNameForOverride")||void 0},dataType:"json",async:!1,success:function(a){if(a.code==200&&a.success){var t=a.data||{};c=t.vCardInfo||{},N=1,U=c.authMobile,window.localStorage.setItem("visitingCardIdStr",c.visitingCardIdStr||""),window.localStorage.setItem("visitingCardavatar",c.avatar||""),window.localStorage.setItem("visitingCardName",c.cardName||""),window.localStorage.setItem("visitingCardsex",c.sex||"")}}});!(o()==5||window.frames.length!=parent.frames.length)&&!$("#customerService").length&&($(".commentbox").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>')),(o()==4||o()==5||o()==1||o()==2)&&$(".head,.foot").remove();var fe=new Base64,H="/static/chatroom/video/video.min.7.4.js",S=["/static/chatroom/js/xgplayer/xgplayer.js","/static/common/live/xgplayer-flv.js","/static/common/live/xgplayer-hls.js","/static/chatroom/video/playerreview.js"],L=window.navigator.userAgent.toLowerCase();if(L.match(/MicroMessenger/i)=="micromessenger"){var V=!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);H=V?"/static/newJS/information/video/7.0.0/video.min.js":"/static/newJS/information/video/7.0.2/video.min.js"}var pe='<video id="shortvideopreview" style="object-fit: contain;" class="video-js vjs-default-skin vjs-big-play-centered vjs-fluid" width="100%" webkit-playsinline="true" playsInline="playsinline" x5-playsinline="true" tabIndex="-1" x-webkit-airplay="true" />',z=$(".photolist").width(),D=(z-6)/3;$.ajax({type:"GET",headers:{token:p("token")},url:"/api/common/getSquareInfoById?projectid=41",contentType:"application/json",dataType:"json",data:{infoId:X()||s("infoId")||Y(),targetServerNameForOverride:s("targetServerNameForOverride")||void 0},dataType:"json",success:function(a){var t=a.success;if(t){var e=a.data,r=e.headPortrait||"",n=e.sourceList||[],i=e.praiseDataVO||{},v=i.topPraiseList||[],h=i.totalPraiseCount||0,u=e.commentList||[],g=e.refererBusType,b=e.refererCoverResolution?e.refererCoverResolution.split("*"):[0,0],P=e.refererCover||"",E=b.length?b[0]:0,J=b.length?b[1]:0;$(".time").text(K(e.gmtCreate));var ae=P.indexOf("appstatic/images/brochure")>-1?"referercover posterleft":"referercover",te=J>E||!J&&!E?"imghgreaterthanw":"imgwgreaterthanh";if(e.contentType=="1"){var ie='<a href="'+(e.refererUrl?e.refererUrl:Q(e))+'" class="refererbox"><div class="'+ae+'">'+('<img class="'+te+'" src="'+f(P)+'" />')+(g=="2"||g=="23"?'<div class="playicon"></div>':"")+'</div><div class="refererinfo"><div class="referertitle">'+e.refererTitle+"</div></div></a>";$(".squareInfo .intro").after(ie)}let O="";if(n.length){for(var d=0;d<n.length;d++){var ne=n[d],C=ne||"",A=Z(C),I=n.length==1,B="width:"+D+"px;height:"+D+"px;";A?O+='<div style="'+(I?"":B)+'" key="photo'+d+'" class="'+(I?"photoli onlyli":"photoli")+'"><div ismp4="1" videourla="'+f(C)+'" poster="'+(e.picPath?f(e.picPath):f("/appstatic/images/noneimg.png"))+'" id="videojs'+(e.infoId+"photo"+d)+'" class="videomse"></div></div>':O+='<div style="'+(I?"":B)+'" key="photo'+d+'" class="'+(I?"photoli onlyli":"photoli")+'"><img class="imghgreaterthanw" src="'+(A?e.picPath?f(e.picPath):f("/appstatic/images/noneimg.png"):f(C))+'" /></div>'}$(".photolist").append(O),$(".videomse").each(function(ge,x){var _=$(x).attr("id"),G=$(x).attr("videourla"),q=$(x).attr("poster"),le=$(x).attr("ismp4");ee(function(){var me=le?new Player({id:_,url:G,videoInit:!0,poster:q,fluid:!0,fitVideoSize:"fixWidth",cssFullscreen:!0,"x5-video-player-fullscreen":!0,"x5-video-orientation":"landscape|portrait"}):new HlsJsPlayer({id:_,url:G,videoInit:!0,poster:q,fluid:!0,fitVideoSize:"fixWidth",cssFullscreen:!0,"x5-video-player-fullscreen":!0,"x5-video-orientation":"landscape|portrait"})})})}for(var m="",W=[],j=0;j<v.length;j++)W.push(v[j].name);var se=W.join("\u3001"),oe=h>10?"\u7B49"+h+"\u4EBA\u89C9\u5F97\u5F88\u8D5E":"";if(h&&(m+='<div class="likelist"><img src="'+f("/appstatic/images/like5.png")+'" />'+se+oe+"</div>"),u.length){m+='<div class="commentul">';for(var d=0;d<u.length;d++){var w=u[d];w.parentRealName?m+='<div key="'+d+'" class="commentli"><span>'+w.realName+"</span> \u56DE\u590D<span>"+w.parentRealName+"\uFF1A</span>"+w.comment+"</div>":m+='<div key="'+d+'" class="commentli"><span>'+w.realName+"\uFF1A</span>"+w.comment+"</div>"}m+="</div>"}$(".commentbox").append(m)}else layer.open({content:a.message||"\u63A5\u53E3\u8BF7\u6C42\u5931\u8D25",skin:"msg",time:2})}});function Q(a){var t=a.refererBusType,e="",r=a.refererBusId,n=t=="21",i=window.location.origin;switch(t){case"0":break;case"1":r?e=l(r):e=i+"/pages/wap/listrmation.html?busType=0";break;case"2":r?e=l(r):e=i+"/pages/wap/listrmation.html?busType=1";break;case"3":r?a.affiliatedType=="303"?e=i+"/pages/bundle.html?cid="+r:e=i+"/pages/info.html?cid="+r:e=i+"/pages/elective.html";break;case"4":r?e=i+"/shop/item.html?itemid="+r:e=i+"/shop/list.html";break;case"5":r&&(e=i+" /portal/form.html?formId="+r);break;case"6":break;case"7":a.busIdEncrypt&&(e=i+"/vscard/views.html?vcardId="+a.busIdEncrypt);break;case"8":r?e=l(r):e=i+"/pages/recruit.html";break;case"9":r?e=l(r):e=i+"/pages/cases.html";break;case"10":r?e=l(r):e=i+"/pages/products.html";break;case"11":r?e=l(r):e=i+"/pages/Wikipedia.html?busType=5";break;case"12":r?e=l(r):e=i+"/pages/QA.html?busType=4";break;case"13":r?e=l(r):e=i+"/pages/photos.html";break;case"14":break;case"15":e=i+" /pages/ware.html?cid="+a.affiliatedBusId+"&rid="+r;break;case"16":r?e=i+"/portal/preview/doc.html?aid="+r:e=i+"/aroom/#/settings/companynews/brochure";break;case"17":r?e=l(r):e=i+"/pages/qualification.html";break;case"18":r?e=l(r):e=i+"/pages/honour.html";break;case"19":r?e=l(r):e=i+"/pages/partner.html";break;case"20":e=i+"/shop/discount.html?couponCode="+a.busIdEncrypt;break;case"21":r&&(e=l(r,"",n));break;case"22":r?e=l(r):e=i+"/pages/Album.html?busType=14";break;case"23":break;case"24":e=i+"/vscard/enterpriseNews.html";break}window.location.href=e}function l(a,t,e,r){var n=t?`shareId=${base64.encode(t+"")}`:"",i="/square/"+a+".shtml"+(n?"?"+n:"");return e&&(i="/pubinfo/"+a+".html?associated=eyJiaW5kaW5mbyI6IiIsImJpbmRjb3Vyc2UiOiIiLCJiaW5kc2hvcCI6IiIsImJpbmRmb3JtIjoiIn0="+(n?"&"+n:"")),r&&r.infoType=="19"&&(i="/business/shareHomepageImg.html?homepageId="+a+(n?"&"+n:"")),r&&r.infoType=="20"&&(i="/business/shareHomepageFile.html?homepageId="+a+(n?"&"+n:"")),window.location.origin+i}function f(a,t){var e=window.cdnPath;return a?a.replace(/(^\s*)/g,"").indexOf("http")!=0&&a.indexOf(e)<0&&a.indexOf("data:image")!==0?e+a:a:e+(t||"/static/common/image/course/defult.jpg")}function k(a){var t=new RegExp("(^|&)"+a+"=([^&]*)(&|$)","i"),e=window.location.search.substr(1).match(t),r="";return e!=null&&(r=e[2]),t=null,e=null,r==null||r==""||r=="undefined"?"":r}function s(a){var t=new RegExp("(^|&)"+a+"=([^&]*)(&|$)"),e=window.location.search.substr(1).match(t);return e!=null?unescape(e[2]):null}function X(){for(var a=location.href.split("/"),t=0,e=a.length;t<e;t++){var r=a[t];if(r.indexOf(".shtml")>-1)return r.split(".shtml")[0]}return!1}function Y(){for(var a=location.href.split("/"),t=0,e=a.length;t<e;t++){var r=a[t];if(r.indexOf(".html")>-1)return r.split(".html")[0]}return!1}function p(a){for(var t=document.cookie,e=t.split("; "),r=0;r<e.length;r++){var n=e[r].split("=");if(n[0]==a)return n[1]}return""}function F(a,t){var e=30,r=new Date;r.setTime(r.getTime()+e*24*60*60*30),document.cookie=a+"="+escape(t)+";path=/;expires="+r.toGMTString()}function Z(a){var t=(a||"").toLowerCase(),e=t.lastIndexOf("."),r=t.substring(e),n="1"+r;return!!/^\w+\.(avi|mov|rmvb|rm|flv|mp4|3gp)$/.test(n)}function K(a,t){if(new Date(parseInt(a))=="Invalid Date"&&new Date(parseInt(a)*1e3)=="Invalid Date")return"--";new Date(parseInt(t))=="Invalid Date"&&new Date(parseInt(t)*1e3)=="Invalid Date"&&(t=Date.parse(new Date));var e=t-a;if(e<0)return"\u521A\u521A";if(e<6e4)return(parseInt(e/1e3,10)||1)+"\u79D2\u524D";if(e<3600*1e3)return parseInt(e/1e3/60,10)+"\u5206\u949F\u524D";if(e<24*3600*1e3)return parseInt(e/1e3/3600,10)+"\u5C0F\u65F6\u524D";if(e<7*24*3600*1e3)return parseInt(e/1e3/3600/24,10)+"\u5929\u524D";if(e<30*24*3600*1e3)return parseInt(e/1e3/3600/24/7,10)+"\u661F\u671F\u524D";if(e<365*24*3600*1e3)return parseInt(e/1e3/3600/24/30,10)+"\u6708\u524D";var r=new Date(parseInt(a)),n=parseInt(r.getMonth()+1)<10?"0"+(r.getMonth()+1):r.getMonth()+1,i=parseInt(r.getDate())<10?"0"+r.getDate():r.getDate(),v=parseInt(r.getHours())<10?"0"+r.getHours():r.getHours(),h=parseInt(r.getMinutes())<10?"0"+r.getMinutes():r.getMinutes();return`${r.getFullYear()}-${n}-${i}`}function ee(a){var t=this;R(a)}function R(a){var t=this,e=S.length;e?re(S[0],function(){S.shift(),R.call(t,a)}):a.call(t)}function re(a,t){var e=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.src=a+"?v="+new Date().valueOf(),typeof t=="function"&&(r.onload=r.onreadystatechange=function(){(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")&&(t(),r.onload=r.onreadystatechange=null)}),e.appendChild(r)}function o(){var a=navigator.userAgent.toLowerCase(),t=a.indexOf("wujiapp")>-1;if(window.__wxjs_environment==="miniprogram")return 4;if(a.match(/MicroMessenger/i)=="micromessenger"){var e={win:!1,mac:!1},r=navigator.platform;return e.win=r.indexOf("Win")==0,e.mac=r.indexOf("Mac")==0,e.win||e.mac?9:1}else return window.localStorage.appAdapt==="true"||window.localStorage.appAdapt===!0||t?5:s("channel")?s("channel"):/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)?2:3}function ue(a){for(var t=location.search,e=t.split("&"),r="",n=0,i=e.length;n<i;n++){var v=e[n];v.indexOf("?"+a)>-1?n+1!==i&&(r+="?"):v.indexOf(a)==0||(r+=r&&r!="?"?"&"+v:v)}return r}function he(a){switch(a){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 M(){var a="wxa09a4ca9fba61af1",t="wx60a208c13d8acea1",e="test.1x.cn";cdnPath=="//pre-static.1x.cn"&&(a="wxc0968245d91aaf85",t="wx60a208c13d8acea1",e="pre.xx.cn"),cdnPath=="//static.wxbig.cn"&&(a="wxc420bf93bbe26d62",t="wx1ae69c2e8734dd28",e="sys.wxdad.cn");var r=window.location.href,n=decodeURIComponent(decodeURIComponent(r)),i=n+(n.indexOf("?")>-1?"&":"?")+"noevxtoken=true",v=encodeURIComponent(i),h=window.frames.length!=parent.frames.length;$.ajax({headers:{token:p("token")},type:"GET",url:"/api/welink/wechat/qrCode/url",data:{targetServerNameForOverride:s("targetServerNameForOverride")||void 0,envTypeName:"official_account",sceneTypeName:"consulting",redirectUrl:v},dataType:"json",async:!1,success:function(u){if(u.code==200&&u.success){var g=u.data||{};g.url&&(h?window.parent.location.href=g.url:window.location.replace(g.url))}}})}})();
|