From 77f4d007a704b0d4a8c7e85b615d5541255f4d0f Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Fri, 19 Jul 2019 19:08:00 +0800 Subject: [PATCH] update Former-commit-id: f79e83e6eec8dc4d7ebe9f408581c1bf27d27660 --- .../FBeeService/Controllers/IrController.cs | 4 +- .../Infrastructure/DeviceService.cs | 1 + .../Assets/StreamingAssets/wwwroot/index.html | 57 ++++++++++++++++-- .../Assets/StreamingAssets/wwwroot/js/app.js | Bin 49188 -> 55730 bytes 4 files changed, 54 insertions(+), 8 deletions(-) diff --git a/projects/IoT/IoTServices/FBeeService/Controllers/IrController.cs b/projects/IoT/IoTServices/FBeeService/Controllers/IrController.cs index d68ac407..27e26b32 100644 --- a/projects/IoT/IoTServices/FBeeService/Controllers/IrController.cs +++ b/projects/IoT/IoTServices/FBeeService/Controllers/IrController.cs @@ -16,9 +16,9 @@ namespace FBeeService.Controllers this._deviceService = deviceService; } - [HttpGet, Route("[action]"), SwaggerOperation("发送指令")] + [HttpGet, Route("/[controller]/[action]"), SwaggerOperation("发送指令")] - public ApiResponse PressKey([SwaggerParameter("网关编号")]string gateway, [SwaggerParameter("设备编号")]string number, [SwaggerParameter("按键类型")]byte type, [SwaggerParameter("键值")]ushort code) + public ApiResponse Send([SwaggerParameter("网关编号")]string gateway, [SwaggerParameter("设备编号")]string number, [SwaggerParameter("按键类型")]byte type, [SwaggerParameter("键值")]ushort code) { return this.AsyncAction(() => { diff --git a/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs b/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs index fb4615ce..bf7b7552 100644 --- a/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs +++ b/projects/IoT/IoTServices/FBeeService/Infrastructure/DeviceService.cs @@ -1231,6 +1231,7 @@ namespace FBeeService } } deviceRepo.SaveChanges(); + this.SendDevice(device); } } } diff --git a/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html b/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html index 14dc32be..9e62527b 100644 --- a/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html +++ b/projects/IoTClient/Assets/StreamingAssets/wwwroot/index.html @@ -569,19 +569,64 @@