Example #1
0
 public ActionResult ForgetPwd(string mobile, string password, string verifyCode)
 {
     if (SmsLogic.IsPassVerify(mobile, verifyCode))
     {
         if (UserLogic.ForgetPwd(mobile, password))
         {
             return(Json(new ResultModel(ApiStatusCode.OK)));
         }
         else
         {
             return(Json(new ResultModel(ApiStatusCode.找回密码失败)));
         }
     }
     return(Json(new ResultModel(ApiStatusCode.无效验证码)));
 }
Example #2
0
 public ActionResult ForgetPwd(string mobile, string password, string verifyCode)
 {
     try
     {
         if (SmsLogic.IsPassVerify(mobile, verifyCode))
         {
             if (UserLogic.ForgetPwd(mobile, password))
             {
                 return(Json(new ResultModel(ApiStatusCode.OK, "密码设置成功")));
             }
             else
             {
                 return(Json(new ResultModel(ApiStatusCode.找回密码失败)));
             }
         }
         return(Json(new ResultModel(ApiStatusCode.无效验证码)));
     }
     catch (Exception ex)
     {
         LogHelper.Log(string.Format("ForgetPwd user:message:{0},StackTrace:{1}", ex.Message, ex.StackTrace), LogHelperTag.ERROR);
         return(Json(new ResultModel(ApiStatusCode.SERVICEERROR)));
     }
 }
Example #3
0
 public ActionResult ChanageMobile(string mobile, string verifyCode)
 {
     try
     {
         if (SmsLogic.IsPassVerify(mobile, verifyCode))
         {
             SmsLogic.UpdateVerifyCodeInvalid(mobile, verifyCode);
             UserModel userInfo = new UserModel();
             userInfo.UserId     = GetAuthUserId();
             userInfo.UserMobile = mobile;
             if (UserLogic.UpdateUserInfo(UserPropertyOptions.USER_3, userInfo))
             {
                 return(Json(new ResultModel(ApiStatusCode.OK, "修改成功")));
             }
         }
         return(Json(new ResultModel(ApiStatusCode.无效验证码)));
     }
     catch (Exception ex)
     {
         LogHelper.Log(string.Format("ChanageMobile user:message:{0},StackTrace:{1}", ex.Message, ex.StackTrace), LogHelperTag.ERROR);
         return(Json(new ResultModel(ApiStatusCode.SERVICEERROR)));
     }
 }