Files
fitness-coach/miniprogram/components/plan-card/index.wxml
wm 8cf962f662 fix(plan-card): 根视图补 bindtap="onTap",修复点击计划卡片无法进入详情
- 根因:此前重写 my-plans 时改为由 plan-card 自身的 target/onTap 负责跳转,
  但 plan-card/index.wxml 根视图漏绑 bindtap="onTap",onTap 方法虽写好却从未触发,
  导致『我的训练计划』页点击卡片无任何反应、进不去计划详情。
- 修复:plan-card 根 <view class="pc"> 加 bindtap="onTap" 与 hover-class="pc--hover"。
- 体验:新增 .pc--hover 按压反馈(轻微缩放 + Volt 绿描边 var(--gold-line)),token 均在 app.wxss 已定义。
2026-07-23 07:52:16 +08:00

27 lines
987 B
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="pc" bindtap="onTap" hover-class="pc--hover">
<view
wx:if="{{hasCover}}"
class="pc__cover"
style="background: {{color}}22;">
<image class="pc__img" src="{{cover}}" mode="aspectFill" lazy-load="true" />
<view class="pc__badge" style="background: {{color}}22;">
<fc-icon name="{{icon}}" size="38" color="{{color}}" />
</view>
</view>
<view wx:else class="pc__top" style="background: linear-gradient(135deg, {{color}}26, var(--surface));">
<view class="pc__emoji" style="background: {{color}}22;">
<fc-icon name="{{icon}}" size="52" color="{{color}}" />
</view>
</view>
<view class="pc__body">
<view class="pc__name" style="color: {{color}};">{{plan.name}}</view>
<view wx:if="{{plan.description}}" class="pc__desc">{{plan.description}}</view>
</view>
<view class="pc__foot">
<text wx:if="{{count > 0}}" class="pc__count">{{count}} 个动作</text>
<text class="pc__arrow"></text>
</view>
</view>