diff --git a/epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.js b/epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.js index cff57f1..395ecbc 100644 --- a/epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.js +++ b/epdc-resident-mp-yushan/subpages/home/pages/newsDetail/newsDetail.js @@ -132,13 +132,34 @@ Page({ newsId: this.data.detailId, attitude: attitudeState } + if (attitudeState == 0) { //表态 0赞;1踩;2取消赞;3取消踩 + api.newsSupport(para).then(() => { + + }).catch(err => { + console.log(err) + }) + } else if (attitudeState == 1) { + api.newsOpposition(para).then(() => { + + }).catch(err => { + console.log(err) + }) + } else { + // const res = await newsPosition(para) + // console.log('新闻表态', res) + api.newsPosition(para).then(() => { + + }).catch(err => { + console.log(err) + }) + } // const res = await newsPosition(para) // console.log('新闻表态', res) - api.newsPosition(para).then(res => { + // api.newsPosition(para).then(res => { - }).catch(err => { - console.log(err) - }) + // }).catch(err => { + // console.log(err) + // }) } }, // 获取默认配置, 阅读时间, 获取默认网格