|
|
@ -1,6 +1,6 @@ |
|
|
|
// subpages/associationNew/pages/eventlist/eventlist.js
|
|
|
|
const app = getApp() |
|
|
|
import { topiclist, commentSubmit,statement } from '../../utils/api' |
|
|
|
import { topiclist, commentSubmit, statement } from '../../utils/api' |
|
|
|
import { |
|
|
|
getTimestamp |
|
|
|
} from '../../../../utils/common' |
|
|
@ -33,16 +33,17 @@ Page({ |
|
|
|
partyGroupId: options.partyGroupId, |
|
|
|
topicType: options.topicType,//0:事好儿鼓个掌 1:话对捧个场
|
|
|
|
}) |
|
|
|
if(options.topicType == 0){ |
|
|
|
if (options.topicType == 0) { |
|
|
|
wx.setNavigationBarTitle({ |
|
|
|
title: '事好儿鼓个掌' |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
wx.setNavigationBarTitle({ |
|
|
|
title: '话对捧个场' |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
// 查列表
|
|
|
|
topiclist() { |
|
|
@ -148,15 +149,20 @@ Page({ |
|
|
|
}, |
|
|
|
|
|
|
|
//点赞
|
|
|
|
clicklike(e){ |
|
|
|
console.log(JSON.stringify(e)) |
|
|
|
clicklike(e) { |
|
|
|
// <!-- 用户是否已点赞 0否;1是 -->
|
|
|
|
|
|
|
|
console.log(e.currentTarget.dataset.likeflag) |
|
|
|
let attitude ="" |
|
|
|
if(e.currentTarget.dataset.likeflag == '0'){//点赞
|
|
|
|
if (this.data.bannedFlag == '1') {//被禁言
|
|
|
|
wx.showToast({ |
|
|
|
title: '您已经被禁言', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
let attitude = "" |
|
|
|
if (e.currentTarget.dataset.likeflag == '0') {//点赞
|
|
|
|
attitude = 0 |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
attitude = 2 |
|
|
|
} |
|
|
|
let that = this; |
|
|
@ -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)) |
|
|
|
previewImage(e) { |
|
|
|
app.globalData.previewImage = true |
|
|
|
wx.previewImage({ |
|
|
|
urls: e.currentTarget.dataset.imgarry, |
|
|
|