fix: resolve subscription UX issues and add placeholder pages
- Profile: show "未订阅" card when subscription inactive/0 days - Profile: subscription management navigates to page instead of modal - Subscribe-plans: data-driven plan cards with mock payment flow - Subscribe-plans: show current subscription status at top - Subscribe-prompt: "先使用普通模式" goes to wear-check directly - Add help and contact placeholder pages - Fix unbindDevice to work without explicit deviceId
这个提交包含在:
@@ -60,22 +60,21 @@ Page({
|
||||
},
|
||||
|
||||
onViewSubscription: function () {
|
||||
if (!this.data.subscription || this.data.subscription.status !== 'active') {
|
||||
wx.navigateTo({ url: '/pages/subscribe-plans/subscribe-plans' })
|
||||
} else {
|
||||
var sub = this.data.subscription
|
||||
wx.showModal({
|
||||
title: '订阅信息',
|
||||
content: '套餐类型:' + (sub.plan || '未知') + '\n剩余天数:' + (sub.remaining_days || 0) + '天',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
wx.navigateTo({ url: '/pages/subscribe-plans/subscribe-plans' })
|
||||
},
|
||||
|
||||
onViewHistory: function () {
|
||||
wx.switchTab({ url: '/pages/history/history' })
|
||||
},
|
||||
|
||||
onHelp: function () {
|
||||
wx.navigateTo({ url: '/pages/help/help' })
|
||||
},
|
||||
|
||||
onContact: function () {
|
||||
wx.navigateTo({ url: '/pages/contact/contact' })
|
||||
},
|
||||
|
||||
onLogout: function () {
|
||||
wx.showModal({
|
||||
title: '退出登录',
|
||||
|
||||
@@ -8,12 +8,19 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="sub-card" wx:if="{{subscription}}">
|
||||
<view class="sub-card" wx:if="{{subscription && subscription.status === 'active' && subRemaining > 0}}">
|
||||
<view class="sub-left">
|
||||
<view class="sub-name">✨ 智能模式</view>
|
||||
<view class="sub-remain">剩余 {{subRemaining}}天</view>
|
||||
</view>
|
||||
<text class="status-badge status-badge-gold">试用中</text>
|
||||
<text class="status-badge status-badge-gold">使用中</text>
|
||||
</view>
|
||||
<view class="sub-card sub-card-inactive" wx:else bindtap="onViewSubscription">
|
||||
<view class="sub-left">
|
||||
<view class="sub-name">智能模式</view>
|
||||
<view class="sub-remain">未订阅</view>
|
||||
</view>
|
||||
<text class="status-badge" style="background:#eee;color:#999;">去订阅 ›</text>
|
||||
</view>
|
||||
|
||||
<view class="menu-list">
|
||||
@@ -34,12 +41,12 @@
|
||||
<view class="menu-text">订阅管理</view>
|
||||
<text class="menu-arrow">›</text>
|
||||
</view>
|
||||
<view class="menu-item">
|
||||
<view class="menu-item" bindtap="onHelp">
|
||||
<view class="menu-icon">❓</view>
|
||||
<view class="menu-text">使用帮助</view>
|
||||
<text class="menu-arrow">›</text>
|
||||
</view>
|
||||
<view class="menu-item">
|
||||
<view class="menu-item" bindtap="onContact">
|
||||
<view class="menu-icon">📞</view>
|
||||
<view class="menu-text">联系我们</view>
|
||||
<text class="menu-arrow">›</text>
|
||||
|
||||
@@ -107,6 +107,11 @@
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.sub-card-inactive {
|
||||
background: #f5f5f5;
|
||||
border: 1px dashed #d9d9d9;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
text-align: center;
|
||||
color: #ff4d4f;
|
||||
|
||||
在新工单中引用
屏蔽一个用户