|
|
@ -142,6 +142,10 @@ namespace Shentun.Peis.PlugIns |
|
|
|
|
|
|
|
|
public async Task<TOut> CallAppServiceAsync<TInput, TOut>(string url, TInput data, string method = "post") |
|
|
public async Task<TOut> CallAppServiceAsync<TInput, TOut>(string url, TInput data, string method = "post") |
|
|
{ |
|
|
{ |
|
|
|
|
|
if(string.IsNullOrWhiteSpace(_appBaseAddress)) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new Exception("_appBaseAddress不能为空"); |
|
|
|
|
|
} |
|
|
string baseAddress = _appBaseAddress; |
|
|
string baseAddress = _appBaseAddress; |
|
|
await CheckLoginAsync(); |
|
|
await CheckLoginAsync(); |
|
|
using (var httpClientHandler = new HttpClientHandler()) |
|
|
using (var httpClientHandler = new HttpClientHandler()) |
|
|
@ -214,6 +218,14 @@ namespace Shentun.Peis.PlugIns |
|
|
|
|
|
|
|
|
public async virtual Task<LoginOutDto> LoginAsync() |
|
|
public async virtual Task<LoginOutDto> LoginAsync() |
|
|
{ |
|
|
{ |
|
|
|
|
|
if(string.IsNullOrWhiteSpace(SelfUser)) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new Exception("SelfUser不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
if (string.IsNullOrWhiteSpace(SelfPassword)) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new Exception("SelfPassword不能为空"); |
|
|
|
|
|
} |
|
|
var relult = await LoginAsync(SelfUser, SelfPassword); |
|
|
var relult = await LoginAsync(SelfUser, SelfPassword); |
|
|
return relult; |
|
|
return relult; |
|
|
} |
|
|
} |
|
|
|