feat: production readiness — feature gaps + config hardening

Miniprogram:
- Add BLE reconnect button on home page when disconnected
- Add loading states to index, profile, subscribe-plans pages
- Add profile editing (avatar + nickname) with COS upload
- Enable pull-to-refresh on history page
- Fix auto-scan self.options → self.data inconsistency
- Add console.error to silent catch blocks
- Gate 'Simple Peripheral' BLE scan behind __DEV__ flag
- Add production config comment to env.js

Admin console:
- Add empty state '暂无数据' to all 5 list views
- Replace plain text plan input with select dropdown
- Add type="date" to record date filters
- Add production config comment

Server:
- CORS origin restricted in production (env CORS_ORIGIN)
- DB pool size configurable via DB_POOL_SIZE env var
- .env.example updated with WeChat Pay + production fields
这个提交包含在:
Guoguo
2026-05-15 09:07:41 -07:00
父节点 7e036576e3
当前提交 92416261ee
修改 23 个文件,包含 421 行新增33 行删除
+8 -2
查看文件
@@ -1,5 +1,10 @@
<view class="page">
<view class="page-content" wx:if="{{!hasDevice}}">
<view class="loading-container" wx:if="{{loading}}">
<view class="loading-spinner"></view>
<text class="loading-text">加载中...</text>
</view>
<view class="page-content" wx:if="{{!loading && !hasDevice}}">
<view class="empty-device">
<text class="empty-icon">📱</text>
<view class="empty-text">还没有绑定设备</view>
@@ -11,12 +16,13 @@
</view>
</view>
<view class="page-content" wx:if="{{hasDevice}}">
<view class="page-content" wx:if="{{!loading && hasDevice}}">
<view class="device-card">
<view class="device-icon">💆</view>
<view class="device-name">{{deviceName || '我的光面膜'}}</view>
<text class="status-badge status-badge-green" wx:if="{{connected}}">已连接</text>
<text class="status-badge" style="background:#ccc;" wx:else>未连接</text>
<button class="btn-secondary btn-sm" bindtap="onConnectBle" wx:if="{{hasDevice && !connected}}">重新连接</button>
<view class="device-battery" wx:if="{{connected}}">
<text>🔋</text>
<text>电量 {{battery}}%</text>