Commit 0176c265 authored by agping's avatar agping

下载页

parent 5ae703ad
<template>
<div class="min-height-list">
<div class="bg-con"></div>
<div class="btn-con">
<img :src="btn" @click="download"/>
</div>
</div>
</template>
<script>
import btn from '@/components/download/images/btn@2x.png';
import '@/assets/js/layer041002.js';
export default {
data: () => ({
btn,
}),
created() {
let _this = this;
if(_this.common.isIos()) {
_this.downloadAddress = 'https://itunes.apple.com/cn/app/id1326696107';
} else {
//获取安卓下载链接,type为1,苹果为2
_this.axios({
method: 'get',
url: '/api/getVersionNo',
responseType: 'json',
data: {
'type': 1
}
})
.then(function(response) {
if(response.data.code == 200) {
_this.downloadAddress = response.data.data.app_path;
} else {
layer.tipsX(response.data.message);
}
})
.catch(function(error) {
_this.common.layerError(error);
});
}
},
methods: {
download() {
let _this = this;
if(_this.common.isIos()) {
console.log(555)
location.href = _this.downloadAddress; //直接进入下载页
} else {
if(_this.common.isWeixinBrowser()) {
_this.layerWeiXin = true;
} else {
location.href = _this.downloadAddress;
}
}
}
}
}
</script>
<style scoped>
.min-height-list{
width: 7.5rem;
height: 100vh;
background: #fff;
}
.bg-con{
width: 100%;
height: 10rem;
background: #fff url(images/Group@2x.png) no-repeat center .3rem/7.5rem;
}
img{
width: 5.4rem;
}
.btn-con{
text-align: center;
margin-top: .3rem;
}
</style>
...@@ -86,6 +86,12 @@ ...@@ -86,6 +86,12 @@
'nameCustom': 'H5广告推广页', 'nameCustom': 'H5广告推广页',
'query': { 'query': {
} }
},
{
'path': '/download',
'nameCustom': '同联下载页',
'query': {
}
} }
] ]
} }
......
...@@ -17,7 +17,7 @@ import articleDetail from '@/components/businessCollege/articleDetail' ...@@ -17,7 +17,7 @@ import articleDetail from '@/components/businessCollege/articleDetail'
import shopList from '@/components/shop/shopList' import shopList from '@/components/shop/shopList'
import shopSearchList from '@/components/shopSearch/shopSearchList' import shopSearchList from '@/components/shopSearch/shopSearchList'
import advertisingPage from '@/components/advertisingPage/advertisingPage' import advertisingPage from '@/components/advertisingPage/advertisingPage'
import download from '@/components/download/download'
Vue.use(VueRouter) Vue.use(VueRouter)
export default new VueRouter({ export default new VueRouter({
...@@ -120,6 +120,11 @@ export default new VueRouter({ ...@@ -120,6 +120,11 @@ export default new VueRouter({
path: '/advertisingPage', path: '/advertisingPage',
name: 'v-advertising-page', name: 'v-advertising-page',
component: advertisingPage component: advertisingPage
},
{
path: '/download',
name: 'v-download',
component: download
} }
] ]
}) })
\ No newline at end of file
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