index-legacy.73c235ce.js 4.3 KB

1
  1. !function(){function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e,r,n,o,i,c){try{var a=t[i](c),l=a.value}catch(u){return void r(u)}a.done?e(l):Promise.resolve(l).then(n,o)}var o=document.createElement("style");o.innerHTML="._grid_15ttl_1 .van-grid-item .van-grid-item__content{padding:0;background:transparent}._grid_15ttl_1 .van-grid-item .van-grid-item__content:after{display:none}._grid_15ttl_1 ._gridItem_15ttl_8{position:relative;width:100%;height:3.46667rem;border-radius:.21333rem;overflow:hidden;background:#f7cb8f}._grid_15ttl_1 ._gridItem_15ttl_8 ._cover_15ttl_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_15ttl_1 ._gridItem_15ttl_8 ._title_15ttl_27{position:relative;text-align:center;padding:.37333rem;color:#742c00;font-size:.37333rem}._grid_15ttl_1 ._gridItem_15ttl_8 ._num_15ttl_34{position:absolute;left:50%;bottom:.32rem;transform:translate(-50%);display:flex;align-items:center;justify-content:center;font-size:.32rem;width:50%;height:.53333rem;border-radius:.53333rem;background-color:#fff;color:#742c00}._grid_15ttl_1 ._gridItem_15ttl_8 ._look_15ttl_49{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(t){"use strict";var r,o,i,c,a,l,u,s,d,f,g,p,_;return{setters:[function(t){r=t.d,o=t.aV,i=t.ag,c=t.r,a=t.$,l=t.c,u=t.q,s=t.ai,d=t.ak,f=t.m,g=t.f},function(t){p=t.G,_=t.a}],execute:function(){var m="_grid_15ttl_1",b="_gridItem_15ttl_8",v="_cover_15ttl_16",y="_num_15ttl_34";t("default",r({name:"lessonCourseware",setup:function(){var t=o(),r=i(),h=c({loading:!0,list:[]}),j=function(){var e,r=(e=regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.loading=!0,"select"!==t.query.code){e.next=13;break}return e.prev=2,e.next=5,f.post(g.platformApi+"/courseSchedule/getCourseware/".concat(t.query.courseScheduleId));case 5:r=e.sent,Array.isArray(null==r?void 0:r.data)&&(h.list=r.data.map((function(t){return{coverImg:t.coverImg,name:t.coursewareName,id:t.lessonCoursewareId,courseNum:t.coursewareNum}}))),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:e.next=22;break;case 13:return e.prev=13,e.next=16,f.post(g.platformApi+"/courseSchedule/myCourseware");case 16:n=e.sent,Array.isArray(null==n?void 0:n.data)&&(h.list=n.data),e.next=22;break;case 20:e.prev=20,e.t1=e.catch(13);case 22:h.loading=!1;case 23:case"end":return e.stop()}}),e,null,[[2,9],[13,20]])})),function(){var t=this,r=arguments;return new Promise((function(o,i){var c=e.apply(t,r);function a(t){n(c,o,i,a,l,"next",t)}function l(t){n(c,o,i,a,l,"throw",t)}a(void 0)}))});return function(){return r.apply(this,arguments)}}();a((function(){j()}));return function(){var n,o;return l("div",{style:{paddingTop:"14px",boxSizing:"border-box"},class:!h.list.length&&"emptyRootContainer"},[l(p,{gutter:14,columnNum:3,class:m},(o=n=h.list.map((function(n){return l(_,null,{default:function(){return[l("div",{class:b,style:{background:n.coverImg?"":"hsla(".concat(Math.floor(360*Math.random()),",50%,50%,.8)")},onClick:function(){return function(n){"select"!==t.query.code?r.push({path:"/courseList",query:{id:n.id}}):r.push({path:"/courseList",query:e(e({},t.query),{},{id:n.id})})}(n)}},[l("img",{src:n.coverImg,class:v},null),l("div",{class:y},[u("共"),n.courseNum,u("课")])])]}})})),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!d(o)?n:{default:function(){return[n]}})),!h.loading&&!h.list.length&&l(s,{tips:"没有课件"},null)])}}}))}}}))}();