From ce1a8d6256985c21f12ae8bc1bdefe3293589e11 Mon Sep 17 00:00:00 2001 From: Gdpao <1341331954@qq.com> Date: Fri, 14 Aug 2020 11:33:57 +0800 Subject: [PATCH] gdpaoup --- pageA/login/login.vue | 2 ++ pageB/photo/index.vue | 8 ++++---- pageB/video/video.nvue | 44 ++++++++++++++++++++++++++++++++++++++---- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/pageA/login/login.vue b/pageA/login/login.vue index 29a3ef5..97f75df 100644 --- a/pageA/login/login.vue +++ b/pageA/login/login.vue @@ -229,6 +229,7 @@ console.log(res.errCode); if (res.errCode == 0) { this.loginIn(res.data.token); + uni.setStorageSync('user_info',res.data); this.show = false; uni.switchTab({ url: "../../pages/index/index" @@ -259,6 +260,7 @@ console.log(res); if (res.errCode == 0) { this.loginIn(res.data.token); + uni.setStorageSync('user_info',res.data); this.show = false; uni.switchTab({ url: "../../pages/index/index" diff --git a/pageB/photo/index.vue b/pageB/photo/index.vue index 2b7bebb..4fefe18 100644 --- a/pageB/photo/index.vue +++ b/pageB/photo/index.vue @@ -251,6 +251,7 @@ } .child_content { margin: 18rpx 0 18rpx 30rpx; + font-size: 26rpx; } } .more-reply { @@ -578,16 +579,15 @@ export default { this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => { uni.hideLoading(); if (res.errCode == 0) { - if (res.data.length < 10) { - this.is_more = false; - } + // if (res.data.length < 10) { + // this.is_more = false; + // } this.page_[id]++; console.log(this.page_[id]); this.$nextTick(() => { this.allList[id] = res.data; }) console.log(this.allList); - } }) }, diff --git a/pageB/video/video.nvue b/pageB/video/video.nvue index 1236436..b748833 100644 --- a/pageB/video/video.nvue +++ b/pageB/video/video.nvue @@ -8,7 +8,7 @@ @openCart="openPopup"> - + 视频 {{ time_count }}s @@ -69,10 +69,11 @@ {{ child.member_nickname }} {{ child.reply_member_nickname }} - {{ child.content }} + {{ child.content }} - - 展开更多回复 + + 展开更多回复 + @@ -154,6 +155,7 @@ pid: 0, // 主键 reply_id: 0, // 回复id allList: {}, // 全部子评论 + page_: {}, page: 0, comment_id: 0, send_value: "", // 评论 @@ -298,6 +300,40 @@ } }) }, + // 发现回复列表 + getReplyList(id) { + uni.showLoading({ + title: "loading..." + }) + if (!this.page_[id] === 0) { + } + console.log(id); + uni.request({ + url: temp_url + "article/articleReplyList", + method: "POST", + data: { + id: id, + page: this.page_[id], + }, + header: { + Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + }, + success: (res) => { + uni.hideLoading(); + if (res.data.errCode == 0) { + if (res.data.data.length < 10) { + this.is_more = false; + } + this.page_[id]++; + console.log(this.page_[id]); + this.$nextTick(function(){ + this.allList[id] = res.data.data; + }) + console.log(this.allList); + } + } + }) + }, // 获取手机信息 getInfo() { uni.getSystemInfo({