...
|
...
|
@@ -23,10 +23,10 @@ |
|
|
</view>
|
|
|
</view>
|
|
|
<view class="empTopH"></view>
|
|
|
<swiper class="imgSwiper" :indicator-dots="true" :indicator-active-color="'#fff'" :indicator-color="'rgba(255,255,255,0.30)'" :circular="true">
|
|
|
<swiper class="imgSwiper" :style="{height:swiperHeight+'px'}" @change="changeImg" :indicator-dots="true" :indicator-active-color="'#fff'" :indicator-color="'rgba(255,255,255,0.30)'" :circular="true">
|
|
|
<swiper-item v-for="(item,index) in articleInfo.images" :key="index" @click="closeAllAlert">
|
|
|
<view class="swiper-item">
|
|
|
<image :src="item" mode="aspectFill"></image>
|
|
|
<image :src="item" mode="widthFix"></image>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
...
|
...
|
@@ -186,6 +186,7 @@ |
|
|
export default{
|
|
|
data(){
|
|
|
return{
|
|
|
swiperHeight:0,
|
|
|
keyboardHeight:0,
|
|
|
showPostImg:false,
|
|
|
shareFlag:false,
|
...
|
...
|
@@ -231,14 +232,39 @@ |
|
|
},
|
|
|
methods:{
|
|
|
getData(){
|
|
|
this.$request('/article/info',{article_id:this.article_id}).then((res)=>{
|
|
|
let that = this
|
|
|
this.$request('/article/info',{article_id:that.article_id}).then((res)=>{
|
|
|
console.log('故事详情',res)
|
|
|
res.data.content = this.textFormat(res.data.content)
|
|
|
this.articleInfo = res.data
|
|
|
this.showPostImg = true
|
|
|
res.data.content = that.textFormat(res.data.content)
|
|
|
that.articleInfo = res.data
|
|
|
uni.getImageInfo({
|
|
|
src:res.data.images[0],
|
|
|
success: function(image) {
|
|
|
uni.getSystemInfo({
|
|
|
success: function (res) {
|
|
|
that.swiperHeight = res.windowWidth/image.width * image.height;
|
|
|
that.showPostImg = true
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
this.getRemarkList()
|
|
|
},
|
|
|
//轮播图切换
|
|
|
changeImg(e){
|
|
|
let that = this
|
|
|
uni.getImageInfo({
|
|
|
src:that.articleInfo.images[e.detail.current],
|
|
|
success: function(image) {
|
|
|
uni.getSystemInfo({
|
|
|
success: function (res) {
|
|
|
that.swiperHeight = res.windowWidth/image.width * image.height;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
textFormat(val) {
|
|
|
// 格式化文字展示文本域格式文字
|
|
|
if (val) {
|
...
|
...
|
@@ -523,9 +549,8 @@ |
|
|
height: calc(88rpx + var(--status-bar-height));
|
|
|
}
|
|
|
.imgSwiper{
|
|
|
height: 1028rpx;
|
|
|
.swiper-item{
|
|
|
image{width: 750rpx;height: 1028rpx;}
|
|
|
image{width: 750rpx;}
|
|
|
}
|
|
|
}
|
|
|
.postInfoWrap{
|
...
|
...
|
|