lixuliang
2024-11-22 879a3501a8ab9767a59458ad8c337f6c25e2e7c4
src/store/modules/user.js
@@ -1,5 +1,6 @@
import { login, logout, getInfo, refreshToken } from '@/api/login'
import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth'
import { encr } from "@/utils/jsencrypt";
const user = {
  state: {
@@ -39,7 +40,11 @@
    // 登录
    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