| | |
| | | import { login, logout, getInfo, refreshToken } from '@/api/login' |
| | | import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth' |
| | | import { encr } from "@/utils/jsencrypt"; |
| | | |
| | | const user = { |
| | | state: { |
| | |
| | | // 登录 |
| | | Login({ commit }, userInfo) { |
| | | const username = userInfo.username.trim() |
| | | const password = userInfo.password |
| | | let pwd = encr(userInfo.password); |
| | | const password = pwd; |
| | | // const password = userInfo.password |
| | | const code = userInfo.code |
| | | const uuid = userInfo.uuid |
| | | return new Promise((resolve, reject) => { |
| | | login(username, password).then(res => { |
| | | let data = res.data |