Files
fitness-coach/miniprogram/pages/profile/profile.wxml
wm 70ff806042 feat: 小程序连接服务器IP + 同步未提交开发
- miniprogram/config.js: BASE_URL 指向 http://192.227.237.8:3001
- 动作标题中文化(nameZh),搜索匹配 name/nameZh/nameEn
- 新增计划/收藏/我的 等页面与组件
- 后端 Docker 化(Dockerfile/.dockerignore)与翻译脚本
- .gitignore 补充 .DS_Store
2026-07-22 14:05:30 +08:00

88 lines
3.1 KiB
Plaintext
Raw 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">💪</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">
<text class="cell__icon">❤️</text>
<text class="cell__label">我的收藏动作</text>
<text class="cell__arrow"></text>
</view>
<view class="cell" bindtap="goPlans">
<text class="cell__icon">🗂️</text>
<text class="cell__label">我的训练计划</text>
<text class="cell__arrow"></text>
</view>
<view class="cell" bindtap="goFavPlans">
<text class="cell__icon">⭐</text>
<text class="cell__label">收藏的官方计划</text>
<text class="cell__arrow"></text>
</view>
<view class="cell" bindtap="goOfficial">
<text class="cell__icon">📋</text>
<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">{{item}}</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>