import{d as E,m as x,b9 as S,o as m,f,c as s,B as T}from"./index.28bb778f.js";import{s as U,t as v,m as b,a as n}from"./manage-center.3e62a754.js";import{w as P}from"./wx_bg.3aff1fb2.js";import{I as l}from"./index.7e0a75cb.js";var M=E({name:"download-transfer",data(){return{wxStatus:!1,type:"student",androidUrl:"",buttonText:"\u4E0B\u8F7D\u7BA1\u4E50\u56E2\u5B66\u5458\u7AEF"}},async mounted(){const{pn:t,url:e,action:d,pageTag:g,...y}=this.$route.query,{origin:w,pathname:A}=location;let a=A,i="BandMusicTeam://linkUrl=",r="orchestrastudent://html:8888/SplashActivity?url=",o="android-student";t==="s"?(this.type="student",this.buttonText="\u4E0B\u8F7D\u7BA1\u4E50\u56E2\u5B66\u5458\u7AEF",a="/orchestra-student/",i="BandMusicTeam://linkUrl=",r="orchestrastudent://html:8888/SplashActivity?url=",o="android-student"):t==="t"?(this.type="teacher",this.buttonText="\u4E0B\u8F7D\u7BA1\u4E50\u56E2\u4F34\u5B66\u7AEF",a="/orchestra-teacher/",i="BandMusicTeamTeacher://linkUrl=",r="orchestrateacher://html:8888/SplashActivity?url=",o="android-student"):t==="m"&&(this.type="manage",this.buttonText="\u4E0B\u8F7D\u7BA1\u4E50\u56E2\u7BA1\u7406\u7AEF",a="/orchestra-school/",i="BandMusicTeamManager://linkUrl=",r="orchestramanager://html:8888/SplashActivity?url=",o="android-school");try{const{data:B}=await x.get("/api-student/open/appVersionInfo/queryLatestByPlatform",{params:{platform:o,status:"history"}});this.androidUrl=B.downloadUrl}catch{}document.title=this.buttonText;let h=w+a+"#/";if(!e&&!d)return;const c=S.stringify({...y});h+=e+(c?"?"+c:"");const p={url:h,action:d||"h5",pageTag:g||1},u=encodeURIComponent(JSON.stringify(p));console.log(p,"iosStr"),/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href=i+u:/(Android)/i.test(navigator.userAgent)?window.location.href=r+u:m("\u8BF7\u7528\u624B\u673A\u6216\u79FB\u52A8\u8BBE\u5907\u6253\u5F00")},methods:{onDownload(){if(f().weixin){this.wxStatus=!0;return}let t="",e="";location.origin.indexOf("online.lexiaoya.cn")>-1?this.type==="student"?(t="https://apps.apple.com/cn/app/%E7%AE%A1%E4%B9%90%E5%9B%A2/id1671474346?uo=4 ",e=this.androidUrl):this.type==="teacher"?(t="https://apps.apple.com/cn/app/%E7%AE%A1%E4%B9%90%E5%9B%A2%E4%BC%B4%E5%AD%A6%E7%AB%AF/id1670584741?uo=4",e=this.androidUrl):this.type==="manage"&&(t="https://apps.apple.com/cn/app/%E7%AE%A1%E4%B9%90%E5%9B%A2%E7%AE%A1%E7%90%86%E7%AB%AF/id1671473981?uo=4",e=this.androidUrl):this.type==="student"?(t="https://www.pgyer.com/2Wg2",e=this.androidUrl):this.type==="teacher"?(t="https://www.pgyer.com/v5yB",e=this.androidUrl):this.type==="manage"&&(t="https://www.pgyer.com/DGrR",e=this.androidUrl),f().ios||/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?t&&(window.location.href=t):/(Android)/i.test(navigator.userAgent)?window.location.href=e:m("\u8BF7\u7528\u624B\u673A\u6216\u79FB\u52A8\u8BBE\u5907\u6253\u5F00")}},render(){return s("div",{class:[n.downloadContainer]},[this.type!=="teacher"&&this.type!=="manage"&&s(l,{src:U},null),this.type==="teacher"&&s(l,{src:v},null),this.type==="manage"&&s(l,{src:b},null),s("div",{class:n.buttonGroup},[s(T,{round:!0,size:"large",color:"#FF8057",class:n.btn,onClick:this.onDownload},{default:()=>[this.buttonText]})]),this.wxStatus&&s("div",{class:n.wxpopup,onClick:()=>{this.wxStatus=!1}},[s("img",{src:P,alt:""},null)])])}});export{M as default};
