小程序服务器域名
小程序上线前,需在微信公众平台 → 开发管理 → 开发设置 → 服务器域名中配置以下域名。
域名清单
| 域名类型 | 域名 | 用途 |
|---|---|---|
| request 合法域名 | https://hotel.chintiot.com | 业务 API |
https://ztmp.chintiot.com | 小程序后端 RPC 网关 | |
https://chint-beancomm-content.oss-cn-shanghai.aliyuncs.com | 固件升级检查 | |
| socket 合法域名 | wss://hotel.chintiot.com | MQTT WebSocket |
wss://ztmp.chintiot.com | WebSocket 备用 | |
wss://emqx-1.chintiot.com | MQTT 直连 WebSocket | |
| uploadFile 合法域名 | https://hotel.chintiot.com | 文件上传 |
https://ztmp.chintiot.com | 文件上传 | |
| downloadFile 合法域名 | https://hotel.chintiot.com | 文件下载 |
https://ztmp.chintiot.com | 文件下载 |
注意事项
- 未配置合法域名会导致小程序对应功能不可用(登录失败、上传失败、MQTT 连接失败等)
- 开发阶段可在微信开发者工具中勾选「详情 → 本地设置 → 不校验合法域名」绕过
- 域名必须为 HTTPS/WSS,不支持 HTTP/WS
- 每个类型最多可配置 200 个合法域名
