transfer-e380a8fe.js 1.8 KB

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