From 046f2e50c549e6dd234e1214e060cdf67652b2f6 Mon Sep 17 00:00:00 2001
From: Gdpao <1341331954@qq.com>
Date: Thu, 6 Aug 2020 10:35:59 +0800
Subject: [PATCH] gdpaoup
---
components/index/video-item/index.vue | 2 +-
pageB/photo/index.vue | 72 +++++++++++++++++++++------
2 files changed, 59 insertions(+), 15 deletions(-)
diff --git a/components/index/video-item/index.vue b/components/index/video-item/index.vue
index 8f7890e..50c44aa 100644
--- a/components/index/video-item/index.vue
+++ b/components/index/video-item/index.vue
@@ -5,7 +5,7 @@
- {{ item.article_title }}
+ {{ item.article_title }}
{{ item.article_content }}
diff --git a/pageB/photo/index.vue b/pageB/photo/index.vue
index def52f7..dc40cea 100644
--- a/pageB/photo/index.vue
+++ b/pageB/photo/index.vue
@@ -30,7 +30,7 @@
-
+
@@ -43,13 +43,19 @@
{{ item.content }}
-
-
+
+
+
+ {{ child.member_nickname }}
+
+ {{ child.reply_member_nickname }}
+
+ {{ child.content }}
-
+ 展开更多回复
- 111
+
@@ -187,7 +193,7 @@
}
.scroll-box {
z-index: 99;
- margin: 88rpx 0 150rpx 0;
+ margin: 88rpx 0 100rpx 0;
height: 100%;
.box {
display: flex;
@@ -223,6 +229,28 @@
}
.child-content {
margin: 6rpx 90rpx 6rpx;
+ .child-box {
+ .info {
+ display: flex;
+ align-items: center;
+ margin-bottom: 10rpx;
+ color: #666;
+ font-size: 20rpx;
+ & > image {
+ flex-shrink: 0;
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 10rpx;
+ border-radius: 50%;
+ }
+ .icon {
+ margin: 0 10rpx;
+ }
+ }
+ .child_content {
+ margin: 18rpx 0 18rpx 30rpx;
+ }
+ }
.more-reply {
font-size: 22rpx;
color: #999;
@@ -373,7 +401,8 @@ export default {
return {
list:{},
swiper_id: "",
- page: 1, //
+ page: 0, // 主评论
+ page_: [], // 子评论
cart_type: false, // 显示购物车
is_comment: false, // 显示评论
is_focus: false, // 聚焦
@@ -385,7 +414,7 @@ export default {
edit_text: "有爱评论,说点好听的 ~",
edit_text_other: "有爱评论,说点好听的 ~",
commentList: [], // 评论
- allList: {}, // 全部子评论
+ allList: [], // 全部子评论
}
},
onLoad(option){
@@ -419,25 +448,30 @@ export default {
// console.log(e.detail.current);
this.swiper_id = e.detail.current; // 储存swiper id
},
- // 更改购物车状态
+ // 更改弹框状态
openPopup(data) {
// console.log(data);
this.cart_type = data.cart;
this.is_comment = data.comment;
if (this.is_comment) {
+ this.page = 0;
this.getComment(this.article_id,0);
}
},
// 获取评论
- getComment(id,page) {
+ getComment() {
this.$u.post("article/articleCommentList",{
- article_id: id,
- page: page,
+ article_id: this.article_id,
+ page: this.page,
}).then(res => {
console.log(res);
- if (res.errCode == 0) {
+ if (res.errCode == 0 && this.page == 0) {
this.commentList = res.data;
- }
+ } else if (res.errCode == 0 && this.page > 0) {
+ this.commentList = this.commentList.concat(res.data);
+ } else {
+
+ }
})
},
// 打开评论输入
@@ -479,6 +513,14 @@ export default {
}
})
},
+ // 发现回复列表
+ getReplyList(id) {
+ this.page_[id] = 0;
+ console.log(this.page_);
+ this.$u.post("article/articleReplyList", {id: id, page: 0}).then(res => {
+ this.allList[id] = res.data;
+ })
+ },
// 预览图片
viewImage(e) {
let arr = [];
@@ -492,6 +534,8 @@ export default {
},
// 评论滚动到底部
scrollBottom(e) {
+ this.page++;
+ this.getComment();
console.log(e);
},
// 跳转到商品