import{_ as n,a as r,b as l,c as d,d as p,s as a}from"./index.module.8a406a30.js";import{_ as u}from"./wx_bg.2f1a3efe.js";import{d as g,x as c,f as i,j as e,B as m,z as h}from"./index.3bfa6a0e.js";const o=t=>{const s=`./images/${t}`;return{"./images/bg.png":n,"./images/logo.png":r,"./images/student_bg.png":l,"./images/teacher_bg.png":d,"./images/teacher_logo.png":p,"./images/wx_bg.png":u}[s].default};var b=g({name:"download",data(){return{type:this.$route.query.type||"student",androidUrl:"",wxStatus:!1}},async mounted(){let t="android-student";this.type==="student"?(t="android-student",document.title="\u9177\u4E50\u79C0\u4E0B\u8F7D"):this.type==="teacher"&&(t="android-teacher",document.title="\u9177\u4E50\u79C0\u5B66\u9662\u4E0B\u8F7D");try{const{data:s}=await c.get("/api-student/open/appVersionInfo/queryLatestByPlatform",{params:{platform:t,status:"history"}});this.androidUrl=s.downloadUrl}catch{}},methods:{downLoadApp(){if(i().weixin){this.wxStatus=!0;return}let t="",s="";location.origin.indexOf("online.colexiu.com")>-1?this.type==="student"?(t="https://itunes.apple.com/cn/app/id1626971695?mt=8",s=this.androidUrl):this.type==="teacher"&&(t="https://itunes.apple.com/cn/app/id1626971149?mt=8",s=this.androidUrl):this.type==="student"?(t="https://www.pgyer.com/powy",s=this.androidUrl):(t="https://www.pgyer.com/iO0m",s=this.androidUrl),i().ios||/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href=t:window.location.href=s}},render(){return e("div",{class:a.downContainer},[e("div",{class:a.logo},[this.type==="student"?e("img",{src:o("logo.png"),alt:""},null):e("img",{src:o("teacher_logo.png"),alt:""},null)]),e("div",{class:a.down},[e(m,{type:"primary",round:!0,plain:!0,onClick:this.downLoadApp},{default:()=>[h("\u70B9\u51FB\u4E0B\u8F7DApp")]})]),e("div",{class:a.mainImg},[this.type==="student"?e("img",{src:o("student_bg.png"),alt:""},null):e("img",{src:o("teacher_bg.png"),alt:""},null)]),this.wxStatus&&e("div",{class:a.wxpopup,onClick:()=>{this.wxStatus=!1}},[e("img",{src:o("wx_bg.png"),alt:""},null)])])}});export{b as default,o as getAssetsHomeFile};
