fix: onPageNotFound 兜底防空页崩溃 + 首页/记录页接入 i18n(语言切换覆盖全部3个tab)
这个提交包含在:
@@ -1,47 +1,47 @@
|
||||
<view class="page">
|
||||
<view class="loading-container" wx:if="{{loading}}">
|
||||
<view class="loading-spinner"></view>
|
||||
<text class="loading-text">加载中...</text>
|
||||
<text class="loading-text">{{i18n.common.loading}}</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="empty-text">{{i18n.home.noDevice}}</view>
|
||||
<button class="btn-primary mt-30" bindtap="onAddDevice">{{i18n.home.addDevice}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="page-content" wx:if="{{!loading && hasDevice}}">
|
||||
<view class="device-card">
|
||||
<view class="device-card-icon">💆</view>
|
||||
<view class="device-card-name">{{deviceName || '我的设备'}}</view>
|
||||
<view class="device-card-name">{{deviceName || i18n.home.myDevice}}</view>
|
||||
<view class="device-card-status">
|
||||
<text class="status-badge status-badge-green" wx:if="{{connected}}">已连接</text>
|
||||
<text class="status-badge" style="background:#ccc;" wx:else>未连接</text>
|
||||
<text class="status-badge status-badge-green" wx:if="{{connected}}">{{i18n.home.connected}}</text>
|
||||
<text class="status-badge" style="background:#ccc;" wx:else>{{i18n.home.disconnected}}</text>
|
||||
<text class="device-card-battery" wx:if="{{connected}}">🔋 {{battery}}%</text>
|
||||
</view>
|
||||
<button class="btn-reconnect" bindtap="onConnectBle" wx:if="{{!connected}}">重新连接</button>
|
||||
<button class="btn-reconnect" bindtap="onConnectBle" wx:if="{{!connected}}">{{i18n.home.reconnect}}</button>
|
||||
</view>
|
||||
|
||||
<view class="sub-info" bindtap="onViewSubscription" wx:if="{{!subscription || subscription.plan !== 'free'}}">
|
||||
<view class="sub-info-left">
|
||||
<text class="sub-info-icon">💳</text>
|
||||
<text wx:if="{{subscription && subscription.status === 'active'}}">智能模式 · 剩余{{subRemaining}}天</text>
|
||||
<text wx:else>未订阅智能模式</text>
|
||||
<text wx:if="{{subscription && subscription.status === 'active'}}">{{subRemainText}}</text>
|
||||
<text wx:else>{{i18n.home.notSubscribed}}</text>
|
||||
</view>
|
||||
<text class="sub-info-arrow">›</text>
|
||||
</view>
|
||||
<view class="sub-info" wx:if="{{subscription && subscription.plan === 'free'}}">
|
||||
<view class="sub-info-left">
|
||||
<text class="sub-info-icon">✨</text>
|
||||
<text>智能模式已开放</text>
|
||||
<text>{{i18n.home.smartOpen}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="action-buttons">
|
||||
<button class="btn-primary" bindtap="onStartTreatment">开始使用</button>
|
||||
<button class="btn-secondary" bindtap="onManageDevice">设备管理</button>
|
||||
<button class="btn-primary" bindtap="onStartTreatment">{{i18n.home.start}}</button>
|
||||
<button class="btn-secondary" bindtap="onManageDevice">{{i18n.home.deviceManage}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
在新工单中引用
屏蔽一个用户