theory-legacy.ad2637fa.js 5.5 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,o,a){try{var s=e[o](a),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(["./index-legacy.f8641610.js","./index-legacy.fc510843.js","./index-legacy.13f535d5.js","./index-legacy.4ddb0119.js","./index-legacy.c8b60294.js","./index-legacy.f387dd32.js","./index-legacy.e8dcdcc8.js","./hooks-legacy.1d4168e3.js","./use-tab-status-legacy.5d29085f.js","./index-legacy.8a3dede6.js","./use-id-legacy.30c2e9af.js"],(function(e){"use strict";var i,r,o,a,s,c,l,u,d,f,m,h,p,g,_;return{setters:[function(e){i=e.d,r=e.e,o=e.s,a=e.p,s=e.i,c=e.C,l=e.$},function(e){u=e.C},function(e){d=e.L},function(e){f=e.S},function(e){m=e.I},function(e){h=e.C,p=e.a},function(e){g=e.C},function(e){_=e.u},function(){},function(){},function(){}],execute:function(){var v={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(),_("热门资讯")},methods:{getList:function(){var e,i=this;return(e=regeneratorRuntime.mark((function e(){var n,o,a,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(o=e.sent,i.loading=!1,a=o.data||{},!(i.list.length>0&&1===a.pageNo)){e.next=9;break}return e.abrupt("return");case 9:i.list=i.list.concat(a.rows||[]),i.finished=a.pageNo>=a.totalPage,i.params.page=a.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,o){var a=e.apply(t,i);function s(e){n(a,r,o,s,c,"next",e)}function c(e){n(a,r,o,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"===o.platformType?"student":"teacher";a({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:[v.theory,"theory"]},[s(f,{offsetTop:0,position:"top",class:"mb12"},{default:function(){return[s(g,{onSearch:i.onSearch,modelValue:i.params.search},null)]}}),this.dataShow?s(d,{class:v.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(h,{modelValue:i.activeNames,"onUpdate:modelValue":function(e){return i.activeNames=e},border:!1},{default:function(){return[s(p,{title:e.name,name:e.id,center:!0},{default:function(){return[e.newsInformationList.map((function(e){return s(u,{title:e.title,class:v.cell,border:!1,onClick:function(){i.onDetail(e)},titleClass:["van-ellipsis",v.title]},null)}))]},title:function(){return s("div",{class:[v.groupTitle]},[e.url&&s(m,{src:e.url,fit:"cover",class:v.groupImg},null),s("p",{class:["van-ellipsis",v.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)])}}))}}}))}();