From 6d4d8c567518e8521e6236cfebfcb97915520905 Mon Sep 17 00:00:00 2001
From: Gdpao <1341331954@qq.com>
Date: Wed, 12 Aug 2020 22:00:01 +0800
Subject: [PATCH] gdpaoup
---
pageB/photo/index.vue | 33 +-
pageB/video/video.nvue | 71 ++-
pages/index/index.vue | 1014 ++++++++++++++++++++--------------------
pages/mine/index.vue | 50 +-
pages/zhibo/index.nvue | 6 +-
5 files changed, 609 insertions(+), 565 deletions(-)
diff --git a/pageB/photo/index.vue b/pageB/photo/index.vue
index bff54e2..911248d 100644
--- a/pageB/photo/index.vue
+++ b/pageB/photo/index.vue
@@ -66,7 +66,7 @@
-
+
发送
@@ -419,7 +419,7 @@ export default {
edit_text: "有爱评论,说点好听的 ~",
edit_text_other: "有爱评论,说点好听的 ~",
commentList: [], // 评论
- allList: [], // 全部子评论
+ allList: {}, // 全部子评论
status: 'loadmore',
iconType: 'circle',
loadText: {
@@ -433,6 +433,7 @@ export default {
onLoad(option){
this.article_id = option.id;
this.articleInfo(this.article_id);
+ this.allList = {};
},
// 监听返回按钮
onBackPress() {
@@ -491,18 +492,28 @@ export default {
this.commentList = this.commentList.concat(res.data);
}
this.page++;
+ let list = this.commentList;
+ // list.forEach((item,index) => {
+ // console.log(item);
+ // })
}
})
},
// 打开评论输入
openKeyInput(data,index) {
- // console.log(data);
+ let me = this;
+ console.log(data);
this.is_edit = true;
setTimeout(() => {
this.is_focus = true;
}, 200)
+ uni.onKeyboardHeightChange(function(res){
+ if (res.height == 0) {
+ me.is_focus = false;
+ }
+ })
this.comment_id = index;
- if (data.id) {
+ if (data.content) {
this.edit_text_other = "回复@" + data.member_nickname;
this.pid = data.id;
this.reply_id = data.member_id;
@@ -525,7 +536,7 @@ export default {
pid: this.pid,
reply_id: this.reply_id,
}).then(res => {
- // console.log(res.data.data);
+ // console.log(res.data);
if (res.errCode == 0) {
this.send_value = "";
this.comment_num = res.data.num;
@@ -533,9 +544,11 @@ export default {
this.is_edit = false;
console.log(res.data.data.reply_id);
if (res.data.data.reply_id) {
+ console.log(this.allList);
this.commentList[this.comment_id].reply_count = true;
- this.allList[this.comment_id].unshift(res.data.data);
- console.log(this.allList,111);
+ this.allList[this.comment_id] = [];
+ this.allList[this.comment_id].push(res.data.data);
+ console.log(this.allList);
} else {
this.commentList.unshift(res.data.data);
}
@@ -546,14 +559,14 @@ export default {
},
// 发现回复列表
getReplyList(id) {
- this.page_[id] = 0;
if (!this.page_[id] === 0) {
}
console.log(this.page_[id]);
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
- console.log(this.page_);
+ console.log(res);
if (res.errCode == 0) {
this.page_[id]++;
+ console.log(this.page_[id]);
this.allList[id] = res.data;
}
})
@@ -585,7 +598,7 @@ export default {
delta: 1
})
},
- focus() {
+ focus(e) {
setTimeout(function(){
uni.showSoftKeybord;
}, 200)
diff --git a/pageB/video/video.nvue b/pageB/video/video.nvue
index dd229cb..57afe10 100644
--- a/pageB/video/video.nvue
+++ b/pageB/video/video.nvue
@@ -1,5 +1,5 @@
-
+
@@ -29,7 +29,7 @@
-
+
@@ -75,10 +75,13 @@
-
-
- 发送
+
+
+
+ 发送
+
+
@@ -124,6 +127,7 @@
return {
videoSize: {},
fixTop: 0,
+ editTop: 0,
list: {},
labelLen: [],
cart_len: 0, // 购物车个数
@@ -238,6 +242,7 @@
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => {
+ this.is_edit = false;
if (res.data.errCode == 0) {
this.send_value = "";
this.comment_num = res.data.num;
@@ -249,6 +254,11 @@
this.commentList.unshift(res.data.data.data);
}
console.log(this.commentList);
+ } else if (res.data.errCode == 401) {
+ uni.showToast({
+ title: "您还没有登录,请先登录!",
+ icon: "none"
+ })
} else {
uni.showToast({
title: res.data.message,
@@ -327,12 +337,21 @@
}
},
// 打开评论输入
- openKeyInput(data,index) {
- console.log(this.is_focus);
- this.is_edit = true;
+ openKeyInput(data, index) {
+ let me = this;
+ this.is_focus = true;
setTimeout(() => {
- this.is_focus = true;
- }, 200)
+ this.is_edit = true;
+ }, 500)
+ uni.onKeyboardHeightChange(function(res) {
+ console.log(res);
+ if (res.height == 0) {
+ me.is_focus = false;
+ me.is_edit = false;
+ } else {
+ me.editTop = res.height;
+ }
+ })
this.comment_id = index;
if (data.id) {
this.edit_text_other = "回复@" + data.member_nickname;
@@ -347,7 +366,6 @@
},
blue() {
this.is_focus = false;
- console.log(111);
},
// 关闭评论
closeComment() {
@@ -387,6 +405,10 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 推荐达人
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 您还没有关注哦,赶紧去点点关注!
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index e047b68..689adba 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -47,7 +47,7 @@
我的订单
查看全部订单
-
+
@@ -180,7 +180,7 @@ export default {
.mine-top {
// width: 100%;
height: 272rpx;
- background: #FF780F;
+ background-color: #F0AD4E;
.top {
padding: 40rpx 0 0 30rpx;
display: flex;
@@ -242,13 +242,11 @@ export default {
}
}
.bottom {
- box-sizing: border-box;
- padding: 0 30rpx;
display: flex;
- // justify-content: space-between;
- justify-content: flex-start;
+ justify-content: space-around;
+ padding: 0 10rpx;
+ box-sizing: border-box;
> view {
- margin-right: 80rpx;
text-align: center;
font-size: 26rpx;
font-weight: 500;
@@ -268,35 +266,35 @@ export default {
}
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
box-sizing: border-box;
- width: 690rpx;
+ width: 750rpx;
background: rgba(255,255,255,1);
- border-radius: 10rpx;
- margin: 30rpx auto 0;
- padding: 0 20rpx;
+ // border-radius: 10rpx;
+ margin: 20rpx auto 0;
.title {
- height: 76rpx;
- font-size: 28rpx;
- color: #666;
- position: relative;
display: flex;
align-items: center;
- &::after {
- content: "";
- position: absolute;
- width: 650rpx;
- height: 1rpx;
- background: rgba(234,234,234,1);
- bottom: 0;
- left: 50%;
- transform: translate(-50%,0);
- }
+ height: 76rpx;
+ padding: 0 20rpx;
+ font-size: 28rpx;
+ color: #666;
+ border-bottom: 1px solid #ececec;
+ // &::after {
+ // content: "";
+ // position: absolute;
+ // width: 650rpx;
+ // height: 1rpx;
+ // background: rgba(234,234,234,1);
+ // bottom: 0;
+ // left: 50%;
+ // transform: translate(-50%,0);
+ // }
}
.title-text-more {
font-size: 24rpx;
color: #999;
}
.content {
- padding: $content-padding-top 0 $content-padding-bottom;
+ padding: $content-padding-top 20rpx $content-padding-bottom;
display: flex;
> view {
text-align: center;
diff --git a/pages/zhibo/index.nvue b/pages/zhibo/index.nvue
index f981639..cf05ced 100644
--- a/pages/zhibo/index.nvue
+++ b/pages/zhibo/index.nvue
@@ -507,7 +507,11 @@ export default {
},
success(res){
console.log(res)
- that.info = res.data.data
+ that.info = res.data.data;
+ uni.showToast({
+ title: res.data.message,
+ icon: "none"
+ })
// that.list= res.data.data
}
})