material_1014_3

This commit is contained in:
dengbw
2021-10-14 17:51:27 +08:00
committed by lccsw
parent befc13fb79
commit cdd75a2a27
5 changed files with 33 additions and 14 deletions
+11 -1
View File
@@ -16,6 +16,15 @@ class Common extends CI_Controller
public $data = array();
//获取素材模版
public function material()
{
$this->load->model('app/material/Material_template_model', 'mdTemplate');
$rows = $this->mdTemplate->select(array('status' => 1, 'type in(1,2)' => null), 'id desc', '', '', 'id,title');
$this->data['data'] = $rows;
return $this->show_json(SYS_CODE_SUCCESS);
}
//获取行政区域
public function area()
{
@@ -1350,6 +1359,7 @@ class Common extends CI_Controller
$this->data['itemsPage'] = array('page' => $page, 'pageLimit' => $size, 'pageCount' => $count, 'hasNext' => $hasNext);
return $this->show_json(SYS_CODE_SUCCESS);
}
/**
* Notes:选择品牌
*/
@@ -1444,7 +1454,7 @@ class Common extends CI_Controller
$page = $this->input->post('page') ? intval($this->input->post('page')) : 1;
$size = $this->input->post('size') ? intval($this->input->post('size')) : 10;
$where = "status=1 ";
if($vin){
if ($vin) {
$where .= " and vin='{$vin}'";
} else {
$brand_id && $where .= " and brand_id=$brand_id";
+1 -1
View File
@@ -150,7 +150,7 @@ class Template extends HD_Controller
$msg = '非法参数';
} else if (!$info['title']) {
$msg = '请输入模版名称';
} else if (!$info['cover']['value']) {
} else if (!$info['cover']['value'] && $info['type'] != 3) {
$msg = '请上传封面图';
} else if (!$info['brand_ids'] && $info['type'] != 3) {
$msg = '请选择适用品牌';
+12 -7
View File
@@ -133,14 +133,19 @@ class Customer extends HD_Controller
$dt_time[1] && $where["dt_time <="] = $dt_time[1] . ' 23:59:59';
}
if ($params['cfrom_id'] || $params['cfrom_id2']) {
if ($params['cfrom_id2']) {
$where['cf_id'] = $params['cfrom_id2'];
if ($params['cfrom_id'] == 24) {
$where['cf_id'] = 24;
$params['cfrom_id2'] && $where['t_id'] = $params['cfrom_id2'];
} else {
$cf_rows = $this->clues_cfrom_model->select(['pid' => $params['cfrom_id']], '', '', '', 'id');
$cf_ids = array_column($cf_rows, 'id');
$cf_ids[] = $params['cfrom_id'];
$cf_str_ids = implode(',', array_filter($cf_ids));
$cf_str_ids && $where["cf_id in ({$cf_str_ids})"] = null;
if ($params['cfrom_id2']) {
$where['cf_id'] = $params['cfrom_id2'];
} else {
$cf_rows = $this->clues_cfrom_model->select(['pid' => $params['cfrom_id']], '', '', '', 'id');
$cf_ids = array_column($cf_rows, 'id');
$cf_ids[] = $params['cfrom_id'];
$cf_str_ids = implode(',', array_filter($cf_ids));
$cf_str_ids && $where["cf_id in ({$cf_str_ids})"] = null;
}
}
}
$count = $this->customers_model->count($where);
+5 -2
View File
@@ -41,6 +41,7 @@
<option value="">全部类型</option>
<option value="平台分配" <?= $params['cf_title'] == '平台分配' ? 'selected' : '' ?>>平台分配</option>
<option value="自有资源" <?= $params['cf_title'] == '自有资源' ? 'selected' : '' ?>>自有资源</option>
<option value="素材推广" <?= $params['cf_title'] == '素材推广' ? 'selected' : '' ?>>素材推广</option>
</select>
</div>
</div>
@@ -273,7 +274,8 @@
that.cfroms = result.data.data
});
if (that.cfrom_id > 0) {
$.get('/receiver/clues/get_cfroms', {'id': that.cfrom_id}, function (result) {
var url = that.cfrom_id == 24 ? '/common/material' : '/receiver/clues/get_cfroms';
$.get(url, {'id': that.cfrom_id}, function (result) {
that.cfroms2 = result.data.data
});
}
@@ -346,7 +348,8 @@
that.cfrom_id2 = 0;
that.cfroms = [];
} else {
$.get('/receiver/clues/get_cfroms', {'id': nv}, function (result) {
var url = nv == 24 ? '/common/material' : '/receiver/clues/get_cfroms';
$.get(url, {'id': nv}, function (result) {
that.cfroms2 = result.data.data;
if (that.cfrom_id2 > 0) {
var cfrom_id2 = '0';
+4 -3
View File
@@ -78,14 +78,15 @@ class Biz extends Wxapp
}
//统计浏览数
$re_s = $this->mdBizStatistics->sum('browse_num', ['app_id' => $this->app_id, 'biz_id' => $biz_id]);
$orders = $this->mdBizStatistics->count_order(array('c.biz_id' => $biz_id, 'c.cf_id' => $this->cf_id, 'c.status >=' => 0));
//$orders = $this->mdBizStatistics->count_order(array('c.biz_id' => $biz_id, 'c.cf_id' => $this->cf_id, 'c.status >=' => 0));
$this->data['title'] = '店铺';
$this->data['biz_name'] = $re['biz_name'];
$this->data['address'] = $re['address'];
$this->data['lat'] = $re['lat'];
$this->data['lng'] = $re['lng'];
$this->data['auto_brands'] = $auto_brands;
$this->data['statistics'] = $re_s['browse_num'] . '人浏览 | ' . $orders . '笔成交';
//$this->data['statistics'] = $re_s['browse_num'] . '人浏览 | ' . $orders . '笔成交';
$this->data['statistics'] = $re_s['browse_num'] . '人浏览';
$this->data['topics'] = array('title' => '热门', 'list' => $list);
return $this->data;
}
@@ -113,7 +114,7 @@ class Biz extends Wxapp
'biz_id' => $biz_id,
'city_id' => $re_biz['city_id'],
'county_id' => $re_biz['county_id'],
'cf_title' => '自有资源',
'cf_title' => '素材推广',
'cf_id' => $this->cf_id,
't_id' => $t_id,
'p_time' => date('Y-m-d H:i:s'),