develop #5
@ -39,11 +39,11 @@ public class UserControllers:ControllerBase
 | 
				
			|||||||
    [HttpGet]
 | 
					    [HttpGet]
 | 
				
			||||||
    public async Task<IActionResult> My()
 | 
					    public async Task<IActionResult> My()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        string userId = this.User.FindFirst(JwtRegisteredClaimNames.Sub)!.Value;
 | 
					      
 | 
				
			||||||
        if (string.IsNullOrEmpty(userId))
 | 
					
 | 
				
			||||||
        {
 | 
					     
 | 
				
			||||||
            return Ok(new ReturnTemplate(500,"获取用户失败(JWT解析错误)",null));
 | 
					
 | 
				
			||||||
        }
 | 
					        string userId = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try
 | 
					        try
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@ -54,6 +54,5 @@ public class UserControllers:ControllerBase
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            return NotFound(ex.Message);
 | 
					            return NotFound(ex.Message);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -11,4 +11,6 @@ public class UserProfile
 | 
				
			|||||||
    public string? JobCode { get; set; }
 | 
					    public string? JobCode { get; set; }
 | 
				
			||||||
    public string? JobName { get; set; }
 | 
					    public string? JobName { get; set; }
 | 
				
			||||||
    public string? Birthday { get; set; }
 | 
					    public string? Birthday { get; set; }
 | 
				
			||||||
 | 
					    public string? MenuCode { get; set; }
 | 
				
			||||||
 | 
					    public string? MenuName { get; set; }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,9 @@ public class UserService
 | 
				
			|||||||
            Config = user.Config,
 | 
					            Config = user.Config,
 | 
				
			||||||
            JobCode = user.JobCode,
 | 
					            JobCode = user.JobCode,
 | 
				
			||||||
            JobName = user.JobName,
 | 
					            JobName = user.JobName,
 | 
				
			||||||
            Birthday = user.Birthday
 | 
					            Birthday = user.Birthday,
 | 
				
			||||||
 | 
					            MenuCode = user.MenuCode,
 | 
				
			||||||
 | 
					            MenuName = user.MenuName
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user