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 r=null!=arguments[a]?arguments[a]:{};a%2?e(Object(r),!0).forEach((function(e){n(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 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,r,i,o){try{var l=e[i](o),c=l.value}catch(u){return void n(u)}l.done?t(c):Promise.resolve(c).then(a,r)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function l(e){a(o,r,i,l,c,"next",e)}function c(e){a(o,r,i,l,c,"throw",e)}l(void 0)}))}}var i=document.createElement("style");i.innerHTML='._base_121xa_1>div{background:url(./header-bg.png) no-repeat top center}._detail_121xa_4{overflow:hidden;--van-nav-bar-background-color: transparent;--van-nav-bar-icon-color: #fff;--van-nav-bar-text-color: #fff;--van-nav-bar-title-text-color: #fff;min-width:100vmin;--plyr-color-main: var(--van-primary);--plyr-control-icon-size: .32rem}._detail_121xa_4 .plyr__controls .plyr__controls__item:first-child{background-color:var(--van-primary);color:#fff;border-radius:50%}._base_121xa_1 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._shareBtn_121xa_22{display:flex;align-items:flex-start;color:#fff;font-size:.37333rem;line-height:.53333rem!important}._shareBtn_121xa_22 .van-image{width:.48rem;height:.48rem;margin-right:.16rem}._bgImg_121xa_34{position:absolute;left:0;top:0;width:100%;height:7.06667rem;-o-object-fit:cover;object-fit:cover;filter:blur(.26667rem)}._bgContent_121xa_43{position:absolute;top:0;height:7.06667rem;width:100%;background-color:rgba(0,0,0,.5);backdrop-filter:blur(.53333rem);-webkit-backdrop-filter:blur(.53333rem)}._musicContent_121xa_52{position:relative;width:100%;height:13.33333rem;overflow:hidden}._musicContent_121xa_52:after{content:" ";position:absolute;bottom:0;left:0;right:0;background:linear-gradient(180deg,rgba(255,255,255,0) 0%,#ffffff 100%);height:7.65333rem}._musicContent_121xa_52 ._musicTitle_121xa_67{text-align:center;font-size:.42667rem}._musicContent_121xa_52 ._musicImg_121xa_71,._musicContent_121xa_52 ._musicImg_121xa_71 img{width:100%}._musicContent_121xa_52 ._finch_121xa_77{width:4rem;margin:2.13333rem auto 0}._musicContent_121xa_52 ._finchLoad_121xa_81{text-align:center;color:#333;font-size:.4rem;margin-top:.10667rem}._musicContent_121xa_52 iframe{border:none;width:100%;height:13.33333rem;overflow:hidden}._musicContent_121xa_52 iframe body ::-webkit-scrollbar-thumb{background-color:#efeff0;border:.02667rem solid transparent;background-clip:padding-box;border-radius:.13333rem}._collectCell_121xa_99{margin:.26667rem .42667rem 0;background:#ffffff;border-radius:.26667rem;box-shadow:0 0 .16rem rgba(229,229,229,.7);overflow:hidden}._videoOperation_121xa_106{position:absolute;left:0;right:0;bottom:.13333rem;z-index:1}._audition_121xa_113{display:flex;align-items:center;margin:.26667rem .42667rem 0;background:linear-gradient(180deg,#fff0d9 0%,#ffdfb8 100%);border-radius:.42667rem;padding:.18667rem .32rem;font-size:.32rem;font-weight:600;color:#ff731d;height:.48rem}._audition_121xa_113 img{margin-top:-.05333rem;width:.56rem;height:.4rem;margin-right:.29333rem}._collect_121xa_99{display:flex;align-items:center;justify-content:space-between;padding:.29333rem;font-size:.37333rem;color:#666}._collect_121xa_99 ._userInfo_121xa_139{display:flex;align-items:center;padding:.08rem .16rem;background:#d5f3ee;border-radius:.42667rem}._collect_121xa_99 ._userInfo_121xa_139 img{width:.69333rem;height:.69333rem;border-radius:50%}._collect_121xa_99 ._userInfo_121xa_139 span{padding-left:.21333rem;max-width:1.6rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#2dc7aa}._collect_121xa_99 ._collectSection_121xa_159{display:flex;align-items:center}._collect_121xa_99 ._collectSection_121xa_159 img{margin-top:-.05333rem;margin-left:.13333rem;width:.48rem;height:.48rem}._collect_121xa_99 ._collectSection_121xa_159 .van-icon{font-size:.53333rem;margin-top:-.05333rem;margin-left:.13333rem;color:var(--van-primary)}._collect_121xa_99 ._collectSection_121xa_159:first-child{margin-right:.37333rem}._lookAlbum_121xa_178{padding:.45333rem .53333rem;margin-bottom:.4rem;font-size:.37333rem;color:#333;line-height:.53333rem;display:flex;align-items:center;justify-content:space-between}._lookAlbum_121xa_178>div{display:flex;align-items:center;line-height:1}._lookAlbum_121xa_178>div img{width:.53333rem;height:.53333rem;margin-right:.26667rem}._bg_121xa_34{position:relative;height:100%;padding:.42667rem;z-index:11}._musicContainer_121xa_204{position:relative;z-index:12;border-radius:.48rem .48rem 0 0;background-color:#fff;overflow-y:auto}._shareMate_121xa_211{position:relative;margin-top:1.33333rem;display:flex;flex:1;align-items:center;padding:.29333rem .32rem;background:#ffffff;border-radius:.26667rem}._shareMate_121xa_211 ._icon_121xa_221{width:.96rem;height:.96rem;border-radius:.26667rem}._shareMate_121xa_211 ._info_121xa_226{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._shareMate_121xa_211 ._info_121xa_226>h4{color:var(--music-list-item-title-color);font-size:.37333rem;font-weight:600;width:5.33333rem}._shareMate_121xa_211 ._info_121xa_226>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._shareMate_121xa_211 ._tagDiscount_121xa_242{position:absolute;top:-.69333rem;left:.4rem;padding:.05333rem .26667rem .02667rem;height:.61333rem;background:linear-gradient(180deg,#ffb635 0%,#ff4e18 100%);border-radius:.21333rem .21333rem 0 0;font-size:.37333rem;font-weight:600;color:#fff;line-height:.53333rem}._shareVip_121xa_255{position:relative;margin-top:.93333rem;display:flex;flex:1;align-items:center;padding:.18667rem;background:#ffffff;border-radius:.26667rem}._shareVip_121xa_255 ._icon_121xa_221{width:1.92rem;height:1.92rem;border-radius:.26667rem}._shareVip_121xa_255 ._info_121xa_226{margin-left:.16rem;flex:1;word-break:break-all}._shareVip_121xa_255 ._info_121xa_226>h4{color:var(--music-list-item-title-color);font-size:.42667rem;font-weight:600}._shareVip_121xa_255 ._info_121xa_226>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._tagDiscount_121xa_242{position:absolute;top:-.61333rem;left:.4rem;padding:0 .26667rem;height:.61333rem;background:linear-gradient(180deg,#ffb635 0%,#ff4e18 100%);border-radius:.21333rem .21333rem 0 0;font-size:.37333rem;font-weight:600;color:#fff;line-height:.64rem}._buttonDiscount_121xa_297{position:absolute;top:-.48rem;right:.4rem;padding:0 .13333rem;height:.48rem;background:linear-gradient(180deg,#ffb635 0%,#ff4e18 100%);border-radius:.21333rem .21333rem 0 0;font-size:.32rem;font-weight:600;color:#fff;line-height:.53333rem}._pImg_121xa_310{width:1.22667rem;height:1.22667rem;border-radius:.26667rem;overflow:hidden;flex-shrink:0}._musicInfo_121xa_317{padding-top:.61333rem!important;padding-bottom:.61333rem!important;margin-bottom:.26667rem}._musicInfo_121xa_317 ._coomposer_121xa_322{padding-top:.05333rem;padding-left:.16rem;max-width:3.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._musicInfo_121xa_317 ._tag_121xa_242{flex-shrink:0;padding:.05333rem .10667rem 0;border-radius:.10667rem}._musicInfo_121xa_317 ._tag_121xa_242+._tag_121xa_242{margin-left:.13333rem}._musicInfo_121xa_317 ._info_121xa_226{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._musicInfo_121xa_317 ._info_121xa_226>h4{font-size:.42667rem;font-weight:700;color:#1a1a1a;width:4.26667rem;padding-bottom:.08rem}._musicInfo_121xa_317 ._info_121xa_226>p{font-size:.32rem;color:#999;line-height:.45333rem}._musicInfo_121xa_317 ._download_121xa_356{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:.32rem}._musicInfo_121xa_317 ._download_121xa_356 img{height:.64rem;width:.64rem}._musicInfo_121xa_317 ._download_121xa_356 ._iconExchange_121xa_367{display:flex;align-items:center;justify-content:center;background:#f6f6f6;border-radius:50%;font-size:.42667rem;width:.64rem;height:.64rem}._musicInfo_121xa_317 ._exquisiteFlag_121xa_377{width:.37333rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_121xa_317 ._songAlbum_121xa_382{width:.4rem;height:.4rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_121xa_317 .van-cell__value{display:flex;justify-content:space-around}._colSticky_121xa_392{display:flex;align-items:center;justify-content:space-between}._colSticky_121xa_392 ._priceSection_121xa_397{font-size:.37333rem;font-weight:400;color:#999}._colSticky_121xa_392 ._priceSection_121xa_397 ._price_121xa_397{font-size:.58667rem;font-weight:700;color:#ff4e19}._colSticky_121xa_392 ._priceSection_121xa_397 ._price_121xa_397 i{font-style:normal;font-size:.42667rem}._buyBtn_121xa_411{--van-button-default-height: 1.12rem;flex:1;display:flex;align-items:center;justify-content:flex-end}._buyBtn_121xa_411 .van-button{padding:0 .58667rem;font-weight:600}._buyBtn_121xa_411 .van-button+.van-button{margin-left:.32rem}._buyBtn_121xa_411 ._primry_121xa_425{box-shadow:0 .05333rem .18667rem rgba(45,199,170,.25)}._buyBtn_121xa_411 ._member_121xa_428{box-shadow:0 .05333rem .18667rem rgba(187,156,83,.25)}._functionSection_121xa_431{display:flex}._empty_121xa_434{margin:0 auto;font-size:.37333rem;color:#999;line-height:.53333rem;text-align:center;padding-top:1.6rem}._empty_121xa_434 ._emptyImg_121xa_442{width:4.58667rem}._staffContainer_121xa_445{padding:.4rem .4rem .64rem}._staffContainer_121xa_445 ._staffTitle_121xa_448{padding-bottom:.66667rem;font-size:.42667rem;color:#1a1a1a;line-height:.58667rem}._staffContainer_121xa_445 ._staffImg_121xa_454{width:.85333rem;height:.53333rem}._staffContainer_121xa_445 ._name_121xa_458{padding-left:.45333rem;font-size:.34667rem;font-weight:500;color:#333}._staffContainer_121xa_445 ._boxStyle_121xa_464{background:transparent!important;width:.4rem;height:.4rem;border:transparent!important}._staffContainer_121xa_445 ._active_121xa_470{background:#f7f8f9;border-radius:.21333rem}._staffContainer_121xa_445 ._active_121xa_470 ._name_121xa_458{color:#2dc7aa}._staffContainer_121xa_445 .van-cell{padding:.24rem .42667rem;margin-bottom:.16rem}._staffContainer_121xa_445 .van-cell:hover,._staffContainer_121xa_445 .van-cell:active,._staffContainer_121xa_445 .van-cell.active{background:#f7f8f9;border-radius:.21333rem}._staffContainer_121xa_445 .van-cell:hover .name,._staffContainer_121xa_445 .van-cell:active .name,._staffContainer_121xa_445 .van-cell.active .name{color:#2dc7aa}._staffContainer_121xa_445 .van-cell:last-child{margin-bottom:0}._staffContainer_121xa_445 .van-cell__value{display:flex;justify-content:flex-end}._staffContainer_121xa_445 .van-checkbox{overflow:inherit;height:.48rem;display:flex;align-items:center;justify-content:flex-end}._staffContainer_121xa_445 .van-checkbox__icon{height:.4rem;line-height:.4rem;display:inline-block;vertical-align:middle}._staffContainer_121xa_445 .van-checkbox__label{line-height:.4rem}\n',document.head.appendChild(i),System.register(["./icon_uploader-legacy.b178a553.js","./icon-xin-legacy.34fb9986.js","./icon_album-legacy.27017c0f.js","./icon_album_active-legacy.fcd6f4c0.js","./icon_exquisite-legacy.80eb242a.js","./icon_music_active-legacy.77693573.js","./index-legacy.396370dc.js","./index-legacy.67ecd3de.js","./index-legacy.64d896a6.js","./index-legacy.2742bed6.js","./index-legacy.88ccb3b2.js","./index-legacy.49fd6060.js","./index-legacy.f72d11a4.js","./index-legacy.04c2af98.js","./index-legacy.55b17da0.js","./index-legacy.6265e301.js","./vue3-lottie.es-legacy.0e8e4a33.js","./music-legacy.476aa529.js","./index-legacy.ab16926a.js","./orderStatus-legacy.feef3d99.js","./icon_share-legacy.69f1973c.js","./download-legacy.9cc06d1d.js","./index-legacy.9850899a.js","./icon_teacher-legacy.42ba77b1.js","./icon_checkbox_default-legacy.e33240bc.js","./plyr.min-legacy.2c76eff7.js","./plyr-legacy.2bfabaee.js","./formatSvgToImg-legacy.d737d6fd.js","./oss-file-upload-legacy.14ad4bfd.js","./index-legacy.f26c6944.js","./index-legacy.cc4cead8.js","./index-legacy.3b03d5e2.js","./code-down-load-legacy.ad391ffe.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.869507ab.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var n,a,i,o,l,c,u,s,d,m,f,_,p,v,g,x,h,b,y,w,k,C,I,S,j,T,R,O,E,N,D,P,z,A,L,B,q,U,V,M,F,X,H,W,J,K,G,Q,Y,Z,$,ee,te,ne,ae,re,ie,oe,le,ce,ue,se,de,me,fe,_e,pe,ve,ge,xe,he,be,ye,we;return{setters:[function(e){n=e._,a=e.a,i=e.b,o=e.c,l=e.d,c=e.e,u=e.f},function(e){s=e._},function(e){d=e.i,m=e._},function(e){f=e._},function(e){_=e._},function(e){p=e._},function(e){v=e.d,g=e.P,x=e.O,h=e.S,b=e.Q,y=e.a2,w=e.U,k=e.X,C=e.bD,I=e.V,S=e.j,j=e.z,T=e.F,R=e.T,O=e.M,E=e.f,N=e.g,D=e.B,P=e.bz,z=e.aR,A=e.W,L=e.x,B=e.D,q=e.bh,U=e.bo},function(e){V=e.C},function(e){M=e.C},function(e){F=e.C},function(e){X=e.I},function(e){H=e.R,W=e.a},function(e){J=e.S},function(e){K=e.T},function(){},function(){},function(e){G=e.V},function(e){Q=e.g,Y=e.m},function(e){Z=e.C},function(e){$=e.o},function(e){ee=e.i},function(e){te=e.i,ne=e.a,ae=e.A,re=e.e,ie=e.b,oe=e.c,le=e.d,ce=e.D,ue=e.s,se=e.f,de=e.g},function(e){me=e.C},function(e){fe=e.i},function(e){_e=e.a,pe=e.i},function(e){ve=e.P},function(){},function(e){ge=e.g,xe=e.s},function(e){he=e.g,be=e.o},function(e){ye=e.e},function(e){we=e.P},function(){},function(){},function(){},function(){},function(){}],execute:function(){var ke={base:"_base_121xa_1",detail:"_detail_121xa_4",shareBtn:"_shareBtn_121xa_22",bgImg:"_bgImg_121xa_34",bgContent:"_bgContent_121xa_43",musicContent:"_musicContent_121xa_52",musicTitle:"_musicTitle_121xa_67",musicImg:"_musicImg_121xa_71",finch:"_finch_121xa_77",finchLoad:"_finchLoad_121xa_81",collectCell:"_collectCell_121xa_99",videoOperation:"_videoOperation_121xa_106",audition:"_audition_121xa_113",collect:"_collect_121xa_99",userInfo:"_userInfo_121xa_139",collectSection:"_collectSection_121xa_159",lookAlbum:"_lookAlbum_121xa_178",bg:"_bg_121xa_34",musicContainer:"_musicContainer_121xa_204",shareMate:"_shareMate_121xa_211",icon:"_icon_121xa_221",info:"_info_121xa_226",tagDiscount:"_tagDiscount_121xa_242",shareVip:"_shareVip_121xa_255",buttonDiscount:"_buttonDiscount_121xa_297",pImg:"_pImg_121xa_310",musicInfo:"_musicInfo_121xa_317",coomposer:"_coomposer_121xa_322",tag:"_tag_121xa_242",download:"_download_121xa_356",iconExchange:"_iconExchange_121xa_367",exquisiteFlag:"_exquisiteFlag_121xa_377",songAlbum:"_songAlbum_121xa_382",colSticky:"_colSticky_121xa_392",priceSection:"_priceSection_121xa_397",price:"_price_121xa_397",buyBtn:"_buyBtn_121xa_411",primry:"_primry_121xa_425",member:"_member_121xa_428",functionSection:"_functionSection_121xa_431",empty:"_empty_121xa_434",emptyImg:"_emptyImg_121xa_442",staffContainer:"_staffContainer_121xa_445",staffTitle:"_staffTitle_121xa_448",staffImg:"_staffImg_121xa_454",name:"_name_121xa_458",boxStyle:"_boxStyle_121xa_464",active:"_active_121xa_470"},Ce=e("getAssetsHomeFile",(function(e){var t="../component/images/".concat(e);return{"../component/images/collection.png":n,"../component/images/collection_active.png":a,"../component/images/icon-xin.png":s,"../component/images/icon_ai.png":i,"../component/images/icon_album.png":m,"../component/images/icon_album_active.png":f,"../component/images/icon_author.png":o,"../component/images/icon_download.png":l,"../component/images/icon_exquisite.png":_,"../component/images/icon_music_active.png":p,"../component/images/icon_share.png":c,"../component/images/icon_uploader.png":u}[t].default}));e("default",v({name:"MusicDetail",setup:function(){localStorage.setItem("behaviorId",Q());var e=g(),n=x(),a=h(!1),i=Number(n.query.activityId)||0,o=h(i),l=h(!1),c=h(null),u=h(null),s=h("0"),m=h(null),f=h(""),_=h([]),p=h([]),v=h([]),Ie=h([]);h("");var Se=h(!1),je=b({status:!1,radio:"staff"}),Te={FREE:{color:"#01B84F",text:"免费"},VIP:{color:"#CD863E",text:"会员"},CHARGE:{color:"#3591CE",text:"点播"}},Re=function(e){je.radio=e,je.status=!1};y((function(){return je.radio}),(function(e){_.value="first"==e?p.value:"fixed"==e?v.value:Ie.value}));var Oe=function(){var e=r(regeneratorRuntime.mark((function e(t){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.value){e.next=2;break}return e.abrupt("return");case 2:return a.value=!0,l.value=!1,e.prev=4,e.next=7,L.get("/music/sheet/detail/".concat(n.query.id),{prefix:"TEACHER"===N.platformType?"/api-teacher":"/api-student"});case 7:i=e.sent,m.value=i.data,console.log(m.value.notation,"musicDetail"),o=i.data.background,f.value=o&&o.length>0?o[0].audioFileUrl:"",_.value=i.data.musicImg?i.data.musicImg.split(","):[],p.value=i.data.firstTone?i.data.firstTone.split(","):[],v.value=i.data.fixedTone?i.data.fixedTone.split(","):[],Ie.value=i.data.musicImg?i.data.musicImg.split(","):[],A((function(){Ye()})),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(4),l.value=!0;case 22:"CONCERT"!==(null===(r=m.value)||void 0===r?void 0:r.musicSheetType)&&(a.value=!1);case 23:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(t){return e.apply(this,arguments)}}(),Ee=function(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],a=atob(t[1]),r=a.length,i=new Uint8Array(r);r--;)i[r]=a.charCodeAt(r);return new Blob([i],{type:n})},Ne=h(null),De=h(null),Pe=h(0),ze=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["play-large","play","progress","captions","duration"],Ne.value=new ve(De.value,{controls:n}),e.next=4,L.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_free_rate"}});case 4:a=e.sent,Pe.value=(null===(t=a.data[0])||void 0===t?void 0:t.paramValue)||0,Ne.value.on("timeupdate",(function(){var e=Ne.value,t=e.duration*Pe.value/100||0;e.currentTime>=t&&!Xe.value.play&&e.stop()}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=r(regeneratorRuntime.mark((function e(r){var i,o,l,c,u,s,d,m,f,p,v,g,x;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("musicStaffRender"!==(null===(i=r.data)||void 0===i?void 0:i.api)){e.next=28;break}o=r.data.osmdImg,_.value=[],l=[],c=0;case 5:if(!(c<o.length)){e.next=25;break}return e.next=8,xe(o[c].img,o[c].width,o[c].height);case 8:return u=e.sent,s=n.query.id+N.user.data.userId+ +new Date+".png",d={filename:s,bucketName:"cloud-coach",postData:{filename:s,acl:"public-read",key:s}},e.next=13,he(d,!0);case 13:return m=e.sent,f=m.data,p={policy:f.policy,signature:f.signature,key:s,KSSAccessKeyId:f.kssAccessKeyId,acl:"public-read",name:s},v=Ee(u),g=U("cloud-coach"),e.next=20,be(g,t(t({},p),{},{file:v}));case 20:x=e.sent,l.push(x);case 22:c++,e.next=5;break;case 25:_.value=l,console.log(_.value,"showImg.value"),a.value=r.data.loading;case 28:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();w(r(regeneratorRuntime.mark((function e(){var t,n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Oe();case 2:t=k(c),n=t.height,a=k(u),s.value=n+a.height,f.value&&ze(),window.addEventListener("message",Ae);case 7:case"end":return e.stop()}}),e)})))),C((function(){window.removeEventListener("message",Ae)}));var Le=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,L.post("/music/sheet/favorite/"+(null===(t=m.value)||void 0===t?void 0:t.id),{prefix:"TEACHER"===N.platformType?"/api-teacher":"/api-student"});case 3:m.value.favorite=null!==(n=m.value)&&void 0!==n&&n.favorite?0:1,m.value.favoriteCount=null!==(a=m.value)&&void 0!==a&&a.favorite?m.value.favoriteCount+1:m.value.favoriteCount-1<0?0:m.value.favoriteCount-1,setTimeout((function(){var e;R(null!==(e=m.value)&&void 0!==e&&e.favorite?"收藏成功":"取消收藏成功")}),100),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,L.post("/api-teacher/courseCourseware/submit",{data:{musicSheetId:m.value.id,clientType:"TEACHER",userId:null===(t=N.user.data)||void 0===t?void 0:t.userId}});case 3:n=e.sent,console.log(n),setTimeout((function(){m.value.coursewareId=n.data.id||"",R("添加成功"),m.value.coursewareStatus=1}),100),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),qe=function(){var e=r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:B.confirm({title:"提示",message:"您是否确定移除课件",confirmButtonColor:"#269a93",cancelButtonText:"取消",confirmButtonText:"确定"}).then(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,L.post("/api-teacher/courseCourseware/remove/"+m.value.coursewareId,{data:{}});case 3:setTimeout((function(){R("移除成功"),m.value.coursewareStatus=0}),100),e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])}))));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ue=function(){var e=r(regeneratorRuntime.mark((function e(){var a,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=m.value,$.orderObject.orderType="MUSIC",$.orderObject.orderName=a.musicSheetName,$.orderObject.orderDesc=a.musicSheetName,$.orderObject.actualPrice=a.musicPrice,$.orderObject.recomUserId=n.query.recomUserId||0,$.orderObject.activityId=n.query.activityId||0,$.orderObject.orderNo="",$.orderObject.orderList=[t({orderType:"MUSIC",goodsName:a.musicSheetName,actualPrice:a.musicPrice},a)],e.next=11,L.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"MUSIC",bizId:a.id}});case 11:i=e.sent,(o=i.data)?B.confirm({title:"提示",message:"您有一个未支付的订单,是否继续支付?",confirmButtonColor:"#269a93",cancelButtonText:"取消订单",confirmButtonText:"继续支付"}).then(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$.orderObject.orderNo=o.orderNo,$.orderObject.actualPrice=o.actualPrice,$.orderObject.discountPrice=o.discountPrice,$.orderObject.paymentConfig=t(t({},o.paymentConfig),{},{paymentVendor:o.paymentVendor,paymentVersion:o.paymentVersion}),Ve();case 5:case"end":return e.stop()}}),e)})))).catch((function(){B.close(),Me(o.orderNo)})):Ve();case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ve=function(){var t=m.value;e.push({path:"/orderDetail",query:{orderType:"MUSIC",musicId:t.id}})},Me=function(){var e=r(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,L.post("/api-student/userOrder/orderCancel",{data:{orderNo:t}});case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}(),Fe=I((function(){var e,t=null===(e=m.value)||void 0===e?void 0:e.paymentType;return"string"==typeof t?t=t.split(","):[]})),Xe=I((function(){var e,t=m.value;return{hasTenantAlbum:!(null===(e=n.query)||void 0===e||!e.tenantAlbumId),play:!!t.play,free:null==t?void 0:t.paymentType.includes("FREE"),charge:null==t?void 0:t.paymentType.includes("CHARGE"),vip:null==t?void 0:t.paymentType.includes("VIP"),buy:"PAID"===(null==t?void 0:t.orderStatus)}})),He=h(!1),We=h(""),Je=h(0),Ke=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,a,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,L.post("/api-teacher/open/musicShareProfit",{data:{bizId:null===(t=m.value)||void 0===t?void 0:t.id,userId:null===(n=N.user.data)||void 0===n?void 0:n.userId}});case 3:return i=e.sent,o=location.origin+"/teacher/#/shareMusic?id=".concat(null===(a=m.value)||void 0===a?void 0:a.id,"&recomUserId=").concat(null===(r=N.user.data)||void 0===r?void 0:r.userId,"&userType=").concat(N.platformType),1===i.data.discount&&(o+="&activityId=".concat(i.data.activityId)),Je.value=i.data.discount||0,console.log(o),We.value=o,He.value=!0,e.abrupt("return");case 13:e.prev=13,e.t0=e.catch(0);case 15:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}(),Ge=b({open:!1,iframeSrc:"",musicXml:"",instrumentName:"",iframeRef:null,partIndex:0,partXmlIndex:0,tempPartList:[],partList:[],xmlPartList:[]}),Qe={"长笛":1,"单簧管":2,"中音单簧管":3,"低音单簧管":4,"高音萨克斯管":5,"中音萨克斯管":6,"次中音萨克斯管":7,"低音萨克斯管":8,"小号":9,"长号":10,"圆号":11,"大号":12,"上低音号":13},Ye=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,a,r,i,o,l,c,u,s,d,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,null===(t=m.value)||void 0===t||!t.xmlFileUrl){e.next=10;break}return e.next=4,q.get(null===(i=m.value)||void 0===i?void 0:i.xmlFileUrl,{mode:"cors"});case 4:for(o=e.sent,l=(new DOMParser).parseFromString(o,"text/xml"),c=l.getElementsByTagName("score-part"),u=[],s=0;s<c.length;s++)for(d=c[s].children,f=0;f<d.length;f++)"part-name"===d[f].nodeName&&u.push({name:d[f].textContent,value:s});Ge.xmlPartList=u;case 10:Ge.iframeSrc="".concat(location.origin).concat(location.pathname,"osmd/index.html"),Ge.musicXml=(null===(n=m.value)||void 0===n?void 0:n.xmlFileUrl)||"",Ge.partList=(null===(a=m.value)||void 0===a?void 0:a.background)||[],Ge.partList.forEach((function(e){var t=Ge.xmlPartList.find((function(t){return t.name===e.track}));t&&(e.index=t.value)})),Ge.tempPartList=JSON.parse(JSON.stringify(Ge.partList)),Ge.partList=((_=Ge.partList).sort((function(e,t){return(Qe[ge(e.track)]||20)-(Qe[ge(t.track)]||20)})),_),Ge.partXmlIndex=Ge.partList[0].index||0,Ge.instrumentName=ge(null===(r=Ge.partList[Ge.partIndex])||void 0===r?void 0:r.track),e.next=22;break;case 20:e.prev=20,e.t0=e.catch(0);case 22:case"end":return e.stop()}var _}),e,null,[[0,20]])})));return function(){return e.apply(this,arguments)}}(),Ze=function(){var e=document.getElementById("staffIframeRef");e&&e.contentWindow.renderXml&&e.contentWindow.renderXml(Ge.musicXml,Ge.partXmlIndex)},$e=I((function(){return Ge.partList.map((function(e,t){var n=ge(e.track);return{text:e.track+(n?"(".concat(n,")"):""),value:t,xmlValue:e.index,track:e.track}}))}));return function(){var r,i,l,p,v,g,x,h,b,y,w;return S("div",{class:ke.detail},[S(J,{position:"top"},{default:function(){var e;return[S("div",{ref:c},[S(V,{background:"transparent",border:!1,isFixed:!1,color:"#fff",title:null===(e=m.value)||void 0===e?void 0:e.musicSheetName,backIconColor:"white"},{right:function(){return S("div",{class:ke.shareBtn,style:{color:"#fff"},onClick:Ke},[S(X,{src:ee},null),j("分享")])}})])]}}),S("img",{class:ke.bgImg,src:null===(r=m.value)||void 0===r?void 0:r.titleImg},null),S("div",{class:ke.bgContent},null),S("div",{class:ke.musicContainer,style:{marginTop:"16px",height:"calc(100vh - ".concat(s.value+16+"px",")")}},[S(M,{border:!1,center:!0,class:ke.musicInfo},{icon:function(){var e;return S(X,{class:ke.pImg,src:null===(e=m.value)||void 0===e?void 0:e.titleImg},null)},title:function(){var e,t,n,a;return S("div",{class:ke.info},[S("h4",{class:"van-ellipsis"},[null===(e=m.value)||void 0===e?void 0:e.musicSheetName]),S("p",{style:{display:"flex"}},[Fe.value.map((function(e){return S(K,{style:{color:Te[e].color},class:ke.tag,type:"success",plain:!0},{default:function(){return[Te[e].text]}})})),1===(null===(t=m.value)||void 0===t?void 0:t.exquisiteFlag)&&S(X,{class:ke.exquisiteFlag,src:Ce("icon_exquisite.png")},null),(null===(n=m.value)||void 0===n?void 0:n.albumNums)>0&&S(X,{class:ke.songAlbum,src:Ce("icon_album_active.png")},null),S("span",{class:ke.coomposer},[null===(a=m.value)||void 0===a?void 0:a.composer])])])},value:function(){var e,t,n;return S(T,null,[null!==(e=m.value)&&void 0!==e&&e.notation?S("span",{class:ke.download,onClick:function(){je.status=!0},style:{display:"CONCERT"!==(null===(t=m.value)||void 0===t?void 0:t.musicSheetType)?"":"none"}},[S("img",{src:te},null),S("span",null,[j("转谱")])]):null,S("span",{class:ke.download,onClick:function(){_.value.length>0?Se.value=!0:R("暂无图片")}},[S("img",{src:ne},null),S("span",null,[j("下载曲谱")])]),S("span",{style:{display:"CONCERT"===(null===(n=m.value)||void 0===n?void 0:n.musicSheetType)?"":"none"},class:ke.download,onClick:function(){Ge.open=!0}},[S(O,{class:ke.iconExchange,name:"exchange"},null),S("span",null,[j("切换乐器")])])])}}),S("div",{class:ke.musicContent},[S("p",{class:ke.musicTitle},[(null!==(i=m.value)&&void 0!==i&&i.musicSheetName?null===(l=m.value)||void 0===l?void 0:l.musicSheetName:"")+(Ge.instrumentName?"(".concat(Ge.instrumentName,")"):"")]),"CONCERT"===(null===(p=m.value)||void 0===p?void 0:p.musicSheetType)?S(T,null,[a.value&&S(T,null,[S(G,{animationData:ae,class:ke.finch},null),S("p",{class:ke.finchLoad},[j("加载中...")])]),S("iframe",{id:"staffIframeRef",style:{opacity:a.value?0:1},src:Ge.iframeSrc,onLoad:Ze},null)]):S(T,null,[_.value.length>0?S("div",{class:ke.musicImg},[S("img",{src:_.value[0],alt:""},null)]):a.value?S(T,null,[S(G,{animationData:ae,class:ke.finch},null),S("p",{class:ke.finchLoad},[j("加载中...")])]):S("div",{class:ke.empty},[S(X,{src:re,class:ke.emptyImg},null),S("p",{class:ke.emptyTip},[j("暂无乐谱预览图")])])]),S("div",{class:ke.videoOperation},[f.value&&S(T,null,[!Xe.value.play&&100!=Pe.value&&0!=Pe.value&&S("div",{class:[ke.audition]},[S("img",{src:ie},null),S("span",null,[j("每首曲目可试听"),Pe.value,j("%")])]),S("div",{class:[ke.audio,ke.collectCell]},[S("audio",{id:"player",controls:!0,ref:De},[S("source",{src:f.value,type:"audio/mp3"},null)])])]),S("div",{class:[ke.collect,ke.collectCell]},[S("div",{class:[ke.userInfo],onClick:function(){var t,n;E().isApp&&"TEACHER"===(null===(t=m.value)||void 0===t?void 0:t.sourceType)&&"STUDENT"===N.platformType&&e.push({path:"/teacherHome",query:{teacherId:null===(n=m.value)||void 0===n?void 0:n.userId,tabs:"music"}})}},[S("img",{src:(null===(v=m.value)||void 0===v?void 0:v.userAvatar)||fe},null),S("span",null,[null===(g=m.value)||void 0===g?void 0:g.userName])]),S("div",{class:ke.functionSection},[S("div",{class:[ke.collectSection],onClick:function(){return Le()}},[S("span",null,[null===(x=m.value)||void 0===x?void 0:x.favoriteCount,j("人收藏")]),S("img",{src:null!==(h=m.value)&&void 0!==h&&h.favorite?oe:le},null)]),"TEACHER"===N.platformType&&S("div",{class:[ke.collectSection],onClick:function(){var e;null!==(e=m.value)&&void 0!==e&&e.coursewareStatus?qe():Be()}},[S("span",null,[null!==(b=m.value)&&void 0!==b&&b.coursewareStatus?"移出课件":"添加到课件"]),null!==(y=m.value)&&void 0!==y&&y.coursewareStatus?S(O,{name:"clear"},null):S(O,{name:"add",size:18},null)])])])])]),S("div",{class:[ke.lookAlbum,ke.collectCell],onClick:function(){var t,n;e.push({path:"/look-album-list",query:{id:null===(t=m.value)||void 0===t?void 0:t.id,musicSubject:null===(n=m.value)||void 0===n?void 0:n.musicSubject}})}},[S("div",null,[S("img",{src:d},null),S("span",null,[j("进入曲目所在平台专辑列表")])]),S(O,{name:"arrow",size:16,color:"#666"},null)])]),(null===(w=m.value)||void 0===w?void 0:w.id)&&S(Z,{position:"bottom",background:"white"},{default:function(){var a;return[S("div",{ref:u},[Xe.value.play||"TEACHER"===N.platformType&&Xe.value.hasTenantAlbum?S(D,{round:!0,block:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:function(){var e=ye((function(){Ne.value&&Ne.value.stop();var e=$e.value.find((function(e){return e.value===Ge.partIndex})),t=Ge.tempPartList.findIndex((function(t){return t.track===(null==e?void 0:e.track)}));Y(m.value,(function(){}),{"part-index":t||0,sett:je.radio})}),500);e()}},{default:function(){return[j("立即练习")]}}):S("div",{class:ke.colSticky},[Xe.value.charge&&S("div",{class:ke.priceSection},[S("span",null,[j("点播价:")]),S("span",{class:ke.price},[S("i",null,[j("¥")]),P(null===(a=m.value)||void 0===a?void 0:a.musicPrice)])]),S("div",{class:[ke.buyBtn]},[Xe.value.charge&&S(D,{round:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",class:ke.primary,onClick:Ue},{default:function(){return[j("立即点播")]}}),Xe.value.vip&&S(D,{round:!0,block:!Xe.value.charge,type:"primary",color:"linear-gradient(180deg, #F7BD8D 0%, #CD8806 100%)",class:ke.memeber,onClick:function(){e.push({path:"/memberCenter",query:t({},n.query)})}},{default:function(){return[o.value>0&&S("div",{class:[ke.buttonDiscount]},[j("专属优惠")]),j("开通会员")]}})])])])]}}),S(z,{show:He.value,"onUpdate:show":function(e){return He.value=e},style:{background:"transparent"},teleport:"body"},{default:function(){var e;return[S(me,{teacherId:null===(e=N.user.data)||void 0===e?void 0:e.userId,shareUrl:We.value,shareType:"music"},{default:function(){var e,t,n;return[S("div",{class:ke.shareMate},[1===Je.value&&S("div",{class:ke.tagDiscount},[j("专属优惠")]),S("img",{class:ke.icon,crossorigin:"anonymous",src:(null===(e=m.value)||void 0===e?void 0:e.titleImg)+"?t=".concat(+new Date)},null),S("div",{class:ke.info},[S("h4",{class:"van-multi-ellipsis--l2"},[null===(t=m.value)||void 0===t?void 0:t.musicSheetName]),S("p",null,[j("作曲人:"),null===(n=m.value)||void 0===n?void 0:n.composer])])])]}})]}}),S(z,{show:Se.value,"onUpdate:show":function(e){return Se.value=e},position:"bottom",round:!0},{default:function(){return[Se.value&&S(ce,{imgList:JSON.parse(JSON.stringify(_.value)),musicSheetName:m.value.musicSheetName},null)]}}),S(z,{show:je.status,"onUpdate:show":function(e){return je.status=e},teleport:"body",closeable:!0,style:{width:"80%"},round:!0},{default:function(){return[S("div",{class:ke.staffContainer},[S("div",{class:ke.staffTitle},[j("选择转换曲谱")]),S(H,{modelValue:je.radio,"onUpdate:modelValue":function(e){return je.radio=e}},{default:function(){return[S(F,{border:!1},{default:function(){return[S(M,{center:!0,border:!1,class:"staff"===je.radio?ke.active:"",onClick:function(){return Re("staff")}},{icon:function(){return S(X,{src:ue,class:ke.staffImg},null)},title:function(){return S("span",{class:ke.name},[j("五线谱")])},value:function(){return S(W,{name:"staff"},{icon:function(e){return S(O,{class:ke.boxStyle,size:16,name:e.checked?_e:pe},null)}})}}),S(M,{center:!0,border:!1,class:"first"===je.radio?ke.active:"",onClick:function(){return Re("first")}},{icon:function(){return S(X,{src:se,class:ke.staffImg},null)},title:function(){return S("span",{class:ke.name},[j("简谱-首调")])},value:function(){return S(W,{name:"first"},{icon:function(e){return S(O,{class:ke.boxStyle,size:16,name:e.checked?_e:pe},null)}})}}),S(M,{center:!0,border:!1,class:"fixed"===je.radio?ke.active:"",onClick:function(){return Re("fixed")}},{icon:function(){return S(X,{src:de,class:ke.staffImg},null)},title:function(){return S("span",{class:ke.name},[j("简谱-固定调")])},value:function(){return S(W,{name:"fixed"},{icon:function(e){return S(O,{class:ke.boxStyle,size:16,name:e.checked?_e:pe},null)}})}})]}})]}})])]}}),S(z,{teleport:"body",position:"bottom",round:!0,show:Ge.open,"onUpdate:show":function(e){return Ge.open=e}},{default:function(){return[S(we,{columns:$e.value,onConfirm:function(e){Ge.open=!1,Ge.partIndex=e.value,Ge.partXmlIndex=e.xmlValue,_.value=[],A((function(){var e,t;(t=document.getElementById("staffIframeRef"))&&t.contentWindow.renderXml&&(t.contentWindow.resetRender(Ge.partXmlIndex),Ge.instrumentName=ge(null===(e=Ge.partList[Ge.partIndex])||void 0===e?void 0:e.track))}))},onCancel:function(){return Ge.open=!1}},null)]}})])}}}))}}}))}();
|