bug 8.9
This commit is contained in:
@@ -106,7 +106,7 @@ export default {
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.scrollHeight = res.windowHeight - (90 / 2) + 'px';
|
||||
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
|
||||
},
|
||||
setTitle(title) {
|
||||
uni.setNavigationBarTitle({
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<view class="imageTop">
|
||||
<image :src="url" mode="aspectFit"></image>
|
||||
<image :src="url" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.imageTop{
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
margin-bottom: 20rpx;
|
||||
overflow: hidden;
|
||||
>image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -21,6 +22,6 @@ export default {
|
||||
return {
|
||||
}
|
||||
},
|
||||
props:['url']
|
||||
props:['url'],
|
||||
}
|
||||
</script>
|
||||
@@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<view class="listItem">
|
||||
<video v-if="type == '2'" :src="url" :show-fullscreen-btn="true"></video>
|
||||
<image v-else :src="url" mode="aspectFit"></image>
|
||||
<image v-else :src="url" mode="aspectFill"></image>
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.listItem{
|
||||
width: 365rpx;
|
||||
height: 500rpx;
|
||||
margin-bottom: 20rpx;
|
||||
overflow: hidden;
|
||||
>image,video{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -104,7 +104,7 @@ export default {
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||
this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.scrollHeight = res.windowHeight - 90 / 2 + 'px';
|
||||
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
|
||||
// console.log(this.scrollHeight);
|
||||
},
|
||||
toDetailsPage(id) {
|
||||
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
const otherHeight = 347 + 140 + 20 + 98;
|
||||
this.scrollHeight = res.windowHeight - otherHeight / 2 + 'px';
|
||||
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * otherHeight + 'px';
|
||||
// console.log(this.scrollHeight);
|
||||
},
|
||||
toDetailsPage(id) {
|
||||
|
||||
@@ -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