From 67da07a665c3c6bf8345b399683a5ab4def545c1 Mon Sep 17 00:00:00 2001 From: zhengpengju Date: Mon, 27 Apr 2020 16:11:42 +0800 Subject: [PATCH] fix bug Former-commit-id: 3d3d626c4d4a69317d8f72e9d12d5ffa9b6b2e0a --- projects/WebSPA/wwwroot/index.html | 3 +++ projects/WebSPA/wwwroot/js/config.js | 2 +- projects/WebSPA/wwwroot/pages/login.html | 2 +- projects/WebSPA/wwwroot/pages/login.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/projects/WebSPA/wwwroot/index.html b/projects/WebSPA/wwwroot/index.html index 9189a3fc..7871a2a3 100644 --- a/projects/WebSPA/wwwroot/index.html +++ b/projects/WebSPA/wwwroot/index.html @@ -21,6 +21,9 @@

加载中

+ diff --git a/projects/WebSPA/wwwroot/js/config.js b/projects/WebSPA/wwwroot/js/config.js index 08008783..1cd49e6d 100644 --- a/projects/WebSPA/wwwroot/js/config.js +++ b/projects/WebSPA/wwwroot/js/config.js @@ -1,5 +1,5 @@ var config = (function(global){ - global.apigateway = 'http://localhost'; // 设置通过API网关访问 + global.apigateway = window.location.protocol + '//' + window.location.host; // 设置通过API网关访问 global.iotCenterUrl = global.apigateway + '/IoTCenter'; // IoT服务API global.hubUrl = global.apigateway + '/IoTCenter/hub?group=page'; // 设备WebSocket访问地址 global.liverUrl = global.apigateway; // 流媒体服务器地址 diff --git a/projects/WebSPA/wwwroot/pages/login.html b/projects/WebSPA/wwwroot/pages/login.html index 4a8ee8e3..e7e74514 100644 --- a/projects/WebSPA/wwwroot/pages/login.html +++ b/projects/WebSPA/wwwroot/pages/login.html @@ -23,7 +23,7 @@ \ No newline at end of file diff --git a/projects/WebSPA/wwwroot/pages/login.js b/projects/WebSPA/wwwroot/pages/login.js index dd081f94..0a63f9bf 100644 --- a/projects/WebSPA/wwwroot/pages/login.js +++ b/projects/WebSPA/wwwroot/pages/login.js @@ -1,7 +1,7 @@ function pages_login() { return { component: Vue.component(arguments.callee.toString(), function (resolve, reject) { - axios.get("/pages/login.html").then(function (response) { + axios.get("/pages/login.html?v=0.1.0.202004270919").then(function (response) { resolve({ template: response.data, data() {