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; }