Bläddra i källkod

feat: EK-2806: 会员端Promo和banner图增加分国家设置.

kevin 3 månader sedan
förälder
incheckning
3d8c9c3856
1 ändrade filer med 44 tillägg och 44 borttagningar
  1. 44 44
      backendApi/modules/v1/models/lists/ad/AdIndexList.php

+ 44 - 44
backendApi/modules/v1/models/lists/ad/AdIndexList.php

@@ -33,51 +33,51 @@ class AdIndexList extends \common\libs\dataList\DataList implements DataListInte
         ]);
     }
 
-//    public function getColumn(){
-//        if(!$this->columns){
-//            $this->columns = [
-//                'ID' => null,
-//                'TITLE' => null,
-//                'COUNTRY_ID' => [
-//                    'header' => Yii::t('ctx', 'country'),
-//                    'headerOther' => ['width' => '150'],
-//                ],
-//                'COUNTRY_NAME' => null,
-//                'LID' => [
-//                    'header' => '广告位',
-//                    'value' => function($row){
-//                        $adLocation = AdLocation::findOneAsArray('ID=:ID', [':ID'=>$row['LID']], 'LOCATION_NAME');
-//                        return $adLocation['LOCATION_NAME'];
-//                    },
-//                    'headerOther' => ['width' => '180'],
-//                ],
-//                'STATUS' => [
-//                    'header' => Yii::t('ctx', 'status'),
-//                    'headerOther' => ['width' => '100'],
-//                ],
-////                'TYPE'=> [
-////                    'name'=> Yii::t('ctx', 'ExternalLink'),
-////                    'other'=> 'select',
-////                    'selectData'=> [
-////                        ['id'=> 1, 'name'=> Yii::t('ctx', 'ExternalLink')],
-////                        ['id'=> 2, 'name'=> Yii::t('ctx', 'Article')]
-////                    ]
-////                ],
-//                'SORT' => null,
-//                'CREATED_AT' => [
-//                    'header' => Yii::t('ctx', 'createTime'),
-//                    'value' => function($row) {
-//                        return (new DateTime([
-//                            'value' => $row['CREATED_AT'],
-//                        ]))->result();
-//                    },
-//                    'headerOther' => ['width' => '180'],
+    public function getColumn(){
+        if(!$this->columns){
+            $this->columns = [
+                'ID' => null,
+                'TITLE' => null,
+                'COUNTRY_ID' => [
+                    'header' => Yii::t('ctx', 'country'),
+                    'headerOther' => ['width' => '150'],
+                ],
+                'COUNTRY_NAME' => null,
+                'LID' => [
+                    'header' => '广告位',
+                    'value' => function($row){
+                        $adLocation = AdLocation::findOneAsArray('ID=:ID', [':ID'=>$row['LID']], 'LOCATION_NAME');
+                        return $adLocation['LOCATION_NAME'];
+                    },
+                    'headerOther' => ['width' => '180'],
+                ],
+                'STATUS' => [
+                    'header' => Yii::t('ctx', 'status'),
+                    'headerOther' => ['width' => '100'],
+                ],
+//                'TYPE'=> [
+//                    'name'=> Yii::t('ctx', 'ExternalLink'),
+//                    'other'=> 'select',
+//                    'selectData'=> [
+//                        ['id'=> 1, 'name'=> Yii::t('ctx', 'ExternalLink')],
+//                        ['id'=> 2, 'name'=> Yii::t('ctx', 'Article')]
+//                    ]
 //                ],
-//            ];
-//        }
-//
-//        return $this->columns;
-//    }
+                '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;
+    }
 
     /**
      * 前台用于筛选的类型集合