From 68a5bf114e33016c365cad01d27b7e40ddf1cc39 Mon Sep 17 00:00:00 2001 From: liangyuyan <1103300295@qq.com> Date: Tue, 29 Sep 2020 11:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8-=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=A7=84=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/v3/GoodsController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Admin/Controllers/v3/GoodsController.php b/app/Admin/Controllers/v3/GoodsController.php index d59d6f6..1b7ad9b 100644 --- a/app/Admin/Controllers/v3/GoodsController.php +++ b/app/Admin/Controllers/v3/GoodsController.php @@ -59,14 +59,13 @@ class GoodsController extends AdminController $grid->column('goods_unit','单位')->editable(); $grid->column('spec','规格')->display(function($spec){ $item = ''; - if(!empty($spec)){ + if(!empty($spec) && is_array($spec)){ foreach($spec as $key => $value){ $specKey = isset($value['spec_key'])?$value['spec_key']:''; $specValue = isset($value['spec_value'])?$value['spec_value']:''; $item .= $specKey.':'.$specValue.'
'; } } - return $item; }); $grid->column('market_id')->display(function($marketId) use($marketList){