feat(client): 商品详情加价格历史卡(接 /products/:id/price-history)
repo.getPriceHistory → 详情异步加载,新增价格历史卡:date + 进价,按相邻点 算涨跌(绿涨/红跌箭头)。至此商品详情 100% 对齐原型富数据版 (KPI + 各仓库分布 + 价格历史 + 近期流水)。golden 三主题已含该卡。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 60 KiB |
@@ -25,6 +25,14 @@ class _FakeProductRepo implements ProductRepository {
|
||||
series: '飞天', spec: '500ml×6', brand: '茅台',
|
||||
purchasePrice: 2680, categoryName: '酱香');
|
||||
@override
|
||||
Future<List<({String date, double price})>> getPriceHistory(int id) async =>
|
||||
const [
|
||||
(date: '2026-06-12', price: 2680),
|
||||
(date: '2026-04-20', price: 2620),
|
||||
(date: '2026-02-08', price: 2700),
|
||||
(date: '2025-11-15', price: 2580),
|
||||
];
|
||||
@override
|
||||
dynamic noSuchMethod(Invocation invocation) =>
|
||||
super.noSuchMethod(invocation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user