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 已定义。
This commit is contained in:
2026-07-23 07:52:16 +08:00
parent 956ad3c3bc
commit 8cf962f662
2 changed files with 6 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
<view class="pc">
<view class="pc" bindtap="onTap" hover-class="pc--hover">
<view
wx:if="{{hasCover}}"
class="pc__cover"

View File

@@ -5,6 +5,11 @@
border: 1rpx solid var(--line);
box-shadow: var(--shadow);
width: 100%;
transition: transform 0.12s var(--ease), border-color 0.12s var(--ease);
}
.pc--hover {
transform: scale(0.985);
border-color: var(--gold-line);
}
.pc__cover { position: relative; width: 100%; height: 220rpx; background: var(--surface-2); }
.pc__img { width: 100%; height: 100%; display: block; }