diff --git a/projects/IoT.Shared/IoTSharedDbConfig.cs b/projects/IoT.Shared/IoTSharedDbConfig.cs index 09a6e2dd..7d53a1fe 100644 --- a/projects/IoT.Shared/IoTSharedDbConfig.cs +++ b/projects/IoT.Shared/IoTSharedDbConfig.cs @@ -70,11 +70,11 @@ namespace IoT.Shared } db.SaveChanges(); - db.Set().Add(new Category { Id = "productcatgoryid-00".ToGuid(), Number = "00", Name = "网关", Image = "/images/gateway.png" }); - db.Set().Add(new Category { Id = "productcatgoryid-10".ToGuid(), Number = "10", Name = "安防", Image = "/images/safe.png" }); - db.Set().Add(new Category { Id = "productcatgoryid-20".ToGuid(), Number = "20", Name = "电器", Image = "/images/socket.png" }); - db.Set().Add(new Category { Id = "productcatgoryid-30".ToGuid(), Number = "30", Name = "照明", Image = "/images/light.png" }); - db.Set().Add(new Category { Id = "productcatgoryid-40".ToGuid(), Number = "40", Name = "监测", Image = "/images/monitor.png" }); + db.Set().Add(new Category { Id = "productcatgoryid-00".ToGuid(), Number = "00", Name = "网关", Image = "/images/gateway.svg" }); + db.Set().Add(new Category { Id = "productcatgoryid-10".ToGuid(), Number = "10", Name = "安防", Image = "/images/safe.svg" }); + db.Set().Add(new Category { Id = "productcatgoryid-20".ToGuid(), Number = "20", Name = "电器", Image = "/images/socket.svg" }); + db.Set().Add(new Category { Id = "productcatgoryid-30".ToGuid(), Number = "30", Name = "照明", Image = "/images/light.svg" }); + db.Set().Add(new Category { Id = "productcatgoryid-40".ToGuid(), Number = "40", Name = "监测", Image = "/images/monitor.svg" }); db.SaveChanges(); } diff --git a/projects/IoTCenter/appsettings.json b/projects/IoTCenter/appsettings.json index d578479c..6e39238d 100644 --- a/projects/IoTCenter/appsettings.json +++ b/projects/IoTCenter/appsettings.json @@ -66,7 +66,7 @@ }, "AppSettings": { "database": "mysql", - "cache": "memory", + "cache": "redis", "fileserver": "minio" }, "minio": { diff --git a/projects/IoTCenter/wwwroot/js/site.js b/projects/IoTCenter/wwwroot/js/site.js index 9be0c5e1..4eaf9210 100644 --- a/projects/IoTCenter/wwwroot/js/site.js +++ b/projects/IoTCenter/wwwroot/js/site.js @@ -1,5 +1,5 @@ -function urlContent(baseUrl,path) { - if (!path.startsWith("/dfs/")) { +function urlContent2(baseUrl,path) { + if (path.startsWith("/dfs/")) { return baseUrl + path; } return path; @@ -206,8 +206,8 @@ function InitEditor(K) { if (isRequired) { $('#' + id).parents('form').validate().element('#' + id); } - $(image_id).attr('src', urlContent(baseUrl,url)); - $(image_id).parent('a').attr('href', urlContent(baseUrl, url)); + $(image_id).attr('src', urlContent2(baseUrl,url)); + $(image_id).parent('a').attr('href', urlContent2(baseUrl, url)); editor.hideDialog(); } }); diff --git a/projects/IoTNode/wwwroot/js/site.js b/projects/IoTNode/wwwroot/js/site.js index 9be0c5e1..4eaf9210 100644 --- a/projects/IoTNode/wwwroot/js/site.js +++ b/projects/IoTNode/wwwroot/js/site.js @@ -1,5 +1,5 @@ -function urlContent(baseUrl,path) { - if (!path.startsWith("/dfs/")) { +function urlContent2(baseUrl,path) { + if (path.startsWith("/dfs/")) { return baseUrl + path; } return path; @@ -206,8 +206,8 @@ function InitEditor(K) { if (isRequired) { $('#' + id).parents('form').validate().element('#' + id); } - $(image_id).attr('src', urlContent(baseUrl,url)); - $(image_id).parent('a').attr('href', urlContent(baseUrl, url)); + $(image_id).attr('src', urlContent2(baseUrl,url)); + $(image_id).parent('a').attr('href', urlContent2(baseUrl, url)); editor.hideDialog(); } }); diff --git a/projects/UserCenter/wwwroot/js/site.js b/projects/UserCenter/wwwroot/js/site.js index 9be0c5e1..4eaf9210 100644 --- a/projects/UserCenter/wwwroot/js/site.js +++ b/projects/UserCenter/wwwroot/js/site.js @@ -1,5 +1,5 @@ -function urlContent(baseUrl,path) { - if (!path.startsWith("/dfs/")) { +function urlContent2(baseUrl,path) { + if (path.startsWith("/dfs/")) { return baseUrl + path; } return path; @@ -206,8 +206,8 @@ function InitEditor(K) { if (isRequired) { $('#' + id).parents('form').validate().element('#' + id); } - $(image_id).attr('src', urlContent(baseUrl,url)); - $(image_id).parent('a').attr('href', urlContent(baseUrl, url)); + $(image_id).attr('src', urlContent2(baseUrl,url)); + $(image_id).parent('a').attr('href', urlContent2(baseUrl, url)); editor.hideDialog(); } }); diff --git a/projects/lib/local/js/site.js b/projects/lib/local/js/site.js index 9be0c5e1..4eaf9210 100644 --- a/projects/lib/local/js/site.js +++ b/projects/lib/local/js/site.js @@ -1,5 +1,5 @@ -function urlContent(baseUrl,path) { - if (!path.startsWith("/dfs/")) { +function urlContent2(baseUrl,path) { + if (path.startsWith("/dfs/")) { return baseUrl + path; } return path; @@ -206,8 +206,8 @@ function InitEditor(K) { if (isRequired) { $('#' + id).parents('form').validate().element('#' + id); } - $(image_id).attr('src', urlContent(baseUrl,url)); - $(image_id).parent('a').attr('href', urlContent(baseUrl, url)); + $(image_id).attr('src', urlContent2(baseUrl,url)); + $(image_id).parent('a').attr('href', urlContent2(baseUrl, url)); editor.hideDialog(); } });