Files
wm 4dba91a16e fix: 首页我的计划点击跳转错页 + feat: 新增留言反馈功能
fix:
- 首页'我的计划'卡片误绑 onExercise(跳动作详情),改为 onPlanTap 正确跳训练计划详情页
- 修复后点击计划可正常打开 plan-detail

feat(留言反馈):
- 后端新增 feedback 模块:POST /api/feedback(AuthGuard,content 必填/contact 选填),JsonStore 持久化
- 前端新增 pages/feedback 页面(留言内容 textarea + 联系方式选填 + 提交),profile 菜单新增'意见反馈'入口
- icon-svg 新增 message-circle 图标(反馈页用)
2026-07-22 23:21:18 +08:00

95 lines
3.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<view class="page">
<navbar title="我的" />
<!-- 未登录 -->
<view wx:if="{{!loggedIn}}" class="login">
<view class="login__logo"><fc-icon name="dumbbell" size="64" color="var(--accent)" /></view>
<view class="login__title">FITCOACH 智能健身教练</view>
<view class="login__sub">登录后同步你的收藏与训练计划</view>
<button class="login__btn" bindtap="onLogin">微信登录</button>
</view>
<!-- 已登录 -->
<view wx:else class="center">
<view class="profile">
<view class="profile__head">
<avatar avatar="{{profile.avatar}}" size="{{120}}" />
<view class="profile__info">
<view class="profile__name">{{profile.nickname || '健身达人'}}</view>
<view class="profile__edit" bindtap="onEdit">编辑 </view>
</view>
</view>
<view class="stats">
<view class="stat" bindtap="goFav">
<view class="stat__n">{{counts.fav}}</view>
<view class="stat__l">收藏动作</view>
</view>
<view class="stat" bindtap="goPlans">
<view class="stat__n">{{counts.plans}}</view>
<view class="stat__l">我的计划</view>
</view>
<view class="stat" bindtap="goFavPlans">
<view class="stat__n">{{counts.favPlans}}</view>
<view class="stat__l">收藏计划</view>
</view>
</view>
</view>
<view class="menu card">
<view class="cell" bindtap="goFav">
<fc-icon class="cell__icon" name="heart" size="24" color="var(--text-2)" />
<text class="cell__label">我的收藏动作</text>
<text class="cell__arrow"></text>
</view>
<view class="cell" bindtap="goPlans">
<fc-icon class="cell__icon" name="folder-open" size="24" color="var(--text-2)" />
<text class="cell__label">我的训练计划</text>
<text class="cell__arrow"></text>
</view>
<view class="cell" bindtap="goFavPlans">
<fc-icon class="cell__icon" name="star" size="24" color="var(--text-2)" />
<text class="cell__label">收藏的官方计划</text>
<text class="cell__arrow"></text>
</view>
<view class="cell" bindtap="goOfficial">
<fc-icon class="cell__icon" name="clipboard-list" size="24" color="var(--text-2)" />
<text class="cell__label">官方训练计划</text>
<text class="cell__arrow"></text>
</view>
<view class="cell" bindtap="goFeedback">
<fc-icon class="cell__icon" name="message-circle" size="24" color="var(--text-2)" />
<text class="cell__label">意见反馈</text>
<text class="cell__arrow"></text>
</view>
</view>
<view class="logout" bindtap="onLogout">退出登录</view>
</view>
<!-- 编辑头像弹层 -->
<view wx:if="{{showEmojiPicker}}" class="sheet" bindtap="onCancelEdit">
<view class="sheet__panel" catchtap="noop">
<view class="sheet__title">选择头像</view>
<scroll-view scroll-x class="emoji-row">
<view
wx:for="{{emojis}}"
wx:key="*this"
class="emoji {{draftAvatar === item ? 'emoji--active' : ''}}"
data-emoji="{{item}}"
bindtap="onPickEmoji">
<fc-icon name="{{item}}" size="48" color="var(--text)" />
</view>
</scroll-view>
<view class="sheet__nick">{{draftNickname || '未命名'}}</view>
<view class="sheet__actions">
<view class="sheet__btn sheet__btn--ghost" bindtap="onCancelEdit">取消</view>
<view class="sheet__btn sheet__btn--gold" bindtap="onConfirmEdit">保存</view>
</view>
</view>
</view>
<view style="height: 160rpx;"></view>
<bottom-nav active="mine" />
</view>