filesbox/web/dist/information/js/information.js

2 lines
28 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(function(){var we=/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent),ke=parseInt($(window).width()),X=o("isnorelated")?parseInt(o("isnorelated")):0,H=["/design/designstatic/chatroom/js/xgplayer/xgplayer.js","/design/designstatic/common/live/xgplayer-flv.js","/design/designstatic/common/live/xgplayer-hls.js","/design/designstatic/chatroom/video/playerreview.js"],ee=["\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"],ie=["\u4E0D\u9650","1-2\u5E74","2-3\u5E74","3-5\u5E74","5\u5E74\u4EE5\u4E0A"],ae=["\u4E0D\u9650","\u793E\u62DB","\u6821\u62DB"],te=["\u4E0D\u9650","\u5168\u804C","\u517C\u804C"],re=["\u4E0D\u9650","\u5C0F\u5B66","\u521D\u4E2D","\u9AD8\u4E2D","\u4E2D\u4E13","\u5927\u4E13","\u672C\u79D1","\u7855\u58EB","\u535A\u58EB","\u5176\u4ED6"],Ve=cdnPath=="//pre-static.1x.cn"?"https://pre.xx.cn":cdnPath=="//static.wxbig.cn"?location.origin:"https://test.1x.cn",ne=parseInt(o("mobile")||o("mobile100")||0),oe=o("targetServerNameForOverride")?"&targetServerNameForOverride="+o("targetServerNameForOverride"):"",$e=o("p"),Ie=o("r"),se=$e&&Ie?1:0,E=D("w")||D("kf")||se?parseInt(D("w")||D("kf")||se):0,Ye=o("kf")?parseInt(o("kf")):0,Ke={},z=0,le=1,m=60,F,de=0,O=0,Qe=ne?0:1,ce,pe,ve,fe,ue=4,Ze="",Xe=0,Te=$(".curriculum").width(),ei=(Te-(ue-1)*12)/ue,ii=[],ai=0,ti=!1;if(o("token")&&he("token",decodeURIComponent(o("token"))),o("vctoken")&&he("vctoken",decodeURIComponent(o("vctoken"))),!f("vxtoken")&&E&&(x()==1||x()==9)?(window.localStorage.setItem("isreport",1),De()):!f("vxtoken")&&E&&!(x()==1||x()==9||x()==5)||f("vxtoken")&&E||f("token"),(x()==4||x()==5||x()==1||x()==2)&&($(".head,.foot").remove(),x()==5&&($(".inforht").remove(),$(".inforpm").css({"margin-top":"14px"}))),o("associated")&&location.pathname.indexOf("pubinfo")>-1){var ze=new Base64,Se=decodeURIComponent(o("associated")),M=JSON.parse(ze.decode(Se))||{};ce=M.bindinfo||void 0,pe=M.bindcourse||void 0,ve=M.bindshop||void 0,fe=M.bindform||void 0}$(".coursemain img").each(function(i){var e=$(this),a,t;$("<img/>").attr("src",$(e).attr("src")).load(function(){a=this.width,t=this.height,a>=ke&&$(e).css("width","100%").css("height","auto"),a<1200&&$(e).css("width",a+"px").css("height",t+"px")})}),Date.prototype.format=function(i){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(i)&&(i=i.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var a in e)new RegExp("("+a+")").test(i)&&(i=i.replace(RegExp.$1,RegExp.$1.length==1?e[a]:("00"+e[a]).substr((""+e[a]).length)));return i};function Ce(){var i=document.createElement("script");i.setAttribute("type","text/javascript"),i.setAttribute("src","/information/js/qrcode.min.js"),document.getElementsByTagName("head")[0].appendChild(i)}function Oe(){$.ajax({type:"GET",headers:{token:f("token")},url:"/api/disk/getHomepageDetail",contentType:"application/json",dataType:"json",data:{infoID:q()||o("aid")||G(),infoId:ce,courseId:pe,shopId:ve,formId:fe,targetServerNameForOverride:o("targetServerNameForOverride")||void 0},async:!0,success:function(i){if(!i.success)return i.code=="user.bindSignError"?layer.open({content:"\u65E0\u6743\u9650\u67E5\u770B\uFF0C\u8BF7\u767B\u5F55",btn:["\u786E\u5B9A","\u53D6\u6D88"],yes:function(r,l){layer.close(r),setTimeout(()=>{location.href=`/#/login?redirect=${encodeURIComponent(location.pathname)}&isInfo=1`},100)}}):layer.open({content:i.message||"\u8D44\u8BAF\u4E0D\u5B58\u5728",btn:"\u786E\u5B9A"}),!1;var e=i.data,a=e.likeCount||0;window.information_sourceType=Me(e.infoType),window.information_busType=e.infoType,window.information_sourceId=q()||o("aid")||G();var t=e.isLike||!1,n=e.infoSource?JSON.parse(e.infoSource):{url:""},s=e.title,c=U(e.modifyTime||e.createTime);if($("title").text(s),$(".inforht").text(s),we)if(e.infoType=="2"){for(var d=e.employAreaList||[],p="",v,W=U(e.modifyTime||e.createTime),I=0;I<d.le