1 |
- !function(){function e(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(u){c=!0,o=u}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,r,o,a,i){try{var c=e[a](i),u=c.value}catch(l){return void n(l)}c.done?t(u):Promise.resolve(u).then(r,o)}var i=document.createElement("style");i.innerHTML="._lessonCourseware_hwgf4_1{min-height:100vh;background-color:#ffe8ce;padding:.26667rem 0;box-sizing:border-box}._filter_hwgf4_7{font-size:.37333rem;font-weight:500}.van-action-sheet{max-height:40%}\n",document.head.appendChild(i),System.register(["./index-legacy.90c82f08.js","./index-legacy.ca29101b.js","./index-legacy.4e015ad0.js","./index-legacy.c6e5fda1.js","./index-legacy.c8871c95.js","./Picker-legacy.aeff9f1a.js","./index-legacy.fe10c814.js","./use-tab-status-legacy.bafe466c.js","./index-legacy.64e3b474.js","./index-legacy.f9492e3a.js"],(function(t){"use strict";var n,o,i,c,u,l,s,f,d,y,p,h,g,m,v,b,w,j,O,x,S;return{setters:[function(e){n=e.d,o=e.ah,i=e.ag,c=e.r,u=e.f,l=e.$,s=e.y,f=e.c,d=e.aj,y=e.F,p=e.q,h=e.a5,g=e.b5,m=e.ak,v=e.P,b=e.m,w=e.g},function(e){j=e.C},function(e){O=e.c},function(e){x=e.O},function(e){S=e.P},function(){},function(){},function(){},function(){},function(){}],execute:function(){var C="_lessonCourseware_hwgf4_1",P="_filter_hwgf4_7";t("default",n({name:"lessonCourseware",setup:function(){var t=o(),n=i(),k=c({loading:!0,list:[],actionShow:!1,actionName:"课程类型",actionKey:"",showRight:"select"!=t.query.code&&u().isTeacher}),A=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].sortNo]?t[e[n].sortNo].push(e[n]):t[e[n].sortNo]=[e[n]];return t},_=function(){var e,n=(e=regeneratorRuntime.mark((function e(){var n,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(k.loading=!0,"select"!==t.query.code){e.next=13;break}return e.prev=2,e.next=5,b.post(w.platformApi+"/courseSchedule/getCourseware/".concat(t.query.courseScheduleId));case 5:n=e.sent,Array.isArray(null==n?void 0:n.data)&&(o=n.data.map((function(e){return r(r({},e),{},{coverImg:e.coverImg,name:e.coursewareName,id:e.lessonCoursewareId,courseNum:e.coursewareNum})})),k.list=A(o),console.log("🚀 ~ data.list:",k.list)),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,b.post(w.platformApi+"/courseSchedule/myCourseware");case 16:a=e.sent,Array.isArray(null==a?void 0:a.data)&&(i=k.actionKey?a.data.filter((function(e){return e.courseTypeCode===k.actionKey})):a.data,k.list=A(i)),e.next=22;break;case 20:e.prev=20,e.t1=e.catch(13);case 22:k.loading=!1;case 23:case"end":return e.stop()}}),e,null,[[2,9],[13,20]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function c(e){a(i,r,o,c,u,"next",e)}function u(e){a(i,r,o,c,u,"throw",e)}c(void 0)}))});return function(){return n.apply(this,arguments)}}();l((function(){_()}));var N=s((function(){var t=Object.entries(O).map((function(t){var n=e(t,2),r=n[0],o=n[1];return{id:r,name:o,text:o,value:r,color:r===k.actionKey?"var(--van-primary)":""}}));return t.unshift({id:"",name:"课程类型",text:"全部",value:"",color:""===k.actionKey?"var(--van-primary)":""}),t}));return function(){return f("div",{class:[C,!Object.values(k.list).length&&"emptyRootContainer"]},[f(d,{border:!1,background:"rgba(255, 232, 206, 1)",color:"rgba(124, 61, 18, 1)",title:"云教材"},{right:function(){return f(y,null,[k.showRight&&f("div",{class:P,onClick:function(){return k.actionShow=!0}},[k.actionName,p(" "),f(h,{style:{transform:"rotate(90deg)"},name:"play"},null)," "])])}}),f(g,{name:"van-fade"},{default:function(){return[!k.loading&&Object.keys(k.list).map((function(e){return f(j,{term:e,list:k.list[e],onItemClick:function(e){return o=e,void("select"!==t.query.code?n.push({path:"/courseList",query:{id:o.id}}):n.push({path:"/courseList",query:r(r({},t.query),{},{id:o.id})}));var o}},null)}))]}}),k.loading&&f(x,null,null),!k.loading&&!Object.values(k.list).length&&f(m,{tips:"没有课件"},null),f(v,{position:"bottom",round:!0,show:k.actionShow,"onUpdate:show":function(e){return k.actionShow=e}},{default:function(){return[f(S,{class:"popupBottomSearch",columns:N.value,onCancel:function(){return k.actionShow=!1},onConfirm:function(e){var t,n=e.selectedOptions;t=n[0],k.actionKey=t.id,k.actionName=t.name,k.actionShow=!1,_()}},null)]}})])}}}))}}}))}();
|