|
|
@@ -43,6 +43,14 @@ class AdIndexList extends \common\libs\dataList\DataList implements DataListInte
|
|
|
'headerOther' => ['width' => '150'],
|
|
|
],
|
|
|
'COUNTRY_NAME' => null,
|
|
|
+ 'LID' => [
|
|
|
+ 'label' => '广告位',
|
|
|
+ 'type' => function($data){
|
|
|
+ $value = $data['value'];
|
|
|
+ $adLocation = AdLocation::findOneAsArray('ID=:ID', [':ID'=>$value], 'LOCATION_NAME');
|
|
|
+ return $adLocation['LOCATION_NAME'];
|
|
|
+ },
|
|
|
+ ],
|
|
|
'STATUS' => [
|
|
|
'header' => Yii::t('ctx', 'status'),
|
|
|
'headerOther' => ['width' => '100'],
|
|
|
@@ -59,56 +67,10 @@ class AdIndexList extends \common\libs\dataList\DataList implements DataListInte
|
|
|
],
|
|
|
];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return $this->columns;
|
|
|
}
|
|
|
|
|
|
-// public function getColumn(){
|
|
|
-// if(!$this->columns){
|
|
|
-// $this->columns = [
|
|
|
-// 'ID' => null,
|
|
|
-// 'TITLE' => null,
|
|
|
-// 'COUNTRY_ID' => [
|
|
|
-// 'header' => Yii::t('ctx', 'country'),
|
|
|
-// 'headerOther' => ['width' => '150'],
|
|
|
-// ],
|
|
|
-//// 'TYPE' => null,
|
|
|
-//// 'TYPE_NAME' => [
|
|
|
-//// 'label' => '类型',
|
|
|
-//// 'type' => function($data){
|
|
|
-//// $value = $data['value'];
|
|
|
-//// return $value==1 ? 'External Link' : 'Article';
|
|
|
-//// },
|
|
|
-//// ],
|
|
|
-// 'LID' => [
|
|
|
-// 'label' => '广告位',
|
|
|
-// 'type' => function($data){
|
|
|
-// $value = $data['value'];
|
|
|
-// $adLocation = AdLocation::findOneAsArray('ID=:ID', [':ID'=>$value], 'LOCATION_NAME');
|
|
|
-// return $adLocation['LOCATION_NAME'];
|
|
|
-// },
|
|
|
-// ],
|
|
|
-//// 'CONTENT' => null,
|
|
|
-// 'COUNTRY_NAME' => null,
|
|
|
-// 'STATUS' => [
|
|
|
-// 'header' => Yii::t('ctx', 'status'),
|
|
|
-// 'headerOther' => ['width' => '100'],
|
|
|
-// ],
|
|
|
-// 'SORT' => null,
|
|
|
-// 'CREATED_AT' => [
|
|
|
-// 'header' => Yii::t('ctx', 'createTime'),
|
|
|
-// 'value' => function($row) {
|
|
|
-// return (new DateTime([
|
|
|
-// 'value' => $row['CREATED_AT'],
|
|
|
-// ]))->result();
|
|
|
-// },
|
|
|
-// 'headerOther' => ['width' => '180'],
|
|
|
-// ],
|
|
|
-// ];
|
|
|
-// }
|
|
|
-// return $this->columns;
|
|
|
-// }
|
|
|
-
|
|
|
/**
|
|
|
* 前台用于筛选的类型集合
|
|
|
* @return mixed
|
|
|
@@ -120,11 +82,11 @@ class AdIndexList extends \common\libs\dataList\DataList implements DataListInte
|
|
|
'TITLE'=> ['name'=> Yii::t('ctx', 'title')],
|
|
|
'CONTENT' => ['name'=> Yii::t('ctx', 'content')],
|
|
|
// 确保这里的键名与getColumn()方法中的列名一致
|
|
|
-// 'COUNTRY_ID'=> [
|
|
|
-// 'name'=> \Yii::t('ctx', 'country'),
|
|
|
-// 'other'=> 'select',
|
|
|
-// 'selectData'=> self::getCountry()
|
|
|
-// ],
|
|
|
+ 'COUNTRY'=> [
|
|
|
+ 'name'=> \Yii::t('ctx', 'country'),
|
|
|
+ 'other'=> 'select',
|
|
|
+ 'selectData'=> self::getCountry()
|
|
|
+ ],
|
|
|
'STATUS'=> [
|
|
|
'name'=> Yii::t('ctx', 'status'),
|
|
|
'other'=> 'select',
|