import{d as o,y as a,z as n,f as d,v as m,A as l,n as h,j as e,B as i,E as p}from"./ResizeObserver.es.62ab429c.js";import{C as _}from"./index.d7a13e47.js";import{i as y,a as g,b as F}from"./icon_discount.535f7618.js";import{i as v}from"./icon_teacher.40b6f077.js";const E="_musicShare_1k540_1",I="_header_1k540_5",T="_btnMore_1k540_23",b="_section_1k540_29",k="_music_1k540_1",A="_discount_1k540_56",S="_shareTeacher_1k540_61",D="_teacherImg_1k540_69",f="_recommend_1k540_75",C="_img_1k540_81",B="_name_1k540_86",q="_titleTips_1k540_91";var t={musicShare:E,header:I,btnMore:T,section:b,music:k,discount:A,shareTeacher:S,teacherImg:D,recommend:f,img:C,name:B,titleTips:q},w=o({name:"share-music-sheet",data(){const s=this.$route.query;return{id:s.id,recomUserId:s.recomUserId,activityId:s.activityId||0,discounts:0,musicSheet:{},teacherName:""}},async mounted(){try{const s=await a.post("/api-teacher/open/musicShareProfit",{data:{bizId:this.id,userId:this.recomUserId}});if(this.musicSheet=s.data.musicSheet||{},this.teacherName=s.data.name||"",this.activityId){const u=await a.post(`/api-student/open/activity/state/${this.activityId}`,{data:{}});this.discounts=u.data.check||0}}catch{}this.onDetail()},methods:{onDetail(){const s=n(),u=d(),c="/klx-music-score/",r=m.stringifyUrl({url:l()+c,query:{id:this.id,recomUserId:this.$route.query.userType&&this.$route.query.userType=="STUDENT"?"":this.recomUserId,activityId:this.activityId,discounts:this.discounts,systemType:u.isStudent?"student":"teacher",behaviorId:s}});h({api:"openAccompanyWebView",content:{url:r,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}},render(){return e("div",{class:t.musicShare},[e("div",{class:t.header},[e("h2",null,[i("\u79D1\u5B66\u7684\u7EC3\u4E60\u6709\u52A9"),e("br",null,null),i("\u4E8E\u6C34\u5E73\u5FEB\u901F\u63D0\u5347")]),e("p",null,[i("\u4F60\u7684\u6C34\u5E73\u4E00\u5B9A\u80FD\u9A7E\u9A6D\u8FD9\u9996\u66F2\u5B50\uFF01")])]),e("div",{class:t.section},[e("div",{class:t.music},[e("img",{src:y},null),e("div",null,[e("h2",null,[this.musicSheet.musicSheetName]),e("p",null,[i("\u4F5C\u66F2\u4EBA: "),this.musicSheet.composer]),this.discounts==1&&e("img",{src:g,class:t.discount},null)])]),e(_,{center:!0,border:!1,class:t.shareTeacher},{icon:()=>e("div",{class:t.teacherImg},[e("img",{src:this.musicSheet.avatar||v,class:t.img,style:{objectFit:"cover"},crossorigin:"anonymous"},null),e("img",{class:t.recommend,src:F},null)]),title:()=>e("div",null,[e("p",{class:t.name},[i("\u8FD9\u4E2A\u66F2\u5B50\u633A\u4E0D\u9519\uFF01\u63A8\u8350\u7ED9\u4F60\uFF5E")]),e("p",{class:t.titleTips},[e("span",null,[this.teacherName]),i(" \u8001\u5E08\u4E3A\u60A8\u63A8\u8350")])])})]),e("div",{class:["btnGroup"],style:{paddingTop:"60px",margin:"0 28px"}},[e(p,{block:!0,round:!0,type:"primary",onClick:this.onDetail,class:t.btnMore,color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)"},{default:()=>[i("\u6253\u5361\u5C0F\u9177Ai\u5F00\u59CB\u7EC3\u4E60\u5427\uFF01")]})])])}});export{w as default};
