Browse Source

修复商品列表因图片不存在报错

antshop
linyaostalker 5 years ago
parent
commit
6de26a7895
  1. 2
      backend/modules/goods/views/goods/view.php

2
backend/modules/goods/views/goods/view.php

@ -77,7 +77,7 @@ $this->params['breadcrumbs'][] = $this->title;
['attribute' => 'image', ['attribute' => 'image',
'format' => 'raw', 'format' => 'raw',
'value' => function ($model) { 'value' => function ($model) {
return $model->image ?
return $model->imageFile ?
Html::img(['/'.$model->imageFile->path], ['style' => 'width:80px']) Html::img(['/'.$model->imageFile->path], ['style' => 'width:80px'])
: '<div class="table_not_setting">未设置</div>'; : '<div class="table_not_setting">未设置</div>';

Loading…
Cancel
Save