|
|
|
@ -115,16 +115,16 @@ Page({ |
|
|
|
} |
|
|
|
this.data.keyboardHeight = Number(e.detail.height) |
|
|
|
wx.setStorageSync('keyboardHeight', this.data.keyboardHeight) |
|
|
|
this.setData({ |
|
|
|
inputBottom: e.detail.height |
|
|
|
}) |
|
|
|
this.setData({ inputBottom: e.detail.height }) |
|
|
|
}, |
|
|
|
inputBlur: function(e) { |
|
|
|
this.setData({ |
|
|
|
inputBottom: 0, focus: false |
|
|
|
}) |
|
|
|
this.setData({ inputBottom: 0, focus: false }) |
|
|
|
}, |
|
|
|
showComment: function(e) { |
|
|
|
if(!app.globalData.userInfo){ |
|
|
|
wx.navigateTo({ url: '/pages/login/index' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.data.keyboardHeight){ |
|
|
|
this.setData({ focus: true,inputBottom: this.data.keyboardHeight }) |
|
|
|
} else { |
|
|
|
@ -150,6 +150,10 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
likeComment: function(e){ |
|
|
|
if(!app.globalData.userInfo){ |
|
|
|
wx.navigateTo({ url: '/pages/login/index' }) |
|
|
|
return |
|
|
|
} |
|
|
|
var item = this.data.commentList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] |
|
|
|
if(item.isLiked){ |
|
|
|
util.showToast('请勿重复点赞') |
|
|
|
@ -173,6 +177,10 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
likePost: function(){ |
|
|
|
if(!app.globalData.userInfo){ |
|
|
|
wx.navigateTo({ url: '/pages/login/index' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.data.momentDetail.isLiked){ |
|
|
|
util.showToast('请勿重复点赞') |
|
|
|
return |
|
|
|
|