(function(){var v=parseInt($(window).width()),o=["/static/chatroom/js/xgplayer/xgplayer.js","/static/common/live/xgplayer-flv.js","/static/common/live/xgplayer-hls.js","/static/chatroom/video/playerreview.js"];$(".coursemain img").each(function(e){var t=$(this),i,r;$("").attr("src",$(t).attr("src")).load(function(){i=this.width,r=this.height,i>=v&&$(t).css("width","100%").css("height","auto"),i<1200&&$(t).css("width",i+"px").css("height",r+"px")})});function E(e){var t=new Date(e),i=t.getFullYear()+"-",r=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,n=t.getDate()+" ",g=t.getHours()+":",c=t.getMinutes()+":",a=t.getSeconds();return i+r+n+g+c+a}var x;$.ajax({headers:{token:s("token")},type:"GET",url:"/api/jwt/getLoginUser?projectid=45",data:{},dataType:"json",async:!1,success:function(e){e.code==200&&(x=e.data.userId)}}),Date.prototype.format=function(e){var t={"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(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var i in t)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,RegExp.$1.length==1?t[i]:("00"+t[i]).substr((""+t[i]).length)));return e},document.write(''),document.write(''),document.write(''),document.write(''),document.write('');var y={init:function(e){var t=this;t.formId=e,t.getFormDate()},getFormDate:function(){var e=this;$.ajax({type:"GET",headers:{token:s("token")},url:" /api/common/findFormForStu?projectid=16",contentType:"application/json",dataType:"json",data:{formId:e.formId},async:!0,success:function(t){e.carryFormEvent(t)}})},carryFormEvent:function(e){var t=this,i=e.data||{},r=i.formInfo||{},n=i.answerInfo;window.playerItemList=r.itemList,parseInt(r.anonymousLimit)==0&&!s("token")?t.renderFormState("unlogin",e):parseInt(r.isMultiSubmit)==0&&parseInt(n.isFilled)==1?t.renderFormState("completed"):t.renderFormHtml(r)},renderFormState:function(e,t){var i=this,r="";switch(e){case"completed":r='

\u6211\u4EEC\u5DF2\u6536\u5230\u60A8\u7684\u53CD\u9988, \u975E\u5E38\u611F\u8C22\u3002

';break;case"unlogin":r='

\u672A\u767B\u5F55

\u8BF7\u60A8\u767B\u5F55\u540E\u586B\u5199\uFF0C\u975E\u5E38\u611F\u8C22\uFF01

';break}$(".relationformul").html(r),$(".loginFormEvent").click(function(){user.loginLayer(function(n){n.success&&i.getFormDate()})})},renderFormHtml:function(e){var t=this;e.referenceSavePath&&$.ajax({type:"get",url:e.referenceSavePath,dataType:"html",success:function(i){if(i){var r="
"+e.title+"
"+e.description+"
"+i+"
";$(".relationformul").html(r)}t.bindEvent()}})},bindEvent:function(){$.getScript("/designschool/form/js/formScript.js",function(){})}};function h(){var e,t,i,r=p()||u("formId");if(r){$(".relation").append("
");var n=j(window.location.href,"formId",r);window.history.replaceState({path:n},"",n),y.init(r)}function g(){var c="/static/front/images/shareBackground.png",a=res.isVertical?res.computerPicPathVertical||[]:res.computerPicPath||[],F=a&&a.length?a[0].sourcePath:"",l={courseName:res.title,commonHomepageInfoId:p()||u("aid"),cover:F||"/static/common/image/information/defult.jpg",introduce:res.introduce};l.userInfo=user.useInfo||{},l.iscourse=res.infoType=="1"?"shortvideo":"information",user.isLogin(function(d){if(parseInt(d.code)==200){var I=window.imgEditor,M=this,b=d.data.userId,S=window.location.href;I.shareLayer(S,c,function(f){f.success||M.unlogin()},l)}else parseInt(d.code)==401?user.loginLayer(function(f){parseInt(f.code)==200&&h()}):layer.open({content:"\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01",btn:"\u786E\u5B9A"})})}}$(function(){setTimeout(h,10)});function T(e){if(!e)return"";var t=1024;return e-1)return r.split(".shtml")[0]}return!1}function s(e){for(var t=document.cookie,i=t.split("; "),r=0;r