文件
jw-beauty/miniprogram/pages/index/index.wxml
T
Guoguo 92416261ee 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
2026-05-15 09:07:41 -07:00

45 行
1.9 KiB
Plaintext
原始文件 Blame 文件历史

此文件含有模棱两可的 Unicode 字符
此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。
<view class="page">
<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>
<button class="btn-primary mt-30" bindtap="onAddDevice">扫码添加设备</button>
<view class="debug-actions" wx:if="{{devMode}}">
<view class="debug-label">🔧 调试工具</view>
<button class="btn-secondary btn-sm" bindtap="onMockBind">模拟绑定设备</button>
</view>
</view>
</view>
<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>
</view>
</view>
<view class="sub-info" bindtap="onViewSubscription">
<view class="sub-info-left">
<text class="sub-info-icon">💳</text>
<text wx:if="{{subscription && subscription.status === 'active'}}">智能模式 · 剩余{{subRemaining}}天</text>
<text wx:else>未订阅智能模式</text>
</view>
<text class="sub-info-arrow"></text>
</view>
<button class="btn-primary" bindtap="onStartTreatment">开始护理</button>
<button class="btn-secondary" bindtap="onManageDevice">设备管理</button>
</view>
</view>