diff --git a/.env.development b/.env.development index 24e61f8..27b9b6a 100644 --- a/.env.development +++ b/.env.development @@ -5,8 +5,8 @@ VITE_APP_TITLE = 云平台管理系统 VITE_APP_ENV = 'development' # 开发环境 - #VITE_APP_BASE_API = 'https://fuyuanshen.com/backend' - VITE_APP_BASE_API = 'http://192.168.2.34:8000' + VITE_APP_BASE_API = 'https://fuyuanshen.com/backend' + #VITE_APP_BASE_API = 'http://192.168.2.23:8000' #代永飞接口 #VITE_APP_BASE_API = 'http://457102h2d6.qicp.vip:24689' diff --git a/src/assets/index/IMG.png b/src/assets/index/IMG.png new file mode 100644 index 0000000..0d59558 Binary files /dev/null and b/src/assets/index/IMG.png differ diff --git a/src/utils/mqtt.ts b/src/utils/mqtt.ts index cfac351..13febdd 100644 --- a/src/utils/mqtt.ts +++ b/src/utils/mqtt.ts @@ -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 diff --git a/src/views/equipmentManagement/devices/index.vue b/src/views/equipmentManagement/devices/index.vue index 3077778..584cfd6 100644 --- a/src/views/equipmentManagement/devices/index.vue +++ b/src/views/equipmentManagement/devices/index.vue @@ -87,9 +87,10 @@