可视化拖拽商品自定义顺序优化

feat/task1-c-wallet
gongfuxiang 2021-10-23 16:53:48 +08:00
parent 01a5496d41
commit eb9fd34986
1 changed files with 11 additions and 0 deletions

View File

@ -849,6 +849,17 @@ class BaseLayout
'order_by' => $order_by,
];
$ret = GoodsService::GoodsList($request_params);
if(!empty($ret['data']))
{
// 商品自定义按照顺序重新调整
$goods = [];
$temp = array_column($ret['data'], null, 'id');
foreach($params['goods_ids'] as $v)
{
$goods[] = $temp[$v];
}
$ret['data'] = $goods;
}
break;
// 商品分类