Authored by Tao

add channel style

... ... @@ -17,7 +17,7 @@
<div class="channel-top"></div>
<div class="marginTop">
<div class="channel-html">
<img src="../../../statics/image/channel/server.png" alt="" />
<img src="../../../statics/image/channel/server.png" />
</div>
<div v-for="(item, index) in channelList.list" :key="index" class="space-between">
<Swiper :list="item.data" v-if="item.template_name == 'threePicture'"/>
... ... @@ -86,7 +86,6 @@ export default {
},
mounted() {
this.fetchChannelList().then((res) => {
console.log(res);
let windowH = document.documentElement.clientHeight || document.body.clientHeight;
this.navTop = this.$refs.sss[0].offsetTop;
this.navHeight = this.$refs.sss[0].offsetHeight;
... ... @@ -114,7 +113,7 @@ export default {
if (scrollY >= this.navTop) {
this.isShow = true;
} else {
this.isShow = false;
this.isShow = false;
}
},
...mapActions(['fetchChannelList']),
... ... @@ -211,5 +210,7 @@ export default {
display: block;
}
}
.space-between {
margin-top: 20px;
}
</style>
... ...
... ... @@ -28,7 +28,7 @@ export default {
<style lang="scss" scoped>
.banner {
width: 100%;
margin-bottom: 20px;
// margin-bottom: 20px;
overflow: hidden;
ul {
li {
... ...
... ... @@ -49,6 +49,9 @@ export default {
this.title = this.$route.query.description;
this.type = this.$route.query.type;
},
activated() {
},
methods: {
...mapActions(['fetchNewsList']),
async onPullingUp() {
... ...
... ... @@ -11,7 +11,6 @@ export default function() {
page: 0,
limit: 10,
totalPage: 0,
uid: '500031170',
},
newsDeatilList: {
list: [],
... ... @@ -19,7 +18,6 @@ export default function() {
page: 0,
limit: 10,
totalPage: 0,
uid: '500031170',
}
},
mutations: {
... ... @@ -43,7 +41,6 @@ export default function() {
async fetchNewsList({ commit, state }, obj) {
console.log(obj);
let page = state.newsList.page + 1;
let uid = state.newsList.uid;
let limit = state.newsList.limit;
let totalPage = state.newsList.totalPage;
let type = obj && obj.type;
... ... @@ -51,17 +48,12 @@ export default function() {
// 页面跳转重置page页码
isPage ? page = 1 : state.newsList.page + 1;
if (page === totalPage) {
return false;
}
const result = await this.$api.post('/api/ufo/home/newsList', {
page, type, limit
});
if (result.code === 200) {
result.data.list.map((res) => {
result.data.list && result.data.list.map((res) => {
res.createTime = moment(new Date(res.createTime * 1000)).format('YYYY.MM.DD HH:mm');
});
commit(Types.FETCH_NEWS_LIST, {list: result.data});
... ...