api_material_1112

This commit is contained in:
dengbw
2021-11-12 16:32:53 +08:00
parent fbdd457394
commit f439f0c165
2 changed files with 24 additions and 3 deletions
+6 -3
View File
@@ -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);
@@ -0,0 +1,18 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Notes:狸车宝渠道门店
* Created on: 2021/11/12 12:45
* Created by: dengbw
*/
class App_licheb_channel_biz_model extends HD_Model
{
private $table_name = 'lc_app_licheb_channel_biz';
public function __construct()
{
parent::__construct($this->table_name, 'default');
}
}