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 <?php
use backend\modules\shop\models\ars\Comment;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
@ -22,12 +23,24 @@ $this->params['breadcrumbs'][] = $this->title;
'attributes' => [ 'attributes' => [
'id', 'id',
'user_id', 'user_id',
'order_goods_id',
[
'attribute' => 'order_goods_id',
'value' => function ($model) {
return $model->orderGoods->goods_name;
},
'label' => '商品名称'
],
'star', 'star',
'content:ntext', '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