|
|
@ -41,7 +41,7 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad: function (options) { |
|
|
|
console.log(options.topicId) |
|
|
|
//console.log(options.topicId)
|
|
|
|
this.setData({ |
|
|
|
topicId: options.topicId |
|
|
|
}) |
|
|
@ -60,7 +60,7 @@ Page({ |
|
|
|
}, |
|
|
|
fetchDetail(){ |
|
|
|
let topicId = this.data.topicId |
|
|
|
console.log('议题详情' + topicId) |
|
|
|
//console.log('议题详情' + topicId)
|
|
|
|
topicModel.getTopicDetail(topicId,res => { |
|
|
|
let data = res.result |
|
|
|
this.setData({ |
|
|
@ -82,7 +82,7 @@ Page({ |
|
|
|
let topicId = this.data.topicId |
|
|
|
let page = this.data.currPage |
|
|
|
topicModel.getTopicDetailComment(topicId,page,res => { |
|
|
|
console.log('议题评论') |
|
|
|
//console.log('议题评论')
|
|
|
|
|
|
|
|
const datas = res.result.list |
|
|
|
let tempDatas = [] |
|
|
@ -119,14 +119,14 @@ Page({ |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.data.commentList) |
|
|
|
//console.log(this.data.commentList)
|
|
|
|
wx.stopPullDownRefresh() |
|
|
|
}) |
|
|
|
}, |
|
|
|
fetchTopicCollect(){ |
|
|
|
let topicId = this.data.topicId |
|
|
|
topicModel.topicCollect(topicId,res =>{ |
|
|
|
console.log('收藏') |
|
|
|
//console.log('收藏')
|
|
|
|
if(res.code === 200){ |
|
|
|
this.fetchDetail() |
|
|
|
wx.showToast({ |
|
|
@ -140,7 +140,7 @@ Page({ |
|
|
|
fetchTopicUnCollect(){ |
|
|
|
let collectionId = this.data.collectionId |
|
|
|
topicModel.topicUnCollect(collectionId, res => { |
|
|
|
console.log('取消收藏') |
|
|
|
//console.log('取消收藏')
|
|
|
|
if (res.code === 200) { |
|
|
|
this.fetchDetail() |
|
|
|
wx.showToast({ |
|
|
@ -184,7 +184,7 @@ Page({ |
|
|
|
}, |
|
|
|
|
|
|
|
onClickPraise(e){ |
|
|
|
console.log(e) |
|
|
|
//console.log(e)
|
|
|
|
const sIndex = e.currentTarget.dataset.index |
|
|
|
var selectItem = e.currentTarget.dataset.item |
|
|
|
const commentList = this.data.commentList |
|
|
@ -198,7 +198,7 @@ Page({ |
|
|
|
|
|
|
|
// 点击查看图片
|
|
|
|
previewImg: function (e) { |
|
|
|
console.log(e.currentTarget.dataset.index); |
|
|
|
//console.log(e.currentTarget.dataset.index);
|
|
|
|
var index = e.currentTarget.dataset.index; |
|
|
|
var imgArr = this.data.imgArr; |
|
|
|
wx.previewImage({ |
|
|
@ -246,7 +246,7 @@ Page({ |
|
|
|
|
|
|
|
// 评论输入框
|
|
|
|
bingTextAreaInput(e){ |
|
|
|
console.log(e.detail.value) |
|
|
|
//console.log(e.detail.value)
|
|
|
|
this.setData({ |
|
|
|
currentComment: e.detail.value |
|
|
|
}) |
|
|
|