From a47b30494cde3d34569699610fdc743b4fdc2a9f Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Thu, 10 Sep 2020 09:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safety/pages/newsDetail/newsDetail.js | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/epdc-resident-mp-yushan/subpages/safety/pages/newsDetail/newsDetail.js b/epdc-resident-mp-yushan/subpages/safety/pages/newsDetail/newsDetail.js index f9c64bc..cdeea90 100644 --- a/epdc-resident-mp-yushan/subpages/safety/pages/newsDetail/newsDetail.js +++ b/epdc-resident-mp-yushan/subpages/safety/pages/newsDetail/newsDetail.js @@ -128,34 +128,13 @@ 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) + }) } } }) \ No newline at end of file