Browse Source

feat:修改评论视图界面字段显示

antshop
linyaostalker 5 years ago
parent
commit
5ed04dd2a1
  1. 21
      backend/modules/shop/views/comment/view.php

21
backend/modules/shop/views/comment/view.php

@ -1,5 +1,6 @@
<?php
use backend\modules\shop\models\ars\Comment;
use yii\helpers\Html;
use yii\widgets\DetailView;
@ -22,12 +23,24 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [
'id',
'user_id',
'order_goods_id',
[
'attribute' => 'order_goods_id',
'value' => function ($model) {
return $model->orderGoods->goods_name;
},
'label' => '商品名称'
],
'star',
'content:ntext',
'status',
'updated_at',
'created_at',
[
'attribute' => 'status',
'value' => function ($model) {
return Comment::$commentStatus[$model->status];
},
'label' => '状态'
],
'updated_at:datetime',
'created_at:datetime',
],
]) ?>

Loading…
Cancel
Save