bug 8.9
This commit is contained in:
@@ -38,12 +38,12 @@
|
||||
</view>
|
||||
<view class="main">
|
||||
<scroll-view class="video-image" scroll-y v-if="cur==0 && indextop.length" :style="{ height: scrollHeiht }">
|
||||
<view v-for="item in indextop" :key="item.id">
|
||||
<videoTop :url="item.article_pic" v-if="item.type == 2"></videoTop>
|
||||
<imageTop v-else :url="item.article_pic"></imageTop>
|
||||
<view v-for="item in indextop" :key="item.id" class="container-top">
|
||||
<videoTop :url="item.article_pic" v-if="item.type == 2" @click.native="toDetailsPage(item.article_id)"></videoTop>
|
||||
<imageTop v-else :url="item.article_pic" @click.native="toDetailsPage(item.article_id)"></imageTop>
|
||||
</view>
|
||||
<view style="display: flex;flex-wrap: wrap;" v-if="indexlist.length">
|
||||
<listitem :style="{'margin-left': index%2 == 1 ? '20rpx':'0'}" v-for="(item,index) in indexlist" :key="item.id" :type="item.type" :url="item.article_pic"></listitem>
|
||||
<view v-if="indexlist.length" class="container-bottom">
|
||||
<listitem v-for="item in indexlist" :key="item.id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage(item.article_id)"></listitem>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="item" v-if="cur==1">
|
||||
@@ -109,6 +109,12 @@ export default {
|
||||
// if(e.index == 0) this.show = true;
|
||||
},
|
||||
methods: {
|
||||
toDetailsPage(id) {
|
||||
// console.log(11);
|
||||
this.$u.route('pageB/photo/index', {
|
||||
id: id
|
||||
});
|
||||
},
|
||||
switchCurrent(current) {
|
||||
this.cur = current;
|
||||
if(current == 0) {
|
||||
@@ -123,15 +129,15 @@ export default {
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
getStoreImgVideoList() {
|
||||
this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
|
||||
if(res.data.length) {
|
||||
this.indextop = [res.data[0], res.data[1]];
|
||||
this.indexlist = res.data.slice(2,);
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
// getStoreImgVideoList() {
|
||||
// this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
|
||||
// if(res.data.length) {
|
||||
// this.indextop = [res.data[0], res.data[1]];
|
||||
// this.indexlist = res.data.slice(2,);
|
||||
// }
|
||||
// uni.stopPullDownRefresh();
|
||||
// })
|
||||
// },
|
||||
attentionMember() {
|
||||
this.$u.api.attentionMember({ member_id: this.info.member_id }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
@@ -149,13 +155,15 @@ export default {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.errCode == 0) {
|
||||
// this.articleList = res.data.list;
|
||||
if(res.data.list.length > 0) {
|
||||
this.indextop = [res.data.list[0]]
|
||||
this.indextop = [res.data.list[0], res.data.list[1]];
|
||||
}
|
||||
if(res.data.list.length > 1) {
|
||||
this.indextop.push(res.data.list[1]);
|
||||
this.indexlist.push(...res.data.list.slice(2,));
|
||||
if(JSON.stringify(res.data) != '[]') {
|
||||
if(res.data.list.length > 0) {
|
||||
this.indextop = [res.data.list[0]]
|
||||
// this.indextop = [res.data.list[0], res.data.list[1]];
|
||||
}
|
||||
if(res.data.list.length > 1) {
|
||||
this.indextop.push(res.data.list[1]);
|
||||
this.indexlist.push(...res.data.list.slice(2,));
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -288,9 +296,23 @@ export default {
|
||||
.video-image {
|
||||
padding-bottom: 98rpx;
|
||||
}
|
||||
> view {
|
||||
margin-top: 20rpx;
|
||||
.container-top {
|
||||
> view {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
.container-bottom {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.bottom-item {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
// > view {
|
||||
// margin-top: 20rpx;
|
||||
// }
|
||||
}
|
||||
.tabbar {
|
||||
border-top: 1rpx #DBDADA solid;
|
||||
|
||||
Reference in New Issue
Block a user