Files
ChowBox/miniapp/pages/recipe-detail/recipe-detail.wxml
王鹏 802b4ba229 fix: 修复 VoiceController Map.of 兼容性 + ExploreController 参数不匹配
- VoiceController: Map.of() -> Collections.singletonMap() 兼容 Java 8
- ExploreController: 补齐 takeoutService.roll() 缺失的 taste/priceRange/allergies 参数

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 20:02:27 +08:00

44 lines
1.6 KiB
Plaintext

<view class="recipe-detail" wx:if="{{recipe}}">
<image class="hero-img" src="{{recipe.imageUrl}}" mode="aspectFill" wx:if="{{recipe.imageUrl}}"></image>
<view class="hero-placeholder" wx:else>🍲</view>
<view class="detail-header">
<view class="detail-name">{{recipe.name}}</view>
<view class="detail-meta">
<text>⭐ 难度{{recipe.difficulty}}</text>
<text>⏱️ {{recipe.cookTime}}分钟</text>
<text>{{recipe.category}}</text>
</view>
</view>
<view class="section">
<view class="section-title">用料</view>
<view class="ingredient-list">
<view class="ing-item {{item.isStaple ? 'staple' : ''}}" wx:for="{{recipe.ingredients}}" wx:key="id">
<text>{{item.ingredientName}}</text>
<text class="amount">{{item.amount}}</text>
</view>
</view>
</view>
<view class="section">
<view class="section-title">步骤</view>
<view class="step-list">
<view class="step-item" wx:for="{{recipe.steps}}" wx:key="id">
<view class="step-num">{{item.stepOrder}}</view>
<view class="step-body">
<view class="step-text">{{item.content}}</view>
<image class="step-img" src="{{item.imageUrl}}" mode="widthFix" wx:if="{{item.imageUrl}}"></image>
</view>
</view>
</view>
</view>
<view class="bottom-bar">
<button class="btn-primary btn-small" bind:tap="startTimer">计时器</button>
<view class="btn-outline" bind:tap="addToShopping">加入购物清单</view>
</view>
</view>
<view class="center" wx:if="{{loading}}">加载中…</view>