Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix(post): 修复发布动态时没有权限的报错信息
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Nov 2, 2018
1 parent c606e8e commit 1ebe50b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/page/post/PostImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ export default {
this.loading = false;
this.goBack();
})
.catch(() => {
this.$Message.error("发送失败,请稍后再试");
.catch(err => {
this.$Message.error(err.response.data);
})
.finally(() => {
this.loading = false;
});
}
Expand Down
7 changes: 4 additions & 3 deletions src/page/post/PostText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,12 @@ export default {
)
.then(({ data }) => {
this.$Message.success(data);
this.loading = false;
this.$router.push("/feeds?type=new");
})
.catch(() => {
this.$Message.error("发送失败,请稍后重试");
.catch(err => {
this.$Message.error(err.response.data);
})
.finally(() => {
this.loading = false;
});
}
Expand Down

0 comments on commit 1ebe50b

Please sign in to comment.