diff --git a/admin/controllers/receiver/Customer.php b/admin/controllers/receiver/Customer.php index 4cf13289..f410f717 100644 --- a/admin/controllers/receiver/Customer.php +++ b/admin/controllers/receiver/Customer.php @@ -107,6 +107,7 @@ class Customer extends HD_Controller $show_info['wxqyAry'] = $wxqyAry; $show_info['wxgrAry'] = $wxgrAry; $show_info['csbizidAry'] = $this->customers_model->csbizidAry(); + $show_info['cbrandAry'] = $this->customers_model->cbrandAry(); $this->data['show_info'] = $show_info; $this->data['lists'] = $lists; $this->data['pager'] = array('count' => ceil($count / $size), 'curr' => $page, 'totle' => $count); @@ -392,6 +393,7 @@ class Customer extends HD_Controller !$params['cf_title'] && $params['cf_title'] = ''; !$params['qdjl_id'] && $params['qdjl_id'] = ''; !$params['level'] && $params['level'] = ''; + !is_numeric($params['c_brand']) && $params['c_brand'] = ''; !$params['of_id'] && $params['of_id'] = ''; !$params['of2_id'] && $params['of2_id'] = ''; !$params['city_id'] && $params['city_id'] = ''; @@ -421,6 +423,9 @@ class Customer extends HD_Controller if ($params['level']) { $where['level'] = $params['level']; } + if (is_numeric($params['c_brand'])) { + $where['c_brand'] = $params['c_brand']; + } if ($params['of_id']) { $where['of_id'] = $params['of_id']; } @@ -607,10 +612,11 @@ class Customer extends HD_Controller 'name' => $row['name'], 'level' => $row['level'], 'mobile' => $mobile_sub, + 'c_brand' => $this->customers_model->cbrandAry($row['c_brand']), 'of_title' => $of_title, 'wxqy_name' => $this->customers_model->wxqyAry($row['wxqy']), 'wxgr_name' => $this->customers_model->wxgrAry($row['wxgr']), - 'wx_name' => '企微:' . $this->customers_model->wxqyAry($row['wxqy']) . '; 个微:' . $this->customers_model->wxgrAry($row['wxgr']), + 'wx_name' => '企微' . $this->customers_model->wxqyAry($row['wxqy']) . '; 个微' . $this->customers_model->wxgrAry($row['wxgr']), 'cf_user' => $cf_user, 'to_send' => $to_send, 'c_time' => date('Y-m-d H:i:s', $row['c_time']), @@ -946,7 +952,7 @@ class Customer extends HD_Controller "dt_time" => "到店时间", "order_time" => "下单时间", "cont_time" => "最后联系时间", - #"of_title" => "来源", + "c_brand" => "品牌归属", "of_title_1" => "来源1", "of_title_2" => "来源2", "biz_name" => "归属门店", @@ -961,7 +967,7 @@ class Customer extends HD_Controller $status_arr = $this->customers_model->get_status(); unset($status_arr['-1']); if ($count) { - $fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, cf_title, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name"; + $fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, c_brand, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name"; $rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds); foreach ($rows as $key => $val) { $of_title = ''; @@ -987,7 +993,7 @@ class Customer extends HD_Controller 'dt_time' => $val['dt_time'], 'order_time' => $val['order_time'], 'cont_time' => $val['cont_time'], - 'of_title' => $of_title, + 'c_brand' => $this->customers_model->cbrandAry($val['c_brand'] ), 'of_title_1' => $of_title_1, 'of_title_2' => $of_title_2, 'biz_name' => $val['biz_name'], diff --git a/admin/views/receiver/customer/get.php b/admin/views/receiver/customer/get.php index 84ccb2c2..35b24c4b 100644 --- a/admin/views/receiver/customer/get.php +++ b/admin/views/receiver/customer/get.php @@ -58,16 +58,17 @@ 加入时间:{{info.c_time}} + 品牌归属:{{info.c_brand}} 客户来源:{{info.of_title}} - 微信好友:{{info.wx_name}} 客户等级:{{info.level}} + 微信好友:{{info.wx_name}} 客户位置:{{info.city_county}} 是否改派:{{info.to_send}} - 分销来源:{{info.cf_user}} + diff --git a/admin/views/receiver/customer/lists.php b/admin/views/receiver/customer/lists.php index c8fba688..c9e1fa58 100644 --- a/admin/views/receiver/customer/lists.php +++ b/admin/views/receiver/customer/lists.php @@ -77,6 +77,15 @@ +
+ +
+ +
+
diff --git a/common/models/receiver/Receiver_customers_model.php b/common/models/receiver/Receiver_customers_model.php index 035ab46b..c2723eb6 100644 --- a/common/models/receiver/Receiver_customers_model.php +++ b/common/models/receiver/Receiver_customers_model.php @@ -206,6 +206,16 @@ class Receiver_customers_model extends HD_Model } } + public function cbrandAry($c_brand=null){ + $arr = [0 => '综合', 1 => '东风纳米', 4 => '哪吒', 5 => '零跑']; + + if (is_numeric($c_brand)) { + return $arr[$c_brand]; + } else { + return $arr; + } + } + public function count_order($where) { return $this->select_order($where, '', '', '', '', 1); diff --git a/home/controllers/Welcome.php b/home/controllers/Welcome.php index 83155c9a..ad7393cb 100644 --- a/home/controllers/Welcome.php +++ b/home/controllers/Welcome.php @@ -4,6 +4,41 @@ defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends CI_Controller { public function index(){ - + $url = 'https://salesapp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue'; + + $data[] = array( + 'cusSource3' => "010403", + 'customerName' => "测试A", + 'dealerCode' => "100316", + 'fromSystem' => "好店云", + 'mobile' => "13012341234", + 'remark' => "测试数据", + ); + + $data = json_encode($data, JSON_UNESCAPED_UNICODE); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + //https + if (strlen($url) > 5 && strtolower(substr($url, 0, 5)) == "https") { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + } + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + 'Content-Type: application/json; charset=utf-8', + 'Content-Length: ' . strlen($data) + ) + ); + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + var_dump($response); } } + + + diff --git a/home/helpers/index.html b/home/helpers/index.html deleted file mode 100755 index b702fbc3..00000000 --- a/home/helpers/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - -