12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
-
- </template>
- <script>
- export default {
- name: "downloadAPP",
- data(){
- return{
- version:{
- trident: '',
- presto: '',
- webKit: '',
- gecko: '',
- mobile: '',
- ios: '',
- android: '',
- iPhone: '',
- iPad: '',
- webApp: '',
- }
- }
- },
- mounted() {
- this.getVersion()
- },
- methods:{
- getVersion(){
- var u = navigator.userAgent, app = navigator.appVersion;
- this.version.trident = u.indexOf('Trident') > -1; //IE内核;
- this.version.trident= u.indexOf('Trident') > -1; //IE内核
- this.version.presto= u.indexOf('Presto') > -1; //opera内核
- this.version.webKit= u.indexOf('AppleWebKit') > -1; //苹果、谷歌内核
- this.version.gecko= u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1; //火狐内核
- this.version.mobile= !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/); //是否为移动终端
- this.version.ios= !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
- this.version.android= u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
- this.version.iPhone= u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1; //是否为iPhone或者QQHD浏览器
- this.version.iPad= u.indexOf('iPad') > -1; //是否iPad
- this.version.webApp= u.indexOf('Safari') == -1; //是否web应该程序,没有头部与底部
- console.log('11111111111111111111111111111')
- if (this.version.ios || this.version.iPhone || this.version.iPad) {
- window.location = "http://d.firim.top/yg58";
- } else if (this.version.android) {
- window.location = "https://www.geidcp.com/api/file/pub/app/apk/__UNI__3E540D1_1127140956.apk";
- }
- },
-
- }
- }
- </script>
- <style scoped>
- </style>
|