1 |
- !function(){function e(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 t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,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 r(e,t,n,r,i,a,s){try{var o=e[a](s),u=o.value}catch(c){return void n(c)}o.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var s=e.apply(t,n);function o(e){r(s,i,a,o,u,"next",e)}function u(e){r(s,i,a,o,u,"throw",e)}o(void 0)}))}}var a=document.createElement("style");a.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}._videoItem_9rujg_1{border-radius:.21333rem;background-color:#fff;overflow:hidden;width:4.48rem;margin-bottom:.32rem}._videoItem_9rujg_1 ._viCover_9rujg_8{height:2.50667rem;width:100%;vertical-align:middle}._videoItem_9rujg_1 ._viSection_9rujg_13{padding:.21333rem .32rem .34667rem}._videoItem_9rujg_1 ._viTitle_9rujg_16{font-size:.37333rem;color:#1a1a1a;line-height:.53333rem}._videoItem_9rujg_1 ._viUserNum_9rujg_21{padding-top:.10667rem;color:#ff802c;font-size:.32rem}._videoItem_9rujg_1 ._viPrice_9rujg_26{padding-top:.26667rem;font-size:.37333rem;color:#999}._videoItem_9rujg_1 ._viPrice_9rujg_26 ._priceNum_9rujg_31{color:red;font-size:.42667rem;font-weight:700}._videoItem_9rujg_1 ._viPrice_9rujg_26 ._priceNum_9rujg_31 i{font-size:.4rem;font-style:normal}._videoItem_9rujg_1 ._viPrice_9rujg_26 ._label_9rujg_40{padding-left:.21333rem}._videoItem_9rujg_1 ._subjectName_9rujg_43{position:absolute;bottom:.16rem;right:.16rem;font-size:.26667rem;padding:.08rem .13333rem;color:#fff;line-height:1;border-radius:.05333rem;background:rgba(0,0,0,.29)}\n",document.head.appendChild(a),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.6ac2a941.js","./index-legacy.bdbc14c4.js","./index-legacy.3ccba950.js","./index-legacy.43e69380.js","./index-legacy.4be048cf.js","./organ-search-legacy.d54ba7b7.js","./hooks-legacy.5cc9e329.js","./index-legacy.c8c5bc4e.js","./index-legacy.cae55a25.js","./use-id-legacy.ef8b5e97.js","./use-tab-status-legacy.d7434e0b.js","./index-legacy.9d25098b.js"],(function(e){"use strict";var n,r,a,s,o,u,c,l,d,_,m,f,p,g,v,b,h,j,S;return{setters:[function(e){n=e.d,r=e.j,a=e.A,s=e.F,o=e.g,u=e.y,c=e.N,l=e.C,d=e.aS,_=e.$},function(e){m=e.C},function(e){f=e.S},function(e){p=e.S},function(e){g=e.L},function(e){v=e.I},function(e){b=e.O},function(e){h=e.a,j=e.S,S=e.u},function(){},function(){},function(){},function(){},function(){}],execute:function(){var y="_videoClass_1udm0_1",w="_label_1udm0_9",x="_classHeader_1udm0_21",C="_videoList_1udm0_28",N="_videoItem_9rujg_1",O="_viCover_9rujg_8",P="_viSection_9rujg_13",k="_viTitle_9rujg_16",L="_viUserNum_9rujg_21",T="_viPrice_9rujg_26",I="_priceNum_9rujg_31",E="_label_9rujg_40",D="_subjectName_9rujg_43",R=n({name:"VideoItem",props:{item:Object,onClick:{type:Function,default:function(e){}}},render:function(){var e=this,t=this.item;return r("div",{class:N,onClick:function(){e.onClick(t)}},[r("div",{style:{position:"relative"}},[r(v,{class:O,fit:"cover",src:null==t?void 0:t.lessonCoverUrl},null),r("span",{class:D},[null==t?void 0:t.lessonSubjectName])]),r("div",{class:P},[r("div",{class:[k,"van-ellipsis"]},[null==t?void 0:t.lessonName]),r("div",{class:T},[r("span",{class:I},["VIP"===t.payType?r("span",{style:{color:"#C76E21"}},[a("会员")]):r(s,null,[(null==t?void 0:t.lessonPrice)>0&&r(s,null,[r("i",null,[a("¥")]),null==t?void 0:t.lessonPrice]),(null==t?void 0:t.lessonPrice)<=0&&0!==t.auditVersion&&r(s,null,[r("i",null,[a("¥")]),a("0")]),(null==t?void 0:t.lessonPrice)<=0&&0===t.auditVersion&&r("span",{style:{color:"#20BEA0"}},[a("免费")])])]),r("span",{class:E},[a("/"),null==t?void 0:t.lessonCount,a("课时")])]),r("div",{class:L},[null==t?void 0:t.countStudent,a("人学习")])])])}});e("default",n({name:"VideoClass",data:function(){return{apiSuffix:"STUDENT"===o.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 i(regeneratorRuntime.mark((function t(){var n,r,i,a,s,c,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.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"===o.platformType?(r=o.user.data).defaultSubject&&(e.params.lessonSubject=r.defaultSubject,e.params.subjectName=r.defaultSubjectName):(i=h(j.VIDEO)).id?(e.params.lessonSubject=Number(i.id),e.params.subjectName=i.name):(s=e.subjectList,c=(null===(a=o.user.data)||void 0===a?void 0:a.subjectId)||"",l=c?Number(c.split(",")[0]):null,s.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(),S("视频课");case 13:case"end":return t.stop()}}),t,null,[[0,7]])})))()},methods:{getList:function(){var e=this;return i(regeneratorRuntime.mark((function n(){var r,i,a,s;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,r=t({},e.params),o.version&&(r.version=o.version||"",r.platform="STUDENT"===o.platformType?"ios-student":"ios-teacher"),i="STUDENT"===o.platformType?"/api-student/videoLesson/selectGroup":"/api-teacher/videoLessonGroup/page",r.myself=!1,n.next=10,u.post(i,{data:t({},r)});case 10:if(a=n.sent,e.loading=!1,s=a.data||{},!(e.list.length>0&&1===s.pageNo)){n.next=15;break}return n.abrupt("return");case 15:e.list=e.list.concat(s.rows||[]),e.finished=s.pageNo>=s.totalPage,e.params.page=s.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 i(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.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"===o.platformType?this.setDefaultSubject(this.params.lessonSubject):this.params.lessonSubject&&h(j.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"===o.platformType&&(t.share=1),this.$router.push({path:"/videoDetail",query:t})}},render:function(){var e,t,n=this;return r("div",{class:y},[r(p,{offsetTop:0,position:"top"},{default:function(){return[r(m,{class:x,border:!1,isFixed:!1,background:"transparent"},null),r(f,{placeholder:"请输入老师名称/课程名称",onSearch:n.onSearch},{left:function(){return r("div",{class:w,onClick:function(){n.searchStatus=!n.searchStatus,n.openStatus=!n.openStatus}},[n.params.subjectName,r(c,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}})]}}),r("div",null,[this.dataShow?r(g,{class:C,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 r(R,{item:e,onClick:n.onDetail},null)})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)?e:{default:function(){return[e]}})):r(l,{btnStatus:!1,tips:"暂无视频课"},null)]),r(d,{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&&r(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)]}})])}}))}}}))}();
|