diff --git a/projects/Infrastructure/Extensions/HelperExtensions.cs b/projects/Infrastructure/Extensions/HelperExtensions.cs index c6f2ab4b..ff4e85b9 100644 --- a/projects/Infrastructure/Extensions/HelperExtensions.cs +++ b/projects/Infrastructure/Extensions/HelperExtensions.cs @@ -48,7 +48,7 @@ namespace Infrastructure.Extensions } } } - var ip = ipList.Where(o => o.ToString().StartsWith("192")).FirstOrDefault(); + var ip = ipList.Where(o => o.ToString().StartsWith("192.168.3")).FirstOrDefault(); return ip; } diff --git a/projects/IoT/IoT.Shared/wwwroot/js/iot.js b/projects/IoT/IoT.Shared/wwwroot/js/iot.js index 381adb20..594aee7a 100644 --- a/projects/IoT/IoT.Shared/wwwroot/js/iot.js +++ b/projects/IoT/IoT.Shared/wwwroot/js/iot.js @@ -303,6 +303,19 @@ function getJsonExt(url) { $.getJSON(url, function (result) { console.log(result); app.dialog.close(); + if (result.code === 0) { + if (result.type === 0) { + if (result.format === 1) { + console.log('format/1/base64 jpeg image'); + $('#callback .page-content .block').html(''); + } + else { + console.log('format/0/json object'); + $('#callback .page-content .block').html(result.data); + } + app.popup.open('#callback'); + } + } }).fail(function () { console.log('error'); app.dialog.close(); @@ -316,6 +329,7 @@ connection.on('Connected', function (id) { connectionId = id; }); connection.on('ApiResult', function (result) { + result = JSON.parse(result); if (result.code === 0) { if (result.type === 0) { if (result.format === 1) { diff --git a/projects/IoT/IoTServices/APService/Properties/launchSettings.json b/projects/IoT/IoTServices/APService/Properties/launchSettings.json index 2cc442a6..b4eff288 100644 --- a/projects/IoT/IoTServices/APService/Properties/launchSettings.json +++ b/projects/IoT/IoTServices/APService/Properties/launchSettings.json @@ -3,7 +3,7 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://127.0.0.1:8006", + "applicationUrl": "http://localhost:8006", "sslPort": 0 } }, @@ -18,7 +18,7 @@ "APService": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "http://127.0.0.1:8006", + "applicationUrl": "http://localhost:8006", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }