From b88e41f609a3662335409aefbea60fc11d8c964b Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Fri, 20 Mar 2020 21:49:43 +0800 Subject: [PATCH] 401 --- src/forge/Main/Detail.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 39eee8fe..da208469 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -202,7 +202,7 @@ class Detail extends Component{ if(!flag){ const url = `/projects/${project_id}/watchers/follow.json`; axios.post(url).then(result=>{ - if(result){ + if(result && result.data.status === 0){ this.props.showNotification('关注成功'); this.getDetail(); } @@ -212,7 +212,7 @@ class Detail extends Component{ }else{ const url = `/projects/${project_id}/watchers/unfollow.json`; axios.delete(url).then(result=>{ - if(result){ + if(result && result.data.status === 0){ this.props.showNotification('取消关注成功'); this.getDetail(); } @@ -228,7 +228,7 @@ class Detail extends Component{ if(!flag){ const url = `/projects/${project_id}/praise_tread/like.json`; axios.post(url).then(result=>{ - if(result){ + if(result && result.data.status === 0){ this.props.showNotification('点赞成功'); this.getDetail(); } @@ -238,7 +238,7 @@ class Detail extends Component{ }else{ const url = `/projects/${project_id}/praise_tread/unlike.json`; axios.delete(url).then(result=>{ - if(result){ + if(result && result.data.status === 0){ this.props.showNotification('取消点赞成功'); this.getDetail(); }