From 2fb1172e3272d9e482d22ac0425d6a0c104746ab Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Wed, 12 Feb 2020 08:47:58 +0800
Subject: [PATCH] update
Former-commit-id: 83734de59e34fc93ca97ebcdd7b8335259ecb304
---
.../DeviceServices/Onvif/OnvifService.cs | 4 +--
.../Controllers/SerialPortController.cs | 3 ++-
projects/WebApp/wwwroot/js/iot.js | 5 ++++
projects/WebApp/wwwroot/pages/iot/device.html | 1 +
.../wwwroot/pages/iot/device/camera.html | 14 +++++-----
.../wwwroot/pages/iot/device/switch.html | 27 +++++++++++++++++++
projects/WebApp/wwwroot/pages/iot/node.html | 13 ++++++---
tools/nginx-1.16.0/conf/nginx.conf | 4 +++
8 files changed, 57 insertions(+), 14 deletions(-)
create mode 100644 projects/WebApp/wwwroot/pages/iot/device/switch.html
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 @@