Browse Source

no message

featrue/v.4.0
xpz2018 5 years ago
parent
commit
35703e4ea9
2 changed files with 15 additions and 9 deletions
  1. 20
      pages/article/detail/index.js
  2. 4
      utils/util.js

20
pages/article/detail/index.js

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

4
utils/util.js

@ -173,7 +173,6 @@ const tokenList = [
'pages/mall/price-index/index', 'pages/mall/price-index/index',
'/pages/article/price-detail/index', '/pages/article/price-detail/index',
'/pages/article/queue-detail/index', '/pages/article/queue-detail/index',
'/pages/article/detail/index',
'/pages/shop/index/index', '/pages/shop/index/index',
'/pages/bidding/index/index', '/pages/bidding/index/index',
'/pages/morder/index/index', '/pages/morder/index/index',
@ -186,8 +185,7 @@ const tokenList = [
'/pages/agent/order/index', '/pages/agent/order/index',
'/pages/home/idcard/index', '/pages/home/idcard/index',
'/pages/shop/detail/index', '/pages/shop/detail/index',
'/pages/article/publish/index',
'pages/agent/factory/index'
'/pages/article/publish/index'
] ]
function navigateTo(url){ function navigateTo(url){

Loading…
Cancel
Save