zhangxiao
2024-08-26 a4ca216c5b215f323b3c439b2f445dad72bbfce1
src/store/modules/user/index.ts
@@ -71,12 +71,14 @@
        const res = await userLogin(loginForm);
        setToken(res.data.access_token);
        const userInfo = {
          avatar: res.data.avatar,
          name: res.data.nickname,
          name: res.data.userName,
          email: res.data.email,
          role: res.data.roles[0].roleKey,
        };
        this.name=res.data.userName
     
        if(res.data?.roles.length>0)
            this.resources=res.data.roles[0].resources;