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

修改详情页面bug

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