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

Loading…
Cancel
Save