예제 #1
0
 /// <summary>
 /// 根据手机号判断账号是否存在
 /// </summary>
 /// <param name="phone">手机号码</param>
 /// <returns></returns>
 /// <remarks>added by jimmy,2015-9-29</remarks>
 public JsonResult IsAccount(string phone)
 {
     if (null == _suppliersService.GetSuppliersByPhone(phone).Data)
     {
         return(Json(new { rs = 1, isAccount = false }));
     }
     // return Json(new { rs = 0, isAccount = true, msg = CultureHelper.GetLangString("LOGIN_PHONE_HAS_REGISTER") });//该手机号码已注册!
     return(Json(new { rs = 0, isAccount = true, msg = "该手机号码已注册!" }));//该手机号码已注册!
 }
예제 #2
0
        public JsonResult LoginPassVerify(string pwd)
        {
            if (string.IsNullOrEmpty(pwd))
            {
                return(Json(new { rs = 0, msg = "LOGIN_GETPASSWORD_PWDNOTEMPTY" }));//密码不能为空
            }
            SuppliersModel model    = _suppliersService.GetSuppliersByPhone("098888888").Data;
            string         password = FormsAuthentication.HashPasswordForStoringInConfigFile(pwd, "MD5");

            if (!password.Equals(model.PassWord))
            {
                return(Json(new { rs = 0, msg = "USERINFO_ORIGINAL_PASSWORD_INCORRECT" })); //原始密码不正确
            }
            return(Json(new { rs = 1, msg = "USERINFO_ORIGINAL_PASSWORD_CORRECT" }));       //原始密码正确
        }