;(function(){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="._musicShare_bcot3_1{min-height:100vh;background:linear-gradient(194deg,#d8f8f3 0%,#ffffff 100%)}._musicShare_bcot3_1 ._header_bcot3_5{background:url(./assets/music-share-banner.68667815.png) no-repeat top center;background-size:cover;height:9.22667rem;padding:.69333rem .58667rem 0}._musicShare_bcot3_1 ._header_bcot3_5 h2{font-size:.90667rem;font-weight:600;color:#333;line-height:1.12rem}._musicShare_bcot3_1 ._header_bcot3_5 p{padding-top:.26667rem;font-size:.4rem;color:#666;line-height:.56rem}._btnMore_bcot3_23 .van-button__text{font-size:.48rem;font-weight:500;color:#fff;line-height:.66667rem}._section_bcot3_29{background-color:#fff;margin:-2.56rem .42667rem 0;border-radius:.26667rem;overflow:hidden}._section_bcot3_29 ._music_bcot3_1{padding:.58667rem;display:flex;align-items:center}._section_bcot3_29 ._music_bcot3_1 img{width:2.72rem;height:2.13333rem;margin-right:.58667rem}._section_bcot3_29 ._music_bcot3_1 h2{font-size:.37333rem;font-weight:600;color:#333;line-height:.53333rem;padding-bottom:.16rem}._section_bcot3_29 ._music_bcot3_1 p{color:#6a6a6a;line-height:.45333rem}._section_bcot3_29 ._music_bcot3_1 ._discount_bcot3_56{height:.48rem;width:auto;margin-top:.21333rem}._shareTeacher_bcot3_61{margin:.26667rem .37333rem .48rem;width:auto;padding:.32rem;background:linear-gradient(270deg,#baffe7 0%,#c0dcff 100%);border-radius:.24rem;color:#333}._shareTeacher_bcot3_61 ._teacherImg_bcot3_69{margin-right:.32rem;position:relative;width:1.06667rem;text-align:center}._shareTeacher_bcot3_61 ._recommend_bcot3_75{position:absolute;height:.37333rem;left:0;bottom:.08rem}._shareTeacher_bcot3_61 ._img_bcot3_81{width:.88rem;height:.88rem;border-radius:50%}._shareTeacher_bcot3_61 ._name_bcot3_86{font-size:.45333rem;font-weight:500;line-height:.64rem}._shareTeacher_bcot3_61 ._titleTips_bcot3_91{font-size:.32rem;line-height:.48rem}\n";document.head.appendChild(__vite_style__);System.register(['./vendor-legacy.b3aeff6a.js','./index-legacy.f25f109a.js','./index-legacy.c75fe8a2.js','./index-legacy.101dd5f6.js','./icon_discount-legacy.e2eed755.js','./icon_teacher-legacy.e765b7f7.js'],function(exports){'use strict';var defineComponent,createVNode,createTextVNode,Cell,Button,qs,request,getRandomKey,browser,postMessage,iconMusic,iconDiscount,iconCert,IconAvator;return{setters:[function(module){defineComponent=module.d;createVNode=module.a;createTextVNode=module.j;Cell=module.C;Button=module.B;},function(){},function(module){qs=module.q;},function(module){request=module.r;getRandomKey=module.i;browser=module.b;postMessage=module.p;},function(module){iconMusic=module.i;iconDiscount=module.a;iconCert=module.b;},function(module){IconAvator=module.I;}],execute:function execute(){var musicShare="_musicShare_bcot3_1";var header="_header_bcot3_5";var btnMore="_btnMore_bcot3_23";var section="_section_bcot3_29";var music="_music_bcot3_1";var discount="_discount_bcot3_56";var shareTeacher="_shareTeacher_bcot3_61";var teacherImg="_teacherImg_bcot3_69";var recommend="_recommend_bcot3_75";var img="_img_bcot3_81";var name="_name_bcot3_86";var titleTips="_titleTips_bcot3_91";var styles={musicShare:musicShare,header:header,btnMore:btnMore,section:section,music:music,discount:discount,shareTeacher:shareTeacher,teacherImg:teacherImg,recommend:recommend,img:img,name:name,titleTips:titleTips};var index=exports('default',defineComponent({name:'share-music-sheet',data:function data(){var query=this.$route.query;return{id:query.id,recomUserId:query.recomUserId,// 分享人编号
activityId:query.activityId||0,// 专属优惠Id
discounts:0,musicSheet:{},teacherName:''};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res,discountObj;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.post('/api-teacher/open/musicShareProfit',{data:{bizId:_this.id,userId:_this.recomUserId}});case 3:res=_context.sent;_this.musicSheet=res.data.musicSheet||{};_this.teacherName=res.data.name||'';// 判断是否有活动编号
if(!_this.activityId){_context.next=11;break;}_context.next=9;return request.post("/api-student/open/activity/state/".concat(_this.activityId),{data:{}});case 9:discountObj=_context.sent;_this.discounts=discountObj.data.check||0;case 11:_context.next=15;break;case 13:_context.prev=13;_context.t0=_context["catch"](0);case 15:_this.onDetail();case 16:case"end":return _context.stop();}}},_callee,null,[[0,13]]);}))();},methods:{onDetail:function onDetail(){var behaviorId=getRandomKey();var browserInfo=browser();var url=qs.stringifyUrl({url:location.origin+'/accompany',query:{id:this.id,recomUserId:this.recomUserId,activityId:this.activityId,discounts:this.discounts,client:browserInfo.isTeacher?'teacher':'student',behaviorId:behaviorId}});postMessage({api:'openAccompanyWebView',content:{url:url,// url: 'http://192.168.3.13:3000/colexiu.html?id=' + item.id,
orientation:0,isHideTitle:true,statusBarTextColor:false,isOpenLight:true}});}},render:function render(){var _this2=this;return createVNode("div",{"class":styles.musicShare},[createVNode("div",{"class":styles.header},[createVNode("h2",null,[createTextVNode("\u79D1\u5B66\u7684\u7EC3\u4E60\u6709\u52A9"),createVNode("br",null,null),createTextVNode("\u4E8E\u6C34\u5E73\u5FEB\u901F\u63D0\u5347")]),createVNode("p",null,[createTextVNode("\u4F60\u7684\u6C34\u5E73\u4E00\u5B9A\u80FD\u9A7E\u9A6D\u8FD9\u9996\u66F2\u5B50\uFF01")])]),createVNode("div",{"class":styles.section},[createVNode("div",{"class":styles.music},[createVNode("img",{"src":iconMusic},null),createVNode("div",null,[createVNode("h2",null,[this.musicSheet.musicSheetName]),createVNode("p",null,[createTextVNode("\u4F5C\u66F2\u4EBA: "),this.musicSheet.composer]),this.discounts==1&&createVNode("img",{"src":iconDiscount,"class":styles.discount},null)])]),createVNode(Cell,{"center":true,"border":false,"class":styles.shareTeacher},{icon:function icon(){return createVNode("div",{"class":styles.teacherImg},[createVNode("img",{"src":_this2.musicSheet.avatar||IconAvator,"class":styles.img,"style":{objectFit:'cover'},"crossorigin":"anonymous"},null),createVNode("img",{"class":styles.recommend,"src":iconCert},null)]);},title:function title(){return createVNode("div",null,[createVNode("p",{"class":styles.name},[createTextVNode("\u8FD9\u4E2A\u66F2\u5B50\u633A\u4E0D\u9519\uFF01\u63A8\u8350\u7ED9\u4F60\uFF5E")]),createVNode("p",{"class":styles.titleTips},[createVNode("span",null,[_this2.teacherName]),createTextVNode(" \u8001\u5E08\u4E3A\u60A8\u63A8\u8350")])]);}})]),createVNode("div",{"class":['btnGroup'],"style":{paddingTop:'60px',margin:'0 28px'}},[createVNode(Button,{"block":true,"round":true,"type":"primary","onClick":this.onDetail,"class":styles.btnMore,"color":"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)"},{default:function _default(){return[createTextVNode("\u6253\u5361\u5C0F\u9177Ai\u5F00\u59CB\u7EC3\u4E60\u5427\uFF01")];}})])]);}}));}};});})();
