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>
This commit is contained in:
13
miniapp/components/result-card/result-card.js
Normal file
13
miniapp/components/result-card/result-card.js
Normal file
@@ -0,0 +1,13 @@
|
||||
Component({
|
||||
properties: {
|
||||
imageUrl: { type: String, value: '' },
|
||||
name: { type: String, value: '' },
|
||||
rating: { type: Number, value: 0 },
|
||||
sales: { type: String, value: '' },
|
||||
avgPrice: { type: Number, value: 0 },
|
||||
distance: { type: String, value: '' },
|
||||
extra: { type: String, value: '' },
|
||||
recommendReason: { type: String, value: '' },
|
||||
signatureDishes: { type: Array, value: [] }
|
||||
}
|
||||
});
|
||||
3
miniapp/components/result-card/result-card.json
Normal file
3
miniapp/components/result-card/result-card.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
21
miniapp/components/result-card/result-card.wxml
Normal file
21
miniapp/components/result-card/result-card.wxml
Normal file
@@ -0,0 +1,21 @@
|
||||
<view class="result-card">
|
||||
<image class="result-image" src="{{imageUrl}}" mode="aspectFill" wx:if="{{imageUrl}}"></image>
|
||||
<view class="result-body">
|
||||
<view class="result-rating" wx:if="{{rating}}">
|
||||
<text class="star">⭐</text>
|
||||
<text>{{rating}}</text>
|
||||
<text wx:if="{{sales}}"> 月销{{sales}}</text>
|
||||
</view>
|
||||
<view class="result-name">{{name}}</view>
|
||||
<view class="result-info" wx:if="{{avgPrice || distance}}">
|
||||
<text wx:if="{{avgPrice}}">¥{{avgPrice}}/人</text>
|
||||
<text wx:if="{{avgPrice && distance}}"> · </text>
|
||||
<text wx:if="{{distance}}">{{distance}}</text>
|
||||
</view>
|
||||
<view class="result-extra" wx:if="{{extra}}">{{extra}}</view>
|
||||
<view class="result-recommend" wx:if="{{recommendReason}}">"{{recommendReason}}"</view>
|
||||
<view class="result-dishes" wx:if="{{signatureDishes && signatureDishes.length}}">
|
||||
<text class="tag tag-orange" wx:for="{{signatureDishes}}" wx:key="*this">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
81
miniapp/components/result-card/result-card.wxss
Normal file
81
miniapp/components/result-card/result-card.wxss
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 结果卡片 — 外卖/探店共用
|
||||
*/
|
||||
|
||||
.result-card {
|
||||
width: 100%;
|
||||
background: var(--color-surface);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
/* ── 图片 ── */
|
||||
.result-image {
|
||||
width: 100%;
|
||||
height: 340rpx;
|
||||
background: #F3F0EC;
|
||||
}
|
||||
|
||||
/* ── 内容 ── */
|
||||
.result-body {
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
/* 评分 */
|
||||
.result-rating {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-size: var(--text-body-sm);
|
||||
font-weight: 600;
|
||||
color: #E8A040;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.result-rating .star {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
/* 名称 */
|
||||
.result-name {
|
||||
font-size: var(--text-headline);
|
||||
font-weight: 700;
|
||||
color: var(--color-text);
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
/* 信息 */
|
||||
.result-info {
|
||||
font-size: var(--text-body-sm);
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
/* 配送 */
|
||||
.result-extra {
|
||||
font-size: var(--text-body-sm);
|
||||
color: var(--color-text-muted);
|
||||
margin-bottom: 12rpx;
|
||||
padding: var(--space-xs) var(--space-sm);
|
||||
background: #FAFAF8;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
/* 推荐语 */
|
||||
.result-recommend {
|
||||
font-size: var(--text-body-sm);
|
||||
color: var(--color-primary);
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
/* 标签 */
|
||||
.result-dishes {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.result-dishes .tag {
|
||||
font-size: var(--text-caption);
|
||||
margin-right: 8rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user