hsb
This commit is contained in:
@@ -8,7 +8,7 @@ class Welcome extends CI_Controller {
|
||||
//生产地址
|
||||
$url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
//测试地址
|
||||
//$url = 'https://salesapp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
//$url = 'https://salespp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
|
||||
$name = '活动客户';
|
||||
$comments = '100832';
|
||||
@@ -16,14 +16,14 @@ class Welcome extends CI_Controller {
|
||||
$samobile = '15815718662';
|
||||
|
||||
$data[] = array(
|
||||
'cusSource3' => '011403',
|
||||
'cusSource3' => '011404',
|
||||
'customerName' => $name,
|
||||
'dealerCode' => $comments,
|
||||
'fromSystem' => "好店云",
|
||||
'mobile' => $mobile,
|
||||
'saMobile' => $samobile,
|
||||
'cusType' => '30111001',
|
||||
'remark' => "99宠你节",
|
||||
'remark' => "云河十分宠爱购车节",
|
||||
);
|
||||
|
||||
$data = json_encode($data, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
@@ -157,7 +157,7 @@ class Item extends Wx{
|
||||
$user = $this->user_model->get(['userId'=>$this->uid]);
|
||||
$act_user = $this->act_user_model->get(['userId'=>$this->uid,'activityId'=>$a_id]);
|
||||
|
||||
if($act_user['channelId'] != $act_user['pid']) {
|
||||
if($act_user['channelId'] != $act_user['pid'] && $act_user['pid']) {
|
||||
$p_user = $this->act_user_model->get(['userId'=>$act_user['pid'], 'activityId'=>$a_id]);
|
||||
} else{
|
||||
$p_user = $this->act_user_model->get(['userId'=>$act_user['channelId'], 'activityId'=>$a_id]);
|
||||
@@ -241,53 +241,52 @@ class Item extends Wx{
|
||||
'oid' => $unpay['id'],
|
||||
];
|
||||
|
||||
// if($a_id == 20){
|
||||
// //生产地址
|
||||
// $url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
// //测试地址
|
||||
// //$url = 'https://salesapp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
//
|
||||
// //获取意向网点编码
|
||||
// if($p_user){
|
||||
// $user = $this->user_model->get(['userId'=>$act_user['channelId']]);
|
||||
// $biz = $this->market_sylive_organization_model->get(['organizationId'=>$user['bizId']]);
|
||||
// }
|
||||
//
|
||||
// $pdata[] = array(
|
||||
// 'cusSource3' => '011403',
|
||||
// 'customerName' => $name,
|
||||
// 'dealerCode' => $biz['comments'],
|
||||
// 'fromSystem' => "好店云",
|
||||
// 'mobile' => $mobile,
|
||||
// 'saMobile' => $user['mobile'],
|
||||
// 'cusType' => '30111001',
|
||||
// 'remark' => "99宠你节",
|
||||
// );
|
||||
//
|
||||
// $pdata = json_encode($pdata, JSON_UNESCAPED_UNICODE);
|
||||
//
|
||||
// $ch = curl_init();
|
||||
// curl_setopt($ch, CURLOPT_POST, 1);
|
||||
// curl_setopt($ch, CURLOPT_URL, $url);
|
||||
// curl_setopt($ch, CURLOPT_POSTFIELDS, $pdata);
|
||||
// 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($pdata)
|
||||
// )
|
||||
// );
|
||||
//
|
||||
// $response = curl_exec($ch);
|
||||
// curl_close($ch);
|
||||
// debug_log("[info]# " . $pdata."\n".$response, 'neta.log','market/sylive');
|
||||
// }
|
||||
if($a_id == 21){
|
||||
//生产地址
|
||||
$url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
|
||||
//获取意向网点编码
|
||||
if($p_user){
|
||||
$userId = $act_user['pid'] ? $act_user['pid'] : $act_user['channelId'];
|
||||
$user = $this->user_model->get(['userId'=> $userId]);
|
||||
$biz = $this->market_sylive_organization_model->get(['organizationId'=>$user['bizId']]);
|
||||
}
|
||||
|
||||
$pdata[] = array(
|
||||
'cusSource3' => '011404',
|
||||
'customerName' => $name,
|
||||
'dealerCode' => $biz['comments'],
|
||||
'fromSystem' => "好店云",
|
||||
'mobile' => $mobile,
|
||||
'saMobile' => $user['mobile'],
|
||||
'cusType' => '30111001',
|
||||
'remark' => "云河十分宠爱购车节",
|
||||
);
|
||||
|
||||
$pdata = json_encode($pdata, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $pdata);
|
||||
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($pdata)
|
||||
)
|
||||
);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
debug_log("[info]# " . $pdata."\n".$response, 'neta.log','market/sylive');
|
||||
}
|
||||
|
||||
$this->show_json($data,200,'操作成功');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user