Commit 6c52ce48 authored by coolfish's avatar coolfish

获取下载地址

parent 8050bcce
FROM nginx
COPY ./dist /tmp/dist
COPY ./nginx.conf /tmp/
RUN cp -r /tmp/dist/* /usr/share/nginx/html/ \
&& rm -f /etc/nginx/nginx.conf \
&& cp /tmp/nginx.conf /etc/nginx/
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
...@@ -24,7 +24,8 @@ module.exports = { ...@@ -24,7 +24,8 @@ module.exports = {
'vue$': 'vue/dist/vue.esm.js', 'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'), '@': resolve('src'),
'components': resolve('src/components'), 'components': resolve('src/components'),
'static': resolve('src/static') 'static': resolve('src/static'),
'api': resolve('src/api')
} }
}, },
module: { module: {
......
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}
\ No newline at end of file
...@@ -187,6 +187,11 @@ ...@@ -187,6 +187,11 @@
"integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=", "integrity": "sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=",
"dev": true "dev": true
}, },
"axios": {
"version": "0.16.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz",
"integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0="
},
"babel-code-frame": { "babel-code-frame": {
"version": "6.22.0", "version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz",
...@@ -1184,8 +1189,7 @@ ...@@ -1184,8 +1189,7 @@
"debug": { "debug": {
"version": "2.6.8", "version": "2.6.8",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw="
"dev": true
}, },
"decamelize": { "decamelize": {
"version": "1.2.0", "version": "1.2.0",
...@@ -1754,6 +1758,11 @@ ...@@ -1754,6 +1758,11 @@
"integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=",
"dev": true "dev": true
}, },
"follow-redirects": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.2.4.tgz",
"integrity": "sha512-Suw6KewLV2hReSyEOeql+UUkBVyiBm3ok1VPrVFRZnQInWpdoZbbiG5i8aJVSjTr0yQ4Ava0Sh6/joCg1Brdqw=="
},
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
...@@ -2814,8 +2823,7 @@ ...@@ -2814,8 +2823,7 @@
"is-buffer": { "is-buffer": {
"version": "1.1.5", "version": "1.1.5",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
"integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw="
"dev": true
}, },
"is-builtin-module": { "is-builtin-module": {
"version": "1.0.0", "version": "1.0.0",
...@@ -3268,8 +3276,7 @@ ...@@ -3268,8 +3276,7 @@
"ms": { "ms": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"dev": true
}, },
"mute-stream": { "mute-stream": {
"version": "0.0.5", "version": "0.0.5",
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"lint": "eslint --ext .js,.vue src" "lint": "eslint --ext .js,.vue src"
}, },
"dependencies": { "dependencies": {
"axios": "^0.16.2",
"babel-runtime": "^6.23.0", "babel-runtime": "^6.23.0",
"fastclick": "^1.0.6", "fastclick": "^1.0.6",
"vue": "^2.3.3", "vue": "^2.3.3",
......
import axios from 'axios'
const downloadUrl = {
mac: 'http://update-fengchao.apps.xiaoyun.com/release/latest-mac.json',
windows: 'http://update-fengchao.apps.xiaoyun.com/release/latest.yml'
}
export function getMacDownloadUrl () {
return axios.get(downloadUrl.mac).then((res) => {
return Promise.resolve(res.data)
})
}
export function getWindowsDownloadUrl () {
return axios.get(downloadUrl.windows).then((res) => {
return Promise.resolve(res.data)
})
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="cover"> <div class="cover">
<div class="title">整合内容资源,提升广告主的品牌曝光能力</div> <div class="title">整合内容资源,提升广告主的品牌曝光能力</div>
<div class="btns"> <div class="btns">
<a class="application">申请试用</a> <a class="application" href="http://hfads.apps.xiaoyun.com/">申请试用</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -7,9 +7,13 @@ ...@@ -7,9 +7,13 @@
<p>帮助自媒体高效的进行跨平台的内容分发及管理</p> <p>帮助自媒体高效的进行跨平台的内容分发及管理</p>
</div> </div>
<div class="btns"> <div class="btns">
<a class="mac"> <a v-if="!macDownloadUrl" class="mac prohibit">
Mac版下载 Mac版下载
</a><a class="windows"> </a><a v-else class="mac" :href="macDownloadUrl">
Mac版下载
</a><a v-if="!windowsDownloadUrl" class="windows prohibit">
Windows版下载
</a><a v-else class="windows" :href="windowsDownloadUrl">
Windows版下载 Windows版下载
</a> </a>
</div> </div>
...@@ -17,7 +21,42 @@ ...@@ -17,7 +21,42 @@
</div> </div>
</template> </template>
<script> <script type="text/ecmascript-6">
import { getMacDownloadUrl, getWindowsDownloadUrl } from 'api/download'
const downloadUrl = 'http://update-fengchao.apps.xiaoyun.com/release/'
export default {
data () {
return {
macDownloadUrl: '',
windowsDownloadUrl: ''
}
},
created () {
this._getMacDownloadUrl()
this._getWindowsDownloadUrl()
},
methods: {
_getMacDownloadUrl () {
getMacDownloadUrl().then((res) => {
if (res.url) {
this.macDownloadUrl = res.url
}
})
},
_getWindowsDownloadUrl () {
getWindowsDownloadUrl().then((res) => {
res = res || ''
let appName = ''
res.replace(/^path:.*?\.exe$/img, ($1) => {
appName = $1.replace('path: ', '').trim()
})
if (appName) {
this.windowsDownloadUrl = downloadUrl + appName
}
})
}
}
}
</script> </script>
<style scoped lang="stylus" rel="stylesheet/stylus"> <style scoped lang="stylus" rel="stylesheet/stylus">
...@@ -58,4 +97,8 @@ ...@@ -58,4 +97,8 @@
border-bottom-right-radius: 50px border-bottom-right-radius: 50px
border-top-right-radius: 50px border-top-right-radius: 50px
background-color: #ff4400 background-color: #ff4400
&.prohibit
cursor: not-allowed;
background-color: #999;
color: #ccc;
</style> </style>
<template> <template>
<div class="m-copyright"> <div class="m-copyright">
<div class="about"> <div class="about">
<a class="line">关于我们</a><a>光音网络</a><a>小云世界</a> <a class="line">关于我们</a><a href="http://www.goyoo.com/">光音网络</a><a href="http://www.xiaoyun.com/">小云世界</a>
</div> </div>
<div class="copyright"> <div class="copyright">
<span>Copyright © 2017 Goyoo. All rights Reserved. 北京光音网络发展股份有限公司 版权所有</span> <span>Copyright © 2017 Goyoo. All rights Reserved. 北京光音网络发展股份有限公司 版权所有</span>
......
body, html body, html
line-height: 1 line-height: 1
font-family: 'PingFang SC', 'STHeitiSC-Light', 'Helvetica-Light', arial, sans-serif, 'Droid Sans Fallback' font-family: 'PingFang SC', 'STHeitiSC-Light', 'Helvetica-Light', arial, sans-serif, 'Droid Sans Fallback'
user-select: none
-webkit-tap-highlight-color: transparent -webkit-tap-highlight-color: transparent
min-width: 1000px min-width: 1000px
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment