1 |
- !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,i,o,a){try{var c=e[o](a),l=c.value}catch(u){return void r(u)}c.done?t(l):Promise.resolve(l).then(n,i)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function c(e){n(a,i,o,c,l,"next",e)}function l(e){n(a,i,o,c,l,"throw",e)}c(void 0)}))}}var o=document.createElement("style");o.innerHTML='._base_1fjxb_1>div{background:url(./header-bg.png) no-repeat top center}._detail_1fjxb_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_1fjxb_4 .plyr__controls .plyr__controls__item:first-child{background-color:var(--van-primary);color:#fff;border-radius:50%}._base_1fjxb_1 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._shareBtn_1fjxb_21{display:flex;align-items:flex-start;color:#fff;font-size:.37333rem;line-height:.53333rem!important}._shareBtn_1fjxb_21 .van-image{width:.48rem;height:.48rem;margin-right:.16rem}._bgImg_1fjxb_33{position:absolute;left:0;top:0;width:100%;height:7.06667rem;-o-object-fit:cover;object-fit:cover;filter:blur(.26667rem)}._bgContent_1fjxb_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_1fjxb_51{position:relative;width:100%;height:13.33333rem;overflow:hidden}._musicContent_1fjxb_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_1fjxb_51 ._musicTitle_1fjxb_66{text-align:center;font-size:.42667rem}._musicContent_1fjxb_51 ._musicImg_1fjxb_70{width:100%}._musicContent_1fjxb_51 ._finch_1fjxb_73{width:4rem;margin:2.13333rem auto 0}._musicContent_1fjxb_51 ._finchLoad_1fjxb_77{text-align:center;color:#333;font-size:.4rem;margin-top:.10667rem}._musicContent_1fjxb_51 iframe{visibility:hidden}._musicContent_1fjxb_51 iframe body ::-webkit-scrollbar-thumb{background-color:#efeff0;border:.02667rem solid transparent;background-clip:padding-box;border-radius:.13333rem}._collectCell_1fjxb_92{margin:.26667rem .42667rem 0;background:#ffffff;border-radius:.26667rem;box-shadow:0 0 .16rem rgba(229,229,229,.7);overflow:hidden}._videoOperation_1fjxb_99{position:absolute;left:0;right:0;bottom:.13333rem;z-index:1}._audition_1fjxb_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_1fjxb_106 img{margin-top:-.05333rem;width:.56rem;height:.4rem;margin-right:.29333rem}._collect_1fjxb_92{display:flex;align-items:center;justify-content:space-between;padding:.29333rem;font-size:.37333rem;color:#666}._collect_1fjxb_92 ._userInfo_1fjxb_132{display:flex;align-items:center;padding:.08rem .16rem;background:#d5f3ee;border-radius:.42667rem}._collect_1fjxb_92 ._userInfo_1fjxb_132 img{width:.69333rem;height:.69333rem;border-radius:50%}._collect_1fjxb_92 ._userInfo_1fjxb_132 span{padding-left:.21333rem;max-width:3.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#2dc7aa}._collect_1fjxb_92 ._collectSection_1fjxb_152{display:flex;align-items:center}._collect_1fjxb_92 ._collectSection_1fjxb_152 img{margin-top:-.05333rem;margin-left:.29333rem;width:.48rem;height:.48rem}._lookAlbum_1fjxb_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_1fjxb_162>div{display:flex;align-items:center;line-height:1}._lookAlbum_1fjxb_162>div img{width:.53333rem;height:.53333rem;margin-right:.26667rem}._bg_1fjxb_33{position:relative;height:100%;padding:.42667rem;z-index:11}._musicContainer_1fjxb_188{position:relative;z-index:12;border-radius:.48rem .48rem 0 0;background-color:#fff;overflow-y:auto}._shareMate_1fjxb_195{position:relative;margin-top:1.33333rem;display:flex;flex:1;align-items:center;padding:.29333rem .32rem;background:#ffffff;border-radius:.26667rem}._shareMate_1fjxb_195 ._icon_1fjxb_205{width:.96rem;height:.96rem;border-radius:.26667rem}._shareMate_1fjxb_195 ._info_1fjxb_210{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._shareMate_1fjxb_195 ._info_1fjxb_210>h4{color:var(--music-list-item-title-color);font-size:.37333rem;font-weight:600;width:5.33333rem}._shareMate_1fjxb_195 ._info_1fjxb_210>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._shareMate_1fjxb_195 ._tagDiscount_1fjxb_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_1fjxb_239{position:relative;margin-top:.93333rem;display:flex;flex:1;align-items:center;padding:.18667rem;background:#ffffff;border-radius:.26667rem}._shareVip_1fjxb_239 ._icon_1fjxb_205{width:1.92rem;height:1.92rem;border-radius:.26667rem}._shareVip_1fjxb_239 ._info_1fjxb_210{margin-left:.16rem;flex:1;word-break:break-all}._shareVip_1fjxb_239 ._info_1fjxb_210>h4{color:var(--music-list-item-title-color);font-size:.42667rem;font-weight:600}._shareVip_1fjxb_239 ._info_1fjxb_210>p{color:var(--music-list-item-mate-color);line-height:.45333rem}._tagDiscount_1fjxb_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_1fjxb_281{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_1fjxb_294{width:1.22667rem;height:1.22667rem;border-radius:.26667rem;overflow:hidden;flex-shrink:0}._musicInfo_1fjxb_301{padding-top:.61333rem!important;padding-bottom:.61333rem!important;margin-bottom:.26667rem}._musicInfo_1fjxb_301 ._coomposer_1fjxb_306{padding-top:.05333rem;padding-left:.16rem;max-width:3.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._musicInfo_1fjxb_301 ._tag_1fjxb_226{flex-shrink:0;padding:.05333rem .10667rem 0;border-radius:.10667rem}._musicInfo_1fjxb_301 ._tag_1fjxb_226+._tag_1fjxb_226{margin-left:.13333rem}._musicInfo_1fjxb_301 ._info_1fjxb_210{margin-left:.37333rem;flex:1;margin-right:.37333rem;word-break:break-all}._musicInfo_1fjxb_301 ._info_1fjxb_210>h4{font-size:.42667rem;font-weight:700;color:#1a1a1a;width:5.33333rem;padding-bottom:.08rem}._musicInfo_1fjxb_301 ._info_1fjxb_210>p{font-size:.32rem;color:#999;line-height:.45333rem}._musicInfo_1fjxb_301 ._download_1fjxb_340{display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:.32rem}._musicInfo_1fjxb_301 ._download_1fjxb_340 img{height:.64rem;width:.64rem}._musicInfo_1fjxb_301 ._exquisiteFlag_1fjxb_351{width:.37333rem;margin-left:.13333rem;flex-shrink:0}._musicInfo_1fjxb_301 ._songAlbum_1fjxb_356{width:.4rem;height:.4rem;margin-left:.13333rem;flex-shrink:0}._colSticky_1fjxb_362{display:flex;align-items:center;justify-content:space-between}._colSticky_1fjxb_362 ._priceSection_1fjxb_367{font-size:.37333rem;font-weight:400;color:#999}._colSticky_1fjxb_362 ._priceSection_1fjxb_367 ._price_1fjxb_367{font-size:.58667rem;font-weight:700;color:#ff4e19}._colSticky_1fjxb_362 ._priceSection_1fjxb_367 ._price_1fjxb_367 i{font-style:normal;font-size:.42667rem}._buyBtn_1fjxb_381{--van-button-default-height: 1.12rem;flex:1;display:flex;align-items:center;justify-content:flex-end}._buyBtn_1fjxb_381 .van-button{padding:0 .58667rem;font-weight:600}._buyBtn_1fjxb_381 .van-button+.van-button{margin-left:.32rem}._buyBtn_1fjxb_381 ._primry_1fjxb_395{box-shadow:0 .05333rem .18667rem rgba(45,199,170,.25)}._buyBtn_1fjxb_381 ._member_1fjxb_398{box-shadow:0 .05333rem .18667rem rgba(187,156,83,.25)}\n',document.head.appendChild(o),System.register(["./icon_uploader-legacy.55b248e4.js","./icon-xin-legacy.3477f06c.js","./icon_exquisite-legacy.9a511f41.js","./icon_album_active-legacy.6a6c539c.js","./icon_music_active-legacy.b48b38f7.js","./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","./orderStatus-legacy.3dc7c259.js","./icon_share-legacy.69f1973c.js","./index-legacy.62d09b14.js","./icon_teacher-legacy.42ba77b1.js","./plyr-legacy.180f4c53.js","./index-legacy.fa8c1bdd.js","./use-height-legacy.7b7670e9.js","./index-legacy.c610561c.js","./index-legacy.d8036da9.js","./code-down-load-legacy.d0d56df7.js","./logo-legacy.cf4b3bd2.js","./browser-legacy.8b7c8200.js"],(function(e){"use strict";var r,n,o,a,c,l,u,s,f,d,m,_,p,b,g,v,h,x,j,y,w,k,I,C,S,O,T,D,P,R,A,z,E,N,B,M,q,F,U,V,L,H,K,G,Q,J,W,X,Y,Z,$,ee,te,re,ne,ie,oe,ae;return{setters:[function(e){r=e._,n=e.a,o=e.b,a=e.c,c=e.d,l=e.e,u=e.f},function(e){s=e._},function(e){f=e.i,d=e._,m=e.a},function(e){_=e._},function(e){p=e._},function(e){b=e.d,g=e.M,v=e.L,h=e.O,x=e.P,j=e.T,y=e.Q,w=e.i,k=e.w,I=e.F,C=e.b,S=e.s,O=e.J,T=e.B,D=e.bu,P=e.aQ,R=e.e,A=e.aE,z=e.bm,E=e.bf,N=e.a_,B=e.D},function(e){M=e.C},function(e){q=e.C},function(e){F=e.I},function(e){U=e.S},function(e){V=e.T},function(e){L=e.i,H=e.V,K=e.A,G=e.a,Q=e.b,J=e.c,W=e.d,X=e.e,Y=e.f,Z=e.g},function(e){$=e.g,ee=e.m},function(e){te=e.C},function(e){re=e.o},function(e){ne=e.i},function(e){ie=e.C},function(e){oe=e.i},function(e){ae=e.P},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var ce={base:"_base_1fjxb_1",detail:"_detail_1fjxb_4",shareBtn:"_shareBtn_1fjxb_21",bgImg:"_bgImg_1fjxb_33",bgContent:"_bgContent_1fjxb_42",musicContent:"_musicContent_1fjxb_51",musicTitle:"_musicTitle_1fjxb_66",musicImg:"_musicImg_1fjxb_70",finch:"_finch_1fjxb_73",finchLoad:"_finchLoad_1fjxb_77",collectCell:"_collectCell_1fjxb_92",videoOperation:"_videoOperation_1fjxb_99",audition:"_audition_1fjxb_106",collect:"_collect_1fjxb_92",userInfo:"_userInfo_1fjxb_132",collectSection:"_collectSection_1fjxb_152",lookAlbum:"_lookAlbum_1fjxb_162",bg:"_bg_1fjxb_33",musicContainer:"_musicContainer_1fjxb_188",shareMate:"_shareMate_1fjxb_195",icon:"_icon_1fjxb_205",info:"_info_1fjxb_210",tagDiscount:"_tagDiscount_1fjxb_226",shareVip:"_shareVip_1fjxb_239",buttonDiscount:"_buttonDiscount_1fjxb_281",pImg:"_pImg_1fjxb_294",musicInfo:"_musicInfo_1fjxb_301",coomposer:"_coomposer_1fjxb_306",tag:"_tag_1fjxb_226",download:"_download_1fjxb_340",exquisiteFlag:"_exquisiteFlag_1fjxb_351",songAlbum:"_songAlbum_1fjxb_356",colSticky:"_colSticky_1fjxb_362",priceSection:"_priceSection_1fjxb_367",price:"_price_1fjxb_367",buyBtn:"_buyBtn_1fjxb_381",primry:"_primry_1fjxb_395",member:"_member_1fjxb_398"},le=e("getAssetsHomeFile",(function(e){var t="../component/images/".concat(e);return{"../component/images/collection.png":r,"../component/images/collection_active.png":n,"../component/images/icon-xin.png":s,"../component/images/icon_ai.png":o,"../component/images/icon_album.png":d,"../component/images/icon_album_active.png":_,"../component/images/icon_author.png":a,"../component/images/icon_download.png":c,"../component/images/icon_exquisite.png":m,"../component/images/icon_music_active.png":p,"../component/images/icon_share.png":l,"../component/images/icon_uploader.png":u}[t].default}));e("default",b({name:"MusicDetail",setup:function(){localStorage.setItem("behaviorId",$());var e=g(),r=v(),n=h(!1),o=Number(r.query.activityId)||0,a=h(o),c=h(!1),l=h(null),u=h(null),s=h("0"),d=h(null),m=h(""),_=h(""),p=h(""),b={FREE:{color:"#01B84F",text:"免费"},VIP:{color:"#CD863E",text:"会员"},CHARGE:{color:"#3591CE",text:"点播"}},ue=function(){var e=i(regeneratorRuntime.mark((function e(t){var o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.value){e.next=2;break}return e.abrupt("return");case 2:return n.value=!0,c.value=!1,e.prev=4,e.next=7,R.get("/music/sheet/detail/".concat(r.query.id),{prefix:"TEACHER"===S.platformType?"/api-teacher":"/api-student"});case 7:o=e.sent,d.value=o.data,a=o.data.background,m.value=a&&a.length>0?a[0].audioFileUrl:"",_.value=o.data.musicImg||"",_.value||(de(),window.addEventListener("message",function(){var e=i(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W(t.data);case 2:r=e.sent,n=X(r),fe(n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),!1)),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(4),c.value=!0;case 18:n.value=!1;case 19:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t){return e.apply(this,arguments)}}(),se=function(e){for(var t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=atob(t[1]),i=n.length,o=new Uint8Array(i);i--;)o[i]=n.charCodeAt(i);return new Blob([o],{type:r})},fe=function(){var e=i(regeneratorRuntime.mark((function e(t){var r,n,i,o,a,c,l,u,s,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=new FormData,n=(new Date).getTime()+Math.ceil(1e3*Math.random())+".png",i=(new Date).getTime()+n,o={filename:n,bucketName:"cloud-coach",postData:{filename:n,acl:"public-read",key:i,unknowValueField:[]}},e.next=7,R.post(S.platformApi+"/getUploadSign",{data:o});case 7:for(l in a=e.sent,A.loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),c={policy:a.data.policy,signature:a.data.signature,key:i,KSSAccessKeyId:a.data.kssAccessKeyId,acl:"public-read",name:n})r.append(l,c[l]);return u=se(t),r.append("file",u,n),s=z("cloud-coach"),e.next=16,E(s,{method:"POST",data:r});case 16:return A.clear(),f=z("cloud-coach")+i,e.next=20,R.post(S.platformApi+"/open/music/sheet/img",{data:{musicSheetId:d.value.id,musicImg:f}});case 20:_.value=f,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)}}(),de=function(){var e=location.origin;(location.host.includes("dev.colexiu")||location.host.includes("192.168")||location.host.includes("localhost"))&&(e="https://dev.colexiu.com");var t=d.value,r="";t.background&&t.background.length>0&&(r=t.background[0].id),p.value=e+"/accompany/colxiu-website.html?id=".concat(t.id,"&part-index=").concat(r)},me=h(null),_e=h(null),pe=h(0),be=function(){var e=i(regeneratorRuntime.mark((function e(){var t,r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=["play-large","play","progress","captions","duration"],me.value=new ae(_e.value,{controls:r}),e.next=4,R.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_free_rate"}});case 4:n=e.sent,pe.value=(null===(t=n.data[0])||void 0===t?void 0:t.paramValue)||0,me.value.on("timeupdate",(function(){var e=me.value,t=e.duration*pe.value/100||0;e.currentTime>=t&&!Ce.value.play&&e.stop()}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();x(i(regeneratorRuntime.mark((function e(){var t,r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ue();case 2:t=j(l),r=t.height,n=j(u),s.value=r+n.height,m.value&&be();case 6:case"end":return e.stop()}}),e)}))));var ge=function(){var e=i(regeneratorRuntime.mark((function e(){var t,r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,R.post("/music/sheet/favorite/"+(null===(t=d.value)||void 0===t?void 0:t.id),{prefix:"TEACHER"===S.platformType?"/api-teacher":"/api-student"});case 3:d.value.favorite=null!==(r=d.value)&&void 0!==r&&r.favorite?0:1,d.value.favoriteCount=null!==(n=d.value)&&void 0!==n&&n.favorite?d.value.favoriteCount+1:d.value.favoriteCount-1<0?0:d.value.favoriteCount-1,setTimeout((function(){var e;A(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)}}(),ve=h(!1),he=h(""),xe=function(){var e=i(regeneratorRuntime.mark((function e(){var t,r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ve.value){e.next=2;break}return e.abrupt("return");case 2:if(ve.value=!0,!he.value){e.next=7;break}je(),e.next=17;break;case 7:return e.next=9,W(_.value);case 9:return r=e.sent,n=Y(r,{title:null===(t=d.value)||void 0===t?void 0:t.musicSheetName,size:18}),e.next=13,Z(n);case 13:return i=e.sent,he.value=X(i),e.next=17,je();case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),je=function(){var e=i(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A.loading({message:"图片生成中...",forbidClick:!0}),setTimeout((function(){ve.value=!1}),100),e.next=4,N({api:"savePicture",content:{base64:he.value}});case 4:"success"===(null==(r=e.sent)||null===(t=r.content)||void 0===t?void 0:t.status)?A.success("保存成功"):A.fail("保存失败");case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=i(regeneratorRuntime.mark((function e(){var n,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.value,re.orderObject.orderType="MUSIC",re.orderObject.orderName=n.musicSheetName,re.orderObject.orderDesc=n.musicSheetName,re.orderObject.actualPrice=n.musicPrice,re.orderObject.recomUserId=r.query.recomUserId||0,re.orderObject.activityId=r.query.activityId||0,re.orderObject.orderNo="",re.orderObject.orderList=[t({orderType:"MUSIC",goodsName:n.musicSheetName,actualPrice:n.musicPrice},n)],e.next=11,R.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"MUSIC",bizId:n.id}});case 11:o=e.sent,(a=o.data)?B.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:re.orderObject.orderNo=a.orderNo,re.orderObject.actualPrice=a.actualPrice,re.orderObject.discountPrice=a.discountPrice,we();case 4:case"end":return e.stop()}}),e)})))).catch((function(){B.close(),ke(a.orderNo)})):we();case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),we=function(){var t=d.value;e.push({path:"/orderDetail",query:{orderType:"MUSIC",musicId:t.id}})},ke=function(){var e=i(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,R.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)}}(),Ie=y((function(){var e,t=null===(e=d.value)||void 0===e?void 0:e.paymentType;return"string"==typeof t?t=t.split(","):[]})),Ce=y((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)}})),Se=h(!1),Oe=h(""),Te=h(0),De=function(){var e=i(regeneratorRuntime.mark((function e(){var t,r,n,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,R.post("/api-teacher/open/musicShareProfit",{data:{bizId:null===(t=d.value)||void 0===t?void 0:t.id,userId:null===(r=S.user.data)||void 0===r?void 0:r.userId}});case 3:return o=e.sent,a=location.origin+"/teacher/#/shareMusic?id=".concat(null===(n=d.value)||void 0===n?void 0:n.id,"&recomUserId=").concat(null===(i=S.user.data)||void 0===i?void 0:i.userId,"&userType=").concat(S.platformType),1===o.data.discount&&(a+="&activityId=".concat(o.data.activityId)),Te.value=o.data.discount||0,console.log(a),Oe.value=a,Se.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)}}();return function(){var n,i,o,c,g,v,h;return w("div",{class:ce.detail},[w(U,{position:"top"},{default:function(){var e;return[w("div",{ref:l},[w(M,{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 w("div",{class:ce.shareBtn,style:{color:"#fff"},onClick:De},[w(F,{src:ne},null),k("分享")])}})])]}}),w("img",{class:ce.bgImg,src:null===(n=d.value)||void 0===n?void 0:n.titleImg},null),w("div",{class:ce.bgContent},null),w("div",{class:ce.musicContainer,style:{marginTop:"16px",height:"calc(100vh - ".concat(s.value+16+"px",")")}},[w(q,{border:!1,center:!0,class:ce.musicInfo},{icon:function(){var e;return w(F,{class:ce.pImg,src:null===(e=d.value)||void 0===e?void 0:e.titleImg},null)},title:function(){var e,t,r,n;return w("div",{class:ce.info},[w("h4",{class:"van-ellipsis"},[null===(e=d.value)||void 0===e?void 0:e.musicSheetName]),w("p",{style:{display:"flex"}},[Ie.value.map((function(e){return w(V,{style:{color:b[e].color},class:ce.tag,type:"success",plain:!0},{default:function(){return[b[e].text]}})})),1===(null===(t=d.value)||void 0===t?void 0:t.exquisiteFlag)&&w(F,{class:ce.exquisiteFlag,src:le("icon_exquisite.png")},null),(null===(r=d.value)||void 0===r?void 0:r.albumNums)>0&&w(F,{class:ce.songAlbum,src:le("icon_album_active.png")},null),w("span",{class:ce.coomposer},[null===(n=d.value)||void 0===n?void 0:n.composer])])])},value:function(){return w("span",{class:ce.download,onClick:function(){return xe()}},[w("img",{src:L},null),k("下载曲谱")])}}),w("div",{class:ce.musicContent},[w("iframe",{id:"containerPrint",ref:"print",style:"width: 540px;page-break-after:always; height: 0;",src:p.value},null),w("p",{class:ce.musicTitle},[null===(i=d.value)||void 0===i?void 0:i.musicSheetName]),_.value?w("img",{src:_.value,alt:"",class:ce.musicImg},null):w(I,null,[w(H,{animationData:K,class:ce.finch},null),w("p",{class:ce.finchLoad},[k("加载中...")])]),w("div",{class:ce.videoOperation},[m.value&&w(I,null,[!Ce.value.play&&100!=pe.value&&0!=pe.value&&w("div",{class:[ce.audition]},[w("img",{src:G},null),w("span",null,[k("每首曲目可试听"),pe.value,k("%")])]),w("div",{class:[ce.audio,ce.collectCell]},[w("audio",{id:"player",controls:!0,ref:_e},[w("source",{src:m.value,type:"audio/mp3"},null)])])]),w("div",{class:[ce.collect,ce.collectCell]},[w("div",{class:[ce.userInfo],onClick:function(){var t,r;C().isApp&&"TEACHER"===(null===(t=d.value)||void 0===t?void 0:t.sourceType)&&"STUDENT"===S.platformType&&e.push({path:"/teacherHome",query:{teacherId:null===(r=d.value)||void 0===r?void 0:r.userId,tabs:"music"}})}},[w("img",{src:(null===(o=d.value)||void 0===o?void 0:o.userAvatar)||oe},null),w("span",null,[null===(c=d.value)||void 0===c?void 0:c.userName])]),w("div",{class:[ce.collectSection],onClick:function(){return ge()}},[w("span",null,[null===(g=d.value)||void 0===g?void 0:g.favoriteCount,k("人收藏")]),w("img",{src:null!==(v=d.value)&&void 0!==v&&v.favorite?Q:J},null)])])])]),w("div",{class:[ce.lookAlbum,ce.collectCell],onClick:function(){var t,r;e.push({path:"/look-album-list",query:{id:null===(t=d.value)||void 0===t?void 0:t.id,musicSubject:null===(r=d.value)||void 0===r?void 0:r.musicSubject}})}},[w("div",null,[w("img",{src:f},null),w("span",null,[k("进入曲目所在专辑列表")])]),w(O,{name:"arrow",size:16,color:"#666"},null)])]),(null===(h=d.value)||void 0===h?void 0:h.id)&&w(te,{position:"bottom",background:"white"},{default:function(){var n;return[w("div",{ref:u},[Ce.value.play?w(T,{round:!0,block:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:function(){me.value&&me.value.stop(),ee(d.value)}},{default:function(){return[k("立即练习")]}}):w("div",{class:ce.colSticky},[Ce.value.charge&&w("div",{class:ce.priceSection},[w("span",null,[k("点播价:")]),w("span",{class:ce.price},[w("i",null,[k("¥")]),D(null===(n=d.value)||void 0===n?void 0:n.musicPrice)])]),w("div",{class:[ce.buyBtn]},[Ce.value.charge&&w(T,{round:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",class:ce.primary,onClick:ye},{default:function(){return[k("立即点播")]}}),Ce.value.vip&&w(T,{round:!0,block:!Ce.value.charge,type:"primary",color:"linear-gradient(180deg, #F7BD8D 0%, #CD8806 100%)",class:ce.memeber,onClick:function(){e.push({path:"/memberCenter",query:t({},r.query)})}},{default:function(){return[a.value>0&&w("div",{class:[ce.buttonDiscount]},[k("专属优惠")]),k("开通会员")]}})])])])]}}),w(P,{show:Se.value,"onUpdate:show":function(e){return Se.value=e},style:{background:"transparent"},teleport:"body"},{default:function(){var e;return[w(ie,{teacherId:null===(e=S.user.data)||void 0===e?void 0:e.userId,shareUrl:Oe.value,shareType:"music"},{default:function(){var e,t,r;return[w("div",{class:ce.shareMate},[1===Te.value&&w("div",{class:ce.tagDiscount},[k("专属优惠")]),w("img",{class:ce.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),w("div",{class:ce.info},[w("h4",{class:"van-multi-ellipsis--l2"},[null===(t=d.value)||void 0===t?void 0:t.musicSheetName]),w("p",null,[k("作曲人:"),null===(r=d.value)||void 0===r?void 0:r.composer])])])]}})]}})])}}}))}}}))}();
|