From 82003df3b8f7078982e3ffa60569df7ce7b85b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E5=AF=92?= <823756726@qq.com> Date: Thu, 7 Nov 2024 17:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/DataSourceApi.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs index fcd7c4bba..547e6727a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DataSourceApi.cs @@ -40,13 +40,17 @@ namespace Learun.Application.WebApi.Modules } else { + if (data.Rows.Count > 0) { - foreach (DataRow item in data.Rows) + if (data.Columns.Contains("f_password")&&data.Columns.Contains("f_mobile")&&data.Columns.Contains("f_identitycardno")) { - item["f_password"] = ""; - item["f_mobile"] = ""; - item["f_identitycardno"] = ""; + foreach (DataRow item in data.Rows) + { + item["f_password"] = ""; + item["f_mobile"] = ""; + item["f_identitycardno"] = ""; + } } } var jsondata = new