1 |
- import{d as h,O as b,o as m,a as g,g as s,L as u,f as A}from"./index-e826bad6.js";const y="_download_1muwj_1",_="_center_1muwj_8",C="_btn_1muwj_15",U="_wxpopup_1muwj_21",i={download:y,center:_,btn:C,wxpopup:U},B=""+new URL("center-d0317ec4.png",import.meta.url).href,F=""+new URL("btn-bg-57116e79.png",import.meta.url).href,S=""+new URL("wx_bg-214fe502.png",import.meta.url).href,T=typeof atob=="function",l=typeof Buffer=="function",c=typeof TextDecoder=="function"?new TextDecoder:void 0;typeof TextEncoder=="function"&&new TextEncoder;const D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",v=Array.prototype.slice.call(D),d=(t=>{let e={};return t.forEach((o,n)=>e[o]=n),e})(v),E=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,r=String.fromCharCode.bind(String),p=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),x=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),L=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,P=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),o=e-65536;return r((o>>>10)+55296)+r((o&1023)+56320);case 3:return r((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return r((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},j=t=>t.replace(L,P),z=t=>{if(t=t.replace(/\s+/g,""),!E.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,o="",n,f;for(let a=0;a<t.length;)e=d[t.charAt(a++)]<<18|d[t.charAt(a++)]<<12|(n=d[t.charAt(a++)])<<6|(f=d[t.charAt(a++)]),o+=n===64?r(e>>16&255):f===64?r(e>>16&255,e>>8&255):r(e>>16&255,e>>8&255,e&255);return o},w=T?t=>atob(x(t)):l?t=>Buffer.from(t,"base64").toString("binary"):z,R=l?t=>p(Buffer.from(t,"base64")):t=>p(w(t).split("").map(e=>e.charCodeAt(0))),Z=l?t=>Buffer.from(t,"base64").toString("utf8"):c?t=>c.decode(R(t)):t=>j(w(t)),k=t=>x(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),I=t=>Z(k(t)),q=h({name:"download-page",setup(){const t=b({wxStatus:!1,type:"student",androidUrl:"",buttonText:"下载学校端"}),e=()=>{if(u().weixin){t.wxStatus=!0;return}let o="",n="";location.origin.indexOf("manonline")>-1?(o="https://itunes.apple.com/cn/app/id6449429354",n=t.androidUrl):(o="https://www.pgyer.com/gnTDCk",n=t.androidUrl),u().ios||/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?o&&(window.location.href=o):/(Android)/i.test(navigator.userAgent)?window.location.href=n:A("请用手机或移动设备打开")};return m(async()=>{try{const{data:o}=await g.get("/api-web/open/appVersionInfo/queryLatestByPlatform",{params:{platform:"android-education",status:"history"}});t.androidUrl=I(o.downloadUrl)}catch(o){}}),()=>s("div",{class:i.download},[s("img",{src:B,class:i.center},null),s("img",{src:F,class:i.btn,onClick:e},null),t.wxStatus&&s("div",{class:i.wxpopup,onClick:()=>{t.wxStatus=!1}},[s("img",{src:S,alt:""},null)])])}});export{q as default};
|