From 566212e186dd81562b5837377b7234b35e32fb98 Mon Sep 17 00:00:00 2001 From: "DESKTOP-G961P6V\\Zhh" <839860190@qq.com> Date: Fri, 17 May 2024 00:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs b/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs index 10119df..15a30c5 100644 --- a/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs +++ b/src/Shentun.ColumnReferencePlugIns/PlugInsBase.cs @@ -142,6 +142,10 @@ namespace Shentun.Peis.PlugIns public async Task CallAppServiceAsync(string url, TInput data, string method = "post") { + if(string.IsNullOrWhiteSpace(_appBaseAddress)) + { + throw new Exception("_appBaseAddress不能为空"); + } string baseAddress = _appBaseAddress; await CheckLoginAsync(); using (var httpClientHandler = new HttpClientHandler()) @@ -214,6 +218,14 @@ namespace Shentun.Peis.PlugIns public async virtual Task LoginAsync() { + if(string.IsNullOrWhiteSpace(SelfUser)) + { + throw new Exception("SelfUser不能为空"); + } + if (string.IsNullOrWhiteSpace(SelfPassword)) + { + throw new Exception("SelfPassword不能为空"); + } var relult = await LoginAsync(SelfUser, SelfPassword); return relult; }