index-legacy.c1fea4c2.js 18 KB

1
  1. !function(){function e(e,t,i,n,r,l,o){try{var a=e[l](o),c=a.value}catch(u){return void i(u)}a.done?t(c):Promise.resolve(c).then(n,r)}function t(t){return function(){var i=this,n=arguments;return new Promise((function(r,l){var o=t.apply(i,n);function a(t){e(o,r,l,a,c,"next",t)}function c(t){e(o,r,l,a,c,"throw",t)}a(void 0)}))}}var i=document.createElement("style");i.innerHTML='._base_16tl9_1>div{background:url(./header-bg.png) no-repeat top center}._detail_16tl9_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_16tl9_4 .plyr__controls .plyr__controls__item:first-child{background-color:var(--van-primary);color:#fff;border-radius:50%}._base_16tl9_1 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._shareBtn_16tl9_21{display:flex;align-items:flex-start;color:#fff;font-size:.37333rem;line-height:.53333rem!important}._shareBtn_16tl9_21 .van-image{width:.48rem;height:.48rem;margin-right:.16rem}._bgImg_16tl9_33{position:absolute;left:0;top:0;width:100%;height:7.06667rem;-o-object-fit:cover;object-fit:cover;filter:blur(.26667rem)}._bgContent_16tl9_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_16tl9_51{position:relative;width:100%;height:13.33333rem;overflow:hidden}._musicContent_16tl9_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_16tl9_51 ._musicTitle_16tl9_66{text-align:center;font-size:.42667rem}._musicContent_16tl9_51 ._musicImg_16tl9_70{width:100%}._musicContent_16tl9_51 ._finch_16tl9_73{width:4rem;margin:2.13333rem auto 0}._musicContent_16tl9_51 ._finchLoad_16tl9_77{text-align:center;color:#333;font-size:.4rem;margin-top:.10667rem}._musicContent_16tl9_51 iframe{visibility:hidden}._musicContent_16tl9_51 iframe body ::-webkit-scrollbar-thumb{background-color:#efeff0;border:.02667rem solid transparent;background-clip:padding-box;border-radius:.13333rem}._collectCell_16tl9_92{margin:.26667rem .42667rem 0;background:#ffffff;border-radius:.26667rem;box-shadow:0 0 .16rem rgba(229,229,229,.7);overflow:hidden}._videoOperation_16tl9_99{position:absolute;left:0;right:0;bottom:.13333rem;z-index:1}._audition_16tl9_106{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_16tl9_106 img{margin-top:-.05333rem;width:.56rem;height:.4rem;margin-right:.29333rem}._collect_16tl9_92{display:flex;align-items:center;justify-content:space-between;padding:.29333rem;font-size:.37333rem;color:#666}._collect_16tl9_92 ._userInfo_16tl9_132{display:flex;align-items:center;padding:.08rem .16rem;background:#d5f3ee;border-radius:.42667rem}._collect_16tl9_92 ._userInfo_16tl9_132 img{width:.69333rem;height:.69333rem;border-radius:50%}._collect_16tl9_92 ._userInfo_16tl9_132 span{padding-left:.21333rem;max-width:3.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#2dc7aa}._collect_16tl9_92 ._collectSection_16tl9_152{display:flex;align-items:center}._collect_16tl9_92 ._collectSection_16tl9_152 img{margin-top:-.05333rem;margin-left:.29333rem;width:.48rem;height:.48rem}._lookAlbum_16tl9_162{padding:.45333rem .53333rem;margin-bottom:.4rem;font-size:.37333rem;color:#333;line-height:.53333rem;display:flex;align-items:center;justify-content:space-between}._lookAlbum_16tl9_162>div{display:flex;align-items:center;line-height:1}._lookAlbum_16tl9_162>div img{width:.53333rem;height:.53333rem;margin-right:.26667rem}._bg_16tl9_33{position:relative;height:100%;padding:.42667rem;z-index:11}._musicContainer_16tl9_188{position:relative;z-index:12;border-radius:.48rem .48rem 0 0;background-color:#fff;overflow-y:auto}._shareMate_16tl9_195{position:relative;margin-top:1.33333rem;display:flex;flex:1;align-items:center;padding:.29333rem .32rem;background:#ffffff;border-radius:.26667rem}._shareMate_16tl9_195 ._icon_16tl9_205{width:.96rem;height:.96rem;border-radius:.26667rem}._shareMate_16tl9_195 ._info_16tl9_210{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._shareMate_16tl9_195 ._info_16tl9_210>h4{color:var(--music-list-item-title-color);font-size:.37333rem;font-weight:600;width:5.33333rem}._shareMate_16tl9_195 ._info_16tl9_210>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._shareMate_16tl9_195 ._tagDiscount_16tl9_226{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_16tl9_239{position:relative;margin-top:.93333rem;display:flex;flex:1;align-items:center;padding:.18667rem;background:#ffffff;border-radius:.26667rem}._shareVip_16tl9_239 ._icon_16tl9_205{width:1.92rem;height:1.92rem;border-radius:.26667rem}._shareVip_16tl9_239 ._info_16tl9_210{margin-left:.16rem;flex:1;word-break:break-all}._shareVip_16tl9_239 ._info_16tl9_210>h4{color:var(--music-list-item-title-color);font-size:.42667rem;font-weight:600}._shareVip_16tl9_239 ._info_16tl9_210>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._tagDiscount_16tl9_226{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_16tl9_281{position:absolute;top:-.61333rem;right:.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}._pImg_16tl9_294{width:1.22667rem;height:1.22667rem;border-radius:.26667rem;overflow:hidden;flex-shrink:0}._musicInfo_16tl9_301{padding-top:.61333rem!important;padding-bottom:.61333rem!important;margin-bottom:.26667rem}._musicInfo_16tl9_301 ._tag_16tl9_226{flex-shrink:0;border-radius:.10667rem}._musicInfo_16tl9_301 ._info_16tl9_210{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._musicInfo_16tl9_301 ._info_16tl9_210>h4{font-size:.42667rem;font-weight:700;color:#1a1a1a;width:5.33333rem;padding-bottom:.08rem}._musicInfo_16tl9_301 ._info_16tl9_210>p{font-size:.32rem;color:#999;line-height:.45333rem}._musicInfo_16tl9_301 ._download_16tl9_328{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:.32rem}._musicInfo_16tl9_301 ._download_16tl9_328 img{height:.64rem;width:.64rem}._musicInfo_16tl9_301 ._exquisiteFlag_16tl9_339{width:.37333rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_16tl9_301 ._songAlbum_16tl9_344{width:.4rem;height:.4rem;margin-left:.13333rem;flex-shrink:0}._colSticky_16tl9_350{display:flex;align-items:center;justify-content:space-between}._colSticky_16tl9_350 ._priceSection_16tl9_355{font-size:.37333rem;font-weight:400;color:#999}._colSticky_16tl9_350 ._priceSection_16tl9_355 ._price_16tl9_355{font-size:.58667rem;font-weight:700;color:#ff4e19}._colSticky_16tl9_350 ._priceSection_16tl9_355 ._price_16tl9_355 i{font-style:normal;font-size:.42667rem}._buyBtn_16tl9_369{--van-button-default-height: 1.01333rem}._buyBtn_16tl9_369 .van-button{padding:0 .58667rem;font-weight:600}._buyBtn_16tl9_369 .van-button+.van-button{margin-left:.32rem}._buyBtn_16tl9_369 ._primry_16tl9_379{box-shadow:0 .05333rem .18667rem rgba(45,199,170,.25)}._buyBtn_16tl9_369 ._member_16tl9_382{box-shadow:0 .05333rem .18667rem rgba(187,156,83,.25)}._wxpopup_16tl9_385{width:100%;height:100vh;position:fixed;top:0;left:0;background:rgba(0,0,0,.5);z-index:9999}._wxpopup_16tl9_385 img{width:88%;margin:0 6%}\n',document.head.appendChild(i),System.register(["./index-legacy.c6e3efd1.js","./index-legacy.1b6e9202.js","./index-legacy.581c4ced.js","./index-legacy.a0625753.js","./index-legacy.081940dd.js","./index-legacy.3553cfca.js","./imageFunction-legacy.69c0c7a2.js","./music-legacy.4b4da9ed.js","./index-legacy.23ae2540.js","./icon_exquisite-legacy.9a511f41.js","./icon_teacher-legacy.42ba77b1.js","./plyr-legacy.180f4c53.js","./icon_album_active-legacy.6a6c539c.js","./wx_bg-legacy.a09a21f9.js","./share-legacy.4dc8d776.js","./index-legacy.c610561c.js","./index-legacy.fa8c1bdd.js","./use-height-legacy.7b7670e9.js"],(function(e){"use strict";var i,n,r,l,o,a,c,u,s,_,m,d,f,g,p,h,v,b,y,w,x,k,I,C,S,A,j,z,D,T,B,F,R,E,P,V,q,M,L,N,O;return{setters:[function(e){i=e.d,n=e.L,r=e.O,l=e.P,o=e.T,a=e.Q,c=e.i,u=e.w,s=e.F,_=e.J,m=e.B,d=e.e,f=e.s,g=e.aE,p=e.bm,h=e.bf,v=e.b},function(e){b=e.C},function(e){y=e.C},function(e){w=e.I},function(e){x=e.S},function(e){k=e.T},function(e){I=e.i,C=e.V,S=e.A,A=e.a,j=e.b,z=e.c,D=e.d,T=e.e},function(e){B=e.g},function(e){F=e.C},function(e){R=e.b,E=e.i},function(e){P=e.i},function(e){V=e.P},function(e){q=e.i},function(e){M=e.w},function(e){L=e.i,N=e.s},function(e){O=e.q},function(){},function(){}],execute:function(){var U={base:"_base_16tl9_1",detail:"_detail_16tl9_4",shareBtn:"_shareBtn_16tl9_21",bgImg:"_bgImg_16tl9_33",bgContent:"_bgContent_16tl9_42",musicContent:"_musicContent_16tl9_51",musicTitle:"_musicTitle_16tl9_66",musicImg:"_musicImg_16tl9_70",finch:"_finch_16tl9_73",finchLoad:"_finchLoad_16tl9_77",collectCell:"_collectCell_16tl9_92",videoOperation:"_videoOperation_16tl9_99",audition:"_audition_16tl9_106",collect:"_collect_16tl9_92",userInfo:"_userInfo_16tl9_132",collectSection:"_collectSection_16tl9_152",lookAlbum:"_lookAlbum_16tl9_162",bg:"_bg_16tl9_33",musicContainer:"_musicContainer_16tl9_188",shareMate:"_shareMate_16tl9_195",icon:"_icon_16tl9_205",info:"_info_16tl9_210",tagDiscount:"_tagDiscount_16tl9_226",shareVip:"_shareVip_16tl9_239",buttonDiscount:"_buttonDiscount_16tl9_281",pImg:"_pImg_16tl9_294",musicInfo:"_musicInfo_16tl9_301",tag:"_tag_16tl9_226",download:"_download_16tl9_328",exquisiteFlag:"_exquisiteFlag_16tl9_339",songAlbum:"_songAlbum_16tl9_344",colSticky:"_colSticky_16tl9_350",priceSection:"_priceSection_16tl9_355",price:"_price_16tl9_355",buyBtn:"_buyBtn_16tl9_369",primry:"_primry_16tl9_379",member:"_member_16tl9_382",wxpopup:"_wxpopup_16tl9_385"};e("default",i({name:"MusicDetail",setup:function(){localStorage.setItem("behaviorId",B());var e=n(),i=r(!1),H=r(!1),K=r(null),G=r(null),J=r("0"),Q=r(null),W=r(""),X=r(""),Y=r(""),Z=r(!1),$="".concat(location.origin,"/student/#/music-detail?").concat(O.stringify(e.query)),ee=r($),te={FREE:{color:"#01B84F",text:"免费"},VIP:{color:"#CD863E",text:"会员"},CHARGE:{color:"#3591CE",text:"点播"}},ie=function(){var n=t(regeneratorRuntime.mark((function n(r){var l,o,a,c;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!i.value){n.next=2;break}return n.abrupt("return");case 2:return i.value=!0,H.value=!1,n.prev=4,o=e.query,n.next=8,d.post("/open/musicShareProfit",{prefix:"/api-teacher",requestType:"json",data:{bizId:o.id,userId:o.recomUserId}});case 8:a=n.sent,c=a.data.musicSheet.background,Y.value=c&&c.length>0?c[0].audioFileUrl:"",console.log(Y.value),Q.value=a.data.musicSheet,W.value=(null===(l=Q.value)||void 0===l?void 0:l.musicImg)||"",W.value||(le(),window.addEventListener("message",function(){var e=t(regeneratorRuntime.mark((function e(t){var i,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D(t.data);case 2:i=e.sent,n=T(i),re(n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),!1)),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(4),H.value=!0;case 20:i.value=!1;case 21:case"end":return n.stop()}}),n,null,[[4,17]])})));return function(e){return n.apply(this,arguments)}}(),ne=function(e){for(var t=e.split(","),i=t[0].match(/:(.*?);/)[1],n=atob(t[1]),r=n.length,l=new Uint8Array(r);r--;)l[r]=n.charCodeAt(r);return new Blob([l],{type:i})},re=function(){var e=t(regeneratorRuntime.mark((function e(t){var i,n,r,l,o,a,c,u,s,_,m;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=new FormData,r=(new Date).getTime()+(null===(i=Q.value)||void 0===i?void 0:i.musicSheetName.replaceAll(" ","_"))+".png",l=(new Date).getTime()+r,o={filename:r,bucketName:"cloud-coach",postData:{filename:r,acl:"public-read",key:l,unknowValueField:[]}},e.next=7,d.post(f.platformApi+"/getUploadSign",{data:o});case 7:for(u in a=e.sent,g.loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),c={policy:a.data.policy,signature:a.data.signature,key:l,KSSAccessKeyId:a.data.kssAccessKeyId,acl:"public-read",name:r})n.append(u,c[u]);return s=ne(t),n.append("file",s,r),_=p("cloud-coach"),e.next=16,h(_,{method:"POST",data:n});case 16:return g.clear(),m=p("cloud-coach")+l,e.next=20,d.post(f.platformApi+"/open/music/sheet/img",{data:{musicSheetId:Q.value.id,musicImg:m}});case 20:W.value=m,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(0),console.log(e.t0);case 26:case"end":return e.stop()}}),e,null,[[0,23]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=Q.value,t="";e.background&&e.background.length>0&&(t=e.background[0].id),X.value="http://dev.colexiu.com"+"/accompany/colxiu-website.html?id=".concat(e.id,"&part-index=").concat(t)},oe=r(null),ae=r(null),ce=r(0),ue=function(){var e=t(regeneratorRuntime.mark((function e(){var t,i,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.get(f.platformApi+"/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_free_rate"}});case 2:i=e.sent,ce.value=(null===(t=i.data[0])||void 0===t?void 0:t.paramValue)||0,n=["play","progress","duration"],oe.value=new V(ae.value,{controls:n}),oe.value.on("timeupdate",(function(){var e,t=oe.value,i=t.duration*ce.value/100||0;t.currentTime>=i&&"PAID"!==(null===(e=Q.value)||void 0===e?void 0:e.orderStatus)&&!se.value.includes("FREE")&&t.pause()}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();l(t(regeneratorRuntime.mark((function e(){var t,i,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(ee.value),e.next=3,ie();case 3:t=o(K),i=t.height,n=o(G),J.value=i+n.height,Y.value&&ue();case 7:case"end":return e.stop()}}),e)}))));var se=a((function(){var e,t=null===(e=Q.value)||void 0===e?void 0:e.paymentType;return"string"==typeof t?t=t.split(","):[]})),_e=function(){v().weixin?Z.value=!0:(N(ee.value),setTimeout((function(){window.location.href=location.origin+"/student/#/download"}),3e3))};return function(){var e,t,i,n,r,l,o,a;return c("div",{class:U.detail},[c(x,{position:"top"},{default:function(){return[c("div",{ref:K},[c(b,{background:"transparent",border:!1,isFixed:!1,color:"#fff",backIconColor:"white"},null)])]}}),c("img",{class:U.bgImg,src:null===(e=Q.value)||void 0===e?void 0:e.titleImg},null),c("div",{class:U.bgContent},null),c("div",{class:U.musicContainer,style:{marginTop:"16px",height:"calc(100vh - ".concat(J.value+16+"px",")")}},[c(y,{border:!1,center:!0,class:U.musicInfo},{icon:function(){var e;return c(w,{class:U.pImg,src:null===(e=Q.value)||void 0===e?void 0:e.titleImg},null)},title:function(){var e,t,i,n;return c("div",{class:U.info},[c("h4",{class:"van-ellipsis"},[null===(e=Q.value)||void 0===e?void 0:e.musicSheetName]),c("p",{style:{display:"flex"}},[se.value.map((function(e){return c(k,{style:{color:te[e].color},class:U.tag,type:"success",plain:!0},{default:function(){return[te[e].text]}})})),1===(null===(t=Q.value)||void 0===t?void 0:t.exquisiteFlag)&&c(w,{class:U.exquisiteFlag,src:R},null),(null===(i=Q.value)||void 0===i?void 0:i.albumNums)>0&&c(w,{class:U.songAlbum,src:q},null),c("span",{style:{paddingTop:"2px",paddingLeft:"6px"}},[null===(n=Q.value)||void 0===n?void 0:n.composer])])])},value:function(){return c("span",{class:U.download,onClick:function(){return _e()}},[c("img",{src:I},null),u("下载曲谱")])}}),c("div",{class:U.musicContent},[c("iframe",{id:"containerPrint",ref:"print",style:"width: 100%;page-break-after:always; height: 0",src:X.value},null),c("p",{class:U.musicTitle},[null===(t=Q.value)||void 0===t?void 0:t.musicSheetName]),W.value?c("img",{src:W.value,alt:"",class:U.musicImg},null):c(s,null,[c(C,{animationData:S,class:U.finch},null),c("p",{class:U.finchLoad},[u("加载中...")])]),c("div",{class:U.videoOperation},[Y.value&&c(s,null,[(se.value.includes("CHARGE")||se.value.includes("VIP"))&&"PAID"!==(null===(i=Q.value)||void 0===i?void 0:i.orderStatus)&&c("div",{class:[U.audition]},[c("img",{src:A},null),c("span",null,[u("每首曲目可试听"),ce.value,u("%")])]),c("div",{class:[U.audio,U.collectCell]},[c("audio",{id:"player",controls:!0,ref:ae},[c("source",{src:Y.value,type:"audio/mp3"},null)])])]),c("div",{class:[U.collect,U.collectCell]},[c("div",{class:[U.userInfo]},[c("img",{src:(null===(n=Q.value)||void 0===n?void 0:n.userAvatar)||P},null),c("span",null,[null===(r=Q.value)||void 0===r?void 0:r.userName])]),c("div",{class:[U.collectSection],onClick:function(){return _e()}},[c("span",null,[null===(l=Q.value)||void 0===l?void 0:l.favoriteCount,u("人收藏")]),c("img",{src:null!==(o=Q.value)&&void 0!==o&&o.favorite?j:z},null)])])])]),c("div",{class:[U.lookAlbum,U.collectCell],onClick:function(){_e()}},[c("div",null,[c("img",{src:E},null),c("span",null,[u("进入曲目所在专辑列表")])]),c(_,{name:"arrow",size:16,color:"#666"},null)])]),(null===(a=Q.value)||void 0===a?void 0:a.id)&&c(F,{position:"bottom",background:"white"},{default:function(){return[c("div",{ref:G},[c(m,{round:!0,block:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:function(){return _e()}},{default:function(){return[u("下载酷乐秀进入详情")]}})])]}}),Z.value&&c("div",{class:U.wxpopup,onClick:function(){Z.value=!1}},[c("img",{src:M,alt:""},null)])])}}}))}}}))}();