neta
This commit is contained in:
@@ -4,6 +4,10 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
class Welcome extends CI_Controller {
|
||||
|
||||
public function index(){
|
||||
echo '404';exit;
|
||||
//生产地址
|
||||
$url = 'https://salesapp.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
//测试地址
|
||||
$url = 'https://salesapp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
|
||||
|
||||
$data[] = array(
|
||||
|
||||
@@ -608,6 +608,58 @@ class Act extends Wx {
|
||||
// }
|
||||
// $syt->Tj($dlrCode,"活动客户",$mobile,$mediaCaName,$leadNo);
|
||||
// }
|
||||
|
||||
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_row['channelId']]);
|
||||
$group_user = $this->groups_user_model->get(['activityId' => $a_id, 'userId' => $act_user_row['channelId'], 'status' => 0]);
|
||||
$biz = $this->market_sylive_organization_model->get(['organizationId'=>$group_user['bizId']]);
|
||||
$dlrCode = $biz['comments'];
|
||||
}
|
||||
|
||||
$cusSource3 = '';
|
||||
|
||||
$data[] = array(
|
||||
'cusSource3' => $cusSource3,
|
||||
'customerName' => "活动客户",
|
||||
'dealerCode' => $dlrCode,
|
||||
'fromSystem' => "好店云",
|
||||
'mobile' => $mobile,
|
||||
'saMobile' => $user['mobile'],
|
||||
'cusType' => '30111001',
|
||||
'remark' => "99宠你节",
|
||||
);
|
||||
|
||||
$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, 'market/sylive','neta.log');
|
||||
}
|
||||
}
|
||||
$redis->delete($key);
|
||||
$this->show_json('',200, '预约成功');
|
||||
|
||||
@@ -141,6 +141,7 @@ class Item extends Wx{
|
||||
if(!$code || ($redis->get($code_key)!=$code)){
|
||||
$this->show_json('',400,'请输入正确验证码');
|
||||
}
|
||||
|
||||
//判断是否已支付
|
||||
$o_row = $this->market_sylive_order_model->get(['itemId'=>$itemId,'activityId'=>$a_id,'status'=>1,'userId'=>$this->uid,'type'=>0]);
|
||||
if($o_row){
|
||||
@@ -234,6 +235,59 @@ class Item extends Wx{
|
||||
'wxjson' => $result['data'],
|
||||
'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']]);
|
||||
$group_user = $this->groups_user_model->get(['activityId' => $a_id, 'userId' => $act_user['channelId'], 'status' => 0]);
|
||||
$biz = $this->market_sylive_organization_model->get(['organizationId'=>$group_user['bizId']]);
|
||||
$dlrCode = $biz['comments'];
|
||||
}
|
||||
|
||||
$cusSource3 = '';
|
||||
|
||||
$data[] = array(
|
||||
'cusSource3' => $cusSource3,
|
||||
'customerName' => "活动客户",
|
||||
'dealerCode' => $dlrCode,
|
||||
'fromSystem' => "好店云",
|
||||
'mobile' => $mobile,
|
||||
'saMobile' => $user['mobile'],
|
||||
'cusType' => '30111001',
|
||||
'remark' => "99宠你节",
|
||||
);
|
||||
|
||||
$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, 'market/sylive','neta.log');
|
||||
}
|
||||
|
||||
$this->show_json($data,200,'操作成功');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user