theory-legacy.74730885.js 5.6 KB

1
  1. !function(){function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function n(e,t,i,n,r,a,o){try{var s=e[a](o),c=s.value}catch(l){return void i(l)}s.done?t(c):Promise.resolve(c).then(n,r)}var r=document.createElement("style");r.innerHTML="._groupTitle_4zxi8_1{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;display:flex;align-items:center}._groupTitle_4zxi8_1 ._groupImg_4zxi8_9{width:.96rem;height:.96rem;border-radius:.26667rem;overflow:hidden;margin-right:.32rem}._cell_4zxi8_16{background:#f7f8f9;border-radius:.10667rem;margin:.26667rem .26667rem 0;width:auto;padding:.32rem .21333rem;overflow:hidden}._cell_4zxi8_16 ._title_4zxi8_24{font-size:.37333rem;color:#666}._time_4zxi8_28{font-size:.37333rem;color:#999;padding-bottom:.16rem}._imgCover_4zxi8_33{width:100%;height:4.66667rem}._musicTitle_4zxi8_37{width:6.13333rem}._theory_4zxi8_40{--van-collapse-item-content-padding: 0}._theory_4zxi8_40 .van-collapse-item{margin:0 .37333rem .26667rem;border-radius:.21333rem;overflow:hidden}._theory_4zxi8_40 .van-collapse-item__content{overflow:hidden;padding-bottom:.26667rem}\n",document.head.appendChild(r),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.610f0a70.js","./index-legacy.c07bb851.js","./index-legacy.4a75d877.js","./index-legacy.2a6c9f99.js","./index-legacy.897f3849.js","./hooks-legacy.f81762aa.js","./index-legacy.87bcd48f.js","./index-legacy.02065493.js","./use-tab-status-legacy.1f35f332.js","./index-legacy.78ce4f6b.js","./use-id-legacy.54528695.js","./index-legacy.bbc2b10e.js"],(function(e){"use strict";var i,r,a,o,s,c,l,u,d,f,m,h,g,p,_,v;return{setters:[function(e){i=e.d,r=e.y,a=e.g,o=e.n,s=e.j,c=e.C,l=e.$},function(e){u=e.C},function(e){d=e.L},function(e){f=e.I},function(e){m=e.C,h=e.a},function(e){g=e.S},function(e){p=e.u},function(e){_=e.C},function(e){v=e.C},function(){},function(){},function(){},function(){}],execute:function(){var y={groupTitle:"_groupTitle_4zxi8_1",groupImg:"_groupImg_4zxi8_9",cell:"_cell_4zxi8_16",title:"_title_4zxi8_24",time:"_time_4zxi8_28",imgCover:"_imgCover_4zxi8_33",musicTitle:"_musicTitle_4zxi8_37",theory:"_theory_4zxi8_40"};e("default",i({name:"special",data:function(){return this.$route.query,{activeNames:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{search:"",page:1,rows:20},theory:null}},mounted:function(){var e=sessionStorage.getItem("theoryCache");if(e){var t=JSON.parse(e);this.theory=t;var i=t.activeNames.split(",").map((function(e){return 1*e}));this.activeNames=i,this.params.search=t.search||""}this.getList(),p("热门资讯")},methods:{getList:function(){var e,i=this;return(e=regeneratorRuntime.mark((function e(){var n,a,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=i.params,e.next=4,r.post("/api-cms/music/theory/app/page",{data:t({},n)});case 4:if(a=e.sent,i.loading=!1,o=a.data||{},!(i.list.length>0&&1===o.pageNo)){e.next=9;break}return e.abrupt("return");case 9:i.list=i.list.concat(o.rows||[]),i.finished=o.pageNo>=o.totalPage,i.params.page=o.pageNo+1,i.dataShow=i.list.length>0,s=i.list,i.activeNames.length<=0&&i.list.length>0&&i.activeNames.push(s[0].id),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(0),i.dataShow=!1,i.finished=!0;case 21:case"end":return e.stop()}}),e,null,[[0,17]])})),function(){var t=this,i=arguments;return new Promise((function(r,a){var o=e.apply(t,i);function s(e){n(o,r,a,s,c,"next",e)}function c(e){n(o,r,a,s,c,"throw",e)}s(void 0)}))})()},onSearch:function(e){this.params.search=e,this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},onDetail:function(e){if(e.linkUrl)window.location.href=e.linkUrl;else{var t="STUDENT"===a.platformType?"student":"teacher";o({api:"openWebView",content:{url:"".concat(location.origin,"/").concat(t,"/#/theoryDetail?id=").concat(e.id),orientation:1,isHideTitle:!1}})}}},render:function(){var e,t,i=this;return s("div",{class:[y.theory,"theory"]},[s(v,{position:"top",class:"mb12"},{default:function(){return[s(_,{border:!1},null),s(g,{onSearch:i.onSearch,modelValue:i.params.search},null)]}}),this.dataShow?s(d,{class:y.videoList,loading:this.loading,"onUpdate:loading":function(e){return i.loading=e},finished:this.finished,finishedText:"没有更多了",immediateCheck:!1,onLoad:this.getList},(t=e=this.list.map((function(e){return s(m,{modelValue:i.activeNames,"onUpdate:modelValue":function(e){return i.activeNames=e},border:!1},{default:function(){return[s(h,{title:e.name,name:e.id,center:!0},{default:function(){return[e.newsInformationList.map((function(e){return s(u,{title:e.title,class:y.cell,border:!1,onClick:function(){i.onDetail(e)},titleClass:["van-ellipsis",y.title]},null)}))]},title:function(){return s("div",{class:[y.groupTitle]},[e.url&&s(f,{src:e.url,fit:"cover",class:y.groupImg},null),s("p",{class:["van-ellipsis",y.musicTitle]},[e.name])])}})]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!l(t)?e:{default:function(){return[e]}})):s(c,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无内容"},null)])}}))}}}))}();