yinbangzhong
2024-08-17 fb0470f0285062672a95d84ba9777b95b9d74404
src/store/modules/user/index.ts
@@ -76,9 +76,11 @@
          name: res.data.nickname,
          email: res.data.email,
        };
        this.resources=res.data.resources;
        setUserInfo(JSON.stringify(userInfo));
        setUserResources(JSON.stringify(this.resources))
        if(res.data?.roles.length>0)
            this.resources=res.data.roles[0].resources;
            setUserInfo(JSON.stringify(userInfo));
            setUserResources(JSON.stringify(this.resources))
        for (const r of this.resources) {
          if (r.menuType == 0) {
            return r.component