From 02c96c75d7a90d3c32c70237dca335d3631291bc Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 14 Mar 2025 11:59:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=B7=E6=A0=BC=E8=B6=8B=E5=8A=BF?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8C=89=E6=97=B6=E9=97=B4=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在处理价格趋势数据时,增加了对列表进行按时间顺序排序的步骤 - 使用 asort() 函数对 $list 数组进行排序,确保价格趋势数据按时间轴正确展示 --- app/admin/logic/store_product_price/StoreProductPriceLogic.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/admin/logic/store_product_price/StoreProductPriceLogic.php b/app/admin/logic/store_product_price/StoreProductPriceLogic.php index 7045f487..ec7a3584 100644 --- a/app/admin/logic/store_product_price/StoreProductPriceLogic.php +++ b/app/admin/logic/store_product_price/StoreProductPriceLogic.php @@ -281,6 +281,7 @@ class StoreProductPriceLogic extends BaseLogic $item['price'] = $item['purchase']; } } + asort($list); $data = [ 'name' => '价格趋势', 'series' => [['name' => '价格', 'value' => array_column($list, 'price')]],