parent
3861b0a84f
commit
cad199394b
@ -0,0 +1,3 @@ |
||||
window.g = { |
||||
baseUrl: 'https://fly.harmonygames.cn', |
||||
}; |
@ -0,0 +1,18 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> |
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
||||
<script src="<%= BASE_URL %>config.js"></script> |
||||
<title>App下载</title> |
||||
</head> |
||||
<body> |
||||
<noscript> |
||||
<strong>We're sorry but fly doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> |
||||
</noscript> |
||||
<div id="download"></div> |
||||
<!-- built files will be auto injected --> |
||||
</body> |
||||
</html> |
@ -0,0 +1,75 @@ |
||||
<template> |
||||
<div id="download" ref="download"> |
||||
<router-view></router-view> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
export default { |
||||
name: 'download', |
||||
data() { |
||||
return {} |
||||
}, |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
body { |
||||
background-color: rgba(0, 166, 224, 0.18) |
||||
} |
||||
|
||||
@font-face { |
||||
font-family: "iconfont"; |
||||
src: url('./assets/icon/iconfont.eot?t=1583637102320'); /* IE9 */ |
||||
src: url('./assets/icon/iconfont.eot?t=1583637102320#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAnUAAsAAAAAEXwAAAmIAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEIAqUYJBKATYCJAMoCxYABCAFhG0HdhuGDlGUL1aT7CuMW3giIDU2lBZVYzMmA6BYbBoB4AIAvsWyNCR1ZYRAPDyt/e/cmdn1b4KYdG+eSCaJRMWjWPVE6ZTyQkZL4P/W2j938EFdZvf2bG4F1UgXqyQeKfBIqpGQb4i2eQ/W/4P6Ek9oYw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czVOuLHD+8pR7Q4ItaA4rCDaqSE1PLB/c/6xOQwt8fF5DmMMYhIFW6P8A/ZWWSDlR+AvKkAZJcuA2ThltOqtHilt0hhX74CCiuz12fJrwJOm/kar23PmgzaH21LlvtP7SQMKjJ4X3Ge4emTB16l/FuniAh5KR716vKe+sOOlsSWpJUK/6+4R1UkQDelaH4e4fnCqZB8Dwv3HAbkMo7II0h+zH2kPQAT7diZzA60R6o3IB2E8hUwxCdENuicNkw3pQ1YR3AhGA9UOqmhVWC7/HngiboCBZbg4KDzga9uu/nfkayyrXNtb5N0LO3U5vStQ1TJl+Jq2M/00nrlp1baILFTn7eSQjGzoIaSRi7V5FYhGUuwcaARMOYt59wXsE8J7+YWJonyFWLkc/AlG4gigJdJjGTQJ1iCbNXk56FOQWmJZOoT+UzxdQWBqaOatItGSBI3E3MxD40KfmrXQpS5vyRCZc+X53Qn98Zz0aZ+yj0f0oB601pJcIT/LFKmMNKINMsffEGFomXauqjNqtKllBO4+/UP+993doltuQfXLtU0pPGBnrW2o4u+P30yuA4vdY6Qe/t07D9YAFHIkqHvfYUeph1RU+m/aBns24EEAD/Rq8s+xcelTUkEMB7JTjY42BnMOokDk8JeBZNLyFmhvio0Caos9puTM95priqjCj9mOOZGMpKz2zmGrAPc+tYh5+nswWBQhRHvKheOR72eAjyc8SFZ4R0pyD4izMyqL5102eIF9TO4GBThIR9FjJtiZ8xg/ChkAXq1tt3w2hzPKZwI736/P0wDo+ZPZIlXSYD3aD2sXrdF5A3j5ZNUJ0UFHXkEF5IverEPDJNIP7+xVywGYJ0ziWSfsUy1NEorjp9+1rvrS37se5DXLePFDlKVFFHE2100cegueWb5QgzqyRdljFPtoQhvCSjo0cKVVaMkK2o4rlyAAA=') format('woff2'), |
||||
url('./assets/icon/iconfont.woff?t=1583637102320') format('woff'), |
||||
url('./assets/icon/iconfont.ttf?t=1583637102320') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('./assets/icon/iconfont.svg?t=1583637102320#iconfont') format('svg'); /* iOS 4.1- */ |
||||
} |
||||
|
||||
.iconfont { |
||||
font-family: "iconfont" !important; |
||||
font-size: 16px; |
||||
font-style: normal; |
||||
-webkit-font-smoothing: antialiased; |
||||
-moz-osx-font-smoothing: grayscale; |
||||
} |
||||
|
||||
.icon-android:before { |
||||
content: "\e61d"; |
||||
} |
||||
|
||||
.icon-android1:before { |
||||
content: "\e616"; |
||||
} |
||||
|
||||
.icon-android2:before { |
||||
content: "\e62a"; |
||||
} |
||||
|
||||
.icon-ios:before { |
||||
content: "\e60c"; |
||||
} |
||||
|
||||
.icon-IOS:before { |
||||
content: "\e68c"; |
||||
} |
||||
|
||||
.icon-ios1:before { |
||||
content: "\e601"; |
||||
} |
||||
|
||||
.icon-ios2:before { |
||||
content: "\e64b"; |
||||
} |
||||
|
||||
.icon-Android:before { |
||||
content: "\e6d4"; |
||||
} |
||||
|
||||
.icon-android3:before { |
||||
content: "\e625"; |
||||
} |
||||
|
||||
|
||||
</style> |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,31 @@ |
||||
import Vue from 'vue' |
||||
import Download from "@/Download"; |
||||
import router from "@/router/download"; |
||||
|
||||
import 'element-ui/lib/theme-chalk/index.css' |
||||
import { |
||||
Button, |
||||
Input, |
||||
Container, |
||||
Main, |
||||
Message, |
||||
Link, |
||||
Divider |
||||
|
||||
} from "element-ui"; |
||||
|
||||
Vue.use(Link); |
||||
Vue.use(Input); |
||||
Vue.use(Button); |
||||
Vue.use(Container); |
||||
Vue.use(Main); |
||||
Vue.use(Divider); |
||||
Vue.prototype.$message = Message; |
||||
|
||||
|
||||
Vue.config.productionTip = false; |
||||
|
||||
new Vue({ |
||||
render: h => h(Download), |
||||
router, |
||||
}).$mount('#download'); |
@ -0,0 +1,115 @@ |
||||
import Axios from 'axios' |
||||
// const https = require('https');
|
||||
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; |
||||
Axios.defaults.withCredentials = true; |
||||
// Axios.defaults.httpsAgent = new https.Agent({
|
||||
// keepAlive: true
|
||||
// });
|
||||
|
||||
// const DOMAIN = 'https://fly.harmonygames.cn';
|
||||
const DOMAIN = window.g.baseUrl; |
||||
const APIPATH = '/api/v1/fir/server'; |
||||
let USERSEVER = DOMAIN + APIPATH; |
||||
|
||||
|
||||
function getData(url, params = {}, callBack) { |
||||
|
||||
|
||||
var uri = ''; |
||||
var keys = Object.keys(params); |
||||
var values = Object.values(params); |
||||
for (var i = 0; i < keys.length; i++) { |
||||
var key = keys[i]; |
||||
var value = values[i]; |
||||
uri = uri + key + "=" + value; |
||||
if (i < keys.length - 1) { |
||||
uri = uri + "&" |
||||
} |
||||
} |
||||
if (uri !== "") { |
||||
uri = "?" + uri |
||||
} |
||||
url = url + uri; |
||||
Axios |
||||
.get(url, params) |
||||
.then(function (response) { |
||||
callBack(response.data); |
||||
let x = ''; |
||||
if (x !== '') { |
||||
alert(x) |
||||
} |
||||
}) |
||||
.catch(function (error) { |
||||
|
||||
if (error && error.response) { |
||||
switch (error.response.status) { |
||||
case 400: |
||||
error.message = '请求错误(400)'; |
||||
break; |
||||
case 401: |
||||
error.message = '未授权,请重新登录(401)'; |
||||
break; |
||||
case 403: |
||||
error.message = '拒绝访问(403)'; |
||||
break; |
||||
case 404: |
||||
error.message = '请求出错(404)'; |
||||
break; |
||||
case 408: |
||||
error.message = '请求超时(408)'; |
||||
break; |
||||
case 500: |
||||
error.message = '服务器错误(500)'; |
||||
break; |
||||
case 501: |
||||
error.message = '服务未实现(501)'; |
||||
break; |
||||
case 502: |
||||
error.message = '网络错误(502)'; |
||||
break; |
||||
case 503: |
||||
error.message = '服务不可用(503)'; |
||||
break; |
||||
case 504: |
||||
error.message = '网络超时(504)'; |
||||
break; |
||||
case 505: |
||||
error.message = 'HTTP版本不受支持(505)'; |
||||
break; |
||||
default: |
||||
error.message = `连接出错(${error.response.status})!`; |
||||
} |
||||
} else { |
||||
error.message = '连接服务器失败!'; |
||||
} |
||||
if (error.message === 'Network Error') { |
||||
alert('网络连接失败') |
||||
} |
||||
|
||||
callBack({"code": -1}); |
||||
}); |
||||
} |
||||
|
||||
|
||||
/**根据短链接获取应用信息 */ |
||||
export function getShortAppinfo(callBack, params) { |
||||
getData( |
||||
USERSEVER + '/short/' + params.short, |
||||
params, |
||||
data => { |
||||
callBack(data); |
||||
}, |
||||
); |
||||
} |
||||
|
||||
|
||||
/**获取下载的url */ |
||||
export function getdownloadurl(callBack, params) { |
||||
getData( |
||||
USERSEVER + '/install/' + params.app_id, |
||||
params.data, |
||||
data => { |
||||
callBack(data); |
||||
}, |
||||
); |
||||
} |
@ -0,0 +1,26 @@ |
||||
import Vue from 'vue' |
||||
//1.先导入
|
||||
import VueRouter from 'vue-router' |
||||
//2.一定先use 一下
|
||||
Vue.use(VueRouter); |
||||
|
||||
// 解决push 同一个路由的错误
|
||||
const originalPush = VueRouter.prototype.push; |
||||
VueRouter.prototype.push = function push(location) { |
||||
return originalPush.call(this, location).catch(err => err) |
||||
}; |
||||
|
||||
// import FirDownload from "@/components/FirDownload";
|
||||
const router = new VueRouter({ |
||||
mode: 'history', |
||||
routes: [ |
||||
{ |
||||
path: '/:short', |
||||
name: 'FirDownload', |
||||
// component: () => import("@/components/ShortDownload")
|
||||
component: ()=>import("@/components/FirDownload") |
||||
} |
||||
] |
||||
}); |
||||
|
||||
export default router; |
@ -0,0 +1,26 @@ |
||||
import Vue from 'vue' |
||||
//1.先导入
|
||||
import VueRouter from 'vue-router' |
||||
//2.一定先use 一下
|
||||
Vue.use(VueRouter); |
||||
|
||||
// 解决push 同一个路由的错误
|
||||
const originalPush = VueRouter.prototype.push; |
||||
VueRouter.prototype.push = function push(location) { |
||||
return originalPush.call(this, location).catch(err => err) |
||||
}; |
||||
|
||||
// import FirDownload from "@/components/FirDownload";
|
||||
const router = new VueRouter({ |
||||
mode: 'history', |
||||
routes: [ |
||||
{ |
||||
path: '/:short', |
||||
name: 'FirDownload', |
||||
component: ()=>import("@/components/ShortDownload") |
||||
// component: () => import("@/components/FirDownload")
|
||||
} |
||||
] |
||||
}); |
||||
|
||||
export default router; |
@ -0,0 +1,11 @@ |
||||
import Vue from 'vue' |
||||
import Download from "@/Download"; |
||||
import router from "@/router/short"; |
||||
|
||||
|
||||
Vue.config.productionTip = false; |
||||
|
||||
new Vue({ |
||||
render: h => h(Download), |
||||
router, |
||||
}).$mount('#download'); |
Loading…
Reference in new issue