From 7d2935f5a361fdc99f511a7df7c32f019208bf37 Mon Sep 17 00:00:00 2001 From: 23688nl <329261568@qq.com> Date: Tue, 8 Nov 2022 10:53:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=EF=BC=9A=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=85=8D=E7=BD=AE=E5=9B=BE=E7=89=87=20prod-api=20?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BB=A5=E5=8F=8Aws=20=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/env.js | 2 +- src/utils/hciot.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/config/env.js b/src/config/env.js index 47c92eaa..67eaf93f 100644 --- a/src/config/env.js +++ b/src/config/env.js @@ -23,7 +23,7 @@ var iotHost="192.168.10.241:32024"; // 海创iot 平台 host var hrefHost = window.location.host; // let httpProtocol = window.location.protocol; // var hrefHost = '192.168.18.139'; -let httpProtocol = 'http'; +let httpProtocol = window.dasConfig.protocol ? window.dasConfig.protocol : 'http://'; if (env.NODE_ENV == 'development') { diff --git a/src/utils/hciot.js b/src/utils/hciot.js index 8d906b99..b05a4fdb 100644 --- a/src/utils/hciot.js +++ b/src/utils/hciot.js @@ -4,7 +4,7 @@ */ import { Loading } from 'element-ui'; -const baseHref = process.env.NODE_ENV === "production" ? `${window.dasConfig.protocol}${window.dasConfig.ip}${window.dasConfig.port ? ':'+window.dasConfig.port : ''}` : process.env.VUE_APP_BASE_API +const baseHref = process.env.NODE_ENV === "production" ? `${window.dasConfig.protocol}${window.dasConfig.ip}${window.dasConfig.port ? ':'+window.dasConfig.port : ''}${window.dasConfig.prodApi ? window.dasConfig.prodApi : ''}` : process.env.VUE_APP_BASE_API const baseURL = process.env.VUE_APP_BASE_API @@ -41,7 +41,6 @@ export function parseTime(time, pattern) { s: date.getSeconds(), a: date.getDay() } - debugger const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { let value = formatObj[key] // Note: getDay() returns 0 on Sunday