shikeying
2023-03-22 47d7d2c1e141d805b28c54ac8cf6d5b6f1a2610d
src/store/modules/user.js
@@ -1,5 +1,6 @@
import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import log from "@/views/monitor/job/log";
const user = {
  state: {
@@ -35,8 +36,11 @@
      const password = userInfo.password
      const code = userInfo.code
      const uuid = userInfo.uuid
      const loginType = userInfo.loginType
      const verifyType = userInfo.verifyType
      return new Promise((resolve, reject) => {
        login(username, password, code, uuid).then(res => {
        login(username, password, code, uuid, loginType, verifyType).then(res => {
          // console.log(res.data.token)
          // setToken(res.token)
          setToken(res.data.token)
@@ -61,7 +65,7 @@
          } else {
            commit('SET_ROLES', ['ROLE_DEFAULT'])
          }
          commit('SET_NAME', user.userName)
          commit('SET_NAME', user.user_name)
          commit('SET_AVATAR', avatar)
          resolve(res)
        }).catch(error => {