WIN-2308041133\Administrator 8 months ago
parent
commit
5daa300148

+ 6 - 6
application/admin/controller/platform/Income.php

@@ -14,10 +14,10 @@ class Income extends Backend
         parent::_initialize();
         $this->model = new \app\common\model\Income;
         // 获取短剧和平台数据(用于下拉框)
-        $videolist = Videolist::column('id,name');
-        $platforms = Platform::column('id,name');
-        $this->assign('videolist', $videolist);
-        $this->assign('platforms', $platforms);
+//        $videolist = Videolist::column('id,name');
+//        $platforms = Platform::column('id,name');
+//        $this->assign('videolist', $videolist);
+//        $this->assign('platforms', $platforms);
     }
 
     // 列表页
@@ -34,12 +34,12 @@ class Income extends Backend
 //            }
 
             $total = $this->model
-//                ->with(['videolist', 'platform'])
+                ->with(['videolist'])
                 ->where($where)
                 ->order($sort, $order)
                 ->count();
             $list = $this->model
-//                ->with(['videolist', 'platform'])
+                ->with(['videolist'])
                 ->where($where)
                 ->order($sort, $order)
                 ->limit($offset, $limit)

+ 4 - 4
application/common/model/Income.php

@@ -25,8 +25,8 @@ class Income extends Model
     {
         return $this->belongsTo('Videolist', 'videolist_id', 'id', [], 'LEFT')->setEagerlyType(0);
     }
-    public function platform()
-    {
-        return $this->belongsTo('Platform', 'platform_id', 'id', [], 'LEFT')->setEagerlyType(0);
-    }
+//    public function platform()
+//    {
+//        return $this->belongsTo('Platform', 'platform_id', 'id', [], 'LEFT')->setEagerlyType(0);
+//    }
 }