拼接数据

This commit is contained in:
liu 2024-06-12 16:39:26 +08:00
parent 06258e7854
commit 8c7684477f

View File

@ -54,7 +54,7 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface
$item['goods_list'] = StoreOrderCartInfo::where('oid', $item['id']) $item['goods_list'] = StoreOrderCartInfo::where('oid', $item['id'])
->field('product_id,cart_num,verify_code,is_writeoff,writeoff_time,old_cart_id')->limit(3)->select() ->field('product_id,cart_num,verify_code,is_writeoff,writeoff_time,old_cart_id')->limit(3)->select()
->each(function ($v) use ($item) { ->each(function ($v) use ($item) {
$find = StoreBranchProduct::where('product_id', $v['product_id'])->where('store_id', $item['store_id'])->find(); $find = StoreBranchProduct::where('product_id', $v['product_id'])->where('store_id', $item['store_id'])->withTrashed()->find();
$v['store_name'] = $find['store_name']; $v['store_name'] = $find['store_name'];
$v['image'] = $find['image']; $v['image'] = $find['image'];
$v['price'] = $find['price']; $v['price'] = $find['price'];
@ -67,6 +67,9 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface
if ($item['pay_time']) { if ($item['pay_time']) {
$item['pay_time'] = date('Y-m-d H:i:s', $item['pay_time']); $item['pay_time'] = date('Y-m-d H:i:s', $item['pay_time']);
} }
if($item['verify_img']){
$item['verify_img'] = 'https://'.$this->request->host(true).$item['verify_img'];
}
}) })
->toArray(); ->toArray();