This commit is contained in:
caicai8 2020-03-20 21:49:43 +08:00
parent a16d9871a3
commit b88e41f609
1 changed files with 4 additions and 4 deletions

View File

@ -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();
}