Files
ChowBox/miniapp/pages/recipe-list/recipe-list.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

43 lines
1.8 KiB
Plaintext

<view class="recipe-list-page">
<box-animation
show="{{showAnimation}}"
boxType="fridge"
dataReady="{{dataReady}}"
bind:done="onAnimationDone"
>
<view class="animation-result-preview" wx:if="{{results.length > 0}}">
<view class="preview-emoji">🥬</view>
<view class="preview-text">{{results[0].recipe.name}}</view>
<view class="preview-sub">匹配度 {{results[0].matchRate}}%</view>
</view>
</box-animation>
<view class="list-header" wx:if="{{!showAnimation && results.length}}">
为你找到 {{results.length}} 个菜谱
</view>
<view class="recipe-cards" wx:if="{{!showAnimation}}">
<view class="recipe-card card" wx:for="{{results}}" wx:key="recipe.id" bind:tap="goDetail" data-id="{{item.recipe.id}}" data-missing="{{item.missingIngredients}}">
<view class="card-left">
<view class="recipe-name">{{item.recipe.name}}</view>
<view class="recipe-meta">
<text wx:if="{{item.recipe.difficulty}}">⭐{{item.recipe.difficulty}}</text>
<text wx:if="{{item.recipe.cookTime}}"> ⏱️{{item.recipe.cookTime}}分钟</text>
</view>
<view class="match-rate">
<view class="rate-bar">
<view class="rate-fill" style="width:{{item.matchRate}}%"></view>
</view>
<text>{{item.matchRate}}%</text>
</view>
<view class="missing" wx:if="{{item.missingIngredients.length}}">
缺:<text wx:for="{{item.missingIngredients}}" wx:key="*this">{{item}} </text>
</view>
</view>
</view>
</view>
<view class="center" wx:if="{{!showAnimation && results.length === 0}}">没有匹配的菜谱,试试换个食材组合</view>
<view class="btn-retry" wx:if="{{!showAnimation && results.length}}" bind:tap="reshuffle">换一批菜谱</view>
</view>