WXL
2026-03-19 5aa165156994b1b8a601063fa0a1107d1893ea57
src/store/modules/user.js
@@ -9,6 +9,7 @@
  state: {
    token: getToken(),
    name: '',
    sex:'',
    avatar: '',
    code: '',
    msg: '',
@@ -31,6 +32,9 @@
    },
    SET_NAME: (state, name) => {
      state.name = name
    },
    SET_SEX: (state, sex) => {
      state.sex = sex
    },
    SET_AVATAR: (state, avatar) => {
      state.avatar = avatar
@@ -93,6 +97,7 @@
            commit('SET_ROLES', ['ROLE_DEFAULT'])
          }
          commit('SET_NAME', user.userName)
          commit('SET_SEX', user.sex)
          commit('SET_ROLESor', user.roles)
          commit('SET_AVATAR', avatar)
          resolve(res)