1 |
- !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,o,u,a){try{var s=e[u](a),c=s.value}catch(i){return void r(i)}s.done?t(c):Promise.resolve(c).then(n,o)}var o=document.createElement("style");o.innerHTML="._unitLesson_qa46k_1{min-height:100vh;background-color:#ffe8ce;padding:.26667rem 0;box-sizing:border-box}\n",document.head.appendChild(o),System.register(["./index-legacy.c1f63540.js","./index-legacy.3fae306e.js","./index-legacy.7e71b67e.js"],(function(e){"use strict";var r,o,u,a,s,c,i,l,f,d,p,m,g;return{setters:[function(e){r=e.d,o=e.ah,u=e.ag,a=e.R,s=e.r,c=e.$,i=e.c,l=e.aj,f=e.ak,d=e.m,p=e.g},function(e){m=e.C},function(e){g=e.O}],execute:function(){var v="_unitLesson_qa46k_1";e("default",r({name:"unit-Lesson",setup:function(){var e=o(),r=u(),b=a({}),y=s({loading:!0,list:[]}),h=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].sortNo]?t[e[r].sortNo].push(e[r]):t[e[r].sortNo]=[e[r]];return t},O=function(){var r,o=(r=regeneratorRuntime.mark((function r(){var n,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return y.loading=!0,r.prev=1,r.next=4,d.post(p.platformApi+"/courseSchedule/getCoursewareByClassId",{requestType:"form",data:{classGroupId:e.query.classGroupId}});case 4:n=r.sent,Array.isArray(null==n?void 0:n.data)&&(o=n.data.filter((function(e){return e.unitTestNum})).map((function(e){return t(t({},e),{},{coverImg:e.coverImg,name:e.coursewareName,id:e.lessonCoursewareId,courseNum:e.coursewareNum,courseNumName:"共".concat(e.coursewareNum,"次测验")})})),y.list=h(o)),r.next=11;break;case 8:r.prev=8,r.t0=r.catch(1),console.log(r.t0);case 11:y.loading=!1;case 12:case"end":return r.stop()}}),r,null,[[1,8]])})),function(){var e=this,t=arguments;return new Promise((function(o,u){var a=r.apply(e,t);function s(e){n(a,o,u,s,c,"next",e)}function c(e){n(a,o,u,s,c,"throw",e)}s(void 0)}))});return function(){return o.apply(this,arguments)}}();c((function(){b.value=t({},JSON.parse(sessionStorage.getItem("unit-create")||"{}")),O()}));return function(){return i("div",{class:[v,Object.values(y.list).length?"":"emptyRootContainer"]},[i(g,{onGetHeight:function(e){document.documentElement.style.setProperty("--header-height",e+"px")}},{default:function(){return[i(l,{border:!1,background:"rgba(255, 232, 206, 1)",color:"rgba(124, 61, 18, 1)",title:"选择教材"},null)]}}),Object.keys(y.list).map((function(e){return i(m,{term:e,list:y.list[e],onItemClick:function(e){return t=e,b.value.coursewareName=t.coursewareName,b.value.lessonCoursewareId=t.lessonCoursewareId,sessionStorage.setItem("unit-create",JSON.stringify(b.value)),void r.push({path:"/uni-test",query:{lessonCoursewareId:t.lessonCoursewareId}});var t}},null)})),!y.loading&&!Object.values(y.list).length&&i(f,{btnStatus:!1,tips:"暂无教材"},null)])}}}))}}}))}();
|