feat: 价格趋势数据按时间顺序排序
- 在处理价格趋势数据时,增加了对列表进行按时间顺序排序的步骤 - 使用 asort() 函数对 $list 数组进行排序,确保价格趋势数据按时间轴正确展示
This commit is contained in:
parent
d367e0e49f
commit
02c96c75d7
@ -281,6 +281,7 @@ class StoreProductPriceLogic extends BaseLogic
|
|||||||
$item['price'] = $item['purchase'];
|
$item['price'] = $item['purchase'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
asort($list);
|
||||||
$data = [
|
$data = [
|
||||||
'name' => '价格趋势',
|
'name' => '价格趋势',
|
||||||
'series' => [['name' => '价格', 'value' => array_column($list, 'price')]],
|
'series' => [['name' => '价格', 'value' => array_column($list, 'price')]],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user