forked from Gitlink/forgeplus-react
401
This commit is contained in:
parent
a16d9871a3
commit
b88e41f609
|
@ -202,7 +202,7 @@ class Detail extends Component{
|
||||||
if(!flag){
|
if(!flag){
|
||||||
const url = `/projects/${project_id}/watchers/follow.json`;
|
const url = `/projects/${project_id}/watchers/follow.json`;
|
||||||
axios.post(url).then(result=>{
|
axios.post(url).then(result=>{
|
||||||
if(result){
|
if(result && result.data.status === 0){
|
||||||
this.props.showNotification('关注成功');
|
this.props.showNotification('关注成功');
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ class Detail extends Component{
|
||||||
}else{
|
}else{
|
||||||
const url = `/projects/${project_id}/watchers/unfollow.json`;
|
const url = `/projects/${project_id}/watchers/unfollow.json`;
|
||||||
axios.delete(url).then(result=>{
|
axios.delete(url).then(result=>{
|
||||||
if(result){
|
if(result && result.data.status === 0){
|
||||||
this.props.showNotification('取消关注成功');
|
this.props.showNotification('取消关注成功');
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ class Detail extends Component{
|
||||||
if(!flag){
|
if(!flag){
|
||||||
const url = `/projects/${project_id}/praise_tread/like.json`;
|
const url = `/projects/${project_id}/praise_tread/like.json`;
|
||||||
axios.post(url).then(result=>{
|
axios.post(url).then(result=>{
|
||||||
if(result){
|
if(result && result.data.status === 0){
|
||||||
this.props.showNotification('点赞成功');
|
this.props.showNotification('点赞成功');
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ class Detail extends Component{
|
||||||
}else{
|
}else{
|
||||||
const url = `/projects/${project_id}/praise_tread/unlike.json`;
|
const url = `/projects/${project_id}/praise_tread/unlike.json`;
|
||||||
axios.delete(url).then(result=>{
|
axios.delete(url).then(result=>{
|
||||||
if(result){
|
if(result && result.data.status === 0){
|
||||||
this.props.showNotification('取消点赞成功');
|
this.props.showNotification('取消点赞成功');
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue