| | |
| | | LoginByUsername({ commit }, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | loginByUsername(userInfo.tenantId, userInfo.username, md5(userInfo.password), userInfo.type, userInfo.key, userInfo.code).then(res => { |
| | | console.log(res, 'res'); |
| | | const data = res.data; |
| | | console.log(data, '获取到token'); |
| | | console.log(data, 'data'); |
| | | if (data.error_description) { |
| | | Message({ |
| | | message: data.error_description, |
| | |
| | | commit('SET_USER_INFO', data); |
| | | commit('DEL_ALL_TAG'); |
| | | commit('CLEAR_LOCK'); |
| | | console.log(data.access_token, data.refresh_toke, data.tenant_id, data, 'usedatas'); |
| | | } |
| | | resolve(); |
| | | }).catch(error => { |