修复设备日志
This commit is contained in:
@ -17,8 +17,10 @@ export interface SubscribeOptions {
|
||||
// 根据当前页面协议自动选择MQTT配置
|
||||
const getMqttConfig = () => {
|
||||
// 检测当前页面协议(http: 或 https:)
|
||||
const isHttps = window.location.protocol === 'https:';
|
||||
console.log(isHttps,'检测环境');
|
||||
//const isHttps = window.location.protocol === 'https:';
|
||||
|
||||
const isHttps = import.meta.env.VITE_APP_ENV === 'production' || window.location.protocol === 'https:';
|
||||
console.log(isHttps,'检测环境');
|
||||
|
||||
return {
|
||||
// 自动切换协议:https页面用wss,http页面用ws
|
||||
|
||||
Reference in New Issue
Block a user