1 |
- !function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function n(n){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){t(n,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n,t,r,a,i,o){try{var u=e[i](o),l=u.value}catch(c){return void t(c)}u.done?n(l):Promise.resolve(l).then(r,a)}function a(e){return function(){var n=this,t=arguments;return new Promise((function(a,i){var o=e.apply(n,t);function u(e){r(o,a,i,u,l,"next",e)}function l(e){r(o,a,i,u,l,"throw",e)}u(void 0)}))}}var i=document.createElement("style");i.innerHTML='._base_18euq_1>div{background:url(./header-bg.png) no-repeat top center}._detail_18euq_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;--plyr-color-main: var(--van-primary);--plyr-control-icon-size: .32rem}._detail_18euq_4 .plyr__controls .plyr__controls__item:first-child{background-color:var(--van-primary);color:#fff;border-radius:50%}._base_18euq_1 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._shareBtn_18euq_21{display:flex;align-items:flex-start;color:#fff;font-size:.37333rem;line-height:.53333rem!important}._shareBtn_18euq_21 .van-image{width:.48rem;height:.48rem;margin-right:.16rem}._bgImg_18euq_33{position:absolute;left:0;top:0;width:100%;height:7.06667rem;-o-object-fit:cover;object-fit:cover;filter:blur(.26667rem)}._bgContent_18euq_42{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_18euq_51{position:relative;width:100%;height:13.33333rem;overflow:hidden}._musicContent_18euq_51: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_18euq_51 ._musicTitle_18euq_66{text-align:center;font-size:.42667rem}._musicContent_18euq_51 ._musicImg_18euq_70{width:100%}._musicContent_18euq_51 ._finch_18euq_73{width:4rem;margin:2.13333rem auto 0}._musicContent_18euq_51 ._finchLoad_18euq_77{text-align:center;color:#333;font-size:.4rem;margin-top:.10667rem}._musicContent_18euq_51 iframe{border:none;width:100%;height:13.33333rem;overflow:hidden}._musicContent_18euq_51 iframe body ::-webkit-scrollbar-thumb{background-color:#efeff0;border:.02667rem solid transparent;background-clip:padding-box;border-radius:.13333rem}._collectCell_18euq_95{margin:.26667rem .42667rem 0;background:#ffffff;border-radius:.26667rem;box-shadow:0 0 .16rem rgba(229,229,229,.7);overflow:hidden}._videoOperation_18euq_102{position:absolute;left:0;right:0;bottom:.13333rem;z-index:1}._audition_18euq_109{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_18euq_109 img{margin-top:-.05333rem;width:.56rem;height:.4rem;margin-right:.29333rem}._collect_18euq_95{display:flex;align-items:center;justify-content:space-between;padding:.29333rem;font-size:.37333rem;color:#666}._collect_18euq_95 ._userInfo_18euq_135{display:flex;align-items:center;padding:.08rem .16rem;background:#d5f3ee;border-radius:.42667rem}._collect_18euq_95 ._userInfo_18euq_135 img{width:.69333rem;height:.69333rem;border-radius:50%}._collect_18euq_95 ._userInfo_18euq_135 span{padding-left:.21333rem;max-width:1.6rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#2dc7aa}._collect_18euq_95 ._collectSection_18euq_155{display:flex;align-items:center}._collect_18euq_95 ._collectSection_18euq_155 img{margin-top:-.05333rem;margin-left:.13333rem;width:.48rem;height:.48rem}._collect_18euq_95 ._collectSection_18euq_155 .van-icon{font-size:.53333rem;margin-top:-.05333rem;margin-left:.13333rem;color:var(--van-primary)}._collect_18euq_95 ._collectSection_18euq_155:first-child{margin-right:.37333rem}._lookAlbum_18euq_174{padding:.45333rem .53333rem;margin-bottom:.4rem;font-size:.37333rem;color:#333;line-height:.53333rem;display:flex;align-items:center;justify-content:space-between}._lookAlbum_18euq_174>div{display:flex;align-items:center;line-height:1}._lookAlbum_18euq_174>div img{width:.53333rem;height:.53333rem;margin-right:.26667rem}._bg_18euq_33{position:relative;height:100%;padding:.42667rem;z-index:11}._musicContainer_18euq_200{position:relative;z-index:12;border-radius:.48rem .48rem 0 0;background-color:#fff;overflow-y:auto}._shareMate_18euq_207{position:relative;margin-top:1.33333rem;display:flex;flex:1;align-items:center;padding:.29333rem .32rem;background:#ffffff;border-radius:.26667rem}._shareMate_18euq_207 ._icon_18euq_217{width:.96rem;height:.96rem;border-radius:.26667rem}._shareMate_18euq_207 ._info_18euq_222{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._shareMate_18euq_207 ._info_18euq_222>h4{color:var(--music-list-item-title-color);font-size:.37333rem;font-weight:600;width:5.33333rem}._shareMate_18euq_207 ._info_18euq_222>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._shareMate_18euq_207 ._tagDiscount_18euq_238{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_18euq_251{position:relative;margin-top:.93333rem;display:flex;flex:1;align-items:center;padding:.18667rem;background:#ffffff;border-radius:.26667rem}._shareVip_18euq_251 ._icon_18euq_217{width:1.92rem;height:1.92rem;border-radius:.26667rem}._shareVip_18euq_251 ._info_18euq_222{margin-left:.16rem;flex:1;word-break:break-all}._shareVip_18euq_251 ._info_18euq_222>h4{color:var(--music-list-item-title-color);font-size:.42667rem;font-weight:600}._shareVip_18euq_251 ._info_18euq_222>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._tagDiscount_18euq_238{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_18euq_293{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_18euq_306{width:1.22667rem;height:1.22667rem;border-radius:.26667rem;overflow:hidden;flex-shrink:0}._musicInfo_18euq_313{padding-top:.61333rem!important;padding-bottom:.61333rem!important;margin-bottom:.26667rem}._musicInfo_18euq_313 ._coomposer_18euq_318{padding-top:.05333rem;padding-left:.16rem;max-width:3.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._musicInfo_18euq_313 ._tag_18euq_238{flex-shrink:0;padding:.05333rem .10667rem 0;border-radius:.10667rem}._musicInfo_18euq_313 ._tag_18euq_238+._tag_18euq_238{margin-left:.13333rem}._musicInfo_18euq_313 ._info_18euq_222{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._musicInfo_18euq_313 ._info_18euq_222>h4{font-size:.42667rem;font-weight:700;color:#1a1a1a;width:4.26667rem;padding-bottom:.08rem}._musicInfo_18euq_313 ._info_18euq_222>p{font-size:.32rem;color:#999;line-height:.45333rem}._musicInfo_18euq_313 ._download_18euq_352{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:.32rem}._musicInfo_18euq_313 ._download_18euq_352 img{height:.64rem;width:.64rem}._musicInfo_18euq_313 ._download_18euq_352 ._iconExchange_18euq_363{display:flex;align-items:center;justify-content:center;background:#f6f6f6;border-radius:50%;font-size:.42667rem;width:.64rem;height:.64rem}._musicInfo_18euq_313 ._exquisiteFlag_18euq_373{width:.37333rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_18euq_313 ._songAlbum_18euq_378{width:.4rem;height:.4rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_18euq_313 .van-cell__value{display:flex;justify-content:space-around}._colSticky_18euq_388{display:flex;align-items:center;justify-content:space-between}._colSticky_18euq_388 ._priceSection_18euq_393{font-size:.37333rem;font-weight:400;color:#999}._colSticky_18euq_388 ._priceSection_18euq_393 ._price_18euq_393{font-size:.58667rem;font-weight:700;color:#ff4e19}._colSticky_18euq_388 ._priceSection_18euq_393 ._price_18euq_393 i{font-style:normal;font-size:.42667rem}._buyBtn_18euq_407{--van-button-default-height: 1.12rem;flex:1;display:flex;align-items:center;justify-content:flex-end}._buyBtn_18euq_407 .van-button{padding:0 .58667rem;font-weight:600}._buyBtn_18euq_407 .van-button+.van-button{margin-left:.32rem}._buyBtn_18euq_407 ._primry_18euq_421{box-shadow:0 .05333rem .18667rem rgba(45,199,170,.25)}._buyBtn_18euq_407 ._member_18euq_424{box-shadow:0 .05333rem .18667rem rgba(187,156,83,.25)}._functionSection_18euq_427{display:flex}._empty_18euq_430{margin:0 auto;font-size:.37333rem;color:#999;line-height:.53333rem;text-align:center;padding-top:1.6rem}._empty_18euq_430 ._emptyImg_18euq_438{width:4.58667rem}._staffContainer_18euq_441{padding:.4rem .4rem .64rem}._staffContainer_18euq_441 ._staffTitle_18euq_444{padding-bottom:.66667rem;font-size:.42667rem;color:#1a1a1a;line-height:.58667rem}._staffContainer_18euq_441 ._staffImg_18euq_450{width:.85333rem;height:.53333rem}._staffContainer_18euq_441 ._name_18euq_454{padding-left:.45333rem;font-size:.34667rem;font-weight:500;color:#333}._staffContainer_18euq_441 ._boxStyle_18euq_460{background:transparent!important;width:.4rem;height:.4rem;border:transparent!important}._staffContainer_18euq_441 ._active_18euq_466{background:#f7f8f9;border-radius:.21333rem}._staffContainer_18euq_441 ._active_18euq_466 ._name_18euq_454{color:#2dc7aa}._staffContainer_18euq_441 .van-cell{padding:.24rem .42667rem;margin-bottom:.16rem}._staffContainer_18euq_441 .van-cell:hover,._staffContainer_18euq_441 .van-cell:active,._staffContainer_18euq_441 .van-cell.active{background:#f7f8f9;border-radius:.21333rem}._staffContainer_18euq_441 .van-cell:hover .name,._staffContainer_18euq_441 .van-cell:active .name,._staffContainer_18euq_441 .van-cell.active .name{color:#2dc7aa}._staffContainer_18euq_441 .van-cell:last-child{margin-bottom:0}._staffContainer_18euq_441 .van-cell__value{display:flex;justify-content:flex-end}._staffContainer_18euq_441 .van-checkbox{overflow:inherit;height:.48rem;display:flex;align-items:center;justify-content:flex-end}._staffContainer_18euq_441 .van-checkbox__icon{height:.4rem;line-height:.4rem;display:inline-block;vertical-align:middle}._staffContainer_18euq_441 .van-checkbox__label{line-height:.4rem}\n',document.head.appendChild(i),System.register(["./icon_uploader-legacy.2d017c5c.js","./icon-xin-legacy.576942b1.js","./icon_album-legacy.dfe53748.js","./icon_album_active-legacy.14486289.js","./icon_exquisite-legacy.37947ae4.js","./icon_music_active-legacy.78521af9.js","./index-legacy.1d96369d.js","./index-legacy.af60f68c.js","./index-legacy.86533850.js","./index-legacy.8cebea06.js","./index-legacy.79e81ff7.js","./index-legacy.20f90a45.js","./index-legacy.2d2b7b4f.js","./index-legacy.b20f549b.js","./index-legacy.1ac2940c.js","./index-legacy.b9958024.js","./vue3-lottie.es-legacy.366d79cc.js","./music-legacy.78365744.js","./index-legacy.6c42bef5.js","./orderStatus-legacy.65222e4d.js","./icon_share-legacy.69f1973c.js","./download-legacy.8e09637d.js","./index-legacy.c1bad244.js","./icon_teacher-legacy.42ba77b1.js","./icon_checkbox_default-legacy.e33240bc.js","./plyr-legacy.180f4c53.js","./formatSvgToImg-legacy.5e7cc36d.js","./oss-file-upload-legacy.7ae6eb34.js","./index-legacy.e75ec1a6.js","./index-legacy.251a6bc4.js","./code-down-load-legacy.0f11176a.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.869507ab.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var t,r,i,o,u,l,c,s,d,m,f,_,p,v,g,h,b,y,q,x,w,k,C,I,S,j,T,R,O,E,N,z,D,P,A,B,L,U,V,M,F,X,H,W,K,G,J,Q,Y,Z,$,ee,ne,te,re,ae,ie,oe,ue,le,ce,se,de,me,fe,_e,pe,ve,ge,he,be,ye,qe;return{setters:[function(e){t=e._,r=e.a,i=e.b,o=e.c,u=e.d,l=e.e,c=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,h=e.O,b=e.S,y=e.Q,q=e.a2,x=e.U,w=e.X,k=e.bC,C=e.V,I=e.j,S=e.z,j=e.F,T=e.T,R=e.M,O=e.f,E=e.g,N=e.B,z=e.bz,D=e.aR,P=e.W,A=e.w,B=e.D,L=e.bg,U=e.bn},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){K=e.S},function(e){G=e.T},function(){},function(){},function(e){J=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){ne=e.i,te=e.a,re=e.A,ae=e.e,ie=e.b,oe=e.c,ue=e.d,le=e.D,ce=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(e){ge=e.g,he=e.s},function(e){be=e.g,ye=e.o},function(e){qe=e.P},function(){},function(){},function(){},function(){},function(){}],execute:function(){var xe={base:"_base_18euq_1",detail:"_detail_18euq_4",shareBtn:"_shareBtn_18euq_21",bgImg:"_bgImg_18euq_33",bgContent:"_bgContent_18euq_42",musicContent:"_musicContent_18euq_51",musicTitle:"_musicTitle_18euq_66",musicImg:"_musicImg_18euq_70",finch:"_finch_18euq_73",finchLoad:"_finchLoad_18euq_77",collectCell:"_collectCell_18euq_95",videoOperation:"_videoOperation_18euq_102",audition:"_audition_18euq_109",collect:"_collect_18euq_95",userInfo:"_userInfo_18euq_135",collectSection:"_collectSection_18euq_155",lookAlbum:"_lookAlbum_18euq_174",bg:"_bg_18euq_33",musicContainer:"_musicContainer_18euq_200",shareMate:"_shareMate_18euq_207",icon:"_icon_18euq_217",info:"_info_18euq_222",tagDiscount:"_tagDiscount_18euq_238",shareVip:"_shareVip_18euq_251",buttonDiscount:"_buttonDiscount_18euq_293",pImg:"_pImg_18euq_306",musicInfo:"_musicInfo_18euq_313",coomposer:"_coomposer_18euq_318",tag:"_tag_18euq_238",download:"_download_18euq_352",iconExchange:"_iconExchange_18euq_363",exquisiteFlag:"_exquisiteFlag_18euq_373",songAlbum:"_songAlbum_18euq_378",colSticky:"_colSticky_18euq_388",priceSection:"_priceSection_18euq_393",price:"_price_18euq_393",buyBtn:"_buyBtn_18euq_407",primry:"_primry_18euq_421",member:"_member_18euq_424",functionSection:"_functionSection_18euq_427",empty:"_empty_18euq_430",emptyImg:"_emptyImg_18euq_438",staffContainer:"_staffContainer_18euq_441",staffTitle:"_staffTitle_18euq_444",staffImg:"_staffImg_18euq_450",name:"_name_18euq_454",boxStyle:"_boxStyle_18euq_460",active:"_active_18euq_466"},we=e("getAssetsHomeFile",(function(e){var n="../component/images/".concat(e);return{"../component/images/collection.png":t,"../component/images/collection_active.png":r,"../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":u,"../component/images/icon_exquisite.png":_,"../component/images/icon_music_active.png":p,"../component/images/icon_share.png":l,"../component/images/icon_uploader.png":c}[n].default}));e("default",v({name:"MusicDetail",setup:function(){localStorage.setItem("behaviorId",Q());var e=g(),t=h(),r=b(!1),i=Number(t.query.activityId)||0,o=b(i),u=b(!1),l=b(null),c=b(null),s=b("0"),m=b(null),f=b(""),_=b([]),p=b([]),v=b([]),ke=b([]);b("");var Ce=b(!1),Ie=y({status:!1,radio:"staff"}),Se={FREE:{color:"#01B84F",text:"免费"},VIP:{color:"#CD863E",text:"会员"},CHARGE:{color:"#3591CE",text:"点播"}},je=function(e){Ie.radio=e,Ie.status=!1};q((function(){return Ie.radio}),(function(e){_.value="first"==e?p.value:"fixed"==e?v.value:ke.value}));var Te=function(){var e=a(regeneratorRuntime.mark((function e(n){var a,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.value){e.next=2;break}return e.abrupt("return");case 2:return r.value=!0,u.value=!1,e.prev=4,e.next=7,A.get("/music/sheet/detail/".concat(t.query.id),{prefix:"TEACHER"===E.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(","):[],ke.value=i.data.musicImg?i.data.musicImg.split(","):[],P((function(){Je()})),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(4),u.value=!0;case 22:"CONCERT"!==(null===(a=m.value)||void 0===a?void 0:a.musicSheetType)&&(r.value=!1);case 23:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(n){return e.apply(this,arguments)}}(),Re=function(e){for(var n=e.split(","),t=n[0].match(/:(.*?);/)[1],r=atob(n[1]),a=r.length,i=new Uint8Array(a);a--;)i[a]=r.charCodeAt(a);return new Blob([i],{type:t})},Oe=b(null),Ee=b(null),Ne=b(0),ze=function(){var e=a(regeneratorRuntime.mark((function e(){var n,t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["play-large","play","progress","captions","duration"],Oe.value=new ve(Ee.value,{controls:t}),e.next=4,A.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_free_rate"}});case 4:r=e.sent,Ne.value=(null===(n=r.data[0])||void 0===n?void 0:n.paramValue)||0,Oe.value.on("timeupdate",(function(){var e=Oe.value,n=e.duration*Ne.value/100||0;e.currentTime>=n&&!Fe.value.play&&e.stop()}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),De=function(){var e=a(regeneratorRuntime.mark((function e(a){var i,o,u,l,c,s,d,m,f,p,v,g,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("musicStaffRender"!==(null===(i=a.data)||void 0===i?void 0:i.api)){e.next=28;break}o=a.data.osmdImg,_.value=[],u=[],l=0;case 5:if(!(l<o.length)){e.next=25;break}return e.next=8,he(o[l].img,o[l].width,o[l].height);case 8:return c=e.sent,s=t.query.id+E.user.data.userId+ +new Date+".png",d={filename:s,bucketName:"cloud-coach",postData:{filename:s,acl:"public-read",key:s}},e.next=13,be(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=Re(c),g=U("cloud-coach"),e.next=20,ye(g,n(n({},p),{},{file:v}));case 20:h=e.sent,u.push(h);case 22:l++,e.next=5;break;case 25:_.value=u,console.log(_.value,"showImg.value"),r.value=a.data.loading;case 28:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();x(a(regeneratorRuntime.mark((function e(){var n,t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Te();case 2:n=w(l),t=n.height,r=w(c),s.value=t+r.height,f.value&&ze(),window.addEventListener("message",De);case 7:case"end":return e.stop()}}),e)})))),k((function(){window.removeEventListener("message",De)}));var Pe=function(){var e=a(regeneratorRuntime.mark((function e(){var n,t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.post("/music/sheet/favorite/"+(null===(n=m.value)||void 0===n?void 0:n.id),{prefix:"TEACHER"===E.platformType?"/api-teacher":"/api-student"});case 3:m.value.favorite=null!==(t=m.value)&&void 0!==t&&t.favorite?0:1,m.value.favoriteCount=null!==(r=m.value)&&void 0!==r&&r.favorite?m.value.favoriteCount+1:m.value.favoriteCount-1<0?0:m.value.favoriteCount-1,setTimeout((function(){var e;T(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)}}(),Ae=function(){var e=a(regeneratorRuntime.mark((function e(){var n,t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.post("/api-teacher/courseCourseware/submit",{data:{musicSheetId:m.value.id,clientType:"TEACHER",userId:null===(n=E.user.data)||void 0===n?void 0:n.userId}});case 3:t=e.sent,console.log(t),setTimeout((function(){m.value.coursewareId=t.data.id||"",T("添加成功"),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)}}(),Be=function(){var e=a(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(a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.post("/api-teacher/courseCourseware/remove/"+m.value.coursewareId,{data:{}});case 3:setTimeout((function(){T("移除成功"),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)}}(),Le=function(){var e=a(regeneratorRuntime.mark((function e(){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m.value,$.orderObject.orderType="MUSIC",$.orderObject.orderName=r.musicSheetName,$.orderObject.orderDesc=r.musicSheetName,$.orderObject.actualPrice=r.musicPrice,$.orderObject.recomUserId=t.query.recomUserId||0,$.orderObject.activityId=t.query.activityId||0,$.orderObject.orderNo="",$.orderObject.orderList=[n({orderType:"MUSIC",goodsName:r.musicSheetName,actualPrice:r.musicPrice},r)],e.next=11,A.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"MUSIC",bizId:r.id}});case 11:i=e.sent,(o=i.data)?B.confirm({title:"提示",message:"您有一个未支付的订单,是否继续支付?",confirmButtonColor:"#269a93",cancelButtonText:"取消订单",confirmButtonText:"继续支付"}).then(a(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=n(n({},o.paymentConfig),{},{paymentVendor:o.paymentVendor,paymentVersion:o.paymentVersion}),Ue();case 5:case"end":return e.stop()}}),e)})))).catch((function(){B.close(),Ve(o.orderNo)})):Ue();case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ue=function(){var n=m.value;e.push({path:"/orderDetail",query:{orderType:"MUSIC",musicId:n.id}})},Ve=function(){var e=a(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.post("/api-student/userOrder/orderCancel",{data:{orderNo:n}});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(n){return e.apply(this,arguments)}}(),Me=C((function(){var e,n=null===(e=m.value)||void 0===e?void 0:e.paymentType;return"string"==typeof n?n=n.split(","):[]})),Fe=C((function(){var e=m.value;return{play:!!e.play,free:null==e?void 0:e.paymentType.includes("FREE"),charge:null==e?void 0:e.paymentType.includes("CHARGE"),vip:null==e?void 0:e.paymentType.includes("VIP"),buy:"PAID"===(null==e?void 0:e.orderStatus)}})),Xe=b(!1),He=b(""),We=b(0),Ke=function(){var e=a(regeneratorRuntime.mark((function e(){var n,t,r,a,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,A.post("/api-teacher/open/musicShareProfit",{data:{bizId:null===(n=m.value)||void 0===n?void 0:n.id,userId:null===(t=E.user.data)||void 0===t?void 0:t.userId}});case 3:return i=e.sent,o=location.origin+"/teacher/#/shareMusic?id=".concat(null===(r=m.value)||void 0===r?void 0:r.id,"&recomUserId=").concat(null===(a=E.user.data)||void 0===a?void 0:a.userId,"&userType=").concat(E.platformType),1===i.data.discount&&(o+="&activityId=".concat(i.data.activityId)),We.value=i.data.discount||0,console.log(o),He.value=o,Xe.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=y({open:!1,iframeSrc:"",musicXml:"",instrumentName:"",iframeRef:null,partIndex:0,partXmlIndex:0,partList:[],xmlPartList:[]}),Je=function(){var e=a(regeneratorRuntime.mark((function e(){var n,t,r,a,i,o,u,l,c,s,d,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,null===(n=m.value)||void 0===n||!n.xmlFileUrl){e.next=10;break}return e.next=4,L.get(null===(i=m.value)||void 0===i?void 0:i.xmlFileUrl,{mode:"cors"});case 4:for(o=e.sent,u=(new DOMParser).parseFromString(o,"text/xml"),l=u.getElementsByTagName("score-part"),c=[],s=0;s<l.length;s++)for(d=l[s].children,f=0;f<d.length;f++)"part-name"===d[f].nodeName&&c.push({name:d[f].textContent,value:s});Ge.xmlPartList=c;case 10:Ge.iframeSrc="".concat(location.origin).concat(location.pathname,"osmd/index.html"),Ge.musicXml=(null===(t=m.value)||void 0===t?void 0:t.xmlFileUrl)||"",Ge.partList=(null===(r=m.value)||void 0===r?void 0:r.background)||[],Ge.partList.forEach((function(e){var n=Ge.xmlPartList.find((function(n){return n.name===e.track}));n&&(e.index=n.value)})),Ge.partXmlIndex=Ge.partList[0].index||0,Ge.instrumentName=ge(null===(a=Ge.partList[Ge.partIndex])||void 0===a?void 0:a.track),e.next=20;break;case 18:e.prev=18,e.t0=e.catch(0);case 20:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),Qe=function(){var e=document.getElementById("staffIframeRef");e&&e.contentWindow.renderXml&&e.contentWindow.renderXml(Ge.musicXml,Ge.partXmlIndex)},Ye=C((function(){return Ge.partList.map((function(e,n){var t=ge(e.track);return{text:e.track+(t?"(".concat(t,")"):""),value:n,xmlValue:e.index}}))}));return function(){var a,i,u,p,v,g,h,b,y,q,x;return I("div",{class:xe.detail},[I(K,{position:"top"},{default:function(){var e;return[I("div",{ref:l},[I(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 I("div",{class:xe.shareBtn,style:{color:"#fff"},onClick:Ke},[I(X,{src:ee},null),S("分享")])}})])]}}),I("img",{class:xe.bgImg,src:null===(a=m.value)||void 0===a?void 0:a.titleImg},null),I("div",{class:xe.bgContent},null),I("div",{class:xe.musicContainer,style:{marginTop:"16px",height:"calc(100vh - ".concat(s.value+16+"px",")")}},[I(M,{border:!1,center:!0,class:xe.musicInfo},{icon:function(){var e;return I(X,{class:xe.pImg,src:null===(e=m.value)||void 0===e?void 0:e.titleImg},null)},title:function(){var e,n,t,r;return I("div",{class:xe.info},[I("h4",{class:"van-ellipsis"},[null===(e=m.value)||void 0===e?void 0:e.musicSheetName]),I("p",{style:{display:"flex"}},[Me.value.map((function(e){return I(G,{style:{color:Se[e].color},class:xe.tag,type:"success",plain:!0},{default:function(){return[Se[e].text]}})})),1===(null===(n=m.value)||void 0===n?void 0:n.exquisiteFlag)&&I(X,{class:xe.exquisiteFlag,src:we("icon_exquisite.png")},null),(null===(t=m.value)||void 0===t?void 0:t.albumNums)>0&&I(X,{class:xe.songAlbum,src:we("icon_album_active.png")},null),I("span",{class:xe.coomposer},[null===(r=m.value)||void 0===r?void 0:r.composer])])])},value:function(){var e,n,t;return I(j,null,[null!==(e=m.value)&&void 0!==e&&e.notation?I("span",{class:xe.download,onClick:function(){Ie.status=!0},style:{display:"CONCERT"!==(null===(n=m.value)||void 0===n?void 0:n.musicSheetType)?"":"none"}},[I("img",{src:ne},null),I("span",null,[S("转谱")])]):null,I("span",{class:xe.download,onClick:function(){_.value.length>0?Ce.value=!0:T("暂无图片")}},[I("img",{src:te},null),I("span",null,[S("下载曲谱")])]),I("span",{style:{display:"CONCERT"===(null===(t=m.value)||void 0===t?void 0:t.musicSheetType)?"":"none"},class:xe.download,onClick:function(){Ge.open=!0}},[I(R,{class:xe.iconExchange,name:"exchange"},null),I("span",null,[S("切换乐器")])])])}}),I("div",{class:xe.musicContent},[I("p",{class:xe.musicTitle},[(null!==(i=m.value)&&void 0!==i&&i.musicSheetName?null===(u=m.value)||void 0===u?void 0:u.musicSheetName:"")+(Ge.instrumentName?"(".concat(Ge.instrumentName,")"):"")]),"CONCERT"===(null===(p=m.value)||void 0===p?void 0:p.musicSheetType)?I(j,null,[r.value&&I(j,null,[I(J,{animationData:re,class:xe.finch},null),I("p",{class:xe.finchLoad},[S("加载中...")])]),I("iframe",{id:"staffIframeRef",style:{opacity:r.value?0:1},src:Ge.iframeSrc,onLoad:Qe},null)]):I(j,null,[_.value.length>0?I("img",{src:_.value[0],alt:"",class:xe.musicImg},null):r.value?I(j,null,[I(J,{animationData:re,class:xe.finch},null),I("p",{class:xe.finchLoad},[S("加载中...")])]):I("div",{class:xe.empty},[I(X,{src:ae,class:xe.emptyImg},null),I("p",{class:xe.emptyTip},[S("暂无乐谱预览图")])])]),I("div",{class:xe.videoOperation},[f.value&&I(j,null,[!Fe.value.play&&100!=Ne.value&&0!=Ne.value&&I("div",{class:[xe.audition]},[I("img",{src:ie},null),I("span",null,[S("每首曲目可试听"),Ne.value,S("%")])]),I("div",{class:[xe.audio,xe.collectCell]},[I("audio",{id:"player",controls:!0,ref:Ee},[I("source",{src:f.value,type:"audio/mp3"},null)])])]),I("div",{class:[xe.collect,xe.collectCell]},[I("div",{class:[xe.userInfo],onClick:function(){var n,t;O().isApp&&"TEACHER"===(null===(n=m.value)||void 0===n?void 0:n.sourceType)&&"STUDENT"===E.platformType&&e.push({path:"/teacherHome",query:{teacherId:null===(t=m.value)||void 0===t?void 0:t.userId,tabs:"music"}})}},[I("img",{src:(null===(v=m.value)||void 0===v?void 0:v.userAvatar)||fe},null),I("span",null,[null===(g=m.value)||void 0===g?void 0:g.userName])]),I("div",{class:xe.functionSection},[I("div",{class:[xe.collectSection],onClick:function(){return Pe()}},[I("span",null,[null===(h=m.value)||void 0===h?void 0:h.favoriteCount,S("人收藏")]),I("img",{src:null!==(b=m.value)&&void 0!==b&&b.favorite?oe:ue},null)]),"TEACHER"===E.platformType&&I("div",{class:[xe.collectSection],onClick:function(){var e;null!==(e=m.value)&&void 0!==e&&e.coursewareStatus?Be():Ae()}},[I("span",null,[null!==(y=m.value)&&void 0!==y&&y.coursewareStatus?"移出课件":"添加到课件"]),null!==(q=m.value)&&void 0!==q&&q.coursewareStatus?I(R,{name:"clear"},null):I(R,{name:"add",size:18},null)])])])])]),I("div",{class:[xe.lookAlbum,xe.collectCell],onClick:function(){var n,t;e.push({path:"/look-album-list",query:{id:null===(n=m.value)||void 0===n?void 0:n.id,musicSubject:null===(t=m.value)||void 0===t?void 0:t.musicSubject}})}},[I("div",null,[I("img",{src:d},null),I("span",null,[S("进入曲目所在平台专辑列表")])]),I(R,{name:"arrow",size:16,color:"#666"},null)])]),(null===(x=m.value)||void 0===x?void 0:x.id)&&I(Z,{position:"bottom",background:"white"},{default:function(){var r;return[I("div",{ref:c},[Fe.value.play?I(N,{round:!0,block:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:function(){Oe.value&&Oe.value.stop(),Y(m.value,(function(){}),{"part-index":Ge.partIndex||0,sett:Ie.radio})}},{default:function(){return[S("立即练习")]}}):I("div",{class:xe.colSticky},[Fe.value.charge&&I("div",{class:xe.priceSection},[I("span",null,[S("点播价:")]),I("span",{class:xe.price},[I("i",null,[S("¥")]),z(null===(r=m.value)||void 0===r?void 0:r.musicPrice)])]),I("div",{class:[xe.buyBtn]},[Fe.value.charge&&I(N,{round:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",class:xe.primary,onClick:Le},{default:function(){return[S("立即点播")]}}),Fe.value.vip&&I(N,{round:!0,block:!Fe.value.charge,type:"primary",color:"linear-gradient(180deg, #F7BD8D 0%, #CD8806 100%)",class:xe.memeber,onClick:function(){e.push({path:"/memberCenter",query:n({},t.query)})}},{default:function(){return[o.value>0&&I("div",{class:[xe.buttonDiscount]},[S("专属优惠")]),S("开通会员")]}})])])])]}}),I(D,{show:Xe.value,"onUpdate:show":function(e){return Xe.value=e},style:{background:"transparent"},teleport:"body"},{default:function(){var e;return[I(me,{teacherId:null===(e=E.user.data)||void 0===e?void 0:e.userId,shareUrl:He.value,shareType:"music"},{default:function(){var e,n,t;return[I("div",{class:xe.shareMate},[1===We.value&&I("div",{class:xe.tagDiscount},[S("专属优惠")]),I("img",{class:xe.icon,crossorigin:"anonymous",src:(null===(e=m.value)||void 0===e?void 0:e.titleImg)+"?t=".concat(+new Date)},null),I("div",{class:xe.info},[I("h4",{class:"van-multi-ellipsis--l2"},[null===(n=m.value)||void 0===n?void 0:n.musicSheetName]),I("p",null,[S("作曲人:"),null===(t=m.value)||void 0===t?void 0:t.composer])])])]}})]}}),I(D,{show:Ce.value,"onUpdate:show":function(e){return Ce.value=e},position:"bottom",round:!0},{default:function(){return[Ce.value&&I(le,{imgList:JSON.parse(JSON.stringify(_.value)),musicSheetName:m.value.musicSheetName},null)]}}),I(D,{show:Ie.status,"onUpdate:show":function(e){return Ie.status=e},teleport:"body",closeable:!0,style:{width:"80%"},round:!0},{default:function(){return[I("div",{class:xe.staffContainer},[I("div",{class:xe.staffTitle},[S("选择转换曲谱")]),I(H,{modelValue:Ie.radio,"onUpdate:modelValue":function(e){return Ie.radio=e}},{default:function(){return[I(F,{border:!1},{default:function(){return[I(M,{center:!0,border:!1,class:"staff"===Ie.radio?xe.active:"",onClick:function(){return je("staff")}},{icon:function(){return I(X,{src:ce,class:xe.staffImg},null)},title:function(){return I("span",{class:xe.name},[S("五线谱")])},value:function(){return I(W,{name:"staff"},{icon:function(e){return I(R,{class:xe.boxStyle,size:16,name:e.checked?_e:pe},null)}})}}),I(M,{center:!0,border:!1,class:"first"===Ie.radio?xe.active:"",onClick:function(){return je("first")}},{icon:function(){return I(X,{src:se,class:xe.staffImg},null)},title:function(){return I("span",{class:xe.name},[S("简谱-首调")])},value:function(){return I(W,{name:"first"},{icon:function(e){return I(R,{class:xe.boxStyle,size:16,name:e.checked?_e:pe},null)}})}}),I(M,{center:!0,border:!1,class:"fixed"===Ie.radio?xe.active:"",onClick:function(){return je("fixed")}},{icon:function(){return I(X,{src:de,class:xe.staffImg},null)},title:function(){return I("span",{class:xe.name},[S("简谱-固定调")])},value:function(){return I(W,{name:"fixed"},{icon:function(e){return I(R,{class:xe.boxStyle,size:16,name:e.checked?_e:pe},null)}})}})]}})]}})])]}}),I(D,{teleport:"body",position:"bottom",round:!0,show:Ge.open,"onUpdate:show":function(e){return Ge.open=e}},{default:function(){return[I(qe,{columns:Ye.value,onConfirm:function(e){Ge.open=!1,Ge.partIndex=e.value,Ge.partXmlIndex=e.xmlValue,_.value=[],P((function(){var e,n;(n=document.getElementById("staffIframeRef"))&&n.contentWindow.renderXml&&(n.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)]}})])}}}))}}}))}();
|