Files
fitness-coach/miniprogram/pages/collection-detail/collection-detail.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

45 lines
2.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" wx:if="{{collection}}">
<navbar title="{{collection.name}}" show-back />
<view class="header" style="background: linear-gradient(135deg, {{collection.color}}26, var(--surface));">
<view class="header__emoji" style="background: {{collection.color}}22; color: {{collection.color}};">{{collection.emoji}}</view>
<view class="header__name" style="color: {{collection.color}};">{{collection.name}}</view>
<view wx:if="{{collection.nameEn}}" class="header__en">{{collection.nameEn}}</view>
<view class="header__desc">{{collection.description}}</view>
<view class="header__meta">
<level-tag level="{{collection.level}}" />
<text class="header__sep">·</text>
<text class="header__m" wx:if="{{collection.sessionsPerWeek}}">每周 {{collection.sessionsPerWeek}} 次</text>
<text class="header__sep" wx:if="{{collection.sessionsPerWeek && collection.durationWeeks}}">·</text>
<text class="header__m" wx:if="{{collection.durationWeeks}}">约 {{collection.durationWeeks}} 周</text>
<text class="header__sep" wx:if="{{collection.focus}}">·</text>
<text class="header__m" wx:if="{{collection.focus}}">{{collection.focus}}</text>
</view>
</view>
<view class="section" style="padding-top: 8rpx;">
<section-header eyebrow="EXERCISES" title="动作列表" subtitle="共 {{total}} 个动作" />
<view class="grid" wx:if="{{exercises.length}}">
<view class="grid__item" wx:for="{{exercises}}" wx:key="id">
<exercise-card exercise="{{item}}" bind:tap="onExercise" />
</view>
</view>
<view wx:elif="{{!loading}}" class="empty">该计划暂无动作</view>
<view wx:else class="empty">加载中…</view>
</view>
<view class="actionbar">
<view class="btn btn--ghost {{favorited ? 'btn--faved' : ''}}" bindtap="onToggleFav">
<text>{{favorited ? '♥ 已收藏' : '♡ 收藏'}}</text>
</view>
<view class="btn btn--gold" bindtap="onImport">
<text> 导入我的计划</text>
</view>
</view>
</view>
<view wx:else class="empty-page">
<view class="empty">{{ loading ? '加载中…' : '未找到该训练计划' }}</view>
</view>