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