diff --git a/pages/find/friend-circle/components/circleItem.vue b/pages/find/friend-circle/components/circleItem.vue
index 61f0a71..893e35a 100644
--- a/pages/find/friend-circle/components/circleItem.vue
+++ b/pages/find/friend-circle/components/circleItem.vue
@@ -133,7 +133,7 @@
...mapGetters(["storeSelfInfo"]),
},
data(){
- console.log(this.item);
+ //console.log(this.item);
return {
girdItemCustomStyle:{
padding: '0',
diff --git a/pages/find/friend-circle/friend-circle.vue b/pages/find/friend-circle/friend-circle.vue
index 57517e8..746aa17 100644
--- a/pages/find/friend-circle/friend-circle.vue
+++ b/pages/find/friend-circle/friend-circle.vue
@@ -56,14 +56,17 @@
-
+
+ :placeholder="placeholder" :focus="true" @confirm="commitComment" />
- 发送
+ 发送
@@ -107,6 +110,7 @@
content: '',
placeholder: '',
showInput: false,
+ keyboardHeight:0,
focus: false,
id: '', //某一条朋友圈id
commentInfo: {},
@@ -131,17 +135,12 @@
},
onReady() {
- console.log(this.storeSelfInfo);
let that = this;
uni.onKeyboardHeightChange(res => {
+ that.keyboardHeight = res.height;
if (res.height == 0) {
- let windowHeight = this.$u.sys().windowHeight;
- //this.scrollViewHeight = windowHeight - 90;
- this.showInput = false;
+ that.showInput = false;
return;
- } else {
- let windowHeight = this.$u.sys().windowHeight;
- //this.scrollViewHeight = (windowHeight - res.height) - 120;
}
});
},
@@ -343,7 +342,7 @@
this.showInput = true;
},
//提交评论消息
- sendMsg() {
+ commitComment() {
let that=this;
if (!that.$u.trim(that.content)) {
return;
diff --git a/store/modules/circle.js b/store/modules/circle.js
index 2b3fcf4..7f7390b 100644
--- a/store/modules/circle.js
+++ b/store/modules/circle.js
@@ -52,16 +52,9 @@ const actions = {
return new Promise((resolve,reject)=>{
uni.$u.http.post('/friendcircle/comment',params).then(data=>{
console.log("评论成功",data);
- let index = -1;
- for(let i=0;i i.id ==params.id);
+ if(index>=0){
+ state.list[index].comments.unshift(data);
resolve(data);
}else{
reject(data);