1
0
mirror of https://github.com/iczer/vue-antd-admin synced 2025-04-06 04:00:06 +08:00

fix: login state lost

This commit is contained in:
chenghx 2018-08-20 16:10:46 +08:00
parent 3053544b59
commit e3c5f57366

@ -16,6 +16,15 @@ export default {
_rev: doc._rev, _rev: doc._rev,
user: user user: user
}) })
}).catch(e => {
if (e.status === 404) {
db.put({
_id: 'currUser',
user: user
})
} else {
throw e
}
}) })
} }
} }