Authored by wuxiao
... ... @@ -42,13 +42,13 @@ class Master extends \yii\db\ActiveRecord
public function attributeLabels()
{
return [
'master_id' => 'Master ID',
'name' => 'Name',
'meta' => 'Meta',
'pic' => 'Pic',
'master_id' => '主播ID',
'name' => '主播名称',
'meta' => '主播标签',
'pic' => '主播头像',
'live_nums' => 'Live Nums',
'create_time' => 'Create Time',
'update_time' => 'Update Time',
'create_time' => '创建时间',
'update_time' => '更新时间',
];
}
... ...
... ... @@ -53,20 +53,20 @@ class Room extends \yii\db\ActiveRecord
{
return [
'id' => 'ID',
'room_id' => 'Room ID',
'title' => 'Title',
'watermark' => 'Watermark',
'master_id' => 'Master ID',
'room_id' => '房间ID',
'title' => '直播标题',
'watermark' => '水印文案',
'master_id' => '主播ID',
'app' => 'App',
'secret' => 'Secret',
'pic' => 'Pic',
'starting_time' => 'Starting Time',
'best' => 'Best',
'vest' => 'Vest',
'living' => 'Living',
'status' => 'Status',
'create_time' => 'Create Time',
'update_time' => 'Update Time',
'secret' => '房间密钥',
'pic' => '头图',
'starting_time' => '预告开始时间',
'best' => '是否精选',
'vest' => '马甲状态',
'living' => '直播状态',
'status' => '房间状态',
'create_time' => '创建时间',
'update_time' => '更新时间',
];
}
... ...
... ... @@ -36,6 +36,7 @@ $this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
<th>头图</th>
<th>主播</th>
<th>预告开始时间</th>
<th>房间密钥</th>
<th>是否精选</th>
<th>马甲状态</th>
<th>直播状态</th>
... ... @@ -52,6 +53,7 @@ $this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
<td><img height="70" alt="房间封面图片" src="<?=CommonImages::getImageUrl($model->pic, 70, 70, 2)?>"></td>
<td><?=$model->master ? $model->master->master_id.' '.$model->master->name : '无主播'?></td>
<td style="white-space:nowrap"><?=$model->starting_time ? date('Y-m-d H:i:s',$model->starting_time) : ''?></td>
<td><?=$model->secret?></td>
<td><?=Yii::$app->params['config']['best'][$model->best]?></td>
<td><?=Yii::$app->params['config']['vest'][$model->vest]?></td>
<td><?=Yii::$app->params['config']['room_living'][$model->living]?></td>
... ...
... ... @@ -60,9 +60,9 @@ $this->registerJs($this->blocks['javascript'],View::POS_END)
</div>
<div class="form-group">
<label class="col-sm-3 control-label">主播: </label>
<label class="col-sm-3 control-label">主播: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<?php echo Html::dropDownList('master_id', $model->master_id,$masters, ['class' => 'width300 select-basic']);?>
<?php echo Html::dropDownList('master_id', $model->master_id,$masters, ['class' => 'width300 select-basic', 'required'=>"required"]);?>
</div>
</div>
... ...