import{d as y,D as x,Y as S,V as s,N as A,a as o,C as P}from"./index-7945cc5d.js";import{a as B,s as e}from"./student-center-578bf3d8.js";import{w as b}from"./wx_bg-bebd65d8.js";import{I as v}from"./index-610eeac6.js";const C=y({name:"download-transfer",data(){return{wxStatus:!1,androidUrl:""}},async mounted(){try{const{data:n}=await x.get("/edu-app/open/appVersionInfo/queryLatestByPlatform",{params:{platform:"android-kt",status:"history"}});this.androidUrl=n.downloadUrl}catch(n){console.log(n)}const{pn:a,url:t,action:r,pageTag:c,...p}=this.$route.query,{origin:f,pathname:m}=location,w=m,h="BandInstrumentTeam://linkUrl=",g="colexiukt://html:8888/SplashActivity?url=";let i=f+w+"#/";if(!t&&!r)return;const l=S.stringify({...p});i+=t+(l?"?"+l:"");const d={url:i,action:r||"h5",pageTag:c||1},u=encodeURIComponent(JSON.stringify(d));console.log(d,"iosStr"),/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href=h+u:s().huawei||/(Android)/i.test(navigator.userAgent)?window.location.href=g+u:A("请用手机或移动设备打开")},methods:{onDownload(){if(s().weixin){this.wxStatus=!0;return}let a="",t="";location.origin.indexOf("kt.colexiu.com")>-1?(a="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):(a="https://www.pgyer.com/dzRRNN",t=this.androidUrl),s().ios||/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?a&&(window.location.href=a):window.location.href=t}},render(){return o("div",{class:[e.downloadContainer,s().isTablet?e.creationTablet:""]},[o(v,{src:B},null),o("div",{class:e.buttonGroup},[o(P,{round:!0,size:"large",class:e.btn,onClick:this.onDownload},null)]),this.wxStatus&&o("div",{class:e.wxpopup,onClick:()=>{this.wxStatus=!1}},[o("img",{src:b,alt:""},null)])])}});export{C as default};
