2 lines
48 KiB
JavaScript
2 lines
48 KiB
JavaScript
|
(function(){$("title").text(""),$(".inforht").text(""),$(".coursemain").html("");var ui=parseInt($(window).width()),hi=n("isnorelated")?parseInt(n("isnorelated")):0,Ei=["/design/designstatic/chatroom/video/video.min.7.4.js","/design/designstatic/chatroom/video/flv.min.js","/design/designstatic/chatroom/video/videojs-contrib-hls.min.js","/design/designstatic/chatroom/video/playerreview.js"],gi=["\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"],mi=["\u4E0D\u9650","1-2\u5E74","2-3\u5E74","3-5\u5E74","5\u5E74\u4EE5\u4E0A"],yi=["\u4E0D\u9650","\u793E\u62DB","\u6821\u62DB"],xi=["\u4E0D\u9650","\u5168\u804C","\u517C\u804C"],bi=["\u4E0D\u9650","\u5C0F\u5B66","\u521D\u4E2D","\u9AD8\u4E2D","\u4E2D\u4E13","\u5927\u4E13","\u672C\u79D1","\u7855\u58EB","\u535A\u58EB","\u5176\u4ED6"],Ni=navigator.userAgent.match(/iPad/)||navigator.userAgent.match(/iPhone/)||navigator.userAgent.match(/iPod/),Fi=cdnPath=="//pre-static.1x.cn"?"https://pre.xx.cn":cdnPath=="//static.wxbig.cn"?location.origin:"https://test.1x.cn",Be=n("mobile")?parseInt(n("mobile")):0,_e=n("mobile100")?parseInt(n("mobile100")):0,Ie=n("targetServerNameForOverride")?"&targetServerNameForOverride="+n("targetServerNameForOverride"):"",wi=n("p"),ki=n("r"),Di=n("tr")?n("tr"):0,Ze=wi&&ki?1:0,pe=Ce("w")||Ce("kf")||Ze?parseInt(Ce("w")||Ce("kf")||Ze):0,Ri=n("kf")?parseInt(n("kf")):0,Bi={},z=0,ve=1,U=60,Te,ei=0,fe=0,ii=Be?0:1,ai,ti,ri,oi,ni=2,_i="",si=0,$i=$(".curriculum").width(),Li=($i-(ni-1)*12)/ni,Ji=[],Gi=0,qi=!1,Le='<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" />',Q,k,Se={},Vi=[];if(n("token")&&di("token",decodeURIComponent(n("token"))),n("vctoken")&&di("vctoken",decodeURIComponent(n("vctoken"))),!p("vxtoken")&&pe&&(h()==1||h()==9)?(window.localStorage.setItem("isreport",1),Ue()):!p("vxtoken")&&pe&&!(h()==1||h()==9||h()==5)||p("vxtoken")&&pe||p("token"),(h()==4||h()==5||h()==1||h()==2)&&$(".head,.foot").remove(),n("associated")&&location.pathname.indexOf("pubinfo")>-1){var Ii=new Base64,Ti=decodeURIComponent(n("associated")),je=JSON.parse(Ii.decode(Ti))||{};ai=je.bindinfo||void 0,ti=je.bindcourse||void 0,ri=je.bindshop||void 0,oi=je.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>=ui&&$(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 Si(){let i=document.getElementsByTagName("head")[0],e=document.createElement("script");e.type="text/javascript",e.src="/information/js/qrcode.min.js";let a=document.createElement("script");a.type="text/javascript",a.src="/information/js/shareproduct.js",i.appendChild(e),i.appendChild(a)}function ji(){$.ajax({type:"GET",headers:{token:p("token")},url:"/api/disk/getHomepageDetail",contentType:"application/json",dataType:"json",data:{infoID:Z()||n("aid")||ee(),infoId:ai,courseId:ti,shopId:ri,formId:oi,targetServerNameForOverride:n("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,c){layer.close(r),setTimeout(()=>{location.href=`/#/login?redirect=${encodeURIComponent(location.pathname)}&isInfo=1`},100)}}):layer.open({con
|