1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

fixes #646 print console.log login data. (#647)

Co-authored-by: EdwinBetanc0urt <EdwinBetanco0urt@outlook.com>
This commit is contained in:
Edwin Betancourt 2021-03-09 09:18:02 -04:00 committed by GitHub
parent cfc744a62c
commit 822b909e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,13 +107,6 @@ const actions = {
token
}) {
return new Promise((resolve, reject) => {
console.log({
userName,
password,
roleUuid,
organizationUuid,
token
})
login({
userName,
password,
@ -137,6 +130,7 @@ const actions = {
})
})
},
/**
* Get session info
* @param {string} sessionUuid as token
@ -209,6 +203,7 @@ const actions = {
})
})
},
/**
* Get user info
* @param {string} sessionUuid as token
@ -251,6 +246,7 @@ const actions = {
})
})
},
// user logout
logout({ commit, state, dispatch }) {
const token = state.token
@ -280,6 +276,7 @@ const actions = {
})
})
},
// remove token
resetToken({ commit }) {
return new Promise(resolve => {
@ -289,6 +286,7 @@ const actions = {
resolve()
})
},
getRolesListFromServer({ commit }, sessionUuid = null) {
if (isEmptyValue(sessionUuid)) {
sessionUuid = getToken()
@ -334,6 +332,7 @@ const actions = {
})
})
},
getOrganizationsListFromServer({ commit, dispatch }, roleUuid) {
if (isEmptyValue(roleUuid)) {
roleUuid = getCurrentRole()
@ -369,6 +368,7 @@ const actions = {
console.warn(`Error ${error.code} getting Organizations list: ${error.message}.`)
})
},
changeOrganization({ commit, dispatch, getters }, {
organizationUuid,
organizationId,
@ -436,6 +436,7 @@ const actions = {
})
})
},
getWarehousesList({ commit }, organizationUuid) {
if (isEmptyValue(organizationUuid)) {
organizationUuid = getCurrentOrganization()
@ -469,6 +470,7 @@ const actions = {
console.warn(`Error ${error.code} getting Warehouses list: ${error.message}.`)
})
},
changeWarehouse({ commit, state }, {
warehouseUuid
}) {
@ -484,6 +486,7 @@ const actions = {
root: true
})
},
// dynamically modify permissions
changeRole({ commit, dispatch }, {
roleUuid,