gdpao
This commit is contained in:
@@ -62,6 +62,19 @@
|
||||
<view class="content-main">
|
||||
<text class="content-style">{{ item.content }}</text>
|
||||
</view>
|
||||
<view class="more-content-box">
|
||||
<!-- <view class="child-box" v-for="(child,cid) in allList[item.id]" :key="cid">
|
||||
<view class="info">
|
||||
<image :src="child.member_avatar" mode=""></image>
|
||||
<text>{{ child.member_nickname }}</text>
|
||||
<text v-if="0">{{ child.reply_member_nickname }}</text>
|
||||
</view>
|
||||
<view class="child_content">{{ child.content }}</view>
|
||||
</view> -->
|
||||
<view class="more-comment" v-if="item.reply_count">
|
||||
展开更多回复
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="send-box">
|
||||
<input class="send-val" type="text" :placeholder="edit_text" placeholder-class="placeholder-class"
|
||||
@@ -246,18 +259,31 @@
|
||||
if (res.data.errCode == 0) {
|
||||
this.send_value = "";
|
||||
this.comment_num = res.data.num;
|
||||
if (res.data.data.data.reply_id) {
|
||||
// this.commentList[this.comment_id].reply_count = true;
|
||||
// this.allList[this.comment_id].unshift(res.data.data);
|
||||
// console.log(this.allList, 111);
|
||||
let p_id = res.data.data.data.pid;
|
||||
console.log(this.pid,this.reply_id,this.comment_id);
|
||||
if (res.data.data.data.pid) {
|
||||
this.commentList[this.comment_id].reply_count = true;
|
||||
console.log(this.allList[p_id]);
|
||||
if (this.allList[p_id]) {
|
||||
this.allList[p_id].push(res.data.data);
|
||||
} else {
|
||||
this.allList[p_id] = [];
|
||||
this.allList[p_id].push(res.data.data);
|
||||
}
|
||||
console.log(this.allList);
|
||||
} else {
|
||||
this.commentList.unshift(res.data.data.data);
|
||||
}
|
||||
console.log(this.commentList);
|
||||
// console.log(this.commentList);
|
||||
} else if (res.data.errCode == 401) {
|
||||
uni.showToast({
|
||||
title: "您还没有登录,请先登录!",
|
||||
icon: "none"
|
||||
icon: "none",
|
||||
// success: () => {
|
||||
// setTimeout(function() {
|
||||
// this.$u.route("/pageA/login/login")
|
||||
// }, 2000)
|
||||
// }
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
@@ -338,6 +364,7 @@
|
||||
},
|
||||
// 打开评论输入
|
||||
openKeyInput(data, index) {
|
||||
console.log(data);
|
||||
let me = this;
|
||||
this.is_focus = true;
|
||||
setTimeout(() => {
|
||||
@@ -528,7 +555,7 @@
|
||||
}
|
||||
|
||||
.comment-list-box {
|
||||
padding: 30rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -538,6 +565,7 @@
|
||||
flex-direction: row;
|
||||
padding-left: 100rpx;
|
||||
}
|
||||
|
||||
|
||||
.content-style {
|
||||
width: 600rpx;
|
||||
@@ -545,6 +573,16 @@
|
||||
color: #333;
|
||||
lines: 2;
|
||||
}
|
||||
|
||||
.more-content-box {
|
||||
margin-left: 100rpx;
|
||||
}
|
||||
|
||||
.more-comment {
|
||||
margin: 10rpx 0;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.comment-list-header {
|
||||
flex-direction: row;
|
||||
|
||||
Reference in New Issue
Block a user