| 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 i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){t(n,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,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,i,a,o){try{var s=e[a](o),l=s.value}catch(c){return void t(c)}s.done?n(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var n=this,t=arguments;return new Promise((function(i,a){var o=e.apply(n,t);function s(e){r(o,i,a,s,l,"next",e)}function l(e){r(o,i,a,s,l,"throw",e)}s(void 0)}))}}var a=document.createElement("style");a.innerHTML='._base_fv27s_1>div{background:url(./header-bg.png) no-repeat top center}._detail_fv27s_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_fv27s_4 .plyr__controls .plyr__controls__item:first-child{background-color:var(--van-primary);color:#fff;border-radius:50%}._base_fv27s_1 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._shareBtn_fv27s_21{display:flex;align-items:flex-start;color:#fff;font-size:.37333rem;line-height:.53333rem!important}._shareBtn_fv27s_21 .van-image{width:.48rem;height:.48rem;margin-right:.16rem}._bgImg_fv27s_33{position:absolute;left:0;top:0;width:100%;height:7.06667rem;-o-object-fit:cover;object-fit:cover;filter:blur(.26667rem)}._bgContent_fv27s_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_fv27s_51{position:relative;width:100%;height:13.33333rem;overflow:hidden}._musicContent_fv27s_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_fv27s_51 ._musicTitle_fv27s_66{text-align:center;font-size:.42667rem}._musicContent_fv27s_51 ._musicImg_fv27s_70{width:100%}._musicContent_fv27s_51 ._finch_fv27s_73{width:4rem;margin:2.13333rem auto 0}._musicContent_fv27s_51 ._finchLoad_fv27s_77{text-align:center;color:#333;font-size:.4rem;margin-top:.10667rem}._musicContent_fv27s_51 iframe{border:none;width:100%;height:13.33333rem;overflow:hidden}._musicContent_fv27s_51 iframe body ::-webkit-scrollbar-thumb{background-color:#efeff0;border:.02667rem solid transparent;background-clip:padding-box;border-radius:.13333rem}._collectCell_fv27s_95{margin:.26667rem .42667rem 0;background:#ffffff;border-radius:.26667rem;box-shadow:0 0 .16rem rgba(229,229,229,.7);overflow:hidden}._videoOperation_fv27s_102{position:absolute;left:0;right:0;bottom:.13333rem;z-index:1}._audition_fv27s_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_fv27s_109 img{margin-top:-.05333rem;width:.56rem;height:.4rem;margin-right:.29333rem}._collect_fv27s_95{display:flex;align-items:center;justify-content:space-between;padding:.29333rem;font-size:.37333rem;color:#666}._collect_fv27s_95 ._userInfo_fv27s_135{display:flex;align-items:center;padding:.08rem .16rem;background:#d5f3ee;border-radius:.42667rem}._collect_fv27s_95 ._userInfo_fv27s_135 img{width:.69333rem;height:.69333rem;border-radius:50%}._collect_fv27s_95 ._userInfo_fv27s_135 span{padding-left:.21333rem;max-width:1.6rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#2dc7aa}._collect_fv27s_95 ._collectSection_fv27s_155{display:flex;align-items:center}._collect_fv27s_95 ._collectSection_fv27s_155 img{margin-top:-.05333rem;margin-left:.13333rem;width:.48rem;height:.48rem}._collect_fv27s_95 ._collectSection_fv27s_155 .van-icon{font-size:.53333rem;margin-top:-.05333rem;margin-left:.13333rem;color:var(--van-primary)}._collect_fv27s_95 ._collectSection_fv27s_155:first-child{margin-right:.37333rem}._lookAlbum_fv27s_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_fv27s_174>div{display:flex;align-items:center;line-height:1}._lookAlbum_fv27s_174>div img{width:.53333rem;height:.53333rem;margin-right:.26667rem}._bg_fv27s_33{position:relative;height:100%;padding:.42667rem;z-index:11}._musicContainer_fv27s_200{position:relative;z-index:12;border-radius:.48rem .48rem 0 0;background-color:#fff;overflow-y:auto}._shareMate_fv27s_207{position:relative;margin-top:1.33333rem;display:flex;flex:1;align-items:center;padding:.29333rem .32rem;background:#ffffff;border-radius:.26667rem}._shareMate_fv27s_207 ._icon_fv27s_217{width:.96rem;height:.96rem;border-radius:.26667rem}._shareMate_fv27s_207 ._info_fv27s_222{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._shareMate_fv27s_207 ._info_fv27s_222>h4{color:var(--music-list-item-title-color);font-size:.37333rem;font-weight:600;width:5.33333rem}._shareMate_fv27s_207 ._info_fv27s_222>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._shareMate_fv27s_207 ._tagDiscount_fv27s_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_fv27s_251{position:relative;margin-top:.93333rem;display:flex;flex:1;align-items:center;padding:.18667rem;background:#ffffff;border-radius:.26667rem}._shareVip_fv27s_251 ._icon_fv27s_217{width:1.92rem;height:1.92rem;border-radius:.26667rem}._shareVip_fv27s_251 ._info_fv27s_222{margin-left:.16rem;flex:1;word-break:break-all}._shareVip_fv27s_251 ._info_fv27s_222>h4{color:var(--music-list-item-title-color);font-size:.42667rem;font-weight:600}._shareVip_fv27s_251 ._info_fv27s_222>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._tagDiscount_fv27s_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_fv27s_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_fv27s_306{width:1.22667rem;height:1.22667rem;border-radius:.26667rem;overflow:hidden;flex-shrink:0}._musicInfo_fv27s_313{padding-top:.61333rem!important;padding-bottom:.61333rem!important;margin-bottom:.26667rem}._musicInfo_fv27s_313 ._coomposer_fv27s_318{padding-top:.05333rem;padding-left:.16rem;max-width:3.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._musicInfo_fv27s_313 ._tag_fv27s_238{flex-shrink:0;padding:.05333rem .10667rem 0;border-radius:.10667rem}._musicInfo_fv27s_313 ._tag_fv27s_238+._tag_fv27s_238{margin-left:.13333rem}._musicInfo_fv27s_313 ._info_fv27s_222{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._musicInfo_fv27s_313 ._info_fv27s_222>h4{font-size:.42667rem;font-weight:700;color:#1a1a1a;width:4.66667rem;padding-bottom:.08rem}._musicInfo_fv27s_313 ._info_fv27s_222>p{font-size:.32rem;color:#999;line-height:.45333rem}._musicInfo_fv27s_313 ._download_fv27s_352{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:.32rem}._musicInfo_fv27s_313 ._download_fv27s_352 img{height:.64rem;width:.64rem}._musicInfo_fv27s_313 ._exquisiteFlag_fv27s_363{width:.37333rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_fv27s_313 ._songAlbum_fv27s_368{width:.4rem;height:.4rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_fv27s_313 .van-cell__value{display:flex;justify-content:space-around}._colSticky_fv27s_378{display:flex;align-items:center;justify-content:space-between}._colSticky_fv27s_378 ._priceSection_fv27s_383{font-size:.37333rem;font-weight:400;color:#999}._colSticky_fv27s_378 ._priceSection_fv27s_383 ._price_fv27s_383{font-size:.58667rem;font-weight:700;color:#ff4e19}._colSticky_fv27s_378 ._priceSection_fv27s_383 ._price_fv27s_383 i{font-style:normal;font-size:.42667rem}._buyBtn_fv27s_397{--van-button-default-height: 1.12rem;flex:1;display:flex;align-items:center;justify-content:flex-end}._buyBtn_fv27s_397 .van-button{padding:0 .58667rem;font-weight:600}._buyBtn_fv27s_397 .van-button+.van-button{margin-left:.32rem}._buyBtn_fv27s_397 ._primry_fv27s_411{box-shadow:0 .05333rem .18667rem rgba(45,199,170,.25)}._buyBtn_fv27s_397 ._member_fv27s_414{box-shadow:0 .05333rem .18667rem rgba(187,156,83,.25)}._functionSection_fv27s_417{display:flex}._empty_fv27s_420{margin:0 auto;font-size:.37333rem;color:#999;line-height:.53333rem;text-align:center;padding-top:1.6rem}._empty_fv27s_420 ._emptyImg_fv27s_428{width:4.58667rem}._staffContainer_fv27s_431{padding:.4rem .4rem .64rem}._staffContainer_fv27s_431 ._staffTitle_fv27s_434{padding-bottom:.66667rem;font-size:.42667rem;color:#1a1a1a;line-height:.58667rem}._staffContainer_fv27s_431 ._staffImg_fv27s_440{width:.85333rem;height:.53333rem}._staffContainer_fv27s_431 ._name_fv27s_444{padding-left:.45333rem;font-size:.34667rem;font-weight:500;color:#333}._staffContainer_fv27s_431 ._boxStyle_fv27s_450{background:transparent!important;width:.4rem;height:.4rem;border:transparent!important}._staffContainer_fv27s_431 ._active_fv27s_456{background:#f7f8f9;border-radius:.21333rem}._staffContainer_fv27s_431 ._active_fv27s_456 ._name_fv27s_444{color:#2dc7aa}._staffContainer_fv27s_431 .van-cell{padding:.24rem .42667rem;margin-bottom:.16rem}._staffContainer_fv27s_431 .van-cell:hover,._staffContainer_fv27s_431 .van-cell:active,._staffContainer_fv27s_431 .van-cell.active{background:#f7f8f9;border-radius:.21333rem}._staffContainer_fv27s_431 .van-cell:hover .name,._staffContainer_fv27s_431 .van-cell:active .name,._staffContainer_fv27s_431 .van-cell.active .name{color:#2dc7aa}._staffContainer_fv27s_431 .van-cell:last-child{margin-bottom:0}._staffContainer_fv27s_431 .van-cell__value{display:flex;justify-content:flex-end}._staffContainer_fv27s_431 .van-checkbox{overflow:inherit;height:.48rem;display:flex;align-items:center;justify-content:flex-end}._staffContainer_fv27s_431 .van-checkbox__icon{height:.4rem;line-height:.4rem;display:inline-block;vertical-align:middle}._staffContainer_fv27s_431 .van-checkbox__label{line-height:.4rem}\n',document.head.appendChild(a),System.register(["./icon_uploader-legacy.db3a8c90.js","./icon-xin-legacy.18ed4a9d.js","./icon_album-legacy.d489a774.js","./icon_album_active-legacy.d2829e23.js","./icon_exquisite-legacy.178b582f.js","./icon_music_active-legacy.cc68af68.js","./index-legacy.9fbf5cc3.js","./index-legacy.a25aafdb.js","./index-legacy.bcebad5e.js","./index-legacy.2574bd80.js","./index-legacy.4f3e9447.js","./index-legacy.0e048967.js","./index-legacy.4b80dca1.js","./index-legacy.6de9b88c.js","./index-legacy.ec44c18a.js","./index-legacy.faf0a245.js","./vue3-lottie.es-legacy.20a67488.js","./music-legacy.5c1ebe75.js","./index-legacy.b0f2eb71.js","./orderStatus-legacy.4eb8eebc.js","./icon_share-legacy.69f1973c.js","./download-legacy.8ebdf741.js","./index-legacy.e3aba256.js","./icon_teacher-legacy.42ba77b1.js","./icon_checkbox_default-legacy.e33240bc.js","./plyr-legacy.180f4c53.js","./instruments-legacy.98db315a.js","./index-legacy.342b9a15.js","./index-legacy.8e975b15.js","./use-height-legacy.af126ed3.js","./index-legacy.3f9a9bef.js","./code-down-load-legacy.6b209968.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.869507ab.js","./html2canvas.esm-legacy.19f9c2b7.js"],(function(e){"use strict";var t,r,a,o,s,l,c,u,f,d,m,v,_,p,g,h,b,y,x,w,C,k,I,S,j,T,O,R,N,z,E,D,P,A,B,q,L,U,M,F,V,H,X,W,G,J,Q,Y,Z,K,$,ee,ne,te,re,ie,ae,oe,se,le,ce,ue,fe,de,me,ve,_e,pe,ge;return{setters:[function(e){t=e._,r=e.a,a=e.b,o=e.c,s=e.d,l=e.e,c=e.f},function(e){u=e._},function(e){f=e.i,d=e._},function(e){m=e._},function(e){v=e._},function(e){_=e._},function(e){p=e.d,g=e.S,h=e.Q,b=e.V,y=e.U,x=e.a4,w=e.W,C=e.Z,k=e.bC,I=e.X,S=e.j,j=e.B,T=e.F,O=e.T,R=e.O,N=e.f,z=e.g,E=e.E,D=e.by,P=e.aT,A=e.Y,B=e.w,q=e.D},function(e){L=e.C},function(e){U=e.C},function(e){M=e.C},function(e){F=e.I},function(e){V=e.R,H=e.a},function(e){X=e.S},function(e){W=e.T},function(){},function(){},function(e){G=e.V},function(e){J=e.g,Q=e.h,Y=e.m},function(e){Z=e.C},function(e){K=e.o},function(e){$=e.i},function(e){ee=e.i,ne=e.a,te=e.A,re=e.e,ie=e.b,ae=e.c,oe=e.d,se=e.D,le=e.s,ce=e.f,ue=e.g},function(e){fe=e.C},function(e){de=e.i},function(e){me=e.a,ve=e.i},function(e){_e=e.P},function(e){pe=e.g},function(e){ge=e.P},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var he={base:"_base_fv27s_1",detail:"_detail_fv27s_4",shareBtn:"_shareBtn_fv27s_21",bgImg:"_bgImg_fv27s_33",bgContent:"_bgContent_fv27s_42",musicContent:"_musicContent_fv27s_51",musicTitle:"_musicTitle_fv27s_66",musicImg:"_musicImg_fv27s_70",finch:"_finch_fv27s_73",finchLoad:"_finchLoad_fv27s_77",collectCell:"_collectCell_fv27s_95",videoOperation:"_videoOperation_fv27s_102",audition:"_audition_fv27s_109",collect:"_collect_fv27s_95",userInfo:"_userInfo_fv27s_135",collectSection:"_collectSection_fv27s_155",lookAlbum:"_lookAlbum_fv27s_174",bg:"_bg_fv27s_33",musicContainer:"_musicContainer_fv27s_200",shareMate:"_shareMate_fv27s_207",icon:"_icon_fv27s_217",info:"_info_fv27s_222",tagDiscount:"_tagDiscount_fv27s_238",shareVip:"_shareVip_fv27s_251",buttonDiscount:"_buttonDiscount_fv27s_293",pImg:"_pImg_fv27s_306",musicInfo:"_musicInfo_fv27s_313",coomposer:"_coomposer_fv27s_318",tag:"_tag_fv27s_238",download:"_download_fv27s_352",exquisiteFlag:"_exquisiteFlag_fv27s_363",songAlbum:"_songAlbum_fv27s_368",colSticky:"_colSticky_fv27s_378",priceSection:"_priceSection_fv27s_383",price:"_price_fv27s_383",buyBtn:"_buyBtn_fv27s_397",primry:"_primry_fv27s_411",member:"_member_fv27s_414",functionSection:"_functionSection_fv27s_417",empty:"_empty_fv27s_420",emptyImg:"_emptyImg_fv27s_428",staffContainer:"_staffContainer_fv27s_431",staffTitle:"_staffTitle_fv27s_434",staffImg:"_staffImg_fv27s_440",name:"_name_fv27s_444",boxStyle:"_boxStyle_fv27s_450",active:"_active_fv27s_456"},be=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":u,"../component/images/icon_ai.png":a,"../component/images/icon_album.png":d,"../component/images/icon_album_active.png":m,"../component/images/icon_author.png":o,"../component/images/icon_download.png":s,"../component/images/icon_exquisite.png":v,"../component/images/icon_music_active.png":_,"../component/images/icon_share.png":l,"../component/images/icon_uploader.png":c}[n].default}));e("default",p({name:"MusicDetail",setup:function(){localStorage.setItem("behaviorId",J());var e=g(),t=h(),r=b(!1),a=Number(t.query.activityId)||0,o=b(a),s=b(!1),l=b(null),c=b(null),u=b("0"),d=b(null),m=b(""),v=[],_=b([]),p=b([]),ye=b([]);b("");var xe=b(!1),we=y({status:!1,radio:"staff"}),Ce={FREE:{color:"#01B84F",text:"免费"},VIP:{color:"#CD863E",text:"会员"},CHARGE:{color:"#3591CE",text:"点播"}},ke=function(e){we.radio=e,we.status=!1};x((function(){return we.radio}),(function(e){v="first"==e?_.value:"fixed"==e?p.value:ye.value}));var Ie=function(){var e=i(regeneratorRuntime.mark((function e(n){var i,a,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,s.value=!1,e.prev=4,e.next=7,B.get("/music/sheet/detail/".concat(t.query.id),{prefix:"TEACHER"===z.platformType?"/api-teacher":"/api-student"});case 7:a=e.sent,d.value=a.data,console.log(d.value.notation,"musicDetail"),o=a.data.background,m.value=o&&o.length>0?o[0].audioFileUrl:"",v=a.data.musicImg?a.data.musicImg.split(","):[],_.value=a.data.firstTone?a.data.firstTone.split(","):[],p.value=a.data.fixedTone?a.data.fixedTone.split(","):[],ye.value=a.data.musicImg?a.data.musicImg.split(","):[],A((function(){He()})),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(4),s.value=!0;case 22:"CONCERT"!==(null===(i=d.value)||void 0===i?void 0:i.musicSheetType)&&(r.value=!1);case 23:case"end":return e.stop()}}),e,null,[[4,19]])})));return function(n){return e.apply(this,arguments)}}(),Se=b(null),je=b(null),Te=b(0),Oe=function(){var e=i(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"],Se.value=new _e(je.value,{controls:t}),e.next=4,B.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_free_rate"}});case 4:r=e.sent,Te.value=(null===(n=r.data[0])||void 0===n?void 0:n.paramValue)||0,Se.value.on("timeupdate",(function(){var e=Se.value,n=e.duration*Te.value/100||0;e.currentTime>=n&&!qe.value.play&&e.stop()}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Re=function(e){var n;console.log(e),"musicStaffRender"===(null===(n=e.data)||void 0===n?void 0:n.api)&&(r.value=e.data.loading)};w(i(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,Ie();case 2:n=C(l),t=n.height,r=C(c),u.value=t+r.height,m.value&&Oe(),window.addEventListener("message",Re);case 7:case"end":return e.stop()}}),e)})))),k((function(){window.removeEventListener("message",Re)}));var Ne=function(){var e=i(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,B.post("/music/sheet/favorite/"+(null===(n=d.value)||void 0===n?void 0:n.id),{prefix:"TEACHER"===z.platformType?"/api-teacher":"/api-student"});case 3:d.value.favorite=null!==(t=d.value)&&void 0!==t&&t.favorite?0:1,d.value.favoriteCount=null!==(r=d.value)&&void 0!==r&&r.favorite?d.value.favoriteCount+1:d.value.favoriteCount-1<0?0:d.value.favoriteCount-1,setTimeout((function(){var e;O(null!==(e=d.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)}}(),ze=function(){var e=i(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,B.post("/api-teacher/courseCourseware/submit",{data:{musicSheetId:d.value.id,clientType:"TEACHER",userId:null===(n=z.user.data)||void 0===n?void 0:n.userId}});case 3:t=e.sent,console.log(t),setTimeout((function(){d.value.coursewareId=t.data.id||"",O("添加成功"),d.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)}}(),Ee=function(){var e=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:q.confirm({title:"提示",message:"您是否确定移除课件",confirmButtonColor:"#269a93",cancelButtonText:"取消",confirmButtonText:"确定"}).then(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,B.post("/api-teacher/courseCourseware/remove/"+d.value.coursewareId,{data:{}});case 3:setTimeout((function(){O("移除成功"),d.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)}}(),De=function(){var e=i(regeneratorRuntime.mark((function e(){var r,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.value,K.orderObject.orderType="MUSIC",K.orderObject.orderName=r.musicSheetName,K.orderObject.orderDesc=r.musicSheetName,K.orderObject.actualPrice=r.musicPrice,K.orderObject.recomUserId=t.query.recomUserId||0,K.orderObject.activityId=t.query.activityId||0,K.orderObject.orderNo="",K.orderObject.orderList=[n({orderType:"MUSIC",goodsName:r.musicSheetName,actualPrice:r.musicPrice},r)],e.next=11,B.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"MUSIC",bizId:r.id}});case 11:a=e.sent,(o=a.data)?q.confirm({title:"提示",message:"您有一个未支付的订单,是否继续支付?",confirmButtonColor:"#269a93",cancelButtonText:"取消订单",confirmButtonText:"继续支付"}).then(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:K.orderObject.orderNo=o.orderNo,K.orderObject.actualPrice=o.actualPrice,K.orderObject.discountPrice=o.discountPrice,Pe();case 4:case"end":return e.stop()}}),e)})))).catch((function(){q.close(),Ae(o.orderNo)})):Pe();case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var n=d.value;e.push({path:"/orderDetail",query:{orderType:"MUSIC",musicId:n.id}})},Ae=function(){var e=i(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,B.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)}}(),Be=I((function(){var e,n=null===(e=d.value)||void 0===e?void 0:e.paymentType;return"string"==typeof n?n=n.split(","):[]})),qe=I((function(){var e=d.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)}})),Le=b(!1),Ue=b(""),Me=b(0),Fe=function(){var e=i(regeneratorRuntime.mark((function e(){var n,t,r,i,a,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,B.post("/api-teacher/open/musicShareProfit",{data:{bizId:null===(n=d.value)||void 0===n?void 0:n.id,userId:null===(t=z.user.data)||void 0===t?void 0:t.userId}});case 3:return a=e.sent,o=location.origin+"/teacher/#/shareMusic?id=".concat(null===(r=d.value)||void 0===r?void 0:r.id,"&recomUserId=").concat(null===(i=z.user.data)||void 0===i?void 0:i.userId,"&userType=").concat(z.platformType),1===a.data.discount&&(o+="&activityId=".concat(a.data.activityId)),Me.value=a.data.discount||0,console.log(o),Ue.value=o,Le.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)}}(),Ve=y({open:!1,iframeSrc:"",musicXml:"",instrumentName:"",iframeRef:null,partIndex:0,partList:[]}),He=function(){var e,n,t;Ve.iframeSrc="".concat(location.origin).concat(location.pathname,"osmd/index.html"),Ve.musicXml=(null===(e=d.value)||void 0===e?void 0:e.xmlFileUrl)||"",Ve.partList=(null===(n=d.value)||void 0===n?void 0:n.background)||[],Ve.instrumentName=pe(null===(t=Ve.partList[Ve.partIndex])||void 0===t?void 0:t.track)},Xe=function(){var e=document.getElementById("staffIframeRef");e&&e.contentWindow.renderXml&&e.contentWindow.renderXml(Ve.musicXml,Ve.partIndex)},We=I((function(){return Ve.partList.map((function(e,n){var t=pe(e.track);return{text:e.track+(t?"(".concat(t,")"):""),value:n}}))}));return function(){var i,a,s,_,p,g,h,b,y,x,w;return S("div",{class:he.detail},[S(X,{position:"top"},{default:function(){var e;return[S("div",{ref:l},[S(L,{background:"transparent",border:!1,isFixed:!1,color:"#fff",title:null===(e=d.value)||void 0===e?void 0:e.musicSheetName,backIconColor:"white"},{right:function(){return S("div",{class:he.shareBtn,style:{color:"#fff"},onClick:Fe},[S(F,{src:$},null),j("分享")])}})])]}}),S("img",{class:he.bgImg,src:null===(i=d.value)||void 0===i?void 0:i.titleImg},null),S("div",{class:he.bgContent},null),S("div",{class:he.musicContainer,style:{marginTop:"16px",height:"calc(100vh - ".concat(u.value+16+"px",")")}},[S(U,{border:!1,center:!0,class:he.musicInfo},{icon:function(){var e;return S(F,{class:he.pImg,src:null===(e=d.value)||void 0===e?void 0:e.titleImg},null)},title:function(){var e,n,t,r;return S("div",{class:he.info},[S("h4",{class:"van-ellipsis",onClick:function(){return Q(d.value)}},[null===(e=d.value)||void 0===e?void 0:e.musicSheetName]),S("p",{style:{display:"flex"}},[Be.value.map((function(e){return S(W,{style:{color:Ce[e].color},class:he.tag,type:"success",plain:!0},{default:function(){return[Ce[e].text]}})})),1===(null===(n=d.value)||void 0===n?void 0:n.exquisiteFlag)&&S(F,{class:he.exquisiteFlag,src:be("icon_exquisite.png")},null),(null===(t=d.value)||void 0===t?void 0:t.albumNums)>0&&S(F,{class:he.songAlbum,src:be("icon_album_active.png")},null),S("span",{class:he.coomposer},[null===(r=d.value)||void 0===r?void 0:r.composer])])])},value:function(){var e,n,t;return S(T,null,[S("div",{class:"van-cell__value",style:{display:"SINGLE"===(null===(e=d.value)||void 0===e?void 0:e.musicSheetType)?"":"none"}},[null!==(n=d.value)&&void 0!==n&&n.notation?S("span",{class:he.download,onClick:function(){we.status=!0}},[S("img",{src:ee},null),S("span",null,[j("转谱")])]):null,S("span",{class:he.download,onClick:function(){v.length>0?xe.value=!0:O("暂无图片")}},[S("img",{src:ne},null),S("span",null,[j("下载曲谱")])])]),S("span",{style:{display:"CONCERT"===(null===(t=d.value)||void 0===t?void 0:t.musicSheetType)?"":"none"},class:he.download,onClick:function(){Ve.open=!0}},[S(R,{style:{background:"rgba(246,246,246,1)",borderRadius:"50%",padding:"4px"},size:"20px",name:"exchange"},null),S("span",null,[j("切换乐器")])])])}}),S("div",{class:he.musicContent},[S("p",{class:he.musicTitle},[(null!==(a=d.value)&&void 0!==a&&a.musicSheetName?null===(s=d.value)||void 0===s?void 0:s.musicSheetName:"")+(Ve.instrumentName?"(".concat(Ve.instrumentName,")"):"")]),"CONCERT"===(null===(_=d.value)||void 0===_?void 0:_.musicSheetType)?S(T,null,[r.value&&S(T,null,[S(G,{animationData:te,class:he.finch},null),S("p",{class:he.finchLoad},[j("加载中...")])]),S("iframe",{id:"staffIframeRef",src:Ve.iframeSrc,onLoad:Xe},null)]):S(T,null,[v.length>0?S("img",{src:v[0],alt:"",class:he.musicImg},null):r.value?S(T,null,[S(G,{animationData:te,class:he.finch},null),S("p",{class:he.finchLoad},[j("加载中...")])]):S("div",{class:he.empty},[S(F,{src:re,class:he.emptyImg},null),S("p",{class:he.emptyTip},[j("暂无乐谱预览图")])])]),S("div",{class:he.videoOperation},[m.value&&S(T,null,[!qe.value.play&&100!=Te.value&&0!=Te.value&&S("div",{class:[he.audition]},[S("img",{src:ie},null),S("span",null,[j("每首曲目可试听"),Te.value,j("%")])]),S("div",{class:[he.audio,he.collectCell]},[S("audio",{id:"player",controls:!0,ref:je},[S("source",{src:m.value,type:"audio/mp3"},null)])])]),S("div",{class:[he.collect,he.collectCell]},[S("div",{class:[he.userInfo],onClick:function(){var n,t;N().isApp&&"TEACHER"===(null===(n=d.value)||void 0===n?void 0:n.sourceType)&&"STUDENT"===z.platformType&&e.push({path:"/teacherHome",query:{teacherId:null===(t=d.value)||void 0===t?void 0:t.userId,tabs:"music"}})}},[S("img",{src:(null===(p=d.value)||void 0===p?void 0:p.userAvatar)||de},null),S("span",null,[null===(g=d.value)||void 0===g?void 0:g.userName])]),S("div",{class:he.functionSection},[S("div",{class:[he.collectSection],onClick:function(){return Ne()}},[S("span",null,[null===(h=d.value)||void 0===h?void 0:h.favoriteCount,j("人收藏")]),S("img",{src:null!==(b=d.value)&&void 0!==b&&b.favorite?ae:oe},null)]),"TEACHER"===z.platformType&&S("div",{class:[he.collectSection],onClick:function(){var e;null!==(e=d.value)&&void 0!==e&&e.coursewareStatus?Ee():ze()}},[S("span",null,[null!==(y=d.value)&&void 0!==y&&y.coursewareStatus?"移出课件":"添加到课件"]),null!==(x=d.value)&&void 0!==x&&x.coursewareStatus?S(R,{name:"clear"},null):S(R,{name:"add",size:18},null)])])])])]),S("div",{class:[he.lookAlbum,he.collectCell],onClick:function(){var n,t;e.push({path:"/look-album-list",query:{id:null===(n=d.value)||void 0===n?void 0:n.id,musicSubject:null===(t=d.value)||void 0===t?void 0:t.musicSubject}})}},[S("div",null,[S("img",{src:f},null),S("span",null,[j("进入曲目所在专辑列表")])]),S(R,{name:"arrow",size:16,color:"#666"},null)])]),(null===(w=d.value)||void 0===w?void 0:w.id)&&S(Z,{position:"bottom",background:"white"},{default:function(){var r;return[S("div",{ref:c},[qe.value.play?S(E,{round:!0,block:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:function(){Se.value&&Se.value.stop(),Y(d.value,(function(){}),{"part-index":Ve.partIndex||0})}},{default:function(){return[j("立即练习")]}}):S("div",{class:he.colSticky},[qe.value.charge&&S("div",{class:he.priceSection},[S("span",null,[j("点播价:")]),S("span",{class:he.price},[S("i",null,[j("¥")]),D(null===(r=d.value)||void 0===r?void 0:r.musicPrice)])]),S("div",{class:[he.buyBtn]},[qe.value.charge&&S(E,{round:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",class:he.primary,onClick:De},{default:function(){return[j("立即点播")]}}),qe.value.vip&&S(E,{round:!0,block:!qe.value.charge,type:"primary",color:"linear-gradient(180deg, #F7BD8D 0%, #CD8806 100%)",class:he.memeber,onClick:function(){e.push({path:"/memberCenter",query:n({},t.query)})}},{default:function(){return[o.value>0&&S("div",{class:[he.buttonDiscount]},[j("专属优惠")]),j("开通会员")]}})])])])]}}),S(P,{show:Le.value,"onUpdate:show":function(e){return Le.value=e},style:{background:"transparent"},teleport:"body"},{default:function(){var e;return[S(fe,{teacherId:null===(e=z.user.data)||void 0===e?void 0:e.userId,shareUrl:Ue.value,shareType:"music"},{default:function(){var e,n,t;return[S("div",{class:he.shareMate},[1===Me.value&&S("div",{class:he.tagDiscount},[j("专属优惠")]),S("img",{class:he.icon,crossorigin:"anonymous",src:(null===(e=d.value)||void 0===e?void 0:e.titleImg)+"@base@tag=imgScale&h=80&w=80&m=1?t=".concat(+new Date)},null),S("div",{class:he.info},[S("h4",{class:"van-multi-ellipsis--l2"},[null===(n=d.value)||void 0===n?void 0:n.musicSheetName]),S("p",null,[j("作曲人:"),null===(t=d.value)||void 0===t?void 0:t.composer])])])]}})]}}),S(P,{show:xe.value,"onUpdate:show":function(e){return xe.value=e},position:"bottom",round:!0},{default:function(){return[S(se,{imgList:JSON.parse(JSON.stringify(v)),musicSheetName:d.value.musicSheetName},null)]}}),S(P,{show:we.status,"onUpdate:show":function(e){return we.status=e},teleport:"body",closeable:!0,style:{width:"80%"},round:!0},{default:function(){return[S("div",{class:he.staffContainer},[S("div",{class:he.staffTitle},[j("选择转换曲谱")]),S(V,{modelValue:we.radio,"onUpdate:modelValue":function(e){return we.radio=e}},{default:function(){return[S(M,{border:!1},{default:function(){return[S(U,{center:!0,border:!1,class:"staff"===we.radio?he.active:"",onClick:function(){return ke("staff")}},{icon:function(){return S(F,{src:le,class:he.staffImg},null)},title:function(){return S("span",{class:he.name},[j("五线谱")])},value:function(){return S(H,{name:"staff"},{icon:function(e){return S(R,{class:he.boxStyle,size:16,name:e.checked?me:ve},null)}})}}),S(U,{center:!0,border:!1,class:"first"===we.radio?he.active:"",onClick:function(){return ke("first")}},{icon:function(){return S(F,{src:ce,class:he.staffImg},null)},title:function(){return S("span",{class:he.name},[j("简谱-首调")])},value:function(){return S(H,{name:"first"},{icon:function(e){return S(R,{class:he.boxStyle,size:16,name:e.checked?me:ve},null)}})}}),S(U,{center:!0,border:!1,class:"fixed"===we.radio?he.active:"",onClick:function(){return ke("fixed")}},{icon:function(){return S(F,{src:ue,class:he.staffImg},null)},title:function(){return S("span",{class:he.name},[j("简谱-固定调")])},value:function(){return S(H,{name:"fixed"},{icon:function(e){return S(R,{class:he.boxStyle,size:16,name:e.checked?me:ve},null)}})}})]}})]}})])]}}),S(P,{teleport:"body",position:"bottom",round:!0,show:Ve.open,"onUpdate:show":function(e){return Ve.open=e}},{default:function(){return[S(ge,{columns:We.value,onConfirm:function(e){Ve.open=!1,Ve.partIndex=e.value,A((function(){var e,n;(n=document.getElementById("staffIframeRef"))&&n.contentWindow.renderXml&&(n.contentWindow.resetRender(Ve.partIndex),Ve.instrumentName=pe(null===(e=Ve.partList[Ve.partIndex])||void 0===e?void 0:e.track))}))},onCancel:function(){return Ve.open=!1}},null)]}})])}}}))}}}))}();
|