index-legacy.7f1bd7d2.js 11 KB

1
  1. !function(){function e(e,t,n,r,a,o,s){try{var i=e[o](s),u=i.value}catch(l){return void n(l)}i.done?t(u):Promise.resolve(u).then(r,a)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(a,o){var s=t.apply(n,r);function i(t){e(s,a,o,i,u,"next",t)}function u(t){e(s,a,o,i,u,"throw",t)}i(void 0)}))}}System.register(["./ResizeObserver.es-legacy.9ef5ac8c.js","./index-legacy.68eb7f39.js","./code-down-load-legacy.3bc1f4e9.js","./html2canvas.esm-legacy.19f9c2b7.js","./index-legacy.e9381954.js","./icon_teacher-legacy.42ba77b1.js"],(function(e){"use strict";var n,r,a,o,s,i,u,l,c,d,p,g,f,m,h,v,b;return{setters:[function(e){n=e.d,r=e.g,a=e.j,o=e.y,s=e.T,i=e.p,u=e.n,l=e.F,c=e.A,d=e.B},function(e){p=e.S,g=e.a},function(e){f=e.s,m=e.C},function(e){h=e.h},function(e){v=e.C},function(e){b=e.i}],execute:function(){var y=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/album1.4ef36b22.png"},Symbol.toStringTag,{value:"Module"})),_=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/bg1.0bb46a9c.png"},Symbol.toStringTag,{value:"Module"})),j=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/bg2.c74c33b8.png"},Symbol.toStringTag,{value:"Module"})),S=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/bg3.1326855b.png"},Symbol.toStringTag,{value:"Module"})),T=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/live1.15180050.png"},Symbol.toStringTag,{value:"Module"})),w=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/live2.f2f5ddbf.png"},Symbol.toStringTag,{value:"Module"})),A=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/live3.bcea3cd3.png"},Symbol.toStringTag,{value:"Module"})),O=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/music1.ff71319a.png"},Symbol.toStringTag,{value:"Module"})),P=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/music11.0ee3dcca.png"},Symbol.toStringTag,{value:"Module"})),z=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/music2.280fcf95.png"},Symbol.toStringTag,{value:"Module"})),U=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/music3.659e089e.png"},Symbol.toStringTag,{value:"Module"})),M=Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAAcCAMAAAD4MnnTAAABUFBMVEUAAAD/jGX//wD/m3b/c0//cU7/iWX/nHb/dVL/iWT/o37/lnH/dVL/dlL/pYD/bUr/flr/b03/oHv/pH7/jmn/g2D/bUv/kGv/bUr/pH//gl//oXz/mHD/pYD/gFr/dFD/////d1P/oHr/cU3/onz/gl7/b0v/mHP/nHf/fFj/pH7/bUr/mnX/f1v/nnj/kW3/lnH/k2//hWH/eVX/h2P/iWX/i2f/jWn/mnT/j2v/nnn//fz/+/n/sZj/kGv/6+X/n37/49r/po3/5+D/1cf/u6j/uqX/mHr/4dn/t5//ooj/ooX/noP/kXH/39b/29D/0cT/zb//x7X/wa7/rZL/iWn/2Mz/s5z/rJb/oYL/m3//jGz/9/X/9vT/9PH/8u7/8Ov/1sn/zLv/uaT/qpD/6uP/3dP/xLP/tJ//pYj/m33/5Nv/var/ybb/nHn/08ayC9PjAAAAH3RSTlMAIQE+Pvn46+vn4NDHVPjn2NjHwsLCwoqKiYlUVD4+4rgLhQAAAwJJREFUSMet0Fdz2kAQAOCL03vvbVMuMgmKAAsIPsmAZIoA0YsJvRmMneT/v2XvJGHlzTPhm7ld7e5pB0Q8O29fPr517+t/Iq7Xtz5vAxEuPfq4HYS7fP37Pvou7Avf/3XRudi2ey4YdI6InovP+T+9HgwGfwhB5EXMnovPcd1tybFb3MUYlKTfkut3l8cu1j6p1D/VvuRHyJuQqwl6KGQwazoQZSqVmsJJKnUCU3wMhc4OJdE38yGfZDnkR3Zuh124Lhyusd0mNHnJwIeFww04DfJ+8jjsg5Ufuaw4JH0J9Xl4OKrXWb5eVxRd1ydg6boFE3zEGxarKmg0UXzGbcWPPE+gg4NEF9BpA5im8XPA213r1EoonS6f4+lI80qlwsYYOgmHwtoY3TlG8iTuULoWzIw+ZOI5yPLGNJ1OL2CcFipxoWmaSRibpmm5b6VgmIj7kJsxjwHzXxr8KjahXlzHYo3DwzIkDx212LpcLut4qwMnsXM6gBHzIdeiHgOyVQscFd5ILAZSVphFo+tyHjLYnEBaiW60++Na1IeonlwdoBp2f10OG7FjaKp9DcFQRVHIqqrEJgNT2bzDphmGdz3XSMSlA8AyqsAsYsOKNyQTmJgUF2mb5yjOIu1Br6iZ8YijxnKxfjuycZNQl53Br0IT4GhTe6CdMrWERotuqYQ3VJjRM8hSOmdllXI6LCldgU49TwndKEKB9uDPKgPV1QmljdwZU8CD8wjMGjClqANVntbaIoLpmBWo6xWRN0pQkFuwknvQkYWMRn+i0TEGLI+gmmu4kwKGwnBk86KV7GMpvCMBlywbUAy0IF+r4qn1sJXRxGT8RyQD2v1ywVYjSG2pcoMN7YDQG7EzmT882DlfpwHrBVQYJgXbXSfn87DkczqYBGwTPIUS5FsBVysPa57vErLnMY5ye3vyEoPHqGLI1BotUR3x1CsZ8/kRkveMwPnNQIHHO4SQD1tz4xKue78tV6+QLa67gdvQp+24c4kIX7bh4V3i+vafrt5/9uLKDnH9BRp3kRQzAJCiAAAAAElFTkSuQmCC"},Symbol.toStringTag,{value:"Module"})),I=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/shop1.81f654af.png"},Symbol.toStringTag,{value:"Module"})),L=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/shop2.9d3386e0.png"},Symbol.toStringTag,{value:"Module"})),R=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/shop3.3d83d9de.png"},Symbol.toStringTag,{value:"Module"})),H=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/video1.53604fa1.png"},Symbol.toStringTag,{value:"Module"})),k=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/video2.ed18546a.png"},Symbol.toStringTag,{value:"Module"})),x=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/video3.6849177a.png"},Symbol.toStringTag,{value:"Module"})),C=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/vip1.8df41b3e.png"},Symbol.toStringTag,{value:"Module"})),D=Object.freeze(Object.defineProperty({__proto__:null,default:"./assets/vip2.72fa722b.png"},Symbol.toStringTag,{value:"Module"})),X=n({name:"share-item",props:{id:{type:String},teacherId:{type:Number},shareUrl:{type:String,default:""},showType:{type:String,default:"default"},shareType:{type:String,default:""}},data:function(){return{heardUrl:null}},computed:{getString:function(){return"music"===this.shareType?"这首曲目挺不错!推荐给你~":"mall"===this.shareType?"这件商品挺不错!推荐给你~":"vip"===this.shareType?"小酷Ai智能陪练!推荐给你~":"album"===this.shareType?"更多曲目扫码下载酷乐秀查看":"这个课程挺不错!推荐给你~"}},mounted:function(){this.heardUrl=r.user.data.heardUrl+"?t="+ +new Date},render:function(){var e=this;return a("div",{id:this.id,class:[f.shareSection,f.shareContainer,f[this.shareType],f[this.showType]]},[a("div",{class:f.shareContent},[this.$slots.default&&this.$slots.default()]),a(v,{center:!0,border:!1,class:[f.shareTeacher,"shareTeacherCustom"]},{icon:function(){return a("div",{class:f.teacherImg},[a("img",{src:r.user.data.heardUrl?e.heardUrl:b,class:f.img,style:{objectFit:"cover"},crossorigin:"anonymous"},null),"TEACHER"==r.platformType&&a("img",{class:f.recommend,src:(t="recommend.png",n="./images/".concat(t),{"./images/album1.png":y,"./images/bg1.png":_,"./images/bg2.png":j,"./images/bg3.png":S,"./images/live1.png":T,"./images/live2.png":w,"./images/live3.png":A,"./images/music1.png":O,"./images/music11.png":P,"./images/music2.png":z,"./images/music3.png":U,"./images/recommend.png":M,"./images/shop1.png":I,"./images/shop2.png":L,"./images/shop3.png":R,"./images/video1.png":H,"./images/video2.png":k,"./images/video3.png":x,"./images/vip1.png":C,"./images/vip2.png":D}[n].default)},null)]);var t,n},title:function(){return a("div",null,[a("p",{class:f.name},[e.getString]),a("p",{class:f.titleTips},[a("span",null,[r.user.data.username]),"TEACHER"==r.platformType?" 酷乐秀入驻老师":" 为您推荐"])])}}),a(m,{shareUrl:this.shareUrl},null)])}});e("C",n({name:"col-share",props:{type:{type:String,default:"default"},teacherId:{type:Number},shareUrl:{type:String,default:""},shareType:{type:String,default:""},shareLength:{type:Number,default:3}},data:function(){for(var e=[],t=0;t<this.shareLength;t++)e.push(t);return console.log(e),{swiperIndex:0,image:null,codeUrl:"",copyCodeUrl:"",shareLoading:!1,shareArray:e||[],saveLoading:!1,showType:["","yellow","pink"]}},mounted:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.post("/api-teacher/sysConfig/shortURL",{requestType:"form",data:{orginURL:e.shareUrl}});case 3:n=t.sent,e.copyCodeUrl=n.data,e.codeUrl=e.shareUrl,t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})))()},methods:{onSaveImg:function(){var e=this;return t(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.saveLoading){n.next=2;break}return n.abrupt("return");case 2:e.saveLoading=!0,e.image?e.saveImg():(r=document.getElementById("share-preview-container".concat(e.swiperIndex)),h(r,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(function(){var n=t(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.toDataURL("image/png"),e.image=r,e.saveImg();case 3:case"end":return t.stop()}}),t)})));return function(e){return n.apply(this,arguments)}}()).catch((function(){s.clear(),e.saveLoading=!1})));case 4:case"end":return n.stop()}}),n)})))()},saveImg:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s.loading({message:"图片生成中...",forbidClick:!0}),setTimeout((function(){e.saveLoading=!1}),100),t.next=4,i({api:"savePicture",content:{base64:e.image}});case 4:"success"===(null==(r=t.sent)||null===(n=r.content)||void 0===n?void 0:n.status)?s.success("已保存到相册"):s.fail("保存失败");case 6:case"end":return t.stop()}}),t)})))()},shareShow:function(){var e=this;return t(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.shareLoading){n.next=2;break}return n.abrupt("return");case 2:e.shareLoading=!0,e.image?e.openShare():(r=document.getElementById("share-preview-container".concat(e.swiperIndex)),h(r,{allowTaint:!0,useCORS:!0,backgroundColor:null}).then(function(){var n=t(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.toDataURL("image/png"),e.image=r,e.openShare();case 3:case"end":return t.stop()}}),t)})));return function(e){return n.apply(this,arguments)}}()).catch((function(){s.clear(),e.shareLoading=!1})));case 4:case"end":return n.stop()}}),n)})))()},openShare:function(){var e=this,t=this.image;setTimeout((function(){e.shareLoading=!1}),100),t&&u({api:"shareAchievements",content:{title:"",desc:"",image:t,video:"",type:"image",button:["copy"],url:this.copyCodeUrl}},(function(e){e&&e.content&&s(e.content.message||(e.content.status?"分享成功":"分享失败"))}))}},render:function(){var e=this;return a(l,null,[this.codeUrl&&a(l,null,[a("div",{class:f.shareContainer,id:"share-preview-container"},[a(p,{showIndicators:!0,lazyRender:!0,onChange:function(t){e.swiperIndex=t,e.image=null}},{default:function(){return[e.shareArray.map((function(t,n){return a(g,null,{default:function(){return[a(X,{id:"share-preview-container".concat(n),teacherId:e.teacherId,shareUrl:e.codeUrl,shareType:e.shareType,showType:e.showType[n]},{default:function(){return[e.$slots.default&&e.$slots.default()]}})]}})}))]},indicator:function(t){return e.shareArray.length>1&&a("div",{class:f.swipe__indicators},[a("div",{class:f.indicators},[Array.from({length:t.total},(function(e,n){return a("div",{class:[f.swipe__indicator,n==t.active&&f["swipe__indicator--active"]]},null)}))]),a("div",{class:f.total},[c("分享模板 "),t.active+1,c("/"),t.total])])}})]),a("div",{class:["btnGroup",f.shareGroupBtn,"tenant"===this.type?f.shareGroupTenantBtn:""]},[a(d,{type:"primary",plain:!0,round:!0,loading:this.saveLoading,loadingText:"保存中",onClick:this.onSaveImg},{default:function(){return[c("保存图片")]}}),a(d,{type:"primary",round:!0,loading:this.shareLoading,loadingText:"分享中",onClick:function(){e.shareShow()}},{default:function(){return[c("立即分享")]}})])])])}}))}}}))}();