Commit 2178873f authored by zhengke's avatar zhengke

修改

parent 16e194c8
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
display: flex; display: flex;
padding: 20px; padding: 20px;
border-bottom: 1px solid #E1E4E6; border-bottom: 1px solid #E1E4E6;
position: relative;
} }
.aImg { .aImg {
...@@ -99,10 +100,24 @@ ...@@ -99,10 +100,24 @@
cursor: pointer; cursor: pointer;
} }
.activeDel img { .compentDel {
width: 25px;
position: absolute;
right: 7px;
top: 4px;
display: none;
cursor: pointer;
}
.activeDel img,
.compentDel img {
width: 100%; width: 100%;
} }
.activityFlex:hover .compentDel {
display: block;
}
.activeComList:hover .activeDel { .activeComList:hover .activeDel {
display: block; display: block;
} }
...@@ -113,6 +128,15 @@ ...@@ -113,6 +128,15 @@
top: 0; top: 0;
} }
.showMoreCompent {
width: 100%;
text-align: right;
color: #333;
font-size: 13px;
margin-top: 15px;
color: #2d64b3;
}
</style> </style>
<template> <template>
<div class="activityInfo"> <div class="activityInfo">
...@@ -140,7 +164,8 @@ ...@@ -140,7 +164,8 @@
<div class="active_NameLeft"> <div class="active_NameLeft">
<div class="aImg"> <div class="aImg">
<img style="width:100%;height:100%;" :src="subItem.Photo" /> <img style="width:100%;height:100%;" :src="subItem.Photo" />
<img src="../../assets/img/userman/louzhu.png" v-if="subItem.UserId==dataList.UserId" class="activeLouzhu" alt="" /> <img src="../../assets/img/userman/louzhu.png" v-if="subItem.UserId==dataList.UserId" class="activeLouzhu"
alt="" />
</div> </div>
<div class="aUserName">{{subItem.UserName}}</div> <div class="aUserName">{{subItem.UserName}}</div>
</div> </div>
...@@ -164,54 +189,71 @@ ...@@ -164,54 +189,71 @@
<span class="commonDate">{{cItem.CreateDate}}</span> <span class="commonDate">{{cItem.CreateDate}}</span>
</div> </div>
</div> </div>
<div class="activeDel" @click="delCompent(cItem)">
<img src="../../assets/img/userman/del.png" alt="" />
</div>
</div> </div>
<div> <div class="showMoreCompent" v-if="subItem.ReplyNum>4">
<span style="cursor:pointer;" @click="getCompentItem(subItem)">查看更多{{subItem.ReplyNum}}条评论</span>
</div> </div>
</div> </div>
</div> </div>
<div class="compentDel" @click="delCompent(subItem)">
<img src="../../assets/img/userman/del.png" alt="" />
</div>
</div> </div>
<!-- <div class="activeComment"> <el-pagination style="text-align:center" background @current-change="handleCurrentChange" :page-size="comMsg.pageSize"
<div class="activeComList" v-for="(item,cindex) in compentList" :key="cindex"> layout="prev, pager, next" :total="pageCount">
<div class="compentImg"> </el-pagination>
<img style="width:100%;height:100%;" :src="item.Photo" alt="" /> </div>
</div> </div>
<div class="compentRight">
<div> <el-dialog title="查看评论" :visible.sync="showCompoent" width="800px">
<span class="compentName">{{item.UserName}}</span>{{item.Content}} <div class="activityFlex" style="max-height:500px;overflow:scroll;">
</div> <div class="active_NameLeft">
<div style="text-align:right;"> <div class="aImg">
<span class="commonDate">{{item.CreateDate}}</span> <img style="width:100%;height:100%;" :src="replyObj.Photo" />
</div> <img src="../../assets/img/userman/louzhu.png" v-if="replyObj.UserId==dataList.UserId" class="activeLouzhu"
</div> alt="" />
<div class="activeDel" @click="delCompent(item)">
<img src="../../assets/img/userman/del.png" alt="" />
</div>
</div> </div>
<div class="activeComList" v-for="(subItem,subIndex) in replayList" :key="subIndex+100"> <div class="aUserName">{{replyObj.UserName}}</div>
<div class="compentImg"> </div>
<img style="width:100%;height:100%;" :src="subItem.Photo" alt="" /> <div style="width:100%;">
</div> <div class="activityContent" style="margin-top:0;">
<div class="compentRight"> {{replyObj.Content}}
<div> </div>
<span class="compentName">{{subItem.UserName}}</span><span>回复</span><span <div class="activeImgContent" v-if="replyObj.ImageList.length>0" v-for="(Iitem,Iindex) in replyObj.ImageList" :key="Iindex">
style="margin-left:5px;color:#2d64b3">{{subItem.ReplyUserName}}</span>{{subItem.Content}} <img :src="Iitem" alt="" />
</div>
<div class="activeComment">
<div class="activeComList" v-for="(rItem,rIndex) in replayList" :key="rIndex">
<div class="compentImg">
<img style="width:100%;height:100%;" :src="rItem.Photo" alt="" />
</div> </div>
<div style="text-align:right;"> <div class="compentRight">
<span class="commonDate">{{subItem.CreateDate}}</span> <div>
<span class="compentName">{{rItem.UserName}}</span>
{{rItem.Content}}
</div>
<div style="text-align:right;">
<span class="commonDate">{{rItem.CreateDate}}</span>
</div>
</div>
<div class="activeDel" @click="delCompent(rItem)">
<img src="../../assets/img/userman/del.png" alt="" />
</div> </div>
</div> </div>
<div class="activeDel" @click="delCompent(subItem)"> <el-pagination style="text-align:center;padding:0;margin-top:15px;" background @current-change="handleCurrentReplay" :page-size="replayMsg.pageSize"
<img src="../../assets/img/userman/del.png" alt="" /> layout="prev, pager, next" :total="replayCount">
</div> </el-pagination>
</div> </div>
<el-pagination style="text-align:right" background v-if="pageCount>0" @current-change="handleCurrentChange" </div>
:page-size="comMsg.pageSize" layout="prev, pager, next" :current-page.sync="comMsg.pageIndex"
:total="pageCount">
</el-pagination>
</div> -->
</div> </div>
</div> <span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="showCompoent = false">确定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -235,7 +277,10 @@ ...@@ -235,7 +277,10 @@
dataList: {}, dataList: {},
compentList: [], compentList: [],
pageCount: 0, pageCount: 0,
replayList: [] replayCount:0,
replayList: [],
showCompoent: false, //显示评论弹窗
replyObj:{}
} }
}, },
created() {}, created() {},
...@@ -243,18 +288,15 @@ ...@@ -243,18 +288,15 @@
if (this.$route.query.Id) { if (this.$route.query.Id) {
this.msg.ActivityId = this.$route.query.Id; this.msg.ActivityId = this.$route.query.Id;
this.comMsg.ActivityId = this.$route.query.Id; this.comMsg.ActivityId = this.$route.query.Id;
this.replayMsg.ParentId = this.$route.query.Id;
} }
this.getList(); this.getList();
this.getCommentList(); this.getCommentList();
this.getSecondReply();
}, },
methods: { methods: {
//获取帖子头部数据 //获取帖子头部数据
getList() { getList() {
this.apipost("/api/Miai/GetActivityInfo", this.msg, res => { this.apipost("/api/Miai/GetActivityInfo", this.msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res, '数据');
this.dataList = res.data.data; this.dataList = res.data.data;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -265,7 +307,6 @@ ...@@ -265,7 +307,6 @@
getCommentList() { getCommentList() {
this.apipost("/api/Miai/GetActivityDiscussPageList", this.comMsg, res => { this.apipost("/api/Miai/GetActivityDiscussPageList", this.comMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res, '评论数据');
this.pageCount = res.data.data.pageCount; this.pageCount = res.data.data.pageCount;
this.compentList = res.data.data.pageData; this.compentList = res.data.data.pageData;
} else { } else {
...@@ -277,7 +318,9 @@ ...@@ -277,7 +318,9 @@
handleCurrentChange(val) { handleCurrentChange(val) {
this.comMsg.pageIndex = val; this.comMsg.pageIndex = val;
this.getCommentList(); this.getCommentList();
},
//回复翻页
handleCurrentReplay(val){
this.replayMsg.pageIndex = val; this.replayMsg.pageIndex = val;
this.getSecondReply(); this.getSecondReply();
}, },
...@@ -285,9 +328,7 @@ ...@@ -285,9 +328,7 @@
getSecondReply() { getSecondReply() {
this.apipost("/api/Miai/GetActivityReplyPageList", this.replayMsg, res => { this.apipost("/api/Miai/GetActivityReplyPageList", this.replayMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res, '回复数据'); this.replayCount = res.data.data.pageCount;
// this.pageCount = res.data.data.pageCount;
// this.compentList = res.data.data.pageData;
this.replayList = res.data.data.pageData; this.replayList = res.data.data.pageData;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -316,6 +357,13 @@ ...@@ -316,6 +357,13 @@
}).catch(() => { }).catch(() => {
}); });
},
//点击更多评论
getCompentItem(item){
this.showCompoent=true;
this.replyObj = item;
this.replayMsg.ParentId = item.Id;
this.getSecondReply();
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment