unit-Lesson-legacy.d68641ac.js 4.2 KB

1
  1. !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e,t,r,o,n,i,a){try{var c=e[i](a),s=c.value}catch(u){return void r(u)}c.done?t(s):Promise.resolve(s).then(o,n)}var o=document.createElement("style");o.innerHTML="._grid_82obo_1 .van-grid-item .van-grid-item__content{padding:0;background:transparent}._grid_82obo_1 .van-grid-item .van-grid-item__content:after{display:none}._grid_82obo_1 ._gridItem_82obo_8{position:relative;width:100%;height:3.46667rem;border-radius:.21333rem;overflow:hidden;background:#f7cb8f}._grid_82obo_1 ._gridItem_82obo_8 ._cover_82obo_16{position:absolute;left:0;right:0;top:0;bottom:0;display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}._grid_82obo_1 ._gridItem_82obo_8 ._title_82obo_27{position:relative;text-align:center;padding:.26667rem;color:#742c00}._grid_82obo_1 ._gridItem_82obo_8 ._num_82obo_33{position:absolute;left:50%;bottom:.32rem;transform:translate(-50%);display:flex;align-items:center;justify-content:center;font-size:.32rem;width:75%;height:.53333rem;border-radius:.53333rem;background-color:#fff;color:#742c00}._grid_82obo_1 ._gridItem_82obo_8 ._look_82obo_48{position:absolute;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.6);z-index:10;display:flex;align-items:center;justify-content:center;color:#fff}\n",document.head.appendChild(o),System.register(["./index-legacy.48c8d62c.js","./index-legacy.8429fc95.js"],(function(o){"use strict";var n,i,a,c,s,u,l,d,f,_,g,b,p,m;return{setters:[function(e){n=e.d,i=e.aV,a=e.ag,c=e.R,s=e.r,u=e.$,l=e.c,d=e.q,f=e.ai,_=e.ak,g=e.m,b=e.f},function(e){p=e.G,m=e.a}],execute:function(){var v="_grid_82obo_1",y="_gridItem_82obo_8",h="_cover_82obo_16",w="_title_82obo_27",O="_num_82obo_33";o("default",n({name:"unit-Lesson",setup:function(){var o=i(),n=a(),j=c({}),I=s({loading:!0,list:[]}),k=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I.loading=!0,e.prev=1,e.next=4,g.post(b.platformApi+"/courseSchedule/getCoursewareByClassId",{requestType:"form",data:{classGroupId:o.query.classGroupId}});case 4:t=e.sent,Array.isArray(null==t?void 0:t.data)&&(I.list=[],t.data.map((function(e){e.unitTestNum&&I.list.push(e)}))),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.log(e.t0);case 11:I.loading=!1;case 12:case"end":return e.stop()}}),e,null,[[1,8]])})),function(){var t=this,o=arguments;return new Promise((function(n,i){var a=e.apply(t,o);function c(e){r(a,n,i,c,s,"next",e)}function s(e){r(a,n,i,c,s,"throw",e)}c(void 0)}))});return function(){return t.apply(this,arguments)}}();u((function(){j.value=function(r){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?e(Object(n),!0).forEach((function(e){t(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}({},JSON.parse(sessionStorage.getItem("unit-create")||"{}")),k()}));return function(){var e,t;return l("div",{style:{paddingTop:"14px"},class:[I.list.length>0?"":"emptyRootContainer"]},[I.list.length>0?l(p,{gutter:14,columnNum:3,class:v},(t=e=I.list.map((function(e){return l(m,null,{default:function(){return[l("div",{class:y,style:{background:e.coverImg?"":"hsla(".concat(Math.floor(360*Math.random()),",50%,50%,.8)")},onClick:function(){return function(e){j.value.coursewareName=e.coursewareName,j.value.lessonCoursewareId=e.lessonCoursewareId,sessionStorage.setItem("unit-create",JSON.stringify(j.value)),n.push({path:"/uni-test",query:{lessonCoursewareId:e.lessonCoursewareId}})}(e)}},[l("img",{src:e.coverImg,class:h},null),l("div",{class:w},[e.name]),l("div",{class:O},[d("共"),e.unitTestNum||0,d("次测验")])])]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)?e:{default:function(){return[e]}})):l(f,{btnStatus:!1,tips:"暂无教材"},null)])}}}))}}}))}();