[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-11538":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},11538,"robot-charging-station-miniprogram","Dragolone\u002Frobot-charging-station-miniprogram","Dragolone","  微信小程序 · 机器人远程管理与实时遥控平台 · uni-app (Vue 3) + uniCloud 云函数    + IoT 网关 (MQTT\u002FWebSocket) | WeChat Mini Program for real-time remote robot     fleet management & teleoperation. Built with uni-app (Vue 3), uniCloud           serverless backend, and an MQTT\u002FWebSocket IoT gateway.   ","",null,"JavaScript",162,17,13,0,110,3.77,"MIT License",false,"main",true,[],"2026-06-12 02:02:32","# Robot Charging Station Mini Program\n\n> 微信小程序 · 机器人远程管理与实时遥控平台\n> uni-app (Vue 3) + uniCloud Serverless + IoT Gateway (MQTT \u002F WebSocket)\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](LICENSE)\n[![uni-app](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Funi--app-Vue%203-42b883.svg)](https:\u002F\u002Funiapp.dcloud.net.cn\u002F)\n[![uniCloud](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FuniCloud-Aliyun-orange.svg)](https:\u002F\u002Funiapp.dcloud.net.cn\u002FuniCloud\u002F)\n[![MQTT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FIoT-MQTT%20%2F%20WebSocket-blue.svg)](#-architecture)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-WeChat%20Mini%20Program-brightgreen.svg)](#)\n[![Status](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FStatus-Reference%20Implementation-blue.svg)](#)\n\n端到端的机器人车队管理小程序：覆盖 **实时遥测 → 远程遥控 → 故障管理 → 用户绑定** 全链路，前端 \u002F 云函数 \u002F IoT 网关 之间通过统一鉴权通道串联。代码以 MIT License 开源，使用前请替换所有占位密钥。\n\n> 🌏 **English version below** — scroll down to the [English README](#english-version).\n\n---\n\n## 📑 Table of Contents\n\n- [Features](#-features)\n- [Tech Highlights](#-tech-highlights)\n- [Architecture](#-architecture)\n- [Project Structure](#-project-structure)\n- [Database](#-database)\n- [Security](#-security)\n- [Quick Start](#-quick-start)\n- [License](#-license)\n- [Disclaimer](#️-disclaimer)\n\n---\n\n## ✨ Features\n\n| 模块 | 描述 |\n|---|---|\n| **机器人监控** | 列表 + 详情，电量 \u002F 在线状态 \u002F 坐标 \u002F 任务态实时显示，15s 心跳窗口判定在线 |\n| **远程遥控** | D-pad 长按持续控制 + 圆形摇杆 + 旋转按钮 + Goto 点位收藏，速度向量协议 `{vx, vy, wz, enable}`，200ms 间隔（5Hz）连续发送，enable 作 deadman 开关 |\n| **实时遥测** | WebSocket 优先，断线自动降级 HTTP 轮询，UI 显示三态连接指示（live \u002F polling \u002F idle） |\n| **故障管理** | 故障记录列表 + 严重等级 |\n| **机器人绑定** | 手动输入 \u002F 扫码（支持 `robot-bind:CODE` \u002F JSON \u002F URL 三种格式），排他绑定 |\n| **用户体系** | uni-id 鉴权 + 路由守卫 + 邮箱注册找回密码，统一中文错误提示 |\n\n---\n\n## 🛠 Tech Highlights\n\n- **零依赖状态管理**：Vue 3 reactive 对象 + localStorage，避免 Vuex\u002FPinia 重量级开销\n- **Stale-while-revalidate 缓存**：列表 + 详情 5 分钟 TTL + 20 条上限 + 3s 节流 + JSON diff 检测，进入页面先渲染缓存再后台刷新\n- **WebSocket 三态指示**：live \u002F polling \u002F idle，UI 直接绑定响应式 `wsState.mode`，连接异常时无感切换 HTTP 轮询\n- **Deadman 速度向量协议**：`{vx, vy, wz, enable}`，200ms 间隔连续发送，IoT 端 1s 超时急停，断包即停车\n- **uniCloud 单通道鉴权**：所有 API 走 `userService` 云对象，`_before` 钩子统一校验，前端永远不传 uid\n- **WebSocket HMAC 动态令牌**：`uid:expiresAt:hmac` 签发，1 小时有效，避免小程序包反编译即拿到长期 token\n\n---\n\n## 🏗 Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│  Frontend (uni-app Vue 3, mp-weixin)                    │\n│                                                          │\n│  pages\u002F*.vue ──► userService.* (uniCloud Object)        │\n│       │                                                  │\n│       └─► ws-client.js ──┐                              │\n└──────────────────────────┼──────────────────────────────┘\n                           │ WebSocket (HMAC token)\n                           ▼\n┌─────────────────────────────────────────────────────────┐\n│  IoT Gateway (Flask + flask-sock + paho-mqtt)           │\n│                                                          │\n│  ├─ POST \u002FsendCommand  ──► MQTT publish ──► Robot       │\n│  ├─ MQTT subscribe    ──► dedupe ──► uniCloud ingest   │\n│  └─ WebSocket \u002Fws     ──► realtime broadcast → 前端     │\n└─────────────────────────────────────────────────────────┘\n                           ▲\n                           │ MQTT\n                           │\n                       ┌───┴────┐\n                       │ Robot  │\n                       └────────┘\n```\n\n**单后端通道**：所有前端调用统一走 `uniCloud.importObject('userService')`，`_before` 钩子统一鉴权，`uid` 永远从 server-side token 派生，不信任前端参数。\n\n**IoT Gateway 不在本仓库**（位于另一个独立 repo），需自行部署。\n\n---\n\n## 📁 Project Structure\n\n```\n├── pages\u002F\n│   ├── login\u002F              # 登录页（充电小伙伴动画角色）\n│   ├── robots\u002F\n│   │   ├── index.vue       # 机器人列表（骨架屏 + 缓存 + WS 状态指示）\n│   │   └── detail.vue      # 详情 + 遥控（D-pad \u002F 摇杆 \u002F 旋转 \u002F Goto）\n│   ├── my\u002F                 # 我的 tab\n│   ├── profile\u002F            # 资料编辑\n│   ├── settings\u002F           # 设置 + 安全隐私 + 帮助 + 关于\n│   └── agreements\u002F         # 服务协议 \u002F 隐私政策本地页面\n├── components\u002F\n│   ├── BindRobotSheet.vue  # 绑定底部弹窗（手动 + 扫码）\n│   └── login-animation\u002F    # 登录页动画角色\n├── utils\u002F\n│   ├── auth.js             # token 管理 + 路由守卫\n│   ├── ws-client.js        # WebSocket 客户端（重连 \u002F 心跳 \u002F 降级轮询）\n│   ├── robot-store.js      # 列表 + 详情缓存（stale-while-revalidate）\n│   ├── profile-store.js    # 用户资料 reactive 状态\n│   └── robotBind.js        # 扫码 \u002F 绑定 payload 解析\n├── uniCloud-aliyun\u002F\n│   ├── cloudfunctions\u002FuserService\u002F    # 唯一鉴权云对象\n│   └── database\u002F                       # Schema + 初始化数据\n└── simulator\u002F              # 本地遥测模拟器（Node.js）\n```\n\n---\n\n## 🗄 Database\n\n| Collection | 索引 | 说明 |\n|---|---|---|\n| `robots` | `robotCode` (unique) | 机器人基础信息 |\n| `telemetry_latest` | `robotCode` (unique) | 每台机器人最新遥测 |\n| `faults` | `robotCode` + `ts` | 故障记录 |\n| `commands` | `robotCode` + `type` + `ts` | 控制指令历史 |\n| `robot_bindings` | `uid` + `robotCode` | 用户-机器人绑定 |\n| `uni-id-users` | 系统内置 | 账号信息 |\n\n所有 schema 的 `read \u002F create \u002F update \u002F delete` 权限均为 `false`，仅云函数可访问。\n\n---\n\n## 🔐 Security\n\n- **Token-based 鉴权**：`userService._before()` 自动校验 token → uid，每个方法无需重复鉴权代码\n- **数据隔离**：用户只能访问自己绑定的机器人\n- **白名单校验**：`sendCommand` 命令类型白名单（move \u002F stop \u002F goto）\n- **WebSocket 鉴权**：HMAC-SHA256 动态令牌（`uid:expiresAt:hmac`），1 小时有效，绕开\"小程序包反编译即拿到 token\"的风险\n- **数据库 schema 权限收紧**：直接客户端访问全关闭\n\n---\n\n## 🚀 Quick Start\n\n### 1. 前置要求\n\n- HBuilderX（最新版本，支持 Vue 3）\n- 微信开发者工具\n- uniCloud 账号 + 阿里云 serverless 空间\n- 自行部署 IoT Gateway（可选，仅在需要真实机器人接入时）\n\n### 2. 克隆仓库\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FDragolone\u002Frobot-charging-station-miniprogram.git\n```\n\n用 HBuilderX 「文件 → 导入 → 从本地目录导入」打开。\n\n### 3. 配置密钥（必填）\n\n⚠️ **以下 4 个文件含 `REPLACE_WITH_*` 占位符，必须替换为你自己的值才能运行：**\n\n#### 3.1 `manifest.json`\n\n```jsonc\n{\n  \"appid\": \"__UNI__YOUR_UNI_APP_ID\",          \u002F\u002F 改为你的 DCloud 应用 ID\n  \"mp-weixin\": {\n    \"appid\": \"wxYOUR_WECHAT_APPID\"            \u002F\u002F 改为你的微信小程序 AppID\n  }\n}\n```\n\n#### 3.2 `uni_modules\u002Funi-config-center\u002FuniCloud\u002Fcloudfunctions\u002Fcommon\u002Funi-config-center\u002Funi-id\u002Fconfig.json`\n\n```jsonc\n{\n  \"tokenSecret\": \"REPLACE_WITH_LONG_RANDOM_STRING_32PLUS\",          \u002F\u002F JWT 签名密钥（32+ 随机字符）\n  \"requestAuthSecret\": \"REPLACE_WITH_ANOTHER_LONG_RANDOM_STRING_32PLUS\"\n}\n```\n\n生成方法：`node -e \"console.log(require('crypto').randomBytes(24).toString('base64'))\"`\n\n#### 3.3 `uni_modules\u002Funi-config-center\u002FuniCloud\u002Fcloudfunctions\u002Fcommon\u002Funi-config-center\u002Ftelemetry\u002Fconfig.json` 与 `uniCloud-aliyun\u002Funi-config-center\u002Fconfig.json`\n\n```jsonc\n{\n  \"telemetry\": {\n    \"ingestToken\": \"REPLACE_WITH_INGEST_TOKEN\",                    \u002F\u002F 与 Gateway .env 一致\n    \"commandBridge\": {\n      \"url\": \"https:\u002F\u002Fyour-gateway.example.com\u002FsendCommand\",       \u002F\u002F 你的 Gateway 地址\n      \"token\": \"REPLACE_WITH_BRIDGE_TOKEN\"\n    },\n    \"ws\": {\n      \"url\": \"wss:\u002F\u002Fyour-gateway.example.com\u002Fws\",\n      \"secret\": \"REPLACE_WITH_WS_HMAC_SECRET\"                       \u002F\u002F WS HMAC 密钥\n    }\n  }\n}\n```\n\n#### 3.4 `simulator\u002Fconfig.json`（可选 - 仅在用本地模拟器时）\n\n```jsonc\n{\n  \"spaceId\": \"REPLACE_WITH_YOUR_UNICLOUD_SPACE_ID\",\n  \"clientSecret\": \"REPLACE_WITH_YOUR_UNICLOUD_CLIENT_SECRET\"\n}\n```\n\n### 4. 部署后端\n\n- HBuilderX 右键 `uniCloud-aliyun\u002Fdatabase\u002F` → 上传 DB Schema + 初始化数据\n- 右键 `userService` 云对象 → 上传部署\n- 右键 `uni-id-co` 云函数（位于 `uni_modules\u002Funi-id-pages\u002FuniCloud\u002Fcloudfunctions\u002Funi-id-co\u002F`）→ 上传部署\n- uniCloud 控制台 → uni-config-center → 上传 `telemetry` 和 `uni-id` 配置\n\n### 5. 微信公众平台后台\n\n服务器域名白名单加上：\n\n| 类型 | 域名 |\n|---|---|\n| request | `api.next.bspapp.com`、`api.bspapp.com` |\n| socket | 你的 Gateway 域名 |\n| uploadFile \u002F downloadFile | uniCloud CDN 域名 |\n\n> **提审前务必关闭\"不校验合法域名\"开关本地复测一次**，开发工具勾选此项会绕过审核期校验。\n\n### 6. 运行\n\nHBuilderX → 运行 → 微信开发者工具（mp-weixin）\n\n---\n\n## 📜 License\n\n[MIT License](LICENSE) — Copyright (c) 2026 Dragolone\n\n---\n\n## ⚠️ Disclaimer\n\n本项目为开源参考实现，**不构成任何商业服务承诺**。第三方品牌（微信、uni-app、uniCloud 等）名称及商标归原所有方所有。代码可在 MIT License 范围内自由使用，但部署到生产环境前请务必：\n\n1. 替换所有 `REPLACE_WITH_*` 占位符为强随机值\n2. 不要公开任何真实密钥到 git 历史\n3. 自行评估安全性，作者不为任何因使用本代码导致的损失负责\n\n---\n\n\u003Ca id=\"english-version\">\u003C\u002Fa>\n\n# English Version\n\n> WeChat Mini Program · Robot remote management & real-time teleoperation platform\n> uni-app (Vue 3) + uniCloud Serverless + IoT Gateway (MQTT \u002F WebSocket)\n\nAn end-to-end robot fleet management mini program covering the full **realtime telemetry → remote teleoperation → fault management → user binding** loop. Frontend, cloud functions, and the IoT gateway are wired together through a single auth-enforced channel. Open-sourced under the MIT License — replace all placeholder secrets before use.\n\n---\n\n## 📑 Table of Contents\n\n- [Features](#-features-1)\n- [Tech Highlights](#-tech-highlights-1)\n- [Architecture](#-architecture-1)\n- [Project Structure](#-project-structure-1)\n- [Database](#-database-1)\n- [Security](#-security-1)\n- [Quick Start](#-quick-start-1)\n- [License](#-license-1)\n- [Disclaimer](#️-disclaimer-1)\n\n---\n\n## ✨ Features\n\n| Module | Description |\n|---|---|\n| **Robot Monitoring** | List + detail views with real-time battery \u002F online status \u002F coordinates \u002F task state. Online status determined by a 15s heartbeat window. |\n| **Remote Control** | D-pad press-and-hold continuous control + circular joystick + rotation buttons + Goto waypoint favorites. Velocity-vector protocol `{vx, vy, wz, enable}` sent every 200ms (5Hz). `enable` acts as a deadman switch. |\n| **Realtime Telemetry** | WebSocket-first, automatic fallback to HTTP polling on disconnect. UI shows a tri-state connection indicator (live \u002F polling \u002F idle). |\n| **Fault Management** | Fault log list with severity levels. |\n| **Robot Binding** | Manual entry \u002F QR scan (supports `robot-bind:CODE`, JSON, or URL formats). Exclusive binding. |\n| **User System** | uni-id authentication + route guards + email registration & password recovery. Unified Chinese error messages. |\n\n---\n\n## 🛠 Tech Highlights\n\n- **Zero-dependency state management**: Vue 3 reactive objects + localStorage, avoiding the overhead of Vuex\u002FPinia.\n- **Stale-while-revalidate cache**: list + detail with 5-minute TTL, 20-entry cap, 3s throttle, and JSON diff change detection — pages render from cache first, then refresh in the background.\n- **Tri-state WebSocket indicator**: live \u002F polling \u002F idle, UI directly bound to reactive `wsState.mode`; transparently falls back to HTTP polling on disconnect.\n- **Deadman velocity-vector protocol**: `{vx, vy, wz, enable}` sent every 200ms; the IoT side performs a 1s-timeout emergency stop — drop the stream, drop the throttle.\n- **Single-channel uniCloud auth**: every API goes through the `userService` cloud object, the `_before` hook enforces auth uniformly, and the frontend never supplies a uid.\n- **HMAC-signed dynamic WebSocket tokens**: `uid:expiresAt:hmac` valid for 1 hour, sidestepping the \"decompile the mini program package and steal a long-lived token\" risk.\n\n---\n\n## 🏗 Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│  Frontend (uni-app Vue 3, mp-weixin)                    │\n│                                                          │\n│  pages\u002F*.vue ──► userService.* (uniCloud Object)        │\n│       │                                                  │\n│       └─► ws-client.js ──┐                              │\n└──────────────────────────┼──────────────────────────────┘\n                           │ WebSocket (HMAC token)\n                           ▼\n┌─────────────────────────────────────────────────────────┐\n│  IoT Gateway (Flask + flask-sock + paho-mqtt)           │\n│                                                          │\n│  ├─ POST \u002FsendCommand  ──► MQTT publish ──► Robot       │\n│  ├─ MQTT subscribe    ──► dedupe ──► uniCloud ingest   │\n│  └─ WebSocket \u002Fws     ──► realtime broadcast → Frontend │\n└─────────────────────────────────────────────────────────┘\n                           ▲\n                           │ MQTT\n                           │\n                       ┌───┴────┐\n                       │ Robot  │\n                       └────────┘\n```\n\n**Single backend channel**: every frontend call goes through `uniCloud.importObject('userService')`. The `_before` hook handles authentication uniformly, and `uid` is always derived from the server-side token — frontend-supplied uid is never trusted.\n\n**The IoT Gateway is not in this repository** (it lives in a separate repo) — you'll need to deploy it yourself.\n\n---\n\n## 📁 Project Structure\n\n```\n├── pages\u002F\n│   ├── login\u002F              # Login page (charging mascot animation)\n│   ├── robots\u002F\n│   │   ├── index.vue       # Robot list (skeleton + cache + WS state indicator)\n│   │   └── detail.vue      # Detail + remote control (D-pad \u002F joystick \u002F rotate \u002F Goto)\n│   ├── my\u002F                 # \"My\" tab\n│   ├── profile\u002F            # Profile editor\n│   ├── settings\u002F           # Settings + privacy & security + help + about\n│   └── agreements\u002F         # Local Terms of Service \u002F Privacy Policy pages\n├── components\u002F\n│   ├── BindRobotSheet.vue  # Bottom-sheet binding dialog (manual + QR scan)\n│   └── login-animation\u002F    # Login page animation character\n├── utils\u002F\n│   ├── auth.js             # Token management + route guards\n│   ├── ws-client.js        # WebSocket client (reconnect \u002F heartbeat \u002F polling fallback)\n│   ├── robot-store.js      # List + detail cache (stale-while-revalidate)\n│   ├── profile-store.js    # User profile reactive store\n│   └── robotBind.js        # QR scan \u002F binding payload parser\n├── uniCloud-aliyun\u002F\n│   ├── cloudfunctions\u002FuserService\u002F    # Single auth-enforced cloud object\n│   └── database\u002F                       # Schema + seed data\n└── simulator\u002F              # Local telemetry simulator (Node.js)\n```\n\n---\n\n## 🗄 Database\n\n| Collection | Index | Description |\n|---|---|---|\n| `robots` | `robotCode` (unique) | Robot base info |\n| `telemetry_latest` | `robotCode` (unique) | Latest telemetry per robot |\n| `faults` | `robotCode` + `ts` | Fault records |\n| `commands` | `robotCode` + `type` + `ts` | Control command history |\n| `robot_bindings` | `uid` + `robotCode` | User-to-robot bindings |\n| `uni-id-users` | Built-in | Account info |\n\nAll schema `read \u002F create \u002F update \u002F delete` permissions are set to `false` — only cloud functions can access them.\n\n---\n\n## 🔐 Security\n\n- **Token-based auth**: `userService._before()` automatically validates token → uid, so no method needs to repeat auth code.\n- **Data isolation**: users can only access robots they've bound.\n- **Whitelist validation**: `sendCommand` enforces a command-type whitelist (move \u002F stop \u002F goto).\n- **WebSocket auth**: HMAC-SHA256 dynamic tokens (`uid:expiresAt:hmac`) valid for 1 hour, sidestepping the \"decompile the mini program package and steal the token\" risk.\n- **Schema permissions locked down**: direct client access fully disabled.\n\n---\n\n## 🚀 Quick Start\n\n### 1. Prerequisites\n\n- HBuilderX (latest, with Vue 3 support)\n- WeChat DevTools\n- A uniCloud account + Aliyun serverless space\n- Self-deployed IoT Gateway (optional — only required for real robot integration)\n\n### 2. Clone the repo\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FDragolone\u002Frobot-charging-station-miniprogram.git\n```\n\nOpen it in HBuilderX via \"File → Import → Import from local directory\".\n\n### 3. Configure secrets (required)\n\n⚠️ **The following 4 files contain `REPLACE_WITH_*` placeholders that must be replaced with your own values before the project will run:**\n\n#### 3.1 `manifest.json`\n\n```jsonc\n{\n  \"appid\": \"__UNI__YOUR_UNI_APP_ID\",          \u002F\u002F Your DCloud app ID\n  \"mp-weixin\": {\n    \"appid\": \"wxYOUR_WECHAT_APPID\"            \u002F\u002F Your WeChat Mini Program AppID\n  }\n}\n```\n\n#### 3.2 `uni_modules\u002Funi-config-center\u002FuniCloud\u002Fcloudfunctions\u002Fcommon\u002Funi-config-center\u002Funi-id\u002Fconfig.json`\n\n```jsonc\n{\n  \"tokenSecret\": \"REPLACE_WITH_LONG_RANDOM_STRING_32PLUS\",          \u002F\u002F JWT signing key (32+ random chars)\n  \"requestAuthSecret\": \"REPLACE_WITH_ANOTHER_LONG_RANDOM_STRING_32PLUS\"\n}\n```\n\nGenerate one with: `node -e \"console.log(require('crypto').randomBytes(24).toString('base64'))\"`\n\n#### 3.3 `uni_modules\u002Funi-config-center\u002FuniCloud\u002Fcloudfunctions\u002Fcommon\u002Funi-config-center\u002Ftelemetry\u002Fconfig.json` and `uniCloud-aliyun\u002Funi-config-center\u002Fconfig.json`\n\n```jsonc\n{\n  \"telemetry\": {\n    \"ingestToken\": \"REPLACE_WITH_INGEST_TOKEN\",                    \u002F\u002F Must match Gateway .env\n    \"commandBridge\": {\n      \"url\": \"https:\u002F\u002Fyour-gateway.example.com\u002FsendCommand\",       \u002F\u002F Your Gateway URL\n      \"token\": \"REPLACE_WITH_BRIDGE_TOKEN\"\n    },\n    \"ws\": {\n      \"url\": \"wss:\u002F\u002Fyour-gateway.example.com\u002Fws\",\n      \"secret\": \"REPLACE_WITH_WS_HMAC_SECRET\"                       \u002F\u002F WS HMAC secret\n    }\n  }\n}\n```\n\n#### 3.4 `simulator\u002Fconfig.json` (optional — only when using the local simulator)\n\n```jsonc\n{\n  \"spaceId\": \"REPLACE_WITH_YOUR_UNICLOUD_SPACE_ID\",\n  \"clientSecret\": \"REPLACE_WITH_YOUR_UNICLOUD_CLIENT_SECRET\"\n}\n```\n\n### 4. Deploy the backend\n\n- In HBuilderX, right-click `uniCloud-aliyun\u002Fdatabase\u002F` → upload DB schema + seed data\n- Right-click the `userService` cloud object → upload & deploy\n- Right-click the `uni-id-co` cloud function (under `uni_modules\u002Funi-id-pages\u002FuniCloud\u002Fcloudfunctions\u002Funi-id-co\u002F`) → upload & deploy\n- In the uniCloud console → uni-config-center → upload the `telemetry` and `uni-id` configs\n\n### 5. WeChat Open Platform console\n\nAdd the following to your server domain whitelist:\n\n| Type | Domain |\n|---|---|\n| request | `api.next.bspapp.com`, `api.bspapp.com` |\n| socket | Your Gateway domain |\n| uploadFile \u002F downloadFile | uniCloud CDN domain |\n\n> **Before submitting for review, disable the \"Skip domain validation\" toggle and re-test locally** — leaving it on in DevTools will bypass the same checks the review process enforces.\n\n### 6. Run\n\nHBuilderX → Run → WeChat DevTools (mp-weixin)\n\n---\n\n## 📜 License\n\n[MIT License](LICENSE) — Copyright (c) 2026 Dragolone\n\n---\n\n## ⚠️ Disclaimer\n\nThis project is an open-source reference implementation and **does not constitute any commercial service commitment**. Third-party brands (WeChat, uni-app, uniCloud, etc.) and their trademarks belong to their respective owners. The code is free to use within the terms of the MIT License, but before deploying to production you must:\n\n1. Replace all `REPLACE_WITH_*` placeholders with strong random values\n2. Never expose any real secret to git history\n3. Perform your own security review — the author accepts no liability for any losses arising from the use of this code\n","Robot Charging Station Mini Program 是一个基于微信小程序的机器人远程管理和实时遥控平台。该项目利用uni-app (Vue 3)构建前端界面，结合uniCloud云函数提供后端服务，并通过MQTT\u002FWebSocket协议实现与IoT网关的数据交互。其核心功能包括实时遥测、远程遥控、故障管理和用户绑定等，支持通过D-pad、圆形摇杆等多种方式控制机器人，并且具备断线自动降级为HTTP轮询的能力以保证数据传输的稳定性。适用于需要对多台机器人进行集中监控和远程操作的应用场景，如仓库管理、无人配送等领域。",2,"2026-06-11 03:32:02","CREATED_QUERY"]