index.c93aa8ae.js 15 KB

1
  1. import{d as Z,V as B,j as a,z as n,P as la,O as oa,Q as ia,S as c,U as na,by as ua,be as ca,C as ra,g as d,B as z,aR as ma,w as y,D as X,n as j}from"./index.cf487d9e.js";import{C as pa}from"./index.36fcf68d.js";import{I as F}from"./index.bc1a15dc.js";import{u as _a,a as ga}from"./index.dffaafe3.js";import{g as da}from"./music.070d0add.js";import{i as Aa,a as va,o as ba}from"./icon-share.35fc8401.js";import{_ as fa,a as ya,b as ha,c as Ca,d as Fa,e as Sa,f as xa,g as Ia,h as Ta,i as Da,j as Ea,k as Ba,l as wa,S as ka}from"./index.a638295f.js";import{u as Ma}from"./hooks.d9eb54a1.js";import{C as Na}from"./index.a75eaf9c.js";import{o as p}from"./orderStatus.f01c560a.js";import{C as Ra}from"./index.8d5c4b2b.js";import{_ as Oa}from"./icon-xin2.4ab2a52d.js";import{T as Ua}from"./index.0656d807.js";import"./index.b915e986.js";import"./use-height.6b216291.js";import"./index.c6b3d658.js";import"./code-down-load.580f0547.js";import"./logo.bcac726b.js";import"./browser.8379baf6.js";import"./html2canvas.esm.3d083717.js";import"./index.e3693273.js";import"./icon_teacher.40b6f077.js";const qa="_base_lm7xy_1",Va="_detail_lm7xy_4",La="_img_lm7xy_14",Ya="_albumType_lm7xy_36",Ja="_shareBtn_lm7xy_49",Pa="_detailContent_lm7xy_61",za="_main_lm7xy_66",Xa="_favoriteContaineer_lm7xy_71",ja="_favorite_lm7xy_71",Ha="_content_lm7xy_93",Wa="_footerBar_lm7xy_114",Za="_bgImg_lm7xy_122",Ga="_musicContent_lm7xy_132",Ka="_bg_lm7xy_122",Qa="_alumWrap_lm7xy_149",$a="_alumTitle_lm7xy_160",ae="_alumDes_lm7xy_166",ee="_des_lm7xy_169",te="_tags_lm7xy_172",se="_tag_lm7xy_172",le="_alumCollect_lm7xy_184",oe="_alumCollectItem_lm7xy_192",ie="_albumTips_lm7xy_209",ne="_albumPrice_lm7xy_222",ue="_alumnContainer_lm7xy_230",ce="_alumnList_lm7xy_235",re="_alumnTitle_lm7xy_241",me="_iconMenu_lm7xy_249",pe="_shareVip_lm7xy_259",_e="_icon_lm7xy_249",ge="_info_lm7xy_274",de="_shareAlumCollect_lm7xy_290",Ae="_right_lm7xy_305",ve="_tagDiscount_lm7xy_310",be="_buttonDiscount_lm7xy_323",fe="_shareMusicList_lm7xy_336",ye="_albumShare_lm7xy_341";var e={base:qa,detail:Va,img:La,albumType:Ya,shareBtn:Ja,detailContent:Pa,main:za,favoriteContaineer:Xa,favorite:ja,content:Ha,footerBar:Wa,bgImg:Za,musicContent:Ga,bg:Ka,alumWrap:Qa,alumTitle:$a,alumDes:ae,des:ee,tags:te,tag:se,alumCollect:le,alumCollectItem:oe,albumTips:ie,albumPrice:ne,alumnContainer:ue,alumnList:ce,alumnTitle:re,iconMenu:me,shareVip:pe,icon:_e,info:ge,shareAlumCollect:de,right:Ae,tagDiscount:ve,buttonDiscount:be,shareMusicList:fe,albumShare:ye},he="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABPxJREFUWEfNmVmsnVMYhp8X4UJMISFNiCklWqKRKGq4qIS02iohaItIzFyoIg4XvaCNoW6ooRKhVYRQRU3hghDpBTEHQRpNhISY4oLgk7f51s46/9l7//sMTc66Ovv/1/rW+3/D+35rHTGOERE7AocDhwFTgN3S3B/A98CXwBeS/h3rNhrtwojYFTgLOAc4GdijxcZvwNvAM8Bzkv4czZ4DA4yIfYClwNXA7qPZpJr7O7AauEfST4PYaAUYEZ5zBXA7sFcXo1uBj4EtgL3lYa8eCBwF7N9lzS/ALcCDkqIf0L4A02vrgNMbRj4HHs2QfdNvg4g4JFPiYuCIxtxXgAv7ebMnwDT8OnBwZfQr4CZgY9uXN0FnJBYAdwBTq/f+wNMkdf3QrgAT3DvAfmnovzS8XNLfg+ROrzkRsTOwPD90h5z3A3BiN5AjAGZYN1eec9WdJ+mlllDa1qLMuZ+Bz4DN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xAx86s7uuy0S08WbAMBDApqj52+ipkbs9jZxXqgQ/uSeYzs1V3mrifGyZf3TzY5eDuq4/j+h7ci6FJffXRADk5L48qkA7Z9rx+81XHkjFdv1UgJ+8FZkNvJ+cVcLMCJ+0leg+q2O7/hvgfqWOr87cr4AMAAAAASUVORK5CYII=";const Ce="_theSong_1plfo_1",Fe="_item_1plfo_4",Se="_content_1plfo_16",xe="_top_1plfo_19",Ie="_tag_1plfo_23",Te="_tags_1plfo_28",De="_title_1plfo_39",Ee="_singer_1plfo_46",Be="_play_1plfo_51",we="_mb100_1plfo_56",ke="_pImg_1plfo_59",Me="_moreSection_1plfo_66",Ne="_collection_1plfo_74",Re="_musicInfo_1plfo_79",Oe="_info_1plfo_88",Ue="_shareIcon_1plfo_106",qe="_share_1plfo_106",Ve="_shareMate_1plfo_116",Le="_icon_1plfo_126",Ye="_tagDiscount_1plfo_147",Je="_exquisiteFlag_1plfo_160",Pe="_songAlbum_1plfo_165";var A={theSong:Ce,item:Fe,content:Se,top:xe,tag:Ie,tags:Te,title:De,singer:Ee,play:Be,mb100:we,pImg:ke,moreSection:Me,collection:Ne,musicInfo:Re,info:Oe,shareIcon:Ue,share:qe,shareMate:Ve,icon:Le,tagDiscount:Ye,exquisiteFlag:Je,songAlbum:Pe};const H=_=>{const v=`../images/${_}`;return{"../images/collection.png":fa,"../images/collection_active.png":ya,"../images/icon-play.png":ha,"../images/icon-xin.png":Ca,"../images/icon-xin2.png":Oa,"../images/icon_ai.png":Fa,"../images/icon_album.png":Sa,"../images/icon_album_active.png":xa,"../images/icon_author.png":Ia,"../images/icon_download.png":Ta,"../images/icon_exquisite.png":Da,"../images/icon_music_active.png":Ea,"../images/icon_share.png":Ba,"../images/icon_uploader.png":wa}[v].default};var ze=Z({name:"TheSong",props:{list:{type:Array,default:()=>[]},showPlay:{type:Boolean,default:!0},musicNameClass:{type:String},authorClass:{type:String}},emits:["detail"],setup(_,{emit:v}){const r=B(()=>_.list.map(l=>(typeof l.paymentType=="string"&&(l.paymentType=l.paymentType.split(",")),{...l})));return()=>a("div",{class:A.theSong},[r.value.map(l=>{var s;return a("div",{class:A.item,onClick:()=>v("detail",l)},[a("div",{class:A.content},[a("div",{class:A.top},[l.exquisiteFlag===1&&a(F,{class:A.exquisiteFlag,src:H("icon_exquisite.png")},null),l.albumNums>0&&a(F,{class:A.songAlbum,src:H("icon_album_active.png")},null),a("span",{class:[A.title,_.musicNameClass,"van-ellipsis"]},[l.musicSheetName]),a("span",{class:[A.singer,_.authorClass,"van-ellipsis"]},[n("-"),l.composer]),a("div",{class:A.tags},[(s=l==null?void 0:l.subjectNames)==null?void 0:s.split(",").map(g=>a("span",null,[g]))])])])])})])}}),Xe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAb1BMVEUAAABG2MNG2MFF18BF2MFG18BF2MFA4MRD2cBF2MJF2cJF18FE2MFF2MFF2MFE2MFF2MFE179A3MVF2MFF18JF2MJF18JF2MFG2cJF2MFG179F2MJF18FF2MFF18JE1sJH2sNF18FF2MJE179F18GInqdFAAAAJHRSTlMAMo9Z+E1lBhaZDfvNyfDSpzUR2biglXUs40Un3sKKSiLmv0D+yki/AAAA3klEQVQoz7XOWXKDMBRE0YYQSUhinsFTkt7/GhMBVihbVf5yf95TD4TwItFnefeUpesJ3cxDT/dOJjl5h0Wk1nebikrGHiOz9ywVkVzTP3643t/7M1Y+BzB6jVItVRREVc2fbiqE15Xm8OU4V4uSLx70JtSXJrc2jLqgWxhLsuimHeVNH1EbtkD95bDuEprmgCMptntoy20eFZkCsMxxIc9DeUSc/1S0ZIyJBYCO/PF4y+lW1EjWbwzkFX7jN2lKBTQ8aaClqXGYGjW2m1OfkSVCa7cfqCDKoUmmuA7RL2POHWJJLgwaAAAAAElFTkSuQmCC",je="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAwCAYAAABqkJjhAAAAAXNSR0IArs4c6QAAAhpJREFUaEPtmr9LHEEUxz8vd5ImIY2V2kgWTGWVv0GQwIXbykIEC00RJSn8A/wDUkS0MSkCksLqREEF/wYrK4ULNkmqNEELJVlfmL3c4a+7nb3Z9W70pt333nz2u2/eDPNWaDE0CIdAXwOvFEYF+hUet/JJ+0zgXOGXwAGwDbIp1cr3ZnHktgc6UhogKiwC0wrFtBAu9gJ/gS8UokU52vp5PdYNYA3CkqJfgacuE2fgeyLIpFQrW5djXQHW5+G8oh8RHmUwoXsI5UKQ9/KtslwP1gCOlVXd6BrYOqGBFinXlY6BTc5qVDjsgjRo9lVOpBC9MDldAw7KnxRm3L9hfhEEPkt1Y1b+l67ju64GaV+tVj1kWDQov1VYSRugE/YCcwZ4R2G8EwBp5xTYlYugbHaVwbTOHbL/YRQ+y3q7zetlzDZuFFarCfqK8G4CJsaQZ0+sXJKM9PcprO/B0jr8MTty8rAHXphE3oTJEduw0NUKfDCngeRhD7y/lpmy17FipV9OJdMC9xjYu5TwbtFZZVj+RvY5nD+L1Qw9YCuZHIx6CjuIZ+Vqr7BDWWvnzNCM3h44g40jzZnBHTiDs0SaM8MDBPYuJbxbdFZFJ38j+yqRP4vVDD1gK5kcjHoKO4hn5erlRYp3V1V+XQZ6eN0a9+L8udA2S9OrlkEM7FtTpqayR22vesX2qrHYgPapdduA9qk5fnlD78bfD/4Bah8zqvt1tfcAAAAASUVORK5CYII=";const W=()=>{};var dt=Z({name:"AlbumDetail",props:{onItemClick:{type:Function,default:W}},setup({onItemClick:_}){localStorage.setItem("behaviorId",da());const v=la(),r=oa(),l=ia({search:"",relatedNum:6,page:1,rows:200}),s=c(null),g=c([]),S=c(!1),G=Number(r.query.activityId)||0,K=c(G),w=c(!1),f=c(0),x=c(0),I=c("rgba(55, 205, 177, 0)"),T=c("#fff"),Q=async t=>{var o;if(!S.value){S.value=!0,w.value=!1;try{const i=await y.post("/music/album/detail",{prefix:d.platformType==="TEACHER"?"/api-teacher":"/api-student",data:{id:t||r.params.id,...l}}),{musicSheetList:b,...m}=i.data;g.value=[...b.rows];const h=m!=null&&m.musicTagNames?(o=m==null?void 0:m.musicTagNames)==null?void 0:o.split(","):[];s.value={...m,musicTagNames:h},f.value=m.favorite,x.value=m.albumFavoriteCount}catch{w.value=!0}S.value=!1}},k=c(!1);na(()=>{Q(),_a(document,"scroll",t=>{const{y:o}=ga();o.value>20?(I.value="rgba(255, 255, 255)",T.value="black",j({api:"backIconChange",content:{iconStyle:"black"}})):(I.value="transparent",T.value="#fff",j({api:"backIconChange",content:{iconStyle:"white"}}))}),Ma("\u4E13\u8F91")});const $=async t=>{k.value=!0;try{await y.post("/music/album/favorite/"+t,{prefix:d.platformType==="TEACHER"?"/api-teacher":"/api-student"}),f.value=f.value===1?0:1,x.value+=f.value?1:-1}catch{}k.value=!1},aa=async()=>{const t=s.value;p.orderObject.orderType="ALBUM",p.orderObject.orderName=t.albumName,p.orderObject.orderDesc=t.albumName,p.orderObject.actualPrice=t.albumPrice,p.orderObject.recomUserId=r.query.recomUserId||0,p.orderObject.activityId=r.query.activityId||0,p.orderObject.orderNo="",p.orderObject.orderList=[{orderType:"ALBUM",goodsName:t.albumName,recomUserId:r.query.recomUserId||0,price:t.albumPrice,...t}];const i=(await y.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"ALBUM",bizId:t.id}})).data;i?X.confirm({title:"\u63D0\u793A",message:"\u60A8\u6709\u4E00\u4E2A\u672A\u652F\u4ED8\u7684\u8BA2\u5355\uFF0C\u662F\u5426\u7EE7\u7EED\u652F\u4ED8\uFF1F",confirmButtonColor:"#269a93",cancelButtonText:"\u53D6\u6D88\u8BA2\u5355",confirmButtonText:"\u7EE7\u7EED\u652F\u4ED8"}).then(async()=>{p.orderObject.orderNo=i.orderNo,p.orderObject.actualPrice=i.actualPrice,p.orderObject.discountPrice=i.discountPrice,M()}).catch(()=>{X.close(),ea(i.orderNo)}):M()},M=()=>{const t=s.value;v.push({path:"/orderDetail",query:{orderType:"ALBUM",album:t.id}})},ea=async t=>{try{await y.post("/api-student/userOrder/orderCancel/v2",{data:{orderNo:t}})}catch{}},D=c(!1),N=c(""),R=c(0),ta=async()=>{const t=d.user.data.userId,o=r.params.id;let i=0;if(console.log(d.user,t),d.platformType==="TEACHER"){const b=await y.post("/api-teacher/open/vipProfit",{data:{bizId:o,userId:t}});E.value&&(i=b.data.activityId||0,R.value=b.data.discount||0)}N.value=`${location.origin}/teacher/#/shareAblum?id=${o}&recomUserId=${t}&activityId=${i}&userType=${d.platformType}&p=tenant`,D.value=!0},E=B(()=>{var o;const t=(o=s.value)==null?void 0:o.musicPaymentTypes;return t&&t.includes("VIP")}),sa=B(()=>g.value.length>2?g.value.slice(0,2):g.value);return()=>{var t,o,i,b,m,h,O,U,q,V,L,Y;return a("div",{class:e.detail},[a(Ua,{position:"top"},{default:()=>[a(pa,{background:I.value,border:!1,isFixed:!1,color:T.value,backIconColor:"white"},null)]}),a("img",{class:e.bgImg,src:(t=s.value)==null?void 0:t.albumCoverUrl},null),a("div",{class:e.musicContent},null),a("div",{class:e.bg},[a("div",{class:e.alumWrap},[a("div",{class:e.img},[a(F,{class:e.image,width:"100%",height:"100%",fit:"cover",src:(o=s.value)==null?void 0:o.albumCoverUrl},null)]),a("div",{class:e.alumDes},[a("div",{class:[e.alumTitle,"van-ellipsis"]},[(i=s.value)==null?void 0:i.albumName]),a("div",{class:[e.des,"van-multi-ellipsis--l2"],style:{height:"32px",lineHeight:"16px"}},[(b=s.value)==null?void 0:b.albumDesc]),a("div",{class:e.tags},[(h=(m=s.value)==null?void 0:m.musicTagNames)==null?void 0:h.map(u=>a("span",{class:e.tag},[u]))])])]),a("div",{class:e.alumCollect},[a("div",{class:e.alumCollectItem,onClick:ta},[a(F,{src:Aa},null),a("span",null,[n("\u5206\u4EAB")])]),a("div",{class:e.alumCollectItem,onClick:()=>v.push({path:"/music-album"})},[a("img",{src:he},null),a("span",null,[n("\u76F8\u5173\u4E13\u8F91")])]),a("div",{class:e.alumCollectItem,onClick:()=>{var u;return $((u=s.value)==null?void 0:u.id)}},[a("img",{src:f.value?va:ba},null),a("span",null,[x.value])])]),((O=s.value)==null?void 0:O.paymentType)==="CHARGE"&&((U=s.value)==null?void 0:U.orderStatus)!=="PAID"&&a("div",{class:e.albumTips},[a("span",null,[n("\u5F00\u901A\u4F1A\u5458\u6216\u8D2D\u4E70\u4E13\u8F91\uFF0C\u5373\u53EF\u81EA\u7531\u7EC3\u4E60\u8BE5\u4E13\u8F91")]),a("span",{class:e.albumPrice},[n("\xA5"),ua((q=s.value)==null?void 0:q.albumPrice)])])]),a("div",{class:e.alumnContainer},[a("div",{class:e.alumnList},[a("div",{class:e.alumnTitle},[a("img",{src:je,class:e.iconMenu},null),n("\u66F2\u76EE\u5217\u8868")," ",a("span",null,[n("("),((V=s.value)==null?void 0:V.musicSheetCount)||0,n(")")])]),a(ka,{showNumber:!0,list:g.value,onDetail:u=>{if(_===W||!_){const C=location.origin+location.pathname+"#/music-detail?id="+u.id+"&albumId="+r.params.id;ca(C,()=>{v.push({path:"/music-detail",query:{id:u.id,albumId:r.params.id}})})}else _(u)}},null),g.value&&g.value.length<=0&&a(ra,{btnStatus:!1,tips:"\u6682\u65E0\u66F2\u76EE"},null)])]),((L=s.value)==null?void 0:L.paymentType)==="CHARGE"&&((Y=s.value)==null?void 0:Y.orderStatus)!=="PAID"&&a(Na,{position:"bottom",background:"white"},{default:()=>[a("div",{class:["btnGroup",E.value&&!d.user.data.isVip&&"btnMore"],style:{paddingTop:"12px"}},[a(z,{block:!0,round:!0,type:"primary",style:{fontSize:"16px"},onClick:aa,color:"linear-gradient(270deg, #FF204B 0%, #FE5B71 100%)"},{default:()=>[n("\u8D2D\u4E70\u4E13\u8F91")]}),E.value&&!d.user.data.isVip&&a(z,{block:!0,round:!0,type:"primary",style:{fontSize:"16px"},color:"linear-gradient(270deg, #FF204B 0%, #FE5B71 100%)",onClick:()=>{v.push({path:"/memberCenter",query:{...r.query}})}},{default:()=>[K.value>0&&a("div",{class:[e.buttonDiscount]},[n("\u4E13\u5C5E\u4F18\u60E0")]),n("\u5F00\u901A\u4F1A\u5458")]})])]}),a(ma,{show:D.value,"onUpdate:show":u=>D.value=u,style:{background:"transparent"},class:e.albumShare},{default:()=>[a(Ra,{type:"tenant",teacherId:d.user.data.userId,shareUrl:N.value,shareType:"album",shareLength:1},{default:()=>{var u,C,J,P;return[a("div",{class:e.shareVip},[R.value===1&&a("div",{class:e.tagDiscount},[n("\u4E13\u5C5E\u4F18\u60E0")]),a("img",{class:e.icon,crossorigin:"anonymous",src:((u=s.value)==null?void 0:u.albumCoverUrl)+`@base@tag=imgScale&h=144&w=144&m=1?t=${+new Date}`},null),a("div",{class:e.info},[a("h4",{class:"van-multi-ellipsis--l2"},[(C=s.value)==null?void 0:C.albumName]),a("p",{class:["van-multi-ellipsis--l3"],style:{lineHeight:"16px",margin:"5px 0 10px 0"}},[(J=s.value)==null?void 0:J.albumDesc]),a("div",{class:e.shareAlumCollect},[a("img",{src:Xe},null),a("span",null,[n("\u5171"),a("span",{style:"color: var(--van-primary-color);"},[(P=s.value)==null?void 0:P.musicSheetCount]),n("\u9996\u66F2\u76EE")])])])]),a("div",{class:[e.shareVip,e.shareMusicList]},[a(ze,{list:sa.value},null)])]}})]})])}}});export{dt as default};