Browse Source

Merge branch 'feature/association' of http://git.elinkit.com.cn:7070/r/epdc-resident-mp-js into feature/association

master
ZhaoTongYao 5 years ago
parent
commit
815599f084
  1. 30
      subpages/associationNew/pages/eventlist/eventlist.js

30
subpages/associationNew/pages/eventlist/eventlist.js

@ -43,6 +43,7 @@ Page({
})
}
},
// 查列表
topiclist() {
@ -149,10 +150,15 @@ Page({
//点赞
clicklike(e) {
console.log(JSON.stringify(e))
// <!-- 用户是否已点赞 0否;1是 -->
console.log(e.currentTarget.dataset.likeflag)
if (this.data.bannedFlag == '1') {//被禁言
wx.showToast({
title: '您已经被禁言',
icon: 'none',
duration: 2000
})
return false
}
let attitude = ""
if (e.currentTarget.dataset.likeflag == '0') {//点赞
attitude = 0
@ -169,13 +175,20 @@ Page({
topiclist: [],
})
this.topiclist()
console.log('点赞成功' + res)
}).catch(err => {
console.log(err)
})
},
// Textarea获取焦点
clickTextarea(e) {
if (this.data.bannedFlag == '1') {//被禁言
wx.showToast({
title: '您已经被禁言',
icon: 'none',
duration: 2000
})
return false
}
this.setData({
ifcomment: true,
focus: true,
@ -188,18 +201,16 @@ Page({
this.setData({ //失去焦点以后view隐藏
ifcomment: false
})
console.log(this.data.commentContent)
},
// 身份证号 双向绑定
// 双向绑定
bindIdentity(e) {
this.setData({
commentContent: e.detail.value
})
console.log(this.data.commentContent)
},
// 评论按钮点击事件
commentSubmit() {
let that = this;
const para = {
topicId: this.data.topicId,//被评论的话题ID
@ -211,14 +222,11 @@ Page({
topiclist: [],
})
this.topiclist()
console.log('评论成功' + res)
}).catch(err => {
console.log(err)
})
console.log('点击事件')
},
previewImage(e) {
console.log(JSON.stringify(e))
app.globalData.previewImage = true
wx.previewImage({
urls: e.currentTarget.dataset.imgarry,

Loading…
Cancel
Save