diff --git a/admin/controllers/hdcloud/Clues.php b/admin/controllers/hdcloud/Clues.php index 36563638..71e77669 100644 --- a/admin/controllers/hdcloud/Clues.php +++ b/admin/controllers/hdcloud/Clues.php @@ -87,6 +87,11 @@ class Clues extends HD_Controller 'sa' => '张安琪', 'mobile' => '15999955547' ), + '100671' => array( + 'biz' => '梅州利兴', + 'sa' => '石绿绿', + 'mobile' => '14718175658' + ), ); protected $log_dir; diff --git a/home/controllers/Welcome.php b/home/controllers/Welcome.php index 544a24ed..c63d2e0e 100644 --- a/home/controllers/Welcome.php +++ b/home/controllers/Welcome.php @@ -16,11 +16,11 @@ class Welcome extends CI_Controller { //测试地址 //$url = 'https://salespp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue'; - $name = '佳味鲜羊肉羊肚火锅'; //客户姓名 - $mobile = '15606956260';//客户手机 + $name = '户外小李子'; //客户姓名 + $mobile = '13422926010';//客户手机 - $comments = '100690'; //门店编码 - $samobile = '13600983210';//销售手机 + $comments = '101043'; //门店编码 + $samobile = '15999955547';//销售手机 $city_id = '350200'; $voId = $city_id . date('mdHis') . sprintf("%06d", rand(1,999999)); diff --git a/home/controllers/h5/market/sylive2/Act.php b/home/controllers/h5/market/sylive2/Act.php index 9c65157c..72e94d95 100644 --- a/home/controllers/h5/market/sylive2/Act.php +++ b/home/controllers/h5/market/sylive2/Act.php @@ -619,51 +619,53 @@ class Act extends Wx { // $syt->Tj($dlrCode,"活动客户",$mobile,$mediaCaName,$leadNo); // } -// if($a_id == 27){ -// //生产地址 -// $url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue'; -// -// //获取意向网点编码 -// if($p_user){ -// $user = $this->user_model->get(['userId'=>$act_user_row['channelId']]); -// $biz = $this->market_sylive_organization_model->get(['organizationId'=>$user['bizId']]); -// } -// -// $data[] = array( -// 'cusSource3' => '023410', -// 'customerName' => "活动客户", -// 'dealerCode' => $biz['comments'], -// 'fromSystem' => "好店云", -// 'mobile' => $mobile, -// 'saMobile' => $user['mobile'], -// 'cusType' => '30111001', -// 'remark' => "2024新春", -// ); -// -// $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); -// curl_close($ch); -// debug_log("[info]# " . $data."\n".$response, 'neta.log','market/sylive'); -// } + if($a_id == 27){ + //生产地址 + $url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue'; + + //获取意向网点编码 + if($p_user){ + $user = $this->user_model->get(['userId'=>$act_user_row['channelId']]); + $biz = $this->market_sylive_organization_model->get(['organizationId'=>$user['bizId']]); + } + + if($biz['comments']){ + $data[] = array( + 'cusSource3' => '023410', + 'customerName' => "活动客户", + 'dealerCode' => $biz['comments'], + 'fromSystem' => "好店云", + 'mobile' => $mobile, + 'saMobile' => $user['mobile'] ? $user['mobile'] : '', + 'cusType' => '30111001', + 'remark' => "2024新春活动", + ); + + $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); + curl_close($ch); + debug_log("[info]# " . $data."\n".$response, 'neta.log','market/sylive'); + } + } } $redis->delete($key); $this->show_json(array('ukey' => $ukey),200, '预约成功'); diff --git a/home/controllers/h5/market/sylive2/Common.php b/home/controllers/h5/market/sylive2/Common.php index a9fb973e..09181bdd 100644 --- a/home/controllers/h5/market/sylive2/Common.php +++ b/home/controllers/h5/market/sylive2/Common.php @@ -266,6 +266,7 @@ class Wx extends Common{ $act_data = [ 'activityId' => $param['a_id'], 'userId' => $this->uid, + 'pid' => 0, "createTime" => date('Y-m-d H:i:s') ]; $row_wechat['bizId'] && $act_data['bizId'] = $row_wechat['bizId']; diff --git a/home/controllers/h5/market/sylive2/Welcome.php b/home/controllers/h5/market/sylive2/Welcome.php index 7d71c1e7..3d1f0e2b 100644 --- a/home/controllers/h5/market/sylive2/Welcome.php +++ b/home/controllers/h5/market/sylive2/Welcome.php @@ -34,7 +34,7 @@ class Welcome extends Admin { 'url' => "/h5/market/sylive2/welcome/org?org_id={$levl_top['organizationId']}&userId={$val['userId']}" ]; - $org_lists[$levl_top['organizationId']] = $temp; + $org_lists[$levl_top['organizationId']] = $temp;:: } $_SESSION[self::SESSION_KEY]['multi_org'] = 1; $this->data['org_lists'] = $org_lists;