var h=Object.defineProperty;var o=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var r=(e,t,s)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,n=(e,t)=>{for(var s in t||(t={}))c.call(t,s)&&r(e,s,t[s]);if(o)for(var s of o(t))m.call(t,s)&&r(e,s,t[s]);return e};import{r as d,s as p,p as u,C as g}from"./index.a9c80450.js";import{d as f,a as i,S as _,M as y,ar as v,as as S,C as x,I as C,x as N}from"./vendor.cd162bf7.js";/* empty css              *//* empty css               *//* empty css               *//* empty css               *//* empty css                */import{C as T}from"./index.a64b1b02.js";/* empty css               */const j="_groupTitle_4zxi8_1",w="_groupImg_4zxi8_9",b="_cell_4zxi8_16",L="_title_4zxi8_24",I="_time_4zxi8_28",z="_imgCover_4zxi8_33",V="_musicTitle_4zxi8_37",k="_theory_4zxi8_40";var a={groupTitle:j,groupImg:w,cell:b,title:L,time:I,imgCover:z,musicTitle:V,theory:k};function U(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!N(e)}var R=f({name:"special",data(){return this.$route.query,{activeNames:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{search:"",page:1,rows:20},theory:null}},mounted(){let e=sessionStorage.getItem("theoryCache");if(e){const t=JSON.parse(e);this.theory=t;let s=t.activeNames.split(",").map(l=>l*1);this.activeNames=s,this.params.search=t.search||""}this.getList()},methods:{async getList(){try{let e=this.params;const t=await d.post("/api-cms/music/theory/app/page",{data:n({},e)});this.loading=!1;const s=t.data||{};if(this.list.length>0&&s.pageNo===1)return;this.list=this.list.concat(s.rows||[]),this.finished=s.pageNo>=s.totalPage,this.params.page=s.pageNo+1,this.dataShow=this.list.length>0;const l=this.list;this.activeNames.length<=0&&this.list.length>0&&this.activeNames.push(l[0].id)}catch{this.dataShow=!1,this.finished=!0}},onSearch(e){this.params.search=e,this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.getList()},onDetail(e){if(e.linkUrl)window.location.href=e.linkUrl;else{let t=p.platformType==="STUDENT"?"student":"teacher";u({api:"openWebView",content:{url:`${location.origin}/${t}/#/theoryDetail?id=${e.id}`,orientation:1,isHideTitle:!1}})}}},render(){let e;return i("div",{class:[a.theory,"theory"]},[i(_,{offsetTop:0,position:"top",class:"mb12"},{default:()=>[i(T,{onSearch:this.onSearch,modelValue:this.params.search},null)]}),this.dataShow?i(y,{class:a.videoList,loading:this.loading,"onUpdate:loading":t=>this.loading=t,finished:this.finished,finishedText:"\u6CA1\u6709\u66F4\u591A\u4E86",immediateCheck:!1,onLoad:this.getList},U(e=this.list.map(t=>i(v,{modelValue:this.activeNames,"onUpdate:modelValue":s=>this.activeNames=s,border:!1},{default:()=>[i(S,{title:t.name,name:t.id,center:!0},{default:()=>[t.newsInformationList.map(s=>i(x,{title:s.title,class:a.cell,border:!1,onClick:()=>{this.onDetail(s)},titleClass:["van-ellipsis",a.title]},null))],title:()=>i("div",{class:[a.groupTitle]},[t.url&&i(C,{src:t.url,fit:"cover",class:a.groupImg},null),i("p",{class:["van-ellipsis",a.musicTitle]},[t.name])])})]})))?e:{default:()=>[e]}):i(g,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5185\u5BB9"},null)])}});export{R as default};
