1 |
- !function(){var e=["musicSheet"];function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function s(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){s(i,r,a,o,c,"next",e)}function c(e){s(i,r,a,o,c,"throw",e)}o(void 0)}))}}var u=document.createElement("style");u.innerHTML=":root{--van-dialog-has-title-message-text-color: var(--van-gray-4) !important;--van-dialog-message-font-size: .42667rem !important;--van-dialog-confirm-button-text-color: #2dc7aa !important;--van-button-default-font-size: .37333rem !important}._musicSheet_19i2y_7{padding-top:0!important;padding-bottom:1.06667rem!important;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important;height:-webkit-fill-available;background:#fff!important;background-color:#fff!important;box-shadow:none!important}._musicSheet_19i2y_7 img{display:none!important}._btnWraper_19i2y_21{position:fixed;bottom:.53333rem;z-index:9;width:100%;padding:.26667rem 0;text-align:center}._btn_19i2y_21{width:6.48rem;height:1.17333rem;background:linear-gradient(180deg,#59e5d5 0%,#2dc7aa 100%);box-shadow:0 .05333rem .18667rem rgba(45,199,170,.25);border-radius:.74667rem;font-size:.48rem}._btn_19i2y_21 ._btnCont_19i2y_37{height:auto;padding:0;background-color:transparent;border:none}._popup_19i2y_43 .plyr{min-width:auto}._popup_19i2y_43 .plyr__poster{background-image:url(./videobg.png)!important;background-size:cover!important}._share_19i2y_50{width:9.46667rem;height:1.65333rem;margin:auto;display:flex;background:url(./assets/bg.f214a841.svg) no-repeat center;background-size:contain;margin-top:.21333rem;align-items:center;justify-content:space-between;position:fixed;top:0;z-index:999;margin-left:50%;transform:translate(-50%)}._share_19i2y_50 ._avatar_19i2y_66{width:1.06667rem;height:1.06667rem;margin:0 .34667rem}._share_19i2y_50 ._mate_19i2y_71{display:flex;align-items:center;margin-left:.48rem;margin-right:.42667rem;justify-content:space-between;flex:1}._share_19i2y_50 ._info_19i2y_79{color:#ff7100;font-size:.42667rem;width:2.66667rem}._share_19i2y_50 ._info_19i2y_79>span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;display:block}._share_19i2y_50 ._info_19i2y_79>span:last-child{font-size:.37333rem}._share_19i2y_50 ._topbtn_19i2y_94{width:3.89333rem;height:.85333rem;background:linear-gradient(180deg,#ffc000 0%,#ff6c00 100%);border-radius:.42667rem;color:#fff;font-size:.34667rem}._fullimg_19i2y_102 img{display:block!important}html,body{background-color:#fff!important}\n",document.head.appendChild(u),System.register(["./base-legacy.54a6af10.js","./index.module-legacy.09b0da47.js","./app-legacy.366ee50d.js","./index-legacy.9e554eac.js","./wx_bg-legacy.dbd1cf29.js","./index-legacy.59d29f53.js","./index-legacy.77eb8ef2.js","./TransposeCalculator-legacy.1f8b1c11.js","./index-legacy.27d95cd8.js","./index-legacy.eaaab519.js"],(function(){"use strict";var n,r,i,s,u,l,p,d,f,m,g,y,v,h,b,_,w,x,k,S,j,O,I,T,P,A,R,D,C,M;return{setters:[function(e){n=e.D,r=e.p,i=e.d,s=e.u,u=e.c,l=e.f,p=e.B,d=e.F,f=e.P,m=e.E,g=e.r,y=e.t,v=e.q,h=e.A,b=e.C,_=e.K,w=e.g,x=e.n},function(e){k=e.s},function(){},function(e){S=e.u,j=e.E,O=e.M,I=e.a3,T=e.a4,P=e.W,A=e.X,R=e.Y},function(e){D=e.w},function(e){C=e.I},function(e){M=e.S},function(){},function(){},function(){}],execute:function(){var U="_musicSheet_19i2y_7",z="_btnWraper_19i2y_21",B="_btn_19i2y_21",E="_share_19i2y_50",N="_avatar_19i2y_66",W="_mate_19i2y_71",F="_info_19i2y_79",L="_topbtn_19i2y_94",V="_fullimg_19i2y_102",q=n(),K=S(),H=r(0),J=function(){if(q.isApp){if(q.isTeacher)return void I.alert({message:"请使用酷乐秀学生端扫码打开"}).then((function(){y({api:"back"})}));var e=sessionStorage.getItem("behaviorId")||""+(new Date).valueOf(),t=v.stringifyUrl({url:location.origin+"/accompany",query:{id:K.id,behaviorId:e,client:q.isTeacher?"teacher":"student",recomUserId:K.userType&&"STUDENT"==K.userType?"":K.recomUserId,activityId:K.activityId||"0",discounts:H.value}});y({api:"openAccompanyWebView",content:{url:t,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}else{var n=location.origin+"/student/#/share-music-sheet",r={url:n+="?recomUserId=".concat(K.userType&&"STUDENT"==K.userType?"":K.recomUserId,"&id=").concat(K.id,"&activityId=").concat(K.activityId||"0"),action:K.action||"h5",pageTag:K.pageTag||1},a=encodeURIComponent(JSON.stringify(r));/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href="ColexiuStudent://linkUrl=".concat(a):/(Android)/i.test(navigator.userAgent)?(r.url=encodeURIComponent(r.url),window.location.href="colexiustudent://html:8888/SplashActivity?url=".concat(encodeURIComponent(JSON.stringify(r)))):h("请用手机或移动设备打开")}},X=function(){var e=c(regeneratorRuntime.mark((function e(t,n){var a,i,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(t);case 2:return a=e.sent,i=r(""),o=P(a),i.value=A(o.parsedXML,{title:n.musicSheetName}),s=Number(K["part-index"])||0,i.value=R(i.value,s),e.abrupt("return",i);case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Y=i({name:"Colexiu",setup:function(){var n=r(!1),i=r(!0),y=r(!1),v=r(""),h=r(""),_=function(t){var n=r("loading"),i=r({}),s=r({}),u=r(!1);return m(c(regeneratorRuntime.mark((function t(){var r,c,l,p;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return K.activityId&&g.post("/open/activity/state/"+K.activityId,{prefix:"/api-teacher"}).then((function(e){H.value=e.data.check,u.value=!!e.data.check,u.value||I.alert({message:"优惠活动已结束,您将按原价购买"})})).catch((function(){})),n.value="loading",t.prev=2,t.next=5,g.post("/open/musicShareProfit",{prefix:"/api-teacher",requestType:"json",data:{bizId:K.id,userId:K.recomUserId}});case 5:r=t.sent,c=r.data,l=c.musicSheet,p=o(c,e),i.value=a({},l),s.value=p,n.value="success",t.next=16;break;case 12:t.prev=12,t.t0=t.catch(2),n.value="error",console.log(t.t0);case 16:case"end":return t.stop()}}),t,null,[[2,12]])})))),[n,i,s,u]}(K.id),w=t(_,4),x=w[0],S=w[1],P=w[2],A=w[3];s(x,c(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("success"!==x.value||!S.value.xmlFileUrl){e.next=11;break}if(!S.value.musicImg){e.next=7;break}return i.value=!1,e.next=5,T(S.value.musicImg+"?_t="+(new Date).valueOf());case 5:return h.value=e.sent,e.abrupt("return");case 7:return e.next=9,X(S.value.xmlFileUrl,S.value);case 9:t=e.sent,v.value=t.value;case 11:case"end":return e.stop()}}),e)}))));var R=function(e){var t=e.Drawer.Backends[0],n=Math.max(t.width,t.height),r=5*Math.floor(n/240),a=5*Math.floor(n/200),i=t.CanvasRenderingCtx;i.font="50px 宋体",i.fillStyle="rgba(0,0,0,.1)",i.rotate(-30*Math.PI/180);for(var o=0;o<r;o++)for(var s=0;s<a;s++)i.fillText("酷乐秀",240*o-n,200*s-n/2)},Y=function(){var e=c(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t,e.abrupt("return",g("/open/getUploadSign",{method:"post",data:{filename:t,bucketName:"daya",postData:{filename:t,acl:"public-read",key:n,unknowValueField:[]}},requestType:"json"}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=c(regeneratorRuntime.mark((function e(t,n,r){var a,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(t,{responseType:"blob"});case 2:return a=e.sent,(i=new FormData).append("policy",r.policy),i.append("signature",r.signature),i.append("acl","public-read"),i.append("KSSAccessKeyId",r.kssAccessKeyId),i.append("name",n),i.append("key",n),i.append("file",a),e.next=13,b("https://ks3-cn-beijing.ksyuncs.com/daya",{method:"POST",body:i});case 13:return o=e.sent,console.log(o),e.next=17,b("/api-student/open/music/sheet/img",{method:"post",data:{musicImg:"https://ks3-cn-beijing.ksyuncs.com/daya/"+n,musicSheetId:S.value.id}});case 17:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),G=function(){var e=c(regeneratorRuntime.mark((function e(t){var n,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="music-sheet/"+S.value.musicSheetName+".png",r=t.Drawer.Backends[0].canvas.toDataURL("image/png"),e.next=5,Y(n);case 5:return a=e.sent,e.next=8,$(r,n,a.data);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log(e.t0);case 13:R(t),J(),i.value=!1;case 16:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}(),Q=function(){y.value=!0,i.value=!1},Z=function(){q.weixin?n.value=!0:(J(),q.isApp||setTimeout((function(){location.href=location.origin+"/student/#/download"}),3e3))};return function(){var e=i.value||"loading"===x.value,t=y.value||"error"===x.value,r=P.value&&A.value;return u("div",{class:[k.container],style:{background:"#fff",paddingTop:r?"80px":0}},[r&&u("div",{class:E},[u(C,{radius:"100%",class:N,src:P.value.avatar},null),u("div",{class:W},[u("div",{class:F},[u("span",null,[P.value.name,l("老师")]),u("span",null,[l("专属分享~")])]),u(p,{class:L,onClick:Z},{default:function(){return[l("开通会员专属优惠"),u("img",{src:"./assets/right.5d046f40.svg"},null)]}})])]),u("div",{id:"colexiu-detail-music-sheet",class:[k.musicSheet,U],style:{paddingBottom:"100px!important"}},[e&&!t&&u(M,{class:k.skeleton,rowWidth:"80%",title:!0,row:3},null),t&&u(j,null,null),h.value&&u(d,null,[u("h3",{style:{fontSize:"24px",fontWeight:"normal",textAlign:"center",padding:"0 10px",marginTop:"36px",marginBottom:"0px"},class:"van-ellipsis"},[S.value.musicSheetName]),u(C,{class:V,src:h.value,alt:"",style:{width:"100%",display:"block!important"}},null)]),!h.value&&v.value&&u(d,null,[u("h3",{style:{fontSize:"24px",fontWeight:"normal",textAlign:"center",padding:"0 10px",marginTop:"36px",marginBottom:"0px"},class:"van-ellipsis"},[S.value.musicSheetName]),u(O,{score:v.value,showSection:!1,opotions:{drawTitle:!1,drawComposer:!0,drawLyricist:!1,drawMetronomeMarks:!0,drawMeasureNumbers:!0,autoResize:!1,backend:"canvas"},EngravingRules:{VoiceSpacingMultiplierVexflow:.65,VoiceSpacingAddendVexflow:2,MinSkyBottomDistBetweenStaves:2,MinSkyBottomDistBetweenSystems:3,BetweenStaffDistance:2.5,StaffDistance:3.5,MinimumDistanceBetweenSystems:1,PageBottomMargin:0,PageLeftMargin:2,PageRightMargin:2},onRerender:G,onRenderError:Q},null)])]),u("div",{class:z},[u(p,{onClick:Z,class:B,color:"linear-gradient(to bottom, #55F1CC, #2DC7AA)"},{default:function(){return[q.isApp?"打卡小酷Ai开始练习吧!":"下载酷乐秀立即练习"]}})]),u(f,{show:n.value,position:"top",style:{background:"none"}},{default:function(){return[u("img",{src:D,style:{width:"80%",display:"block",margin:"auto"}},null)]}})])}}});document.body.style.setProperty("--osdm-zoom",""+_()),w(),x(Y).mount("#app")}}}))}();
|