diff --git a/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs b/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs index e1b998f5..fdb52abb 100644 --- a/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs +++ b/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs @@ -509,7 +509,7 @@ namespace IoTNode.DeviceServices.Onvif if (!string.IsNullOrEmpty(ptzAddress)) { var deviceUrl = camera.GetDataValue("DeviceUrl"); - RequestXml(ptzAddress, MessageTemplate.StopAction, String.Format(MessageTemplate.StopMessage, camera.GetDataValue("Token"), true, true), camera.UserName, camera.Password, GetOnoce(deviceUrl)); + RequestXml(ptzAddress, MessageTemplate.StopAction, String.Format(MessageTemplate.StopMessage, camera.GetDataValue("ProfileToken"), true, true), camera.UserName, camera.Password, GetOnoce(deviceUrl)); } } } @@ -523,7 +523,7 @@ namespace IoTNode.DeviceServices.Onvif if (!string.IsNullOrEmpty(ptzAddress)) { var deviceUrl = camera.GetDataValue("DeviceUrl"); - RequestXml(ptzAddress, MessageTemplate.ContinuousMoveAction, String.Format(MessageTemplate.ContinuousMoveMessage, camera.GetDataValue("Token"), zx, px, py), camera.UserName, camera.Password, GetOnoce(deviceUrl)); + RequestXml(ptzAddress, MessageTemplate.ContinuousMoveAction, String.Format(MessageTemplate.ContinuousMoveMessage, camera.GetDataValue("ProfileToken"), zx, px, py), camera.UserName, camera.Password, GetOnoce(deviceUrl)); } } } diff --git a/projects/IoTNode/DeviceServices/SerialPort/Controllers/SerialPortController.cs b/projects/IoTNode/DeviceServices/SerialPort/Controllers/SerialPortController.cs index 35f47e76..d1ffb484 100644 --- a/projects/IoTNode/DeviceServices/SerialPort/Controllers/SerialPortController.cs +++ b/projects/IoTNode/DeviceServices/SerialPort/Controllers/SerialPortController.cs @@ -35,7 +35,8 @@ namespace IoTNode.Controllers }); } - public ApiResponse Test([SwaggerParameter("设备编号")]string number, + [HttpGet, Route("/[controller]/[action]"), SwaggerOperation("测试")] + public ApiResponse Test([SwaggerParameter("设备编号")]string number, [SwaggerParameter("串口")]string port, [SwaggerParameter("波特率")]int baud, [SwaggerParameter("数据位")]int dataBits, diff --git a/projects/WebApp/wwwroot/js/iot.js b/projects/WebApp/wwwroot/js/iot.js index 2dbf25a4..5dc513ef 100644 --- a/projects/WebApp/wwwroot/js/iot.js +++ b/projects/WebApp/wwwroot/js/iot.js @@ -75,6 +75,11 @@ Vue.component('iot-curtain', function (resolve, reject) { resolve(parseModel(response)); }); }); +Vue.component('iot-switch', function (resolve, reject) { + axios.get("/pages/iot/device/switch.html").then(function (response) { + resolve(parseModel(response)); + }); +}); Vue.component('iot-switch3', function (resolve, reject) { axios.get("/pages/iot/device/switch3.html").then(function (response) { resolve(parseModel(response)); diff --git a/projects/WebApp/wwwroot/pages/iot/device.html b/projects/WebApp/wwwroot/pages/iot/device.html index 1cd7b5aa..368df61b 100644 --- a/projects/WebApp/wwwroot/pages/iot/device.html +++ b/projects/WebApp/wwwroot/pages/iot/device.html @@ -13,6 +13,7 @@ + diff --git a/projects/WebApp/wwwroot/pages/iot/device/camera.html b/projects/WebApp/wwwroot/pages/iot/device/camera.html index a76914d7..1945f0b5 100644 --- a/projects/WebApp/wwwroot/pages/iot/device/camera.html +++ b/projects/WebApp/wwwroot/pages/iot/device/camera.html @@ -42,21 +42,21 @@ - + - - - - - + + + + + - + diff --git a/projects/WebApp/wwwroot/pages/iot/device/switch.html b/projects/WebApp/wwwroot/pages/iot/device/switch.html new file mode 100644 index 00000000..0ad26a9d --- /dev/null +++ b/projects/WebApp/wwwroot/pages/iot/device/switch.html @@ -0,0 +1,27 @@ + + \ No newline at end of file diff --git a/projects/WebApp/wwwroot/pages/iot/node.html b/projects/WebApp/wwwroot/pages/iot/node.html index e7d67bb7..647697eb 100644 --- a/projects/WebApp/wwwroot/pages/iot/node.html +++ b/projects/WebApp/wwwroot/pages/iot/node.html @@ -4,7 +4,7 @@

{{node.name}}

- +
@@ -35,9 +35,9 @@
- +
@@ -46,6 +46,11 @@
+ +
+ +
+
diff --git a/tools/nginx-1.16.0/conf/nginx.conf b/tools/nginx-1.16.0/conf/nginx.conf index 1d2f79fe..8d6fd436 100644 --- a/tools/nginx-1.16.0/conf/nginx.conf +++ b/tools/nginx-1.16.0/conf/nginx.conf @@ -30,6 +30,10 @@ http { proxy_pass http://localhost:8030/; } + location ^~ /live/ { + proxy_pass http://localhost:8080/live/; + } + location ^~ /UserCenter/ { proxy_pass http://localhost:8010/UserCenter/; }