From ef1018b32dc7e0dcdff08c506441af9b11a0a3c0 Mon Sep 17 00:00:00 2001 From: dengbw Date: Wed, 19 Jan 2022 11:30:35 +0800 Subject: [PATCH] api_material_119 --- admin/controllers/items/Transfer.php | 5 +++++ api/controllers/wxapp/material/Home.php | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/admin/controllers/items/Transfer.php b/admin/controllers/items/Transfer.php index e5820354..ab2d103d 100644 --- a/admin/controllers/items/Transfer.php +++ b/admin/controllers/items/Transfer.php @@ -844,6 +844,11 @@ class Transfer extends HD_Controller $cache_transports[$key]['mobile'] = $params['mobile']; $cache_transports[$key]['time'] = date('Y-m-d'); $addTransports = false; + } else if (($value['cardid'] == '待定' || $value['cardid'] == '待补') && $value['mobile'] == $params['mobile']) { + $cache_transports[$key]['name'] = $params['name']; + $cache_transports[$key]['cardid'] = $params['cardid']; + $cache_transports[$key]['time'] = date('Y-m-d'); + $addTransports = false; } } if ($addTransports) {//新增 diff --git a/api/controllers/wxapp/material/Home.php b/api/controllers/wxapp/material/Home.php index fffad407..c99f04c4 100644 --- a/api/controllers/wxapp/material/Home.php +++ b/api/controllers/wxapp/material/Home.php @@ -44,16 +44,19 @@ class Home extends Wxapp if ($distribute == 1) {//分销 $res = $this->mdAutoBrand->select(array('status' => 1, 'id<>' => 3), "id desc", 0, 0, 'id,name'); } else { - if ($this->biz_id) {//查找门店授权品牌 - $re_b = $this->mdBiz->get(array('id' => $this->biz_id, 'status' => 1)); - if ($re_b['jsondata']) { - $jsondata = json_decode($re_b['jsondata'], true); - if ($jsondata['auto_brands']) { - $brand_ids = implode($jsondata['auto_brands'], ','); - $res = $this->mdAutoBrand->select(array("id in ({$brand_ids})" => null, 'status' => 1, 'id<>' => 3), "id desc", 0, 0, 'id,name'); - } - } - } + $res = $this->mdAutoBrand->select(['id' => 1], "id desc", 0, 0, 'id,name');//临时只显示东风品牌 1.19 + //临时隐藏 +// if ($this->biz_id) {//查找门店授权品牌 +// $re_b = $this->mdBiz->get(array('id' => $this->biz_id, 'status' => 1)); +// if ($re_b['jsondata']) { +// $jsondata = json_decode($re_b['jsondata'], true); +// if ($jsondata['auto_brands']) { +// $brand_ids = implode($jsondata['auto_brands'], ','); +// !$brand_ids && $brand_ids = $jsondata['auto_brands']; +// $res = $this->mdAutoBrand->select(array("id in ({$brand_ids})" => null, 'status' => 1, 'id<>' => 3), "id desc", 0, 0, 'id,name'); +// } +// } +// } } //根据品牌做分类 if ($res) { @@ -71,7 +74,7 @@ class Home extends Wxapp array_multisort($timeKey, SORT_DESC, $list);//排序,根据$total 排序 } } - $list[] = ['id' => '3', 'name' => '狸车'];//全品牌蓄客 + $distribute == 1 && $list[] = ['id' => '3', 'name' => '狸车'];//全品牌蓄客 $distribute == 1临时加分销判断 1.19 $this->data['title'] = '推广素材'; $this->data['list'] = $list; $this->data['list_type'] = [['id' => 4, 'name' => '图片'], ['id' => 1, 'name' => '视频']];