diff --git a/projects/Demo/Demo/App.xaml.cs b/projects/Demo/Demo/App.xaml.cs index 3ae84ac7..b9435e98 100644 --- a/projects/Demo/Demo/App.xaml.cs +++ b/projects/Demo/Demo/App.xaml.cs @@ -22,7 +22,7 @@ namespace Demo #endif Task.Factory.StartNew(async () => { - using (var server = new WebServer("http://*:80")) + using (var server = new WebServer("http://*:5000")) { var assembly = typeof(App).Assembly; server.RegisterModule(new ResourceFilesModule(assembly, "Demo.wwwroot")); diff --git a/projects/Demo/Demo/MainPage.xaml.cs b/projects/Demo/Demo/MainPage.xaml.cs index 1690782a..c18be876 100644 --- a/projects/Demo/Demo/MainPage.xaml.cs +++ b/projects/Demo/Demo/MainPage.xaml.cs @@ -13,7 +13,7 @@ namespace Demo NavigationPage.SetHasNavigationBar(this, false); this.webView.Navigating += WebView_Navigating; this.webView.Navigated += WebView_Navigated; - this.webView.Source = $"http://localhost/index.html"; + this.webView.Source = $"http://localhost:5000/index.html"; } private void WebView_Navigating(object sender, WebNavigatingEventArgs e) diff --git a/projects/Demo/Demo/wwwroot/css/app.css b/projects/Demo/Demo/wwwroot/css/app.css index 5184c63b..e7cc05a0 100644 --- a/projects/Demo/Demo/wwwroot/css/app.css +++ b/projects/Demo/Demo/wwwroot/css/app.css @@ -34,7 +34,7 @@ img.shot.zoom { max-width:none; max-height: none; } -.list.media-list{ +.block .list{ margin:0; } @@ -58,3 +58,13 @@ img.shot.zoom { .videoContainer table { margin: 0 auto; } +.device-desktop.with-modal-dialog .page-content { + overflow: auto; +} +* { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} \ No newline at end of file diff --git a/projects/Demo/Demo/wwwroot/images/stop.png b/projects/Demo/Demo/wwwroot/images/stop.png index 18b5c15d..8013cb91 100644 Binary files a/projects/Demo/Demo/wwwroot/images/stop.png and b/projects/Demo/Demo/wwwroot/images/stop.png differ diff --git a/projects/Demo/Demo/wwwroot/index.html b/projects/Demo/Demo/wwwroot/index.html index 4f11cf24..a01d944c 100644 --- a/projects/Demo/Demo/wwwroot/index.html +++ b/projects/Demo/Demo/wwwroot/index.html @@ -832,23 +832,23 @@ - + - + - + - + - + - + diff --git a/projects/Demo/Demo/wwwroot/js/app.js b/projects/Demo/Demo/wwwroot/js/app.js index b464c4e3..fab91afd 100644 Binary files a/projects/Demo/Demo/wwwroot/js/app.js and b/projects/Demo/Demo/wwwroot/js/app.js differ diff --git a/projects/IoT/IoTServices/NJWLService/src/main/java/com.dsideal.iot/controllers/Lock2Controller.java b/projects/IoT/IoTServices/NJWLService/src/main/java/com.dsideal.iot/controllers/Lock2Controller.java new file mode 100644 index 00000000..b31598e7 --- /dev/null +++ b/projects/IoT/IoTServices/NJWLService/src/main/java/com.dsideal.iot/controllers/Lock2Controller.java @@ -0,0 +1,20 @@ +package com.dsideal.iot.controllers; + +import com.dsideal.iot.models.ApiResponse; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.*; + +@Api(tags = "71洞庭湖系列网络锁") +@RequestMapping("/lock2") +@RestController +@CrossOrigin +public class Lock2Controller extends BaseDeviceController { + @ApiOperation(value = "解锁") + @GetMapping(value = "21open", produces = MediaType.APPLICATION_JSON_VALUE) + public ApiResponse open(@ApiParam(required = true, value = "设备ID") @RequestParam String id) { + return super.sendControl(id, "111"); + } +} diff --git a/projects/IoT/IoTServices/NJWLService/src/main/java/com.dsideal.iot/infrastructure/DeviceMessageCallback.java b/projects/IoT/IoTServices/NJWLService/src/main/java/com.dsideal.iot/infrastructure/DeviceMessageCallback.java index 8fe2f092..8a5557af 100644 --- a/projects/IoT/IoTServices/NJWLService/src/main/java/com.dsideal.iot/infrastructure/DeviceMessageCallback.java +++ b/projects/IoT/IoTServices/NJWLService/src/main/java/com.dsideal.iot/infrastructure/DeviceMessageCallback.java @@ -479,7 +479,23 @@ public class DeviceMessageCallback extends BaseMessageCallback implements Messag } } model.Data.add(new DataModel(DataType.Text, "status", "状态", value, null, null, 0)); - } else if (deviceName.equals("墙面插座")) { + } else if (deviceName.equals("洞庭湖系列网络锁")) { + String key = epData; + String value = null; + Map map = new HashMap() {{ + put("0808010901", "解锁"); + put("0808000003", "解锁"); + put("0808000000", "解锁"); + put("0102", "上锁"); + }}; + if (map.containsKey(key)) { + value = map.get(key); + } else { + value = "其他"; + } + model.Data.add(new DataModel(DataType.Text, "status", "状态", value, null, null, 0)); + } + else if (deviceName.equals("墙面插座")) { Map map = new HashMap() {{ put("0", "关"); put("1", "开"); diff --git a/projects/IoT/IoTServices/NJWLService/src/main/resources/data.json b/projects/IoT/IoTServices/NJWLService/src/main/resources/data.json index df0765af..1fec14a3 100644 --- a/projects/IoT/IoTServices/NJWLService/src/main/resources/data.json +++ b/projects/IoT/IoTServices/NJWLService/src/main/resources/data.json @@ -90,6 +90,13 @@ "path": "lock", "icon":"door" }, + "Bg": { + "deviceName": "洞庭湖系列网络锁", + "categoryName": "安防", + "categoryNumber": "10", + "path": "lock2", + "icon":"door" + }, "80": { "deviceName": "一路可调窗帘", "categoryName": "电器",