index-legacy.83052b84.js 27 KB

12345678910111213
  1. ;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._wall_qwcz5_1{height:70px}._width1200_qwcz5_4{width:1200px;margin:20px auto 0}._musicWrap_qwcz5_8{display:flex;flex-direction:row}._musicWrap_qwcz5_8 ._left_qwcz5_12{width:826px;background-color:#fff;margin-right:14px;margin-bottom:100px}._musicWrap_qwcz5_8 ._left_qwcz5_12 ._title_qwcz5_18{padding:28px 28px 0;background-color:#fff;display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:24px}._musicWrap_qwcz5_8 ._left_qwcz5_12 ._title_qwcz5_18 ._titleLeft_qwcz5_27{display:flex;flex-direction:row;align-items:center}._musicWrap_qwcz5_8 ._left_qwcz5_12 ._title_qwcz5_18 ._titleLeft_qwcz5_27 p{min-width:60px;font-weight:600;color:#333;line-height:28px}._musicWrap_qwcz5_8 ._left_qwcz5_12 ._title_qwcz5_18 ._titleRight_qwcz5_38{cursor:pointer;display:flex;flex-direction:row;align-items:center}._musicWrap_qwcz5_8 ._left_qwcz5_12 ._title_qwcz5_18 ._titleRight_qwcz5_38 img{width:24px;height:24px;margin-right:10px}._musicWrap_qwcz5_8 ._left_qwcz5_12 ._musicContent_qwcz5_49{page-break-after:always;width:702px;min-height:665px;margin:0 auto;border:1px dotted #ccc}._musicWrap_qwcz5_8 ._showCode_qwcz5_56{position:relative}._musicWrap_qwcz5_8 ._showCode_qwcz5_56 ._showCodeWrap_qwcz5_59{position:absolute;z-index:10;bottom:0}._musicWrap_qwcz5_8 ._showCode_qwcz5_56 ._showCodeWrap_qwcz5_59 ._close_qwcz5_64{width:19px;height:19px;position:absolute;z-index:10;top:5px;right:5px;cursor:pointer}._musicWrap_qwcz5_8 ._showCode_qwcz5_56 ._showCodeWrap_qwcz5_59 ._code_qwcz5_73{width:74px;height:74px;position:absolute;z-index:10;top:10px;left:10px}._musicWrap_qwcz5_8 ._showCode_qwcz5_56 ._showCodeWrap_qwcz5_59 ._title_qwcz5_18{padding:0;height:22px;font-size:16px;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#333;line-height:22px;position:absolute;z-index:10;top:14px;left:101px;background-color:transparent}._musicWrap_qwcz5_8 ._showCode_qwcz5_56 ._showCodeWrap_qwcz5_59 ._conent_qwcz5_95{position:absolute;z-index:10;top:38px;left:101px;font-size:14px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#333;line-height:20px}._musicWrap_qwcz5_8 ._showCode_qwcz5_56 ._showCodeWrap_qwcz5_59 ._subConent_qwcz5_106{position:absolute;z-index:10;top:58px;left:101px;font-size:14px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#333;line-height:20px}._musicWrap_qwcz5_8 ._audios_qwcz5_117{width:100%;border-radius:0;background-color:#333}._musicWrap_qwcz5_8 .subjectChiose{border-radius:14px;overflow:hidden}._musicWrap_qwcz5_8 .subjectChiose .el-input__wrapper{background-color:#f1f1f1;border:none;box-shadow:none!important}._musicWrap_qwcz5_8 .subjectChiose .el-input__wrapper.is-focus{border:none!important;box-shadow:none!important}._musicWrap_qwcz5_8 .subjectChiose .el-input.is-focus .el-input__wrapper{background-color:#f1f1f1;border:none;box-shadow:none!important}._musicWrap_qwcz5_8 audio::-webkit-media-controls-pane{background-color:#333}._musicWrap_qwcz5_8 .iframe body ::-webkit-scrollbar-thumb{background-color:#efeff0;border:1px solid transparent;background-clip:padding-box;border-radius:5px}._right_qwcz5_149 ._musicInfo_qwcz5_149{background-color:#fff;padding:24px;width:360px;margin-bottom:14px}._right_qwcz5_149 ._musicInfo_qwcz5_149 h2{font-size:18px;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#333;line-height:28px;margin-bottom:15px}._right_qwcz5_149 ._musicInfo_qwcz5_149 ._tagList_qwcz5_163{margin-bottom:15px}._right_qwcz5_149 ._musicInfo_qwcz5_149 ._collect_qwcz5_166{display:flex;flex-direction:row;align-items:center;margin-bottom:15px;font-size:16px}._right_qwcz5_149 ._musicInfo_qwcz5_149 ._collect_qwcz5_166 ._start_qwcz5_173{width:23px;height:23px;margin-right:6px}._right_qwcz5_149 ._musicInfo_qwcz5_149 ._collect_qwcz5_166 p{font-size:16px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#333;line-height:25px}._right_qwcz5_149 ._musicInfo_qwcz5_149 ._subTitle_qwcz5_185{margin-bottom:15px}._right_qwcz5_149 ._musicInfo_qwcz5_149 ._subTitle_qwcz5_185 span{font-size:16px;line-height:22px;color:#666}._right_qwcz5_149 ._btooom_qwcz5_193{background-color:#fff}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196{padding:18px 14px;background-color:#fff}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200{display:flex;flex-direction:row;align-items:center;justify-content:space-between}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadLeft_qwcz5_206{display:flex;flex-direction:row;align-items:center}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadLeft_qwcz5_206 ._teacherHeader_qwcz5_211{width:50px;height:50px;border-radius:50%;overflow:hidden;margin-right:10px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadLeft_qwcz5_206 ._teacherHeadName_qwcz5_218{padding-top:2px;display:flex;flex-direction:row;align-items:center;font-size:18px;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#333;line-height:28px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadLeft_qwcz5_206 ._teacherHeadName_qwcz5_218 span{margin-right:12px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadLeft_qwcz5_206 ._teacherHeadName_qwcz5_218 ._teacherIcon_qwcz5_232{width:54px;height:22px;margin-right:5px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadLeft_qwcz5_206 ._fens_qwcz5_237{font-size:14px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#999;line-height:22px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadLeft_qwcz5_206 ._fens_qwcz5_237 span{color:#333}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadRight_qwcz5_247{width:67px;background:#2dc7aa;border-radius:21px;font-size:14px;font-family:PingFangSC-Semibold,PingFang SC;color:#fff;line-height:30px;text-align:center;cursor:pointer}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherHeadWrap_qwcz5_200 ._teacherHeadRight_qwcz5_247._isStart_qwcz5_258{border:1px solid #2dc7aa;background:#fff;color:#2dc7aa}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._courseWrap_qwcz5_263{padding:20px;background-color:#fff}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._courseWrap_qwcz5_263 ._courseTitle_qwcz5_267{display:flex;flex-direction:row;align-items:center;font-size:20px;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#333;line-height:28px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._courseWrap_qwcz5_263 ._courseTitle_qwcz5_267 img{width:26px;height:26px;margin-right:8px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._titleWrap_qwcz5_282{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;margin-top:20px;padding-bottom:12px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._titleWrap_qwcz5_282 span{font-size:20px;color:#333;line-height:28px;font-weight:600}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._titleWrap_qwcz5_282 img{width:24px;height:24px;margin-right:10px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherDetail_qwcz5_301{font-size:18px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#666;line-height:25px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherVideoList_qwcz5_308{display:flex;flex-direction:row;flex-wrap:wrap}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherVideoList_qwcz5_308 ._videoItem_qwcz5_313{margin-right:18px;margin-bottom:12px;width:218px;height:145px;position:relative}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherVideoList_qwcz5_308 ._videoItem_qwcz5_313 ._Styles_qwcz5_320,._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherVideoList_qwcz5_308 ._videoItem_qwcz5_313 ._videoItemVideo_qwcz5_324{width:218px;height:145px}._right_qwcz5_149 ._btooom_qwcz5_193 ._teacherInfo_qwcz5_196 ._teacherVideoList_qwcz5_308 ._videoItem_qwcz5_313:nth-child(2n){margin-right:0}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331{padding:0 20px}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331 ._videoNav_qwcz5_334{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin-bottom:14px}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331 ._videoNav_qwcz5_334 h5{font-size:16px;font-weight:500;color:#333;line-height:30px}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331 ._videoNav_qwcz5_334 ._wrapRight_qwcz5_347{display:flex;flex-direction:row;cursor:pointer}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331 ._videoNav_qwcz5_334 ._wrapRight_qwcz5_347 span{color:#666}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331 ._videoNav_qwcz5_334 ._wrapRight_qwcz5_347 ._arrow_qwcz5_355{width:20px;height:20px;margin-left:4px}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331 h2{font-size:18px;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#333;line-height:25px;margin-bottom:14px}._right_qwcz5_149 ._btooom_qwcz5_193 ._otherMusic_qwcz5_331 ._otherMusicList_qwcz5_368{padding:18px 0;border-top:1px solid #dedede}._itemWrap_je1de_1{height:40px;background:#ffffff;display:flex;flex-direction:row;justify-content:space-between;width:100%;border-radius:12px;margin-bottom:20px;cursor:pointer}._itemWrap_je1de_1 ._left_je1de_12{display:flex;flex-direction:row;align-items:center}._itemWrap_je1de_1 ._left_je1de_12 ._imgWrap_je1de_17{width:40px;height:40px;margin-right:18px}._itemWrap_je1de_1 ._left_je1de_12 ._textWrap_je1de_22 p{font-weight:600;color:#333;line-height:22px;font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._itemWrap_je1de_1 ._left_je1de_12 ._textWrap_je1de_22 p span{font-weight:400;color:#6a6a6a}._itemWrap_je1de_1 ._left_je1de_12 ._textWrap_je1de_22 ._authorInfo_je1de_35{display:flex;flex-direction:row;align-items:center}._itemWrap_je1de_1 ._left_je1de_12 ._textWrap_je1de_22 ._authorInfo_je1de_35 ._icon_je1de_40{width:20px;height:20px;border-radius:27px;margin-right:6px}._itemWrap_je1de_1 ._left_je1de_12 ._textWrap_je1de_22 ._authorInfo_je1de_35 ._authorName_je1de_46{color:#333;font-size:12px;margin-right:8px}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.c39ec286.js','./index-legacy.8a8cb887.js','./start-legacy.54568697.js','./index-legacy.dfcc7875.js','./music-legacy.146bf361.js','./vendor-legacy.a87028d2.js','./arrow-legacy.c72c6a83.js'],function(exports){'use strict';var colVideo,getUserType,iconClose,iconTeacher,request,vaildTeachingUrl,start$1,tagItem,music,defineComponent,useRouter,reactive,watch,createVNode,createTextVNode,useRoute,ref,onMounted,Fragment,ElSelect,ElOption,isVNode,arrow$1;return{setters:[function(module){colVideo=module.c;},function(module){getUserType=module.g;iconClose=module.i;iconTeacher=module.a;request=module.r;vaildTeachingUrl=module.v;},function(module){start$1=module.s;},function(module){tagItem=module.t;},function(module){music=module.m;},function(module){defineComponent=module.d;useRouter=module.f;reactive=module.r;watch=module.P;createVNode=module.c;createTextVNode=module.a;useRoute=module.u;ref=module.U;onMounted=module.o;Fragment=module.F;ElSelect=module.a0;ElOption=module.a1;isVNode=module.a3;},function(module){arrow$1=module.a;}],execute:function execute(){var wall="_wall_qwcz5_1";var width1200="_width1200_qwcz5_4";var musicWrap="_musicWrap_qwcz5_8";var left$1="_left_qwcz5_12";var title="_title_qwcz5_18";var titleLeft="_titleLeft_qwcz5_27";var titleRight="_titleRight_qwcz5_38";var musicContent="_musicContent_qwcz5_49";var showCode="_showCode_qwcz5_56";var showCodeWrap="_showCodeWrap_qwcz5_59";var close="_close_qwcz5_64";var code$1="_code_qwcz5_73";var conent="_conent_qwcz5_95";var subConent="_subConent_qwcz5_106";var audios="_audios_qwcz5_117";var right="_right_qwcz5_149";var musicInfo="_musicInfo_qwcz5_149";var tagList="_tagList_qwcz5_163";var collect="_collect_qwcz5_166";var start="_start_qwcz5_173";var subTitle="_subTitle_qwcz5_185";var btooom="_btooom_qwcz5_193";var teacherInfo="_teacherInfo_qwcz5_196";var teacherHeadWrap="_teacherHeadWrap_qwcz5_200";var teacherHeadLeft="_teacherHeadLeft_qwcz5_206";var teacherHeader="_teacherHeader_qwcz5_211";var teacherHeadName="_teacherHeadName_qwcz5_218";var teacherIcon="_teacherIcon_qwcz5_232";var fens="_fens_qwcz5_237";var teacherHeadRight="_teacherHeadRight_qwcz5_247";var isStart="_isStart_qwcz5_258";var courseWrap="_courseWrap_qwcz5_263";var courseTitle="_courseTitle_qwcz5_267";var titleWrap="_titleWrap_qwcz5_282";var teacherDetail="_teacherDetail_qwcz5_301";var teacherVideoList="_teacherVideoList_qwcz5_308";var videoItem="_videoItem_qwcz5_313";var Styles="_Styles_qwcz5_320";var videoItemVideo="_videoItemVideo_qwcz5_324";var otherMusic="_otherMusic_qwcz5_331";var videoNav="_videoNav_qwcz5_334";var wrapRight="_wrapRight_qwcz5_347";var arrow="_arrow_qwcz5_355";var otherMusicList="_otherMusicList_qwcz5_368";var classes$1={wall:wall,width1200:width1200,musicWrap:musicWrap,left:left$1,title:title,titleLeft:titleLeft,titleRight:titleRight,musicContent:musicContent,showCode:showCode,showCodeWrap:showCodeWrap,close:close,code:code$1,conent:conent,subConent:subConent,audios:audios,right:right,musicInfo:musicInfo,tagList:tagList,collect:collect,start:start,subTitle:subTitle,btooom:btooom,teacherInfo:teacherInfo,teacherHeadWrap:teacherHeadWrap,teacherHeadLeft:teacherHeadLeft,teacherHeader:teacherHeader,teacherHeadName:teacherHeadName,teacherIcon:teacherIcon,fens:fens,teacherHeadRight:teacherHeadRight,isStart:isStart,courseWrap:courseWrap,courseTitle:courseTitle,titleWrap:titleWrap,teacherDetail:teacherDetail,teacherVideoList:teacherVideoList,videoItem:videoItem,Styles:Styles,videoItemVideo:videoItemVideo,otherMusic:otherMusic,videoNav:videoNav,wrapRight:wrapRight,arrow:arrow,otherMusicList:otherMusicList};var printIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAiBJREFUWEftl79PGmEcxp/3DouJYTCxo05NyyB0oSWYTgw2YdKmOSIrg3+Btn9Cq3+BAyvGS9M6kejAZCC0LgKDbTqVURMHYuIP7r7NSyAhIN779Y7B9mUiued9vp973ueFO4FH9hGPjBcaeNI7phPWCQ8l8P9VIla1iVODRsryFZKvxRJUA3tsl07Yq8+6w14JDV/Xh04fuqEEdCX8ViJeszdA2BznQ4Q5zkEVAudj9QJb9aS1fZ+f0h9HrLq3CYhPwMTeUAigj41Udsvr5pWApclixc4LYAcCppcp6zrBIWC9uWQVVNYpA0uzlzV71XFRFMC0irmXhoAr00DuJGl989L2r7OA5aJ4zU67LvYFEFEdcpeOgLZhYKWetMocHzZwtx61LwnhuiUATznDBrRnZBiZZvL9MXf9g4C7z8GVYhQidABggTn0D6jztrGUO2Wu68ofDNxN+vvuvHDMQwBRxeGnZDrLzddrLUX9iMwXsHR7flycC9+GZD1eeUD8uJ7qZH4lcuN/hxXuwjewnPHiqBB5Eorsg5C+c6ZA+abTXvn5Jt9WYLpXEgiwnPCsVApPz14WBejd4ESC+Hp1MZP7nclc+4X13eERANs24/PYISDfMy/UW1iHZTlBwAYP3KOKVfc+y6+NVPZDUKB9n8AqETTYOL9/F5j7oM5NXPVtWjlhDTy0BTphbicnpVfu8KQAuL4amJsYV68T5ibG1f8FP3mqLWjC3hAAAAAASUVORK5CYII=";var banner="./assets/banner.6760c6c7.png";var code="./assets/code.b0b30240.png";var itemWrap="_itemWrap_je1de_1";var left="_left_je1de_12";var imgWrap="_imgWrap_je1de_17";var textWrap="_textWrap_je1de_22";var authorInfo="_authorInfo_je1de_35";var icon="_icon_je1de_40";var authorName="_authorName_je1de_46";var classes={itemWrap:itemWrap,left:left,imgWrap:imgWrap,textWrap:textWrap,authorInfo:authorInfo,icon:icon,authorName:authorName};var musicItem=defineComponent({name:'musicItem',emits:['musicDetail'],props:{item:{type:Object,default:function _default(){return{};}},onClick:{type:Function,default:function _default(item){}}},setup:function setup(props,conent){useRouter();var state=reactive({item:props.item});watch(function(){return props.item;},function(item){state.item=item;});var gotoMusicDetail=function gotoMusicDetail(){conent.emit('musicDetail',state.item.id);// router.push({path:'/muiscDetial',query:{id:state.item.id}})
  2. };return function(){return createVNode("div",{"onClick":function onClick(){props.onClick(state.item);}},[createVNode("div",{"class":classes.itemWrap,"onClick":function onClick(){return gotoMusicDetail();}},[createVNode("div",{"class":classes.left},[createVNode("div",{"class":classes.imgWrap},[createVNode("img",{"src":music,"alt":""},null)]),createVNode("div",{"class":classes.textWrap},[createVNode("p",null,[state.item.musicSheetName]),createVNode("p",null,[createVNode("span",null,[createTextVNode("\u4F5C\u66F2: "),state.item.composer])])])])])]);};}});var imgToCanvas=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(url){var img,canvas,ctx;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:img=document.createElement("img");img.src=url;img.setAttribute("crossOrigin","anonymous");_context.next=5;return new Promise(function(resolve){return img.onload=resolve;});case 5:canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;ctx=canvas.getContext("2d");ctx.fillStyle="rgb(255, 255, 255)";ctx.fillStyle="#fff";ctx.fillRect(0,0,img.width,img.height);ctx.drawImage(img,0,0);return _context.abrupt("return",canvas);case 14:case"end":return _context.stop();}}},_callee);}));return function imgToCanvas(_x){return _ref.apply(this,arguments);};}();var addWatermark=function addWatermark(canvas,text){var ctx=canvas.getContext("2d");var water=document.createElement("canvas");water.width=500;water.height=300;var waterCtx=water.getContext("2d");waterCtx.clearRect(0,0,water.width,water.height);waterCtx.rotate(-25*Math.PI/180);waterCtx.font="50pt Calibri";waterCtx.fillStyle="rgba(149,155,170,0.2)";waterCtx.fillText("\u9177\u4E50\u79C0",-10,180);var pat=ctx.createPattern(water,"repeat");ctx.fillStyle=pat;ctx.fillRect(0,0,canvas.width,canvas.height);return canvas;};var convasToImg=function convasToImg(canvas){return canvas.toDataURL("image/png");};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var index=exports('default',defineComponent({name:'muiscDetial',props:{title:{type:String,default:''}},components:{colVideo:colVideo,tagItem:tagItem,musicItem:musicItem},setup:function setup(props,conent){var route=useRoute();var router=useRouter();var state=reactive({title:props.title,id:route.query.id,subjectId:'',subjectList:[],tagList:[],teacherDetail:{},musicDetail:{},musicList:[],mp3Type:'',activeRow:{},showCode:false,userType:'',accompanyUrl:'',imgData:'',imgUrl:''});ref();var getMusicList=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get("/api-website/open/music/sheet/detail/".concat(state.id),{});case 3:res=_context2.sent;state.musicDetail=res.data;state.musicList=res.data.teacher.musicSheetList;state.subjectList=res.data.background;state.tagList=res.data.musicTagNames?res.data.musicTagNames.split(','):[];state.mp3Type=res.data.audioType;if(state.subjectList&&state.subjectList.length>0){state.activeRow=res.data.background[0];state.subjectId=res.data.background[0].id;}state.teacherDetail=res.data.teacher;setAccompanyUrl();console.log('调用');_context2.next=18;break;case 15:_context2.prev=15;_context2.t0=_context2["catch"](0);console.log(_context2.t0);case 18:case"end":return _context2.stop();}}},_callee2,null,[[0,15]]);}));return function getMusicList(){return _ref2.apply(this,arguments);};}();var followVideo=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){var res;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=3;return request.get('/api-website/student/starOrUnStar',{params:{userId:state.teacherDetail.userId,starStatus:state.teacherDetail.star?0:1}});case 3:res=_context3.sent;getMusicList();// state.otherVideoList = res.data
  3. _context3.next=10;break;case 7:_context3.prev=7;_context3.t0=_context3["catch"](0);console.log(_context3.t0);case 10:case"end":return _context3.stop();}}},_callee3,null,[[0,7]]);}));return function followVideo(){return _ref3.apply(this,arguments);};}();var getDetail=function getDetail(val){state.id=val;router.push({query:_objectSpread(_objectSpread({},route.query),{},{id:state.id})});getMusicList();};watch(function(){return state.accompanyUrl;},function(accompanyUrl){state.accompanyUrl=accompanyUrl;});var setAccompanyUrl=function setAccompanyUrl(){var url=vaildTeachingUrl();state.accompanyUrl=url+"/accompany/colxiu-website.html?id=".concat(state.id,"&part-index=").concat(state.subjectId);// state.accompanyUrl = `http://192.168.3.8:3000/colxiu-website.html?id=${state.id}&part-index=${state.subjectId}`
  4. };onMounted(function(){// window.setSvg = (val)=>{
  5. // setSvg(val)
  6. // }
  7. window.addEventListener('message',function(e){console.log(e);state.imgData=e.data;// printHander()
  8. // alert(e.data);
  9. },false);state.userType=getUserType();state.showCode=state.userType=='STUDENT'?true:false;// 拼链接
  10. getMusicList();});var printHander=/*#__PURE__*/function(){var _ref4=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){var tempCanvas,canvas,imgUrl,link;return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:_context4.next=2;return imgToCanvas(state.imgData);case 2:tempCanvas=_context4.sent;canvas=addWatermark(tempCanvas);imgUrl=convasToImg(canvas);link=document.createElement('a');link.setAttribute('download',state.musicDetail.musicSheetName+'.png');// 添加时间戳,防止浏览器缓存图片
  11. state.imgUrl=imgUrl;// console.log('printHander',imgUrl)
  12. // return
  13. link.href=imgUrl;link.click();case 10:case"end":return _context4.stop();}}},_callee4);}));return function printHander(){return _ref4.apply(this,arguments);};}();var gotoMusic=function gotoMusic(){router.push({path:'/searchdetail',query:{search:state.teacherDetail.userName,type:'music'}});};return function(){var _slot;return createVNode(Fragment,null,[createVNode("div",{"class":classes$1.wall},null),createVNode("div",{"class":[classes$1.width1200,classes$1.musicWrap]},[createVNode("div",{"class":classes$1.left},[createVNode("div",{"class":classes$1.title},[createVNode("div",{"class":classes$1.titleLeft},[createVNode("p",null,[createTextVNode("\u58F0\u90E8\uFF1A")]),createVNode(ElSelect,{"class":"w-full subjectChiose","modelValue":state.subjectId,"onUpdate:modelValue":function onUpdateModelValue($event){return state.subjectId=$event;},"placeholder":"请选择声部","onChange":function onChange(){setAccompanyUrl();}},_isSlot(_slot=state.subjectList.map(function(item){return createVNode(ElOption,{"key":item.id,"value":item.id,"label":item.track},null);}))?_slot:{default:function _default(){return[_slot];}})]),createVNode("div",{"class":classes$1.titleRight,"onClick":function onClick(){return printHander();}},[createVNode("img",{"src":printIcon,"alt":""},null),createVNode("p",null,[createTextVNode("\u4E0B\u8F7D\u4E50\u8C31")])])]),createVNode("div",{"class":classes$1.musicContent},[createVNode("iframe",{"id":"containerPrint","ref":"print","style":"width: 100%;page-break-after:always; ","src":state.accompanyUrl,"class":classes$1.iframe},null)]),state.showCode?createVNode("div",{"class":classes$1.showCode},[createVNode("div",{"class":classes$1.showCodeWrap},[createVNode("img",{"class":classes$1.close,"src":iconClose,"alt":"","onClick":function onClick(){state.showCode=false;}},null),createVNode("img",{"class":classes$1.code,"src":code,"alt":""},null),createVNode("img",{"src":banner,"alt":""},null)])]):null,state.mp3Type=='MP3'?createVNode(colVideo,{"src":state.activeRow.audioFileUrl,"styleValue":{height:'68px',bacground:'#333'},"type":'audto',"settings":['captions','quality','speed','loop'],"class":classes$1.audios},null):null]),createVNode("div",{"class":classes$1.right},[createVNode("div",{"class":classes$1.musicInfo},[createVNode("h2",null,[state.musicDetail.musicSheetName]),createVNode("div",{"class":classes$1.collect},[createVNode("img",{"src":start$1,"class":classes$1.start,"alt":""},null),createVNode("p",null,[state.musicDetail.favoriteNum,createTextVNode("\u4EBA\u6536\u85CF")])]),createVNode("div",{"class":classes$1.tagList},[state.tagList.map(function(item){return createVNode(tagItem,{"title":item},_isSlot(item)?item:{default:function _default(){return[item];}});})]),createVNode("p",{"class":classes$1.subTitle},[createTextVNode("\u4F5C\u66F2\u4EBA\uFF1A"),createVNode("span",null,[state.musicDetail.composer])]),createVNode("p",{"class":classes$1.subTitle},[createTextVNode("\u58F0\u90E8\uFF1A"),createVNode("span",null,[state.musicDetail.subjectNames])])]),createVNode("div",{"class":classes$1.btooom},[state.teacherDetail.userId?createVNode("div",{"class":classes$1.teacherInfo},[createVNode("div",{"class":classes$1.teacherHeadWrap},[createVNode("div",{"class":classes$1.teacherHeadLeft},[createVNode("img",{"src":state.teacherDetail.avatar?state.teacherDetail.avatar:iconTeacher,"alt":"","class":classes$1.teacherHeader},null),createVNode("div",{"class":classes$1.teacherHeadInfo},[createVNode("div",{"class":classes$1.teacherHeadName},[createVNode("span",null,[state.teacherDetail.userName])]),createVNode("p",{"class":classes$1.fens},[createTextVNode("\u7C89\u4E1D "),createVNode("span",null,[state.teacherDetail.fansNum])])])]),state.userType=='STUDENT'?createVNode("div",{"class":[classes$1.teacherHeadRight,state.teacherDetail.star?classes$1.isStart:''],"onClick":function onClick(){return followVideo();}},[state.teacherDetail.star?'已关注':'关注']):null])]):null,createVNode("div",{"class":classes$1.otherMusic},[createVNode("div",{"class":classes$1.videoNav},[createVNode("h5",null,[createTextVNode("Ta\u7684\u66F2\u8C31")]),createVNode("div",{"class":classes$1.wrapRight,"onClick":function onClick(){return gotoMusic();}},[createVNode("span",null,[createTextVNode("\u66F4\u591A")]),createVNode("img",{"class":classes$1.arrow,"src":arrow$1,"alt":""},null)])]),createVNode("div",{"class":classes$1.otherMusicList},[state.musicList.map(function(item){return createVNode(musicItem,{"item":item,"onMusicDetail":function onMusicDetail(val){return getDetail(val);}},null);})])])])])])]);};}}));}};});})();