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 @@