public async Task <ApiResult> UpdatePassword() { if (HttpContext.Request.Form.TryGetValue("NewPassword", out var queryNewPwd) && HttpContext.Request.Form.TryGetValue("ConfirmPassword", out var queryCfmPwd) && HttpContext.Request.Query.TryGetValue("StaffId", out var Id)) { if (!queryNewPwd.Equals(queryCfmPwd)) { return(ApiResult.GetRequestError($"{queryCfmPwd}前后密码不一致!")); } else { await passportService.UpdateSysOperatorPassword(int.Parse(Id), queryNewPwd); return(ApiResult.Success); } } else { return(ApiResult.NotFound); } }