import{d as i,x as l,y as d,D as u,a,C as p,V as n}from"./index-7945cc5d.js";import{s,a as c}from"./student-center-578bf3d8.js";import{w}from"./wx_bg-bebd65d8.js";import{I as m}from"./index-610eeac6.js";const h=i({name:"download",setup(){const t=l({wxStatus:!1,androidUrl:""}),r=()=>{if(n().weixin){t.wxStatus=!0;return}let o="",e="";location.origin.indexOf("kt.colexiu.com")>-1?(o="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",e=t.androidUrl):(o="https://www.pgyer.com/dzRRNN",e=t.androidUrl),n().ios||/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?o&&(window.location.href=o):window.location.href=e};return d(async()=>{try{const{data:o}=await u.get("/edu-app/open/appVersionInfo/queryLatestByPlatform",{params:{platform:"android-kt",status:"history"}});t.androidUrl=o.downloadUrl}catch(o){}}),()=>a("div",{class:[s.downloadContainer]},[a(m,{class:s.downImg,src:c},null),a("div",{class:s.buttonGroup},[a(p,{round:!0,size:"large",class:s.btn,onClick:r},null)]),t.wxStatus&&a("div",{class:s.wxpopup,onClick:()=>{t.wxStatus=!1}},[a("img",{src:w,alt:""},null)])])}});export{h as default};
