From 35c7b86865e9c82a48c482ded782a45dc98b8acc Mon Sep 17 00:00:00 2001 From: lai <10633968+laiyujun1@user.noreply.gitee.com> Date: Wed, 26 Mar 2025 20:38:51 +0800 Subject: [PATCH] =?UTF-8?q?UDM=E7=94=A8=E6=88=B7=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/default/config.js | 21 ++++++++++++++------- src/views/dashboard/overview/index.vue | 4 ++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/public/default/config.js b/public/default/config.js index 7696cf78..a37eba9c 100644 --- a/public/default/config.js +++ b/public/default/config.js @@ -1,6 +1,6 @@ /** * =============== Configuration File Description =============== - * + * * - Nginx Deployment * Delete the file with the same name under the same level of loading.js, Nginx proxy address: /omc-api * @@ -10,12 +10,19 @@ * */ (function () { - // host = ip:port - // const host = '192.168.8.100:33030'; - const host = `${window.location.hostname}:33030`; - + // baseUrl = protocol://ip:port + // baseUrl = 'http://192.168.8.100:33030'; + const protocol = window.location.protocol + let wsprotocol = "ws:" + const hostname = window.location.hostname + let host = `${hostname}:33030`; + if (protocol === 'https:') { + host = `${hostname}:33443`; + wsprotocol = "wss:" + } + // Service Address - sessionStorage.setItem('baseUrl', `http://${host}`); + sessionStorage.setItem('baseUrl', `${protocol}//${host}`); // websocket Address - sessionStorage.setItem('wsUrl', `ws://${host}`); + sessionStorage.setItem('wsUrl', `${wsprotocol}//${host}`); })(); diff --git a/src/views/dashboard/overview/index.vue b/src/views/dashboard/overview/index.vue index 91fcc834..ca7ac6a3 100644 --- a/src/views/dashboard/overview/index.vue +++ b/src/views/dashboard/overview/index.vue @@ -198,7 +198,7 @@ async function fnGetSkim() { // UDM listUDMSub({ neId: udmNeId.value, pageNum: 1, pageSize: 1 }).then(res => { if (res.code === RESULT_CODE_SUCCESS) { - skimState.udmSubNum = res.data.total; + skimState.udmSubNum = res.total; } }); } @@ -263,7 +263,7 @@ function fnSelectUDM(e: any) { udmNeId.value = e.key; listUDMSub({ neId: udmNeId.value, pageNum: 1, pageSize: 1 }).then(res => { if (res.code === RESULT_CODE_SUCCESS) { - skimState.udmSubNum = res.data.total; + skimState.udmSubNum = res.total; } }); }