filesbox/web/dist/design/designstatic/front/js/bundle.js

2 lines
16 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
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<h.length;y++)e!=parseInt(h[y])&&t.push(h[y]);for(var y=0,f=t.length;y<f;y++){var g=t[y];y<3&&(v+=","+g)}v=usid[0]+"&uid="+e+v,r=window.location.origin+window.location.pathname+"?"+v,window.history.replaceState(o,u,r);var X=window.location.origin+"/pages/wap/bundle.html"+window.location.search;if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)){var b=document.referrer;b.indexOf("?")==-1&&(window.location.href=X)}}}}),$.ajax({headers:{token:getCookie("token")},type:"GET",contentType:"application/json",url:"/api/course/getCourseDetail?projectid=12",data:{courseId:getPar("cid"),isFromLive:sceneType=="1"?1:void 0,sceneId:sceneId||void 0},dataType:"json",async:!0,success:function(d){var e=d.data,r=e.introduce,o=e.personNumLimit,u=e.personNumLimit-e.personNumCount,v=e.isInCart,h=e.deadline,t=e.price,y=window.location.href,f=e.courseName,h=e.deadline;retit=e.courseName;var g=e.courseId,X=e.isPay,b=e.cover,de=e.isInCart;if(e.courseType==3)var J=3;else var J=4;var le=location.search;if(le.indexOf("?")!=-1)var Y=le.substr(1),he=Y.split("&"),xe=he[0].split("cid="),pe=Y.split("&uid=");var M=window.location.origin+window.location.pathname+"?"+Y,E=pe[1]?pe[1].split(","):[],G=e.parentCourseId,L=new Array,m=new Array;e.parentCourseId==0?(L[0]={goodsId:g,price:t,goodsUrl:M,goodsType:J,goodsName:f,cover:b,introduce:r,endTime:h},m[0]={courseId:g,courseName:f,orderTitle:f,orderType:J,price:t,firstLevelId:E[1],secondLevelId:E[2],thirdLevelId:E[3]}):(L[0]={goodsId:g,price:t,goodsUrl:M,goodsType:J,goodsName:f,cover:b,sourceSchoolCourseId:G,introduce:r,endTime:h},m[0]={courseId:g,courseName:f,orderTitle:f,orderType:J,price:t,firstLevelId:E[1],secondLevelId:E[2],thirdLevelId:E[3],sourceSchoolCourseId:G}),sceneType==1&&(m[0].sceneType="1",m[0].sceneId=sceneId);var ye="<img src="+(cdnPath+e.cover)+" />";$(".curfeng").html(ye);var s='<h2 class="curhtit">'+e.courseName+"</h2>";e.childClassifyName==""?s+='<p class="curint">'+e.mainClassifyName+"</p>":s+='<p class="curint">'+e.mainClassifyName+" > "+e.childClassifyName+"</p>",e.isFavorite==!0?(s+='<span class="curcolls">\u5DF2\u6536\u85CF</span>',s+='<span style="display:none;" class="curcoll">\u6536\u85CF</span>'):(s+='<span class="curcoll">\u6536\u85CF</span>',s+='<span style="display:none;" class="curcolls">\u5DF2\u6536\u85CF</span>'),s+='<span class="curshare">\u5206\u4EAB</span>',s+='<p class="cursimp">'+r+"</p>",s+='<p class="cursered">',e.price==0?s+='<span class="curselv">\u514D\u8D39</span>':(s+='<span class="cursi">\uFFE5</span>'+(e.price/100).toFixed(2)+"",s+='<span class="cursezhe">\uFFE5'+(e.oldPrice/100).toFixed(2)+"</span>"),s+="</p>",e.deadline==0?s+='<p class="curexplain">\u81EA\u8D2D\u4E70\u4E4B\u65E5\u8D77<span class="curseorange">\u6C38\u4E45\u6709\u6548':s+='<p class="curexplain">\u81EA\u8D2D\u4E70\u4E4B\u65E5\u8D77<span class="curseorange">'+e.deadline+"\u5929</span>\u6709\u6548",e.personNumLimit!=0&&(s+='<span class="ml10" style="color:#b2b2b2;">\u5DF2\u8D2D\u4E70<span class="redes">'+e.personNumCount+"</span>/"+e.personNumLimit+"</span>"),s+="</p>",e.isOpenSignUp==!0?e.isPay==!0?s+='<a class="cursign" href="javascript:void(0);">\u8FDB\u5165\u5B66\u4E60</a>':e.price==0?s+='<a class="cursign" href="jav