This commit is contained in:
2018-11-08 18:05:00 +00:00
parent 8c7a001bca
commit 550b40edcc
3 changed files with 38 additions and 50 deletions

View File

@@ -6,11 +6,22 @@ Vue.use(Vuex);
export default new Vuex.Store({
state: {
authenticated: false,
mockAccount: {
username: "manager",
password: "letmein"
apiUrl: "http://localhost:7575/api/v8.0/",
userId: 0,
roles: 0
},
mutations: {
authenticated(state, data) {
// mutate state
state.authenticated = data.authenticated;
state.userId = data.userId;
state.roles = data.roles;
},
notAuthenticated(state) {
state.authenticated = false;
state.userId = 0;
state.roles = 0;
}
},
mutations: {},
actions: {}
});