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

Commit

Permalink
fix(auth): 退出登录后不提示请登录
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Nov 9, 2018
1 parent f846a74 commit 1fca3a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/stores/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export default {
// 注销登录
SIGN_OUT({ commit }) {
try {
Api.post(`/auth/logout`);
Api.post(
`/auth/logout`,
{},
{ validateStatus: s => (s >= 200 && s < 300) || s === 401 }
);
commit("SIGN_OUT");
} catch (e) {
// no condition here
Expand Down

0 comments on commit 1fca3a4

Please sign in to comment.