diff --git a/common/models/hdcloud/Neta_model.php b/common/models/hdcloud/Neta_model.php new file mode 100644 index 00000000..7890860e --- /dev/null +++ b/common/models/hdcloud/Neta_model.php @@ -0,0 +1,19 @@ +table_name, 'default'); + } +} diff --git a/home/controllers/Welcome.php b/home/controllers/Welcome.php index 7efc0afb..7284e877 100644 --- a/home/controllers/Welcome.php +++ b/home/controllers/Welcome.php @@ -73,50 +73,59 @@ class Welcome extends CI_Controller { public function add_clues() { - $mobiles = array('13866790072','13720239200','18907194081','13163118145','15014140367','17670518115','15371113565','13995687107','15347175777','15588309035','15197879915','17561549261','15684548756','13963168469','15065198628','18389173251','18389108897','13863881516','13627232002','18771921959','15954038866','18037989222','18921455430','15251393701','18788042755','13255673535','18898787107','18802777062','13326244206','15239413968'); - $dealerCode = '100481'; + $this->load->model('hdcloud/neta_model'); - foreach ($mobiles as $k => $v) { - $city_id = '350200'; - $voId = $city_id . date('mdHis') . sprintf("%06d", rand(1,999999)); - $data[] = array( - 'voId' => $voId, - 'cusSource3' => '020103',//'023409'区域云店,//023410:云店营销节点 //020103太平洋 - 'customerName' => '客户', - 'dealerCode' => $dealerCode, - 'fromSystem' => "好店云", - 'mobile' => $v, - 'saMobile' => '', - 'cusType' => '30111001', - 'remark' => "", - 'intentModel' => "", + $dealerCode = array('101568'); + + foreach ($dealerCode as $d) + { + $mobiles = $this->neta_model->select(array('status' => 0), '', 1, 20); + + foreach ($mobiles as $k => $v) { + $city_id = '350200'; + $voId = $city_id . date('mdHis') . sprintf("%06d", rand(1,999999)); + + $data[] = array( + 'voId' => $voId, + 'cusSource3' => '023410',//'023409'区域云店,//023410:云店营销节点 //020103太平洋 + 'customerName' => '客户', + 'dealerCode' => $d, + 'fromSystem' => "好店云", + 'mobile' => $v['mobile'], + 'saMobile' => '', + 'cusType' => '30111001', + 'remark' => "", + 'intentModel' => "", + ); + + $this->neta_model->update(array('status' => 1), array('id' => $v['id'])); + } + + $data = json_encode($data, JSON_UNESCAPED_UNICODE); + + $url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue'; + $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); } - - $data = json_encode($data, JSON_UNESCAPED_UNICODE); - - $url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue'; - $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/views/h5/market/sytopic/index.php b/home/views/h5/market/sytopic/index.php index 2238a6cc..4b239641 100644 --- a/home/views/h5/market/sytopic/index.php +++ b/home/views/h5/market/sytopic/index.php @@ -4,7 +4,7 @@
- +
返回
@@ -14,7 +14,7 @@ 我的权益 - + 分享