更新列表

This commit is contained in:
yaooo 2023-12-06 15:55:38 +08:00
parent 246601dfa8
commit b18c1a381e
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@
//产品列表 //产品列表
public function product(): Json public function product(): Json
{ {
$data = Product::field('id as product_id,code,name')->where('status',1)->select()->toArray(); $data = Product::field('id as product_id,code,name')->where('status',1)->where('user_id', $this->userId)->select()->toArray();
$result = []; $result = [];
foreach ($data as $k=>$v) { foreach ($data as $k=>$v) {
$productDevice = ProductDevice::where('product_id',$v['product_id'])->select()->toArray(); $productDevice = ProductDevice::where('product_id',$v['product_id'])->select()->toArray();