1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| import * as types from './mutation-type'
|
| export default {
| setUserAndState({ commit }, user) {
| commit(types.SET_USER, user)
| commit(types.SET_LOGGED_IN, true)
| },
|
| loginOut({ commit }) {
| localStorage.clear()
| commit(types.REMOVE_LOGGED_IN, false)
| },
|
| readMessage({ commit }, message) {
| commit(types.REMOVE_UNREAD_MESSAGE, message.id)
| commit(types.MARK_READ_MESSAGE, message)
| },
| }
|
|