public DataTable UserLogin([FromBody] LoginInfo json) { DataTable dt = null; try { if (string.IsNullOrWhiteSpace(json.account)) { dt = new DataTable(); dt.Columns.Add("IsSuccess", typeof(string)); dt.Columns.Add("Error", typeof(string)); DataRow dr = dt.NewRow(); dr["IsSuccess"] = "false"; dr["Error"] = "账号错误"; dt.Rows.Add(dr); } else { OperationData op = new OperationData(); dt = op.UserVerification(json.account, json.accounttype, json.password, json.code); } } catch (Exception ex) { dt = new DataTable(); dt.Columns.Add("IsSuccess", typeof(string)); dt.Columns.Add("Error", typeof(string)); DataRow dr = dt.NewRow(); dr["IsSuccess"] = "false"; dr["Error"] = ex.Message; dt.Rows.Add(dr); Log.WriteError(ex, "登陆(UserLogin)"); } return(dt); }