Skip to content

Commit

Permalink
fix logout not work zuiidea#826, zuiidea#669
Browse files Browse the repository at this point in the history
  • Loading branch information
superlbr committed May 25, 2018
1 parent 9731991 commit 0fd8824
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/models/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ export default {
}, { call, put }) {
const data = yield call(logout, parse(payload))
if (data.success) {
yield put({ type: 'updateState', payload: {
user: {},
permissions: { visit: [] },
menu: [{
id: 1,
icon: 'laptop',
name: 'Dashboard',
router: '/dashboard',
}],
}})
yield put({ type: 'query' })
} else {
throw (data)
Expand Down

0 comments on commit 0fd8824

Please sign in to comment.