1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;a<arguments.length;a++){var s=null!=arguments[a]?arguments[a]:{};a%2?e(Object(s),!0).forEach((function(e){n(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function n(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,a,s,r,i){try{var o=e[r](i),u=o.value}catch(c){return void n(c)}o.done?t(u):Promise.resolve(u).then(a,s)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(s,r){var i=e.apply(t,n);function o(e){a(i,s,r,o,u,"next",e)}function u(e){a(i,s,r,o,u,"throw",e)}o(void 0)}))}}var r=document.createElement("style");r.innerHTML="._videoClass_1udm0_1 .van-list__loading,._videoClass_1udm0_1 .van-list__finished-text,._videoClass_1udm0_1 .van-list__error-text{width:100%}._videoClass_1udm0_1 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._videoClass_1udm0_1 ._label_1udm0_9{margin-right:.21333rem;font-size:.37333rem}._videoClass_1udm0_1 ._label_1udm0_9 .van-list__loading,._videoClass_1udm0_1 ._label_1udm0_9 .van-list__finished-text,._videoClass_1udm0_1 ._label_1udm0_9 .van-list__error-text{width:100%}._videoClass_1udm0_1 ._label_1udm0_9 .iconfont-down{margin-left:.10667rem}._videoClass_1udm0_1 ._classHeader_1udm0_21{background:linear-gradient(#59e5d5,30%,#ffffff)}._videoClass_1udm0_1 ._banner_1udm0_24{background:#fff;padding:.32rem .37333rem}._videoClass_1udm0_1 ._videoList_1udm0_28{display:flex;justify-content:space-between;flex-wrap:wrap;padding:.37333rem}\n",document.head.appendChild(r),System.register(["./index-legacy.fba2875c.js","./index-legacy.e7460ea1.js","./index-legacy.fc679d65.js","./index-legacy.edb65d0c.js","./index-legacy.a7012d0a.js","./video-item-legacy.e3d1616d.js","./organ-search-legacy.5ed69723.js","./hooks-legacy.148eb332.js","./index-legacy.40eca993.js","./use-height-legacy.233a2ec8.js","./index-legacy.7dcec7b3.js","./index-legacy.8921f068.js","./use-id-legacy.db87b112.js","./use-tab-status-legacy.8752ccde.js","./index-legacy.d92f7da7.js","./index-legacy.78361179.js"],(function(e){"use strict";var n,a,r,i,o,u,c,l,d,f,p,m,h,b,_,g,j;return{setters:[function(e){n=e.d,a=e.g,r=e.w,i=e.j,o=e.M,u=e.C,c=e.aR,l=e.Z},function(e){d=e.C},function(e){f=e.S},function(e){p=e.S},function(e){m=e.L},function(e){h=e.V},function(e){b=e.O},function(e){_=e.a,g=e.S,j=e.u},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var v="_videoClass_1udm0_1",S="_label_1udm0_9",y="_classHeader_1udm0_21",x="_videoList_1udm0_28";e("default",n({name:"VideoClass",data:function(){return{apiSuffix:"STUDENT"===a.platformType?"/api-student":"/api-teacher",search:"",list:[],dataShow:!0,loading:!1,finished:!1,listLoading:!0,params:{search:"",lessonSubject:null,subjectName:"全部声部",page:1,rows:20},searchStatus:!1,openStatus:!1,subjectList:[]}},mounted:function(){var e=this;return s(regeneratorRuntime.mark((function t(){var n,s,i,o,u,c,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.get("".concat(e.apiSuffix,"/subject/subjectSelect?type=VIDEO"));case 3:n=t.sent,e.subjectList=n.data||[],t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:"TEACHER"===a.platformType?(s=a.user.data).defaultSubject&&(e.params.lessonSubject=s.defaultSubject,e.params.subjectName=s.defaultSubjectName):(i=_(g.VIDEO)).id?(e.params.lessonSubject=Number(i.id),e.params.subjectName=i.name):(u=e.subjectList,c=(null===(o=a.user.data)||void 0===o?void 0:o.subjectId)||"",l=c?Number(c.split(",")[0]):null,u.forEach((function(t){(t.subjects||[]).forEach((function(t){t.id===Number(l)&&(e.params.lessonSubject=t.id,e.params.subjectName=t.name)}))}))),e.listLoading=!1,e.getList(),j("视频课");case 13:case"end":return t.stop()}}),t,null,[[0,7]])})))()},methods:{getList:function(){var e=this;return s(regeneratorRuntime.mark((function n(){var s,i,o,u;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!e.listLoading){n.next=3;break}return n.abrupt("return");case 3:return e.listLoading=!0,s=t({},e.params),a.version&&(s.version=a.version||"",s.platform="STUDENT"===a.platformType?"ios-student":"ios-teacher"),i="STUDENT"===a.platformType?"/api-student/videoLesson/selectGroup":"/api-teacher/videoLessonGroup/page",s.myself=!1,n.next=10,r.post(i,{data:t({},s)});case 10:if(o=n.sent,e.loading=!1,u=o.data||{},!(e.list.length>0&&1===u.pageNo)){n.next=15;break}return n.abrupt("return");case 15:e.list=e.list.concat(u.rows||[]),e.finished=u.pageNo>=u.totalPage,e.params.page=u.pageNo+1,e.dataShow=e.list.length>0,n.next=25;break;case 21:n.prev=21,n.t0=n.catch(0),e.dataShow=!1,e.finished=!0;case 25:return n.prev=25,e.listLoading=!1,n.finish(25);case 28:case"end":return n.stop()}}),n,null,[[0,21,25,28]])})))()},setDefaultSubject:function(e){return s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.post("/api-teacher/teacher/defaultSubject",{params:{subjectId:e}});case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})))()},onSort:function(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.searchStatus=!1,"TEACHER"===a.platformType?this.setDefaultSubject(this.params.lessonSubject):this.params.lessonSubject&&_(g.VIDEO,JSON.stringify({id:this.params.lessonSubject,name:this.params.subjectName}),"set"),this.getList()},onSearch:function(e){this.params.search=e,this.onSort()},onDetail:function(e){var t={groupId:e.id};"TEACHER"===a.platformType&&(t.share=1),this.$router.push({path:"/videoDetail",query:t})}},render:function(){var e,t,n=this;return i("div",{class:v},[i(p,{offsetTop:0,position:"top"},{default:function(){return[i(d,{class:y,border:!1,isFixed:!1,background:"transparent"},null),i(f,{placeholder:"请输入老师名称/课程名称",onSearch:n.onSearch},{left:function(){return i("div",{class:S,onClick:function(){n.searchStatus=!n.searchStatus,n.openStatus=!n.openStatus}},[n.params.subjectName,i(o,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}})]}}),i("div",null,[this.dataShow?i(m,{class:x,loading:this.loading,"onUpdate:loading":function(e){return n.loading=e},finished:this.finished,finishedText:"没有更多了",onLoad:this.getList,immediateCheck:!1},(t=e=this.list.map((function(e){return i(h,{item:e,onClick:n.onDetail},null)})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!l(t)?e:{default:function(){return[e]}})):i(u,{btnStatus:!1,tips:"暂无视频课"},null)]),i(c,{show:this.searchStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:function(){return n.searchStatus=!1},onClosed:function(){return n.openStatus=!1}},{default:function(){return[n.openStatus&&i(b,{subjectList:n.subjectList,onSort:n.onSort,modelValue:n.params.lessonSubject,"onUpdate:modelValue":function(e){return n.params.lessonSubject=e},subjectName:n.params.subjectName,"onUpdate:subjectName":function(e){return n.params.subjectName=e}},null)]}})])}}))}}}))}();
|