public ActionResult InitPayPassowrd(string password) { if (MemberApplication.HasPayPassword(CurrentUser.Id)) { throw new MallException("已设置过支付密码"); } MemberApplication.ChangePayPassword(CurrentUser.Id, password); return(Json(new { success = true }, true)); }
/// <summary> /// 设置支付密码 /// </summary> /// <param name="model"></param> /// <returns></returns> public JsonResult <Result <bool> > PostInitPayPassowrd(PostSetPasswordModel model) { CheckUserLogin(); if (MemberApplication.HasPayPassword(CurrentUser.Id)) { return(Json(ErrorResult <bool>("已设置过支付密码!"))); } MemberApplication.ChangePayPassword(CurrentUser.Id, model.password); return(JsonResult(true)); }