diff --git a/backend/modules/shop/models/searchs/CommentSearch.php b/backend/modules/shop/models/searchs/CommentSearch.php index d39c4b5..ff762e5 100644 --- a/backend/modules/shop/models/searchs/CommentSearch.php +++ b/backend/modules/shop/models/searchs/CommentSearch.php @@ -54,12 +54,23 @@ class CommentSearch extends Comment ], 'id', 'user_id', - 'order_goods_id', + [ + 'attribute' => 'order_goods_id', + 'value' => function ($model) { + return $model->orderGoods->goods_name; + }, + 'label' => '商品名称' + ], 'star', 'content', - //'status', - //'updated_at', - //'created_at', + [ + 'attribute' => 'status', + 'value' => function ($model) { + return Comment::$commentStatus[$model->status]; + }, + 'label' => '状态' + ], + 'created_at', [ 'class' => 'iron\grid\ActionColumn', 'align' => 'center', diff --git a/backend/modules/shop/views/comment/index.php b/backend/modules/shop/views/comment/index.php index a0cea8b..3737f47 100644 --- a/backend/modules/shop/views/comment/index.php +++ b/backend/modules/shop/views/comment/index.php @@ -7,22 +7,25 @@ use iron\grid\GridView; /* @var $searchModel backend\modules\shop\models\searchs\CommentSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ -$this->title = 'Comments'; +$this->title = '评论'; $this->params['breadcrumbs'][] = $this->title; ?>
$dataProvider, - 'filter' => $this->render("_search", ['model' => $searchModel]), - 'batch' => [ - [ - "label" => "删除", - "url" => "comment/deletes" - ], + 'dataProvider' => $dataProvider, + 'filter' => $this->render("_search", ['model' => $searchModel]), + 'batch' => [ + [ + "label" => "删除", + "url" => "comment/deletes" ], - 'columns' => $columns - ]); + ], + 'columns' => $columns, + 'batchTemplate' => '', + 'create' => '', + 'export' => '', + ]); ?>
\ No newline at end of file