From 3be5dfb5fd35829299cdb00ef0f1b4ad2abe7e3e Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Sun, 3 Sep 2023 21:47:23 +0800 Subject: [PATCH] fixed --- home/controllers/h5/market/sylive2/Act.php | 6 ++---- home/controllers/h5/market/sylive2/Item.php | 16 +++++++--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/home/controllers/h5/market/sylive2/Act.php b/home/controllers/h5/market/sylive2/Act.php index 4d092ed7..5e38475e 100644 --- a/home/controllers/h5/market/sylive2/Act.php +++ b/home/controllers/h5/market/sylive2/Act.php @@ -618,15 +618,13 @@ class Act extends Wx { //获取意向网点编码 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']; + $biz = $this->market_sylive_organization_model->get(['organizationId'=>$user['bizId']]); } $data[] = array( 'cusSource3' => '011403', 'customerName' => "活动客户", - 'dealerCode' => $dlrCode, + 'dealerCode' => $biz['comments'], 'fromSystem' => "好店云", 'mobile' => $mobile, 'saMobile' => $user['mobile'], diff --git a/home/controllers/h5/market/sylive2/Item.php b/home/controllers/h5/market/sylive2/Item.php index 66e84a7e..ebc07080 100644 --- a/home/controllers/h5/market/sylive2/Item.php +++ b/home/controllers/h5/market/sylive2/Item.php @@ -245,15 +245,13 @@ class Item extends Wx{ //获取意向网点编码 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']; + $biz = $this->market_sylive_organization_model->get(['organizationId'=>$user['bizId']]); } - $data[] = array( + $pdata[] = array( 'cusSource3' => '011403', 'customerName' => "活动客户", - 'dealerCode' => $dlrCode, + 'dealerCode' => $biz['comments'], 'fromSystem' => "好店云", 'mobile' => $mobile, 'saMobile' => $user['mobile'], @@ -261,12 +259,12 @@ class Item extends Wx{ 'remark' => "99宠你节", ); - $data = json_encode($data, JSON_UNESCAPED_UNICODE); + $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, $data); + curl_setopt($ch, CURLOPT_POSTFIELDS, $pdata); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //https @@ -277,13 +275,13 @@ class Item extends Wx{ curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json; charset=utf-8', - 'Content-Length: ' . strlen($data) + 'Content-Length: ' . strlen($pdata) ) ); $response = curl_exec($ch); curl_close($ch); - debug_log("[info]# " . $data."\n".$response, 'neta.log','market/sylive'); + debug_log("[info]# " . $pdata."\n".$response, 'neta.log','market/sylive'); } $this->show_json($data,200,'操作成功');