public JsonResult SavePayPwd(string oldPwd, string pwd) { var hasPayPwd = MemberApplication.HasPayPwd(CurrentUser.Id); if (hasPayPwd && string.IsNullOrEmpty(oldPwd)) { return(Json(new { success = false, msg = "请输入旧支付密码" })); } if (string.IsNullOrWhiteSpace(pwd)) { return(Json(new { success = false, msg = "请输入新支付密码" })); } if (hasPayPwd) { var success = MemberApplication.VerificationPayPwd(CurrentUser.Id, oldPwd); if (!success) { return(Json(new { success = false, msg = "旧支付密码错误" })); } } _iMemberCapitalService.SetPayPwd(CurrentUser.Id, pwd); return(Json(new { success = true, msg = "设置成功" })); }
public ActionResult SetPayPwd() { var hasPayPwd = MemberApplication.HasPayPwd(CurrentUser.Id); var viewModel = new UserCapitalViewModels.SetPayPwdModel() { HasPawPwd = hasPayPwd }; return(View(viewModel)); }