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:
8
miniapp/pages/records/records.js
Normal file
8
miniapp/pages/records/records.js
Normal file
@@ -0,0 +1,8 @@
|
||||
Page({
|
||||
data: { items: [] },
|
||||
onShow() { this.loadRecords(); },
|
||||
loadRecords() {
|
||||
const history = wx.getStorageSync('box_history') || [];
|
||||
this.setData({ items: history.reverse() });
|
||||
}
|
||||
});
|
||||
3
miniapp/pages/records/records.json
Normal file
3
miniapp/pages/records/records.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "开盒记录"
|
||||
}
|
||||
18
miniapp/pages/records/records.wxml
Normal file
18
miniapp/pages/records/records.wxml
Normal file
@@ -0,0 +1,18 @@
|
||||
<view class="records-page">
|
||||
<view class="empty" wx:if="{{items.length === 0}}">
|
||||
<view class="empty-icon">📜</view>
|
||||
<view>还没有开盒记录</view>
|
||||
<view class="sub">去首页开个盲盒吧</view>
|
||||
</view>
|
||||
|
||||
<view class="record-list" wx:else>
|
||||
<view class="record-item" wx:for="{{items}}" wx:key="id">
|
||||
<view class="record-icon">{{item.icon}}</view>
|
||||
<view class="record-info">
|
||||
<view class="record-name">{{item.name}}</view>
|
||||
<view class="record-time">{{item.time}}</view>
|
||||
</view>
|
||||
<view class="record-type tag tag-orange">{{item.typeName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
81
miniapp/pages/records/records.wxss
Normal file
81
miniapp/pages/records/records.wxss
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 开盒记录
|
||||
*/
|
||||
|
||||
.records-page {
|
||||
padding: var(--space-md) var(--space-lg);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* ── 空态 ── */
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 220rpx;
|
||||
font-size: var(--text-body);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
font-size: 80rpx;
|
||||
margin-bottom: var(--space-md);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.sub {
|
||||
font-size: var(--text-body-sm);
|
||||
color: var(--color-text-muted);
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
/* ── 列表 ── */
|
||||
.record-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.record-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: var(--space-md);
|
||||
background: var(--color-surface);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: transform 0.15s var(--ease-out);
|
||||
}
|
||||
|
||||
.record-item:active {
|
||||
transform: scale(0.985);
|
||||
}
|
||||
|
||||
.record-icon {
|
||||
font-size: 44rpx;
|
||||
margin-right: var(--space-sm);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.record-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.record-name {
|
||||
font-size: var(--text-body);
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.record-time {
|
||||
font-size: var(--text-caption);
|
||||
color: var(--color-text-muted);
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.record-type {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user