diff --git a/api/controllers/wxapp/material/Home.php b/api/controllers/wxapp/material/Home.php index 50413c50..24e6903f 100644 --- a/api/controllers/wxapp/material/Home.php +++ b/api/controllers/wxapp/material/Home.php @@ -66,7 +66,8 @@ class Home extends Wxapp } $this->data['title'] = '推广素材'; $this->data['list'] = $list; - return $list; + $this->data['list_type'] = [['id' => 4, 'name' => '图片'], ['id' => 1, 'name' => '视频']]; + return $this->data; } /** @@ -80,14 +81,16 @@ class Home extends Wxapp { $page = $this->input_param('page'); $size = $this->input_param('size'); - $brand_id = intval($this->input_param('type')); + $brand_id = intval($this->input_param('id')); + $type = intval($this->input_param('type')); + !$type && $type = 4; $lists = array(); $total = 0; if ($brand_id) { !$page && $page = 1; !$size && $size = 8; $brand_id = $brand_id . ','; - $where = array('app_id' => $this->app_id, 'type in(4,1)' => null, "brand_ids like '%{$brand_id}%'" => null, 'status' => 1); + $where = array('app_id' => $this->app_id, 'type' => $type, "brand_ids like '%{$brand_id}%'" => null, 'status' => 1); $total = $this->mdTemplate->count($where); $fileds = 'id,title,cover,json_data'; $res = $this->mdTemplate->select($where, "id desc", $page, $size, $fileds); diff --git a/common/models/app/licheb/App_licheb_channel_biz_model.php b/common/models/app/licheb/App_licheb_channel_biz_model.php new file mode 100644 index 00000000..904ee8ae --- /dev/null +++ b/common/models/app/licheb/App_licheb_channel_biz_model.php @@ -0,0 +1,18 @@ +table_name, 'default'); + } +} \ No newline at end of file