提交 e14dc05c 编写于 作者: 赵十四's avatar 赵十四

修改详情页面bug

上级 bb56aab5
......@@ -17,8 +17,8 @@
<text class="text-content">{{postDetail.content}}</text>
<view class="img-conetent">
<!-- 多张图片 -->
<view class="one-img" v-for="(img,imgIndex) in item.pictureList">
<view class="post-pic" @click.stop="showPic(imgIndex,item.pictureList)"
<view class="one-img" v-for="(img,imgIndex) in postDetail.pictureList">
<view class="post-pic" @click="showPic(imgIndex,postDetail.pictureList)"
:style="'background: url('+img+') no-repeat center/cover #eeeeee;'"></view>
</view>
......
......@@ -14,6 +14,10 @@
</u-tabs>
<!-- 所有帖子 -->
<view v-if="current == 1">
<view class="message">
新增{{messageNum}}条消息~
</view>
<view v-for="(item,index) in allPost" :key="index">
<!-- 单个帖子 -->
<view class="one-post" @click="toDetial(item.postId)">
......@@ -56,10 +60,8 @@
</view>
<!-- 我的帖子 -->
<view v-if="current == 0">
<view class="message">
您一共收到{{messageNum}}条消息~
</view>
<!-- 消息按钮 -->
<image :src="'/static/post/message.png'" style="float: right;width: 30px;height:30px; margin-right: 10%; "></image>
<!-- 单个帖子 -->
<view v-for="(item,index) in myPost" :key="index">
......@@ -149,6 +151,7 @@
};
},
methods: {
//转到帖子的详情页面
toDetial(postId) {
uni.navigateTo({
url: '/pages/post/post-detail?postId=' + postId
......@@ -174,7 +177,7 @@
})
.then(res => {
this.allPost = res.result.data.postList;
//console.log(res.result.data);
});
},
//获得我的帖子
......@@ -187,7 +190,7 @@
})
.then(res => {
this.myPost = res.result.data.postList;
console.log(res.result.data);
});
},
// 图片放大
......@@ -300,7 +303,7 @@
flex-direction: row;
align-items: center;
justify-content: center;
background-color: rgb(245 154 35 / 30%);
background-color: rgb(245 154 35 / 60%);
}
.one-post {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册