传播token;

更新admin解决方案
This commit is contained in:
Kimdiego2098
2023-08-14 16:43:30 +08:00
parent 89f9c537f8
commit 5bf64a8bec
3 changed files with 20 additions and 17 deletions
@@ -301,7 +301,7 @@ internal partial class SiemensHelper
{
return new OperResult<string>("在PLC中不是字符串类型");
}
var result2 = await plc.ReadAsync(address, 2 + result1.Content[1]);
var result2 = await plc.ReadAsync(address, 2 + result1.Content[1], token);
if (!result2.IsSuccess)
{
return result2.Copy<string>();
@@ -311,7 +311,7 @@ public class MqttClient : UpLoadBase
{
var mqttFactory = new MqttFactory(new PrivateLogger(LogMessage));
_mqttClientOptions = mqttFactory.CreateClientOptionsBuilder()
.WithClientId(driverPropertys.ConnectId)
.WithClientId(driverPropertys.ConnectId)
.WithCredentials(driverPropertys.UserName, driverPropertys.Password)//账密
.WithTcpServer(driverPropertys.IP, driverPropertys.Port)//服务器
.WithCleanSession(true)
@@ -5,26 +5,29 @@
</PropertyGroup>
<ItemGroup>
<Content Include="Configuration\App.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration\Database.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration\JWT.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration\Swagger.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration\App.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration\Database.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration\JWT.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration\Swagger.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<!--Admin-->
<ProjectReference Include="..\ThingsGateway.Admin.ApiController\ThingsGateway.Admin.ApiController.csproj" />
<ProjectReference Include="..\ThingsGateway.Admin.Blazor\ThingsGateway.Admin.Blazor.csproj" />
<ProjectReference Include="..\ThingsGateway.Admin.ApiController\ThingsGateway.Admin.ApiController.csproj" />
<ProjectReference Include="..\ThingsGateway.Admin.Blazor\ThingsGateway.Admin.Blazor.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(SolutionName)'=='ThingsGateway'">
<!--采集网关-->
<ProjectReference Include="..\ThingsGateway.ApiController\ThingsGateway.ApiController.csproj" />
<ProjectReference Include="..\ThingsGateway.Blazor\ThingsGateway.Blazor.csproj" />