public object Login(WebAPI.Models.UserModel userInfo) { bool result = false; string reason = string.Empty; if (userInfo == null) { reason = "参数为空"; var returnData = new { result = result, reason = reason }; return(returnData); } //校验 if (!VilidateKey.CheckKey(userInfo, ref reason)) { var returnData = new { result = result, reason = reason }; return(returnData); } int type = -1; result = UserData.Instance.Login(ref userInfo, ref reason, ref type); if (!result) { return(new { result = result, reason = reason }); } return(new { result = result, reason = reason, type = type, userid = userInfo.id }); }
public object AddMoney(Models.UserModel userInfo) { if (userInfo == null) { return(new { result = false, reason = "参数解析错误" }); } string reason = string.Empty; //校验 if (!VilidateKey.CheckKey(userInfo, ref reason)) { var returnData = new { result = false, reason = reason }; return(returnData); } bool result = UserData.Instance.AddMoney(userInfo, ref reason); return(new { result = result, reason = reason }); }
public object Regist(WebAPI.Models.UserModel userInfo) { bool result = false; string reason = string.Empty; if (userInfo == null) { reason = "参数为空"; var returnData = new { result = result, reason = reason }; return(returnData); } //校验 if (!VilidateKey.CheckKey(userInfo, ref reason)) { var returnData = new { result = result, reason = reason }; return(returnData); } result = UserData.Instance.RegistUser(userInfo, ref reason); return(new { result = result, reason = reason }); }