import{d as A,D as x,W as S,E as u,R as c,a as o,C as P}from"./index-0890a9ad.js";import{s as v,a as s,w as B}from"./student-center-0b9ea657.js";import{I as E}from"./index-cacec5b3.js";const C=A({name:"download-transfer",data(){return{wxStatus:!1,androidUrl:""}},async mounted(){try{const{data:a}=await x.get("/edu-app/open/appVersionInfo/queryLatestByPlatform",{params:{platform:"android-kt",status:"history"}});this.androidUrl=a.downloadUrl}catch(a){console.log(a)}const{pn:e,url:t,action:n,pageTag:p,...f}=this.$route.query,{origin:m,pathname:w}=location,g=w,h="BandInstrumentTeam://linkUrl=",y="colexiukt://html:8888/SplashActivity?url=";let r=m+g+"#/";if(!t&&!n)return;const i=S.stringify({...f});r+=t+(i?"?"+i:"");const l={url:r,action:n||"h5",pageTag:p||1},d=encodeURIComponent(JSON.stringify(l));console.log(l,"iosStr"),/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href=h+d:/(Android)/i.test(navigator.userAgent)?window.location.href=y+d:u("请用手机或移动设备打开")},methods:{onDownload(){if(c().weixin){this.wxStatus=!0;return}let e="",t="";location.origin.indexOf("kt.colexiu.com")>-1?(e="https://apps.apple.com/us/app/%E9%9F%B3%E4%B9%90%E6%95%B0%E5%AD%97%E8%AF%BE%E5%A0%82/id6452725878",t=this.androidUrl):(e="https://www.pgyer.com/dzRRNN",t=this.androidUrl),c().ios||/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?e&&(window.location.href=e):/(Android)/i.test(navigator.userAgent)?window.location.href=t:u("请用手机或移动设备打开")}},render(){return o("div",{class:[s.downloadContainer]},[o(E,{src:v},null),o("div",{class:s.buttonGroup},[o(P,{round:!0,size:"large",class:s.btn,onClick:this.onDownload},null)]),this.wxStatus&&o("div",{class:s.wxpopup,onClick:()=>{this.wxStatus=!1}},[o("img",{src:B,alt:""},null)])])}});export{C as default};
