Ejemplo n.º 1
0
        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 = "设置成功" }));
        }
Ejemplo n.º 2
0
        public ActionResult SetPayPwd()
        {
            var hasPayPwd = MemberApplication.HasPayPwd(CurrentUser.Id);
            var viewModel = new UserCapitalViewModels.SetPayPwdModel()
            {
                HasPawPwd = hasPayPwd
            };

            return(View(viewModel));
        }