Commit 32fc7f3f by yanju

Merge branch 'new-func#1' into 'master'

主页服务端渲染

See merge request pigbigbig/beyond-clouds-front!116
parents ccff5390 c43e9007
......@@ -60,7 +60,27 @@
}
});
return {blogList:blogList.data.dataList,projectList:projectList.data.dataList}
let newsList = await $axios.$get(config.api.get.Content.list + '/13/contents',
{
params: {
page: 1,
size: 5,
type: 1}
})
let bannerList = await $axios.$get(config.api.get.Content.list + '/12/contents',
{
params: {
page: 1,
size: 5,
type: 0
}
})
return {blogList:blogList.data.dataList,
projectList:projectList.data.dataList,
bannerList:bannerList.data.dataList,
newsList:newsList.data.dataList}
},
data(){
return{
......@@ -75,7 +95,6 @@
created() {
this.dataGetHotBloggersList();
this.dataGetHotAnswerList();
this.dataGetNewsList();
this.dataGetBanner();
},
......@@ -98,17 +117,7 @@
},
dataGetBanner(){ //内容类型-0:幻灯,1:普通文章,3:广告
let params = {
page: 1,
size: 5,
type: 0
};
this.$axios.$get(config.api.get.Content.list + '/12/contents',
{
params: params
}).then((response) => {
let dataList = response.data.dataList;
let dataList = this.bannerList;
dataList.map((val,index)=>{
this.imgArr.push(
val.pic1
......@@ -117,7 +126,7 @@
val.link
)
})
})
},
dataGetHotBloggersList() {
......@@ -142,19 +151,6 @@
});
},
dataGetNewsList() {
let params = {
page: 1,
size: 5,
type: 1
};
this.$axios.$get(config.api.get.Content.list + '/13/contents',
{
params: params
}).then((response) => {
this.newsList = response.data.dataList;
})
},
},
mounted(){
}
......
<template>
<yun-video></yun-video>
</template>
<script>
import YunVideo from '../components/common/video/src/main.vue';
export default {
components:{
YunVideo
},
data(){
return{
}
},
props:{
},
}
</script>
<style lang="scss" scoped>
.container{
width:$pageWidth;
margin:0 auto;
}
</style>
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