| | |
| | | import request from '@/utils/request' |
| | | import { getToken } from '@/utils/auth' |
| | | |
| | | const LOGIN_SYSTEM_URL = "http://localhost:8008"; |
| | | |
| | | //换取账号 |
| | | export function getAccount(data) { |
| | | return request({ |
| | | url: LOGIN_SYSTEM_URL + '/auth/getAccount', |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/auth/getAccount', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | //换取账号密码 |
| | | getUserInfo().then(res => { |
| | | if (res.data.code == 200) { |
| | | // loginForm.department = res.data.result.department |
| | | loginForm.department = "公司领导" |
| | | loginForm.department = res.data.result.department |
| | | // loginForm.department = "公司领导" |
| | | getAccount(loginForm).then(res => { |
| | | if (res.data.code == "00000") { |
| | | //缓存账号密码 |