var cdnPath="",wapurl=window.location.origin+"/pages/wap/bundle.html"+window.location.search;getPar("cid")||(window.location.href="/");var urls=location.search;if(urls.indexOf("?")!=-1){/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)&&(window.location.href=wapurl);var ster=urls.substr(1),sty=ster.split("&"),cide=sty[0].split("cid="),usid=ster.split("&uid=")}var deusid=usid[1]?usid[1].split(","):[],sceneId=getPar("sceneId")||"",sceneType=getPar("sceneType")?getPar("sceneType"):0,urlpd=window.location.href,futit,retit,userInfo,channels=getchannel();function details(i){$.ajax({headers:{token:getCookie("token")},type:"GET",url:"/api/jwt/getLoginUser?projectid=45",data:{},dataType:"json",async:!0,success:function(d){if(d.code==200){userInfo=d.data,i&&i(d);for(var e=d.data.userId,r="",o="",u="\u8BFE\u7A0B\u8BE6\u60C5",v="",h=deusid,t=[],y=0;y";$(".curfeng").html(ye);var s='

'+e.courseName+"

";e.childClassifyName==""?s+='

'+e.mainClassifyName+"

":s+='

'+e.mainClassifyName+" > "+e.childClassifyName+"

",e.isFavorite==!0?(s+='\u5DF2\u6536\u85CF',s+=''):(s+='\u6536\u85CF',s+=''),s+='\u5206\u4EAB',s+='

'+r+"

",s+='

',e.price==0?s+='\u514D\u8D39':(s+='\uFFE5'+(e.price/100).toFixed(2)+"",s+='\uFFE5'+(e.oldPrice/100).toFixed(2)+""),s+="

",e.deadline==0?s+='

\u81EA\u8D2D\u4E70\u4E4B\u65E5\u8D77\u6C38\u4E45\u6709\u6548':s+='

\u81EA\u8D2D\u4E70\u4E4B\u65E5\u8D77'+e.deadline+"\u5929\u6709\u6548",e.personNumLimit!=0&&(s+='\u5DF2\u8D2D\u4E70'+e.personNumCount+"/"+e.personNumLimit+""),s+="

",e.isOpenSignUp==!0?e.isPay==!0?s+='\u8FDB\u5165\u5B66\u4E60':e.price==0?s+='\u514D\u8D39\u62A5\u540D':(v==!0?s+='\u52A0\u5165\u8D2D\u7269\u8F66':s+='\u52A0\u5165\u8D2D\u7269\u8F66',s+='\u7ACB\u5373\u8D2D\u4E70'):(s+='\u52A0\u5165\u8D2D\u7269\u8F66',s+='\u7ACB\u5373\u8D2D\u4E70');for(var l="",Z=0,ge=e.courseSubList.length;Z',l+='',l+='
',l+='

'+I.courseName+"

",I.childClassifyName==""?l+='

'+I.mainClassifyName+"

":l+='

'+I.mainClassifyName+" > "+I.childClassifyName+"

",l+='

'+I.introduce+"

",l+='

',I.price==0?l+='\u514D\u8D39':(l+='\uFFE5'+(I.price*(e.price/e.oldPrice)/100).toFixed(2)+"",l+='\uFFE5'+(I.price/100).toFixed(2)+""),l+="

",l+="
",l+='\u67E5\u770B\u8BE6\u60C5',l+="",l+=""}$(".detailed").html(l),$(".curwithin").html(s),$(".coursemain").html(e.detail)==""?$(".coursemain").html("
"):$(".coursemain").html(e.detail),$(".active span").html(e.courseCount),$(".curcoll").on("click",function(){channels=getchannel(),user.isLogin(function(n){parseInt(n.code)==200?$.ajax({headers:{token:getCookie("token")},type:"GET",url:"/api/course/collectCourse?projectid=37",data:{courseId:g,pvid:channels.pvid,uvcid:channels.uvcid,shareUserId:channels.shareUserId,clientType:channels.channel},dataType:"json",async:!0,success:function(p){$(".curcoll").hide(),$(".curcolls").show()}}):parseInt(n.code)==401?user.loginLayer(function(p){parseInt(p.code)==200&&details()}):layer.alert("\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01")})}),$(".curcolls").on("click",function(){user.isLogin(function(n){parseInt(n.code)==200?$.ajax({headers:{token:getCookie("token")},type:"GET",url:"/api/course/cancelCollectCourse?projectid=37",data:{courseId:g},dataType:"json",async:!0,success:function(p){$(".curcolls").hide(),$(".curcoll").show()}}):parseInt(n.code)==401?user.loginLayer(function(p){parseInt(p.code)==200&&details()}):layer.alert("\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01")})});var Ie="/static/front/images/shareBackground.png",R=e;$(".curshare").on("click",function(){R.userInfo=userInfo,R.iscourse=!0,user.isLogin(function(n){if(parseInt(n.code)==200){var p=window.imgEditor,N=this,A=n.data.userId,j=window.location.href;p.shareLayer(j,Ie,function(C){C.success||N.unlogin()},R)}else parseInt(n.code)==401?user.loginLayer(function(C){parseInt(C.code)==200&&details()}):layer.alert("\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01")})}),$(".cursign").on("click",function(){channels=getchannel(),e.isOpenSignUp==!0&&user.isLogin(function(n){parseInt(n.code)==200?n.data.userTypeExact=="STUDENT"?X==!0?window.location.href="/myroom/#/learn/center":u<=0&&o!=0?layer.alert("\u8D2D\u4E70\u4EBA\u6570\u5DF2\u6EE1\uFF01"):t==0?(channels.orderList=m,layer.open({type:1,offset:"auto",content:'
\u8D2D\u4E70\u6210\u529F\uFF0C\u8FDB\u5165\u5B66\u4E60\u4E2D\u5FC3\uFF01
',btn:"\u786E\u8BA4",btnAlign:"c",yes:function(){$.ajax({headers:{token:getCookie("token")},type:"POST",url:"/api/order/createOrder?projectid=22",contentType:"application/json",dataType:"json",data:JSON.stringify(channels),async:!0,success:function(p){window.location.href="/myroom/#/learn/center"}}),layer.closeAll()}})):$.ajax({headers:{token:getCookie("token")},type:"POST",url:"/api/order/shoppingCart?projectid=22",contentType:"application/json",dataType:"json",data:JSON.stringify({goodsList:coverUid(L),pvid:channels.pvid,uvcid:channels.uvcid,shareUserId:channels.shareUserId,clientType:channels.channel}),async:!0,success:function(p){window.location.href="/pay/#/shopping"}}):layer.alert("\u53EA\u6709\u5B66\u751F\u8D26\u53F7\u624D\u80FD\u8D2D\u4E70\uFF01"):parseInt(n.code)==401?user.loginLayer(function(p){parseInt(p.code)==200&&details(function(N){if(N.data.userTypeExact=="STUDENT"){var A=N.data.userId,j="",C="",ee="\u8BFE\u7A0B\u8BE6\u60C5",T="",B=location.search;if(B.indexOf("?")!=-1)var _=B.substr(1),ae=_.split("&"),me=ae[0].split("cid="),z=_.split("&uid=");for(var w=z[1]?z[1].split(","):[],x=w,S=[],c=0;c\u8D2D\u4E70\u6210\u529F\uFF0C\u8FDB\u5165\u5B66\u4E60\u4E2D\u5FC3\uFF01',btn:"\u786E\u8BA4",btnAlign:"c",yes:function(){$.ajax({headers:{token:getCookie("token")},type:"POST",url:"/api/order/createOrder?projectid=22",contentType:"application/json",dataType:"json",data:JSON.stringify(channels),async:!0,success:function(Ce){window.location.href="/myroom/#/learn/center"}}),layer.closeAll()}})):$.ajax({headers:{token:getCookie("token")},type:"POST",url:"/api/order/shoppingCart?projectid=22",contentType:"application/json",dataType:"json",data:JSON.stringify({goodsList:coverUid(W),pvid:channels.pvid,uvcid:channels.uvcid,shareUserId:channels.shareUserId,clientType:channels.channel}),async:!0,success:function(Ce){window.location.href="/pay/#/shopping"}})}})}else layer.alert("\u53EA\u6709\u5B66\u751F\u8D26\u53F7\u624D\u80FD\u8D2D\u4E70\uFF01")})}):layer.alert("\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01")})}),$(".curshop").on("click",function(){channels=getchannel(),e.isOpenSignUp==!0&&user.isLogin(function(n){parseInt(n.code)==200?n.data.userTypeExact=="STUDENT"?v==!0?$(".curshop").addClass("huise"):u==0&&o!=0?layer.alert("\u8D2D\u4E70\u4EBA\u6570\u5DF2\u6EE1\uFF01"):de==!1&&$.ajax({headers:{token:getCookie("token")},type:"POST",url:"/api/order/shoppingCart?projectid=22",contentType:"application/json",dataType:"json",data:JSON.stringify({goodsList:coverUid(L),pvid:channels.pvid,uvcid:channels.uvcid,shareUserId:channels.shareUserId,clientType:channels.channel}),async:!0,success:function(p){details(),layer.msg("\u52A0\u5165\u6210\u529F",{time:1500})}}):layer.alert("\u53EA\u6709\u5B66\u751F\u8D26\u53F7\u624D\u80FD\u52A0\u5165\u8D2D\u7269\u8F66\uFF01"):parseInt(n.code)==401?user.loginLayer(function(p){parseInt(p.code)==200&&details(function(N){if(N.data.userTypeExact=="STUDENT"){var A=N.data.userId,j="",C="",ee="\u8BFE\u7A0B\u8BE6\u60C5",T="",B=location.search;if(B.indexOf("?")!=-1)var _=B.substr(1),ae=_.split("&"),me=ae[0].split("cid="),z=_.split("&uid=");for(var w=z[1]?z[1].split(","):[],x=w,S=[],c=0;c