diff --git a/README-萤石云对接.md b/README-萤石云对接.md
new file mode 100644
index 0000000..31bce4d
--- /dev/null
+++ b/README-萤石云对接.md
@@ -0,0 +1,250 @@
+# 萤石云对接快速参考
+
+> **快速参考文档** - 5分钟了解核心要点
+
+---
+
+## 🚀 快速开始
+
+### 1. 文件清单
+```
+✅ src/pages/visual/index.vue # 监控页面
+✅ src/components/EzvizVideoPlayerSimple.vue # 播放器组件
+✅ src/static/html/ezviz-iframe.html # iframe HTML
+✅ src/utils/ezvizTokenManager.js # Token管理
+```
+
+### 2. 配置清单
+```json
+// pages.json - 横屏配置
+{
+ "path": "pages/visual/index",
+ "style": {
+ "pageOrientation": "landscape" // 横屏
+ }
+}
+
+// manifest.json - 内存配置
+{
+ "app-plus": {
+ "compatible": {
+ "largeHeap": true // 512MB
+ }
+ }
+}
+```
+
+### 3. 核心代码(3步完成)
+
+```javascript
+// 步骤1: 获取 AccessToken
+const accessToken = await tokenManager.getValidAccessToken()
+
+// 步骤2: 准备配置
+const config = {
+ accessToken: accessToken,
+ play_url: "ezopen://open.ys7.com/K74237657/1.hd.live"
+}
+
+// 步骤3: 初始化播放器
+this.ezstate = true
+await this.$nextTick()
+this.$refs.playerVideoRef.initEzuikit(config)
+```
+
+---
+
+## 📐 技术架构
+
+```
+Vue页面 → web-view → 本地HTML → 萤石云iframe
+ ↓ ↓ ↓ ↓
+管理状态 URL传参 解析参数 官方播放器
+```
+
+---
+
+## 🔑 关键参数
+
+### ezopen地址格式
+```
+ezopen://open.ys7.com/{设备序列号}/{通道号}.{清晰度}.live
+
+示例:
+ezopen://open.ys7.com/K74237657/1.hd.live
+ ↑ ↑ ↑
+ 设备序列号 通道 清晰度(hd/sd)
+```
+
+### AccessToken获取
+```javascript
+// API: https://open.ys7.com/api/lapp/token/get
+// 自动管理(推荐)
+const token = await tokenManager.getValidAccessToken()
+
+// 有效期:2小时
+// 自动缓存:提前1小时刷新
+```
+
+---
+
+## 🐛 常见问题速查
+
+| 问题 | 原因 | 解决方案 |
+|------|------|----------|
+| 黑屏 | AccessToken过期 | `tokenManager.getValidAccessToken()` |
+| 崩溃 | 内存不足 | 使用iframe方案 + largeHeap:true |
+| 变形 | 容器比例错误 | padding-top: 56.25% (16:9) |
+| ref undefined | 组件未渲染 | 先设置ezstate=true,再await $nextTick() |
+| 加载慢 | 高清占用大 | 切换标清: .sd.live |
+
+---
+
+## 💡 核心解决方案
+
+### 问题1:OutOfMemoryError
+```javascript
+// ❌ 不要加载本地SDK(~20MB)
+
+
+// ✅ 使用官方iframe(内存占用↓90%)
+
+```
+
+### 问题2:画面变形
+```scss
+// ✅ 使用padding-top锁定16:9
+.video-content {
+ &::before {
+ content: '';
+ display: block;
+ padding-top: 56.25%; /* 16:9 */
+ }
+}
+```
+
+### 问题3:组件引用错误
+```javascript
+// ✅ 正确顺序
+this.ezstate = true // 1. 先渲染
+await this.$nextTick() // 2. 等待DOM
+this.$refs.player.init() // 3. 再调用
+```
+
+---
+
+## 📊 性能对比
+
+| 方案 | 内存占用 | 稳定性 | 加载速度 |
+|------|---------|--------|----------|
+| 本地SDK | 256MB+ | ❌ 崩溃 | 慢 |
+| **iframe(最终)** | **~80MB** | **✅ 稳定** | **快** |
+
+---
+
+## 🎯 一键复制代码
+
+### 播放器初始化(完整版)
+```javascript
+async getVideoData() {
+ try {
+ // 1. 获取token
+ let accessToken
+ try {
+ accessToken = await tokenManager.getValidAccessToken()
+ } catch (error) {
+ accessToken = "backup-token" // 备用
+ }
+
+ // 2. 配置参数
+ const config = {
+ accessToken: accessToken,
+ play_url: "ezopen://open.ys7.com/K74237657/1.hd.live"
+ }
+
+ // 3. 渲染组件
+ this.ezstate = true
+ await this.$nextTick()
+
+ // 4. 初始化播放器
+ if (this.$refs.playerVideoRef) {
+ this.$refs.playerVideoRef.initEzuikit(config)
+ }
+
+ } catch (error) {
+ console.error('播放器初始化失败:', error)
+ }
+}
+```
+
+### 刷新播放器
+```javascript
+refresh() {
+ this.$refs.playerVideoRef.refresh()
+}
+```
+
+### 切换清晰度
+```javascript
+// 高清
+play_url: "ezopen://open.ys7.com/K74237657/1.hd.live"
+
+// 标清(省流量)
+play_url: "ezopen://open.ys7.com/K74237657/1.sd.live"
+```
+
+---
+
+## 📱 调试技巧
+
+### 查看日志
+```bash
+# BlueStacks + ADB
+adb logcat | grep -i "console\|chromium"
+```
+
+### Chrome远程调试
+```
+chrome://inspect/#devices
+```
+
+### 关键日志点
+```javascript
+console.log('AccessToken:', token.substring(0, 20))
+console.log('PlayUrl:', play_url)
+console.log('组件ref:', this.$refs.playerVideoRef)
+```
+
+---
+
+## 🔗 相关链接
+
+- 📖 [完整指南](./萤石云APP对接完整指南.md)
+- 🌐 [萤石云开放平台](https://open.ys7.com/)
+- 📚 [Uni-app文档](https://uniapp.dcloud.net.cn/)
+
+---
+
+## ✅ 检查清单
+
+部署前确认:
+
+```
+□ 已配置 AppKey 和 AppSecret
+□ 已获取设备序列号和验证码
+□ pages.json 配置横屏 (pageOrientation: landscape)
+□ manifest.json 启用大内存 (largeHeap: true)
+□ 所有必需文件已添加
+□ tokenManager 正常工作
+□ 测试播放功能正常
+```
+
+---
+
+**最后更新:** 2025-10-06
+**快速参考版本:** v1.0
+
+---
+
+需要详细说明?查看 → [萤石云APP对接完整指南.md](./萤石云APP对接完整指南.md)
+
diff --git a/package-lock.json b/package-lock.json
index d634fb5..de6649a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -25,6 +25,7 @@
"@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4070620250821001",
"@dcloudio/uni-ui": "^1.4.28",
+ "ezuikit-js": "^8.1.15",
"mqtt": "^3.0.0",
"vue": "^3.4.21",
"vue-i18n": "^9.1.9"
@@ -2681,6 +2682,62 @@
"node": ">=12"
}
},
+ "node_modules/@ezuikit/player-ezopen": {
+ "version": "8.1.15-beta.4",
+ "resolved": "https://registry.npmjs.org/@ezuikit/player-ezopen/-/player-ezopen-8.1.15-beta.4.tgz",
+ "integrity": "sha512-ry7kqBkFppxdXAiTHEIZZIigYGjv208NRX2t0XxvVRb9DPchKfwYN0bwjljXqD1Z3LHmhISlix+U0Q12ofLiRQ==",
+ "dependencies": {
+ "@ezuikit/player-plugin-record": "8.1.8-beta.3",
+ "@ezuikit/utils-i18n": "^1.0.1",
+ "@ezuikit/utils-logger": "^1.0.1",
+ "@ezuikit/utils-service": "1.0.1",
+ "@ezuikit/utils-tools": "^1.0.4",
+ "@juggle/resize-observer": "^3.4.0",
+ "dayjs": "^1.11.10",
+ "deepmerge": "^4.3.1",
+ "eventemitter3": "^5.0.1",
+ "jquery": "^3.7.1",
+ "screenfull": "^5.2.0",
+ "ua-parser-js": "1.0.37"
+ }
+ },
+ "node_modules/@ezuikit/player-plugin-record": {
+ "version": "8.1.8-beta.3",
+ "resolved": "https://registry.npmjs.org/@ezuikit/player-plugin-record/-/player-plugin-record-8.1.8-beta.3.tgz",
+ "integrity": "sha512-YcQ5MR8zyg8b+o/ktr6r+YCXkiEX43HVmzVkfJsERgaokaHzoNIpOomEl51j/13gcemjSXuN6i1apCRC2v32pg=="
+ },
+ "node_modules/@ezuikit/utils-collect": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@ezuikit/utils-collect/-/utils-collect-0.1.1.tgz",
+ "integrity": "sha512-BgEOnTtAq8rQRBAKv5rLXbQLGOnfOZ6NS0QTmiviey80JbMJlxrLiqmjL5lxvkm4JtCcXCtSgPA4tskQKN4eDA=="
+ },
+ "node_modules/@ezuikit/utils-i18n": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@ezuikit/utils-i18n/-/utils-i18n-1.1.1.tgz",
+ "integrity": "sha512-PZe37fHfjUbhArXaoWMxbGOnU1R6k8XV7NroB3n2uL+z06SajozxO5TQARrk7Z72USQPvUsyaKIBcwVNjWK6/w==",
+ "dependencies": {
+ "deepmerge": "^4.3.1"
+ }
+ },
+ "node_modules/@ezuikit/utils-logger": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@ezuikit/utils-logger/-/utils-logger-1.1.0.tgz",
+ "integrity": "sha512-l/PiFZIC/VtW2l1oEjZEXfeYKFkPvX1kAlljXc1nRImNOI9t71/2oyTTkqkZvMLP/EG5regD9wuQplcvtfubUg=="
+ },
+ "node_modules/@ezuikit/utils-service": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@ezuikit/utils-service/-/utils-service-1.0.1.tgz",
+ "integrity": "sha512-iNjYuU7AScBJxvKBM9PjiGI2y64QJNPT/H1Fy/Y7ZIAlw4DO//TP+x50qCho+i+EOUpWLtOqBQvtRb7a0O4X4Q==",
+ "dependencies": {
+ "@ezuikit/utils-tools": "^1.0.1",
+ "dayjs": "^1.11.10"
+ }
+ },
+ "node_modules/@ezuikit/utils-tools": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@ezuikit/utils-tools/-/utils-tools-1.1.0.tgz",
+ "integrity": "sha512-mujPtXIhZnuJrJySu1/Z6X90sMJQStZydurZcfetMCH6pqIYN4P+1w6+P8PCTR6k4LJp5nY9+eNnKa7AZ8OBKA=="
+ },
"node_modules/@intlify/core-base": {
"version": "9.1.9",
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.1.9.tgz",
@@ -3554,6 +3611,11 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@juggle/resize-observer": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz",
+ "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA=="
+ },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -4621,6 +4683,11 @@
"dev": true,
"peer": true
},
+ "node_modules/abortcontroller-polyfill": {
+ "version": "1.7.8",
+ "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.8.tgz",
+ "integrity": "sha512-9f1iZ2uWh92VcrU9Y8x+LdM4DLj75VE0MJB8zuF1iUnroEptStw+DQ8EQPMUdfe5k+PkB1uUfDQfWbhstH8LrQ=="
+ },
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -5715,6 +5782,16 @@
"node": ">=10"
}
},
+ "node_modules/dayjs": {
+ "version": "1.11.18",
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.18.tgz",
+ "integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA=="
+ },
+ "node_modules/debounce-promise": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/debounce-promise/-/debounce-promise-3.1.2.tgz",
+ "integrity": "sha512-rZHcgBkbYavBeD9ej6sP56XfG53d51CD4dnaw989YX/nZ/ZJfgRx/9ePKmTNiUiyQvh4mtrMoS3OAWW+yoYtpg=="
+ },
"node_modules/debug": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
@@ -5749,8 +5826,6 @@
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
- "dev": true,
- "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -5777,6 +5852,11 @@
"node": ">=0.4.0"
}
},
+ "node_modules/delegate": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
+ "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
+ },
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -6221,6 +6301,11 @@
"es5-ext": "~0.10.14"
}
},
+ "node_modules/eventemitter3": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
+ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
+ },
"node_modules/execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
@@ -6354,6 +6439,28 @@
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
+ "node_modules/ezuikit-js": {
+ "version": "8.1.15",
+ "resolved": "https://registry.npmjs.org/ezuikit-js/-/ezuikit-js-8.1.15.tgz",
+ "integrity": "sha512-1rYAvL7dJWoRNGGoPwqCfGX3LDiDoMQFk2LxdqT7Sk9ITt0TaOwnprka4cF372g/qYuwG17xUbQ0+wUgnMV7KA==",
+ "dependencies": {
+ "@ezuikit/player-ezopen": "8.1.15-beta.4",
+ "@ezuikit/utils-collect": "0.1.1",
+ "@ezuikit/utils-i18n": "^1.0.1",
+ "@ezuikit/utils-logger": "^1.0.1",
+ "@ezuikit/utils-tools": "^1.0.4",
+ "@juggle/resize-observer": "^3.4.0",
+ "abortcontroller-polyfill": "^1.7.5",
+ "debounce-promise": "^3.1.2",
+ "deepmerge": "^4.3.1",
+ "delegate": "3.2.0",
+ "formdata-polyfill": "^4.0.10",
+ "jquery": "^3.3.1",
+ "lodash-es": "^4.17.21",
+ "screenfull": "^5.2.0",
+ "uuid": "^8.3.0"
+ }
+ },
"node_modules/fast-glob": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
@@ -6394,6 +6501,28 @@
"bser": "2.1.1"
}
},
+ "node_modules/fetch-blob": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "dependencies": {
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
+ },
+ "engines": {
+ "node": "^12.20 || >= 14.13"
+ }
+ },
"node_modules/file-type": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-9.0.0.tgz",
@@ -6496,6 +6625,17 @@
"node": ">= 6"
}
},
+ "node_modules/formdata-polyfill": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+ "dependencies": {
+ "fetch-blob": "^3.1.2"
+ },
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -7950,6 +8090,11 @@
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.3.7.tgz",
"integrity": "sha512-9IXdWudL61npZjvLuVe/ktHiA41iE8qFyLB+4VDTblEsWBzeg8WQTlktdUK4CdncUqtUgUg0bbOmTE2bKBKaBQ=="
},
+ "node_modules/jquery": {
+ "version": "3.7.1",
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
+ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
+ },
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -8244,6 +8389,11 @@
"dev": true,
"peer": true
},
+ "node_modules/lodash-es": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
+ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
+ },
"node_modules/lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
@@ -8584,6 +8734,25 @@
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
"optional": true
},
+ "node_modules/node-domexception": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+ "deprecated": "Use your platform's native DOMException instead",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "engines": {
+ "node": ">=10.5.0"
+ }
+ },
"node_modules/node-int64": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
@@ -9733,6 +9902,17 @@
"node": ">=10"
}
},
+ "node_modules/screenfull": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/screenfull/-/screenfull-5.2.0.tgz",
+ "integrity": "sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/scule": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz",
@@ -10414,6 +10594,28 @@
"is-typedarray": "^1.0.0"
}
},
+ "node_modules/ua-parser-js": {
+ "version": "1.0.37",
+ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz",
+ "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/ua-parser-js"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/faisalman"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/faisalman"
+ }
+ ],
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/ufo": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
@@ -10644,6 +10846,14 @@
"node": ">= 0.4.0"
}
},
+ "node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
"node_modules/v8-to-istanbul": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz",
@@ -10867,6 +11077,14 @@
"makeerror": "1.0.12"
}
},
+ "node_modules/web-streams-polyfill": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
"node_modules/webidl-conversions": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
diff --git a/package.json b/package.json
index ebb7ff7..b187166 100644
--- a/package.json
+++ b/package.json
@@ -53,6 +53,7 @@
"@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4070620250821001",
"@dcloudio/uni-ui": "^1.4.28",
+ "ezuikit-js": "^8.1.15",
"mqtt": "^3.0.0",
"vue": "^3.4.21",
"vue-i18n": "^9.1.9"
diff --git a/src/App.vue b/src/App.vue
index 3ec2bdf..a836b58 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,7 +3,6 @@ import mqttDataManager from '@/utils/mqttDataManager.js'
export default {
onLaunch: function () {
- console.log('App Launch')
// 应用启动时的初始化逻辑
this.initApp()
},
@@ -26,17 +25,17 @@ export default {
}
// 显示平台信息
- console.log('📱 当前平台:',
- // #ifdef H5
- 'H5'
- // #endif
- // #ifdef APP-PLUS
- 'APP-PLUS'
- // #endif
- // #ifdef MP-WEIXIN
- 'MP-WEIXIN'
- // #endif
- )
+ let platform = 'Unknown'
+ // #ifdef H5
+ platform = 'H5'
+ // #endif
+ // #ifdef APP-PLUS
+ platform = 'APP-PLUS'
+ // #endif
+ // #ifdef MP-WEIXIN
+ platform = 'MP-WEIXIN'
+ // #endif
+ console.log('📱 当前平台:', platform)
// MQTT连接已在mqttDataManager中自动初始化
console.log('✅ 应用初始化完成')
@@ -55,7 +54,7 @@ page {
sans-serif;
height: 100%;
width: 100%;
- background-color: #f5f5f5;
+ background-color: #f5f6fa;
}
/* 确保根元素和页面容器都是100%高度 */
@@ -74,15 +73,16 @@ page {
/* 固定头部样式 */
.fixed-header {
- // position: fixed;
- // top: 0;
- // left: 0;
- // right: 0;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
height: 40px;
z-index: 1000;
- background-color: #3f51b5;
- padding: 20rpx 30rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.1);
+ background-color: #ffffff;
+ padding: 15rpx 20rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
+ border-bottom: 2rpx solid #e1e5e9;
display: flex;
flex-direction: row;
justify-content: center;
@@ -90,9 +90,9 @@ page {
}
.header-title {
- color: white;
+ color: #2c3e50;
font-size: 32rpx;
- font-weight: bold;
+ font-weight: 600;
text-align: center;
}
@@ -102,7 +102,7 @@ page {
padding-top: 100rpx; /* 为固定头部留出空间 */
padding-bottom: 200rpx; /* 为tabbar留出空间 */
overflow-y: auto;
- background-color: #f5f5f5;
+ background-color: #f5f6fa;
display: flex;
flex-direction: column;
}
@@ -110,13 +110,14 @@ page {
/* tabbar页面内容区域 */
.tabbar-content {
flex: 1;
- padding: 20rpx;
+ // padding: 0 20rpx; /* 增加底部padding为tabbar留出空间 */
+ margin-top: 100rpx; /* 为固定头部留出空间,增加距离 */
overflow-y: auto;
display: flex;
flex-direction: column;
- // padding-bottom: 60px
+ // min-height: calc(100vh - 200rpx); /* 调整最小高度计算 */
// #ifdef H5
- margin-bottom: 50px;
+ // margin-bottom: 50px;
// #endif
}
@@ -148,29 +149,69 @@ button::after {
/* 卡片样式 */
.card {
- background: white;
- border-radius: 12rpx;
- padding: 30rpx;
- margin-bottom: 20rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
+ background: #ffffff;
+ border-radius: 8rpx;
+ padding: 20rpx;
+ margin-bottom: 16rpx;
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
+ border: 1rpx solid #e1e5e9;
}
/* 按钮样式 */
.btn-primary {
- background-color: #3f51b5;
+ background-color: #2980b9;
color: white;
- padding: 20rpx 40rpx;
- border-radius: 8rpx;
- font-size: 28rpx;
+ padding: 16rpx 20rpx;
+ border-radius: 6rpx;
+ font-size: 26rpx;
border: none;
+ font-weight: 600;
+ transition: background-color 0.2s ease;
+}
+
+.btn-primary:active {
+ background-color: #21618c;
}
.btn-secondary {
- background-color: #666;
+ background-color: #7f8c8d;
color: white;
- padding: 20rpx 40rpx;
- border-radius: 8rpx;
- font-size: 28rpx;
+ padding: 16rpx 20rpx;
+ border-radius: 6rpx;
+ font-size: 26rpx;
border: none;
+ font-weight: 600;
+ transition: background-color 0.2s ease;
+}
+
+.btn-secondary:active {
+ background-color: #6c7b7d;
+}
+
+/* 响应式设计 */
+@media screen and (max-width: 750rpx) {
+ .fixed-header {
+ padding: 16rpx 20rpx;
+ }
+
+ .tabbar-content {
+ padding: 16rpx 16rpx 100rpx; /* 调整小屏幕下的内边距 */
+ margin-top: 90rpx; /* 调整小屏幕下的顶部间距 */
+ }
+}
+
+@media screen and (max-width: 600rpx) {
+ .fixed-header {
+ padding: 12rpx 16rpx;
+ }
+
+ .tabbar-content {
+ padding: 16rpx 16rpx 90rpx; /* 更小屏幕下的内边距 */
+ margin-top: 80rpx; /* 更小屏幕下的顶部间距 */
+ }
+
+ .header-title {
+ font-size: 28rpx;
+ }
}
diff --git a/src/components/EzvizVideoPlayerSimple.vue b/src/components/EzvizVideoPlayerSimple.vue
new file mode 100644
index 0000000..7f2257f
--- /dev/null
+++ b/src/components/EzvizVideoPlayerSimple.vue
@@ -0,0 +1,351 @@
+
+
+
+ 平台: {{ platform }}
+ 状态: {{ status }}
+ 播放状态: {{ isPlaying ? '播放中' : '已暂停' }}
+
+
+
+
+
+
+
+
+
+ H5平台暂不支持
+
+
+
+
+
+
+
+
+
+ {{ loadingText }}
+
+
+
+ {{ errorText }}
+
+
+
+
+
+
+
+
+
diff --git a/src/main.js b/src/main.js
index 050a36b..b8ea339 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,28 +1,28 @@
-import {
- createSSRApp
-} from "vue";
-import App from "./App.vue";
-import httpService from "./utils/http.js";
-import api from "./utils/api.js";
-
-export function createApp() {
- const app = createSSRApp(App);
-
- // 注册全局HTTP服务
- app.config.globalProperties.$http = httpService;
- app.config.globalProperties.$api = api;
-
- return {
- app,
- };
-}
-
-// #ifndef MP
-// 处理 wx.connectSocket promisify 兼容问题,强制返回 SocketTask
-uni.connectSocket = (function(connectSocket) {
- return function(options) {
- options.success = options.success || function() {}
- return connectSocket.call(this, options)
- }
-})(uni.connectSocket)
-// #endif
+import {
+ createSSRApp
+} from "vue";
+import App from "./App.vue";
+import httpService from "./utils/http.js";
+import api from "./utils/api.js";
+
+export function createApp() {
+ const app = createSSRApp(App);
+
+ // 注册全局HTTP服务
+ app.config.globalProperties.$http = httpService;
+ app.config.globalProperties.$api = api;
+
+ return {
+ app,
+ };
+}
+
+// #ifndef MP
+// 处理 wx.connectSocket promisify 兼容问题,强制返回 SocketTask
+uni.connectSocket = (function(connectSocket) {
+ return function(options) {
+ options.success = options.success || function() {}
+ return connectSocket.call(this, options)
+ }
+})(uni.connectSocket)
+// #endif
diff --git a/src/manifest.json b/src/manifest.json
index a51330f..1ab820d 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -11,6 +11,9 @@
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 2,
"orientation" : "portrait",
+ "compatible" : {
+ "largeHeap" : true
+ },
"icons" : {
"app" : {
"hdpi" : "static/app-icon.png",
diff --git a/src/pages.json b/src/pages.json
index b0bc4db..3318f78 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -24,7 +24,7 @@
"path": "pages/visual/index",
"style": {
"navigationBarTitleText": "移动式检修车间",
- "navigationStyle": "custom"
+ "pageOrientation": "landscape"
}
},
{
@@ -45,23 +45,23 @@
"path": "pages/system/index",
"style": {
"navigationBarTitleText": "移动式检修车间",
- "navigationStyle": "custom",
- "orientation": "landscape"
+ "navigationStyle": "custom"
}
}
],
"globalStyle": {
- "navigationBarTextStyle": "white",
+ "navigationBarTextStyle": "black",
"navigationBarTitleText": "移动式检修车间系统",
- "navigationBarBackgroundColor": "#3f51b5",
- "backgroundColor": "#F8F8F8"
+ "navigationBarBackgroundColor": "#ffffff",
+ "backgroundColor": "#f5f6fa"
},
"tabBar": {
- "color": "#666666",
- "selectedColor": "#3f51b5",
+ "color": "#7f8c8d",
+ "selectedColor": "#2980b9",
"backgroundColor": "#ffffff",
- "borderStyle": "black",
- "fontSize": "14px",
+ "borderStyle": "white",
+ "fontSize": "13px",
+ "height": "65px",
"list": [
{
"pagePath": "pages/environment/index",
diff --git a/src/pages/environment/index.vue b/src/pages/environment/index.vue
index dc63ce4..5d34062 100644
--- a/src/pages/environment/index.vue
+++ b/src/pages/environment/index.vue
@@ -7,101 +7,143 @@
-
-
-
-
- 🌡️
-
- 温度
- {{ temperature }}°C
+
+
+
+
+
+
+
+
+
+ {{ 0 }}°C - {{ 100 }}°C
+
-
-
-
-
-
- 💧
-
- 湿度
- {{ humidity }}%
+
+
+
+
+
+
+
+
+ {{ 0 }}% - {{ 100 }}%
+
-
-
-
-
-
- ✨
-
- 洁净度
- {{ cleanliness > 0 ? cleanliness + '%' : '-%' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ 0 }}°C - {{ 100 }}°C
+
+
+
+
+
+
+
+
+ {{ 0 }}% - {{ 100 }}%
+
-
-
-
-
-
-
-
-
-
- {{ 0 }}% - {{ 100 }}%
-
-
-
-
-
-
-
-
-
-
-
- {{ 0 }}% - {{ 100 }}%
-
-
-
-
+
-
- 目标温度
+
+
+
+
-
+
- {{ targetTemperature }}
+
°C
-
+
+
+
+ {{ tempValidationMessage }}
+
+
+
+
+
+
+
+
+
+
+ %
+
+
+
+
+ {{ humidityValidationMessage }}
@@ -110,42 +152,25 @@
-
-
-
- 当前: {{ temperature }}°C
- 范围: {{ temperatureRange.min }}°C - {{ temperatureRange.max }}°C
-
-
- 当前: {{ humidity }}%
- 范围: {{ humidityRange.min }}% - {{ humidityRange.max }}%
-
@@ -221,7 +246,7 @@
+