import{d as i,x as d,y as l,D as u,a as o,C as p,R as n,E as c}from"./index-521a9826.js";import{s as w,a as s,w as f}from"./student-center-0b9ea657.js";import{I as m}from"./index-25b5c9d0.js";const y=i({name:"download",setup(){const a=d({wxStatus:!1,androidUrl:""}),r=()=>{if(n().weixin){a.wxStatus=!0;return}let t="",e="";location.origin.indexOf("kt.colexiu.com")>-1?(t="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=a.androidUrl):(t="https://www.pgyer.com/dzRRNN",e=a.androidUrl),n().ios||/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?t&&(window.location.href=t):/(Android)/i.test(navigator.userAgent)?window.location.href=e:c("请用手机或移动设备打开")};return l(async()=>{try{const{data:t}=await u.get("/edu-app/open/appVersionInfo/queryLatestByPlatform",{params:{platform:"android-kt",status:"history"}});a.androidUrl=t.downloadUrl}catch(t){}}),()=>o("div",{class:[s.downloadContainer]},[o(m,{src:w},null),o("div",{class:s.buttonGroup},[o(p,{round:!0,size:"large",class:s.btn,onClick:r},null)]),a.wxStatus&&o("div",{class:s.wxpopup,onClick:()=>{a.wxStatus=!1}},[o("img",{src:f,alt:""},null)])])}});export{y as default};