diff --git a/admin/controllers/hdcloud/Clues.php b/admin/controllers/hdcloud/Clues.php index 8c5aeff5..489c9015 100644 --- a/admin/controllers/hdcloud/Clues.php +++ b/admin/controllers/hdcloud/Clues.php @@ -6,97 +6,118 @@ class Clues extends HD_Controller { private $searchTpAry = array('mobile' => '客户手机号', 'name' => '客户姓名', 'void' => 'voId', ); private $bizs = array( - '100958' => array( - 'biz' => '福州齐安路', - 'sa' => '陈秋龙', - 'mobile' => '17758949069' + '350' => array( + 'name' => '福建', + 'list' => array( + + '100958' => array( + 'biz' => '福州齐安路', + 'sa' => '陈秋龙', + 'mobile' => '17758949069' + ), + '100966' => array( + 'biz' => '泉州南环路', + 'sa' => '傅玲玲', + 'mobile' => '18519510420' + ), + '101077' => array( + 'biz' => '晋江豪信', + 'sa' => '杨晓默', + 'mobile' => '13799859101' + ), + '100619' => array( + 'biz' => '漳州狸车', + 'sa' => '陈鸿喜', + 'mobile' => '17750151079' + ), + '100231' => array( + 'biz' => '宁德辉科', + 'sa' => '余玮', + 'mobile' => '18659197547' + ), + '100421' => array( + 'biz' => '南平绿衡', + 'sa' => '周伟豪', + 'mobile' => '16659478792' + ), + '100179' => array( + 'biz' => '莆田众诚', + 'sa' => '林昉', + 'mobile' => '18760550059' + ), + '100690' => array( + 'biz' => '龙岩胜华成', + 'sa' => '郭晓芬', + 'mobile' => '13600983210' + ), + '101207' => array( + 'biz' => '厦门胜华嘉', + 'sa' => '', + 'mobile' => '' + ), + ), ), - '100966' => array( - 'biz' => '泉州南环路', - 'sa' => '傅玲玲', - 'mobile' => '18519510420' - ), - '101077' => array( - 'biz' => '晋江豪信', - 'sa' => '杨晓默', - 'mobile' => '13799859101' - ), - '100619' => array( - 'biz' => '漳州狸车', - 'sa' => '陈鸿喜', - 'mobile' => '17750151079' - ), - '100231' => array( - 'biz' => '宁德辉科', - 'sa' => '余玮', - 'mobile' => '18659197547' - ), - '100421' => array( - 'biz' => '南平绿衡', - 'sa' => '周伟豪', - 'mobile' => '16659478792' - ), - '100179' => array( - 'biz' => '莆田众诚', - 'sa' => '林昉', - 'mobile' => '18760550059' - ), - '100690' => array( - 'biz' => '龙岩胜华成', - 'sa' => '郭晓芬', - 'mobile' => '13600983210' - ), - '101207' => array( - 'biz' => '厦门胜华嘉', - 'sa' => '', - 'mobile' => '' + '440' => array( + 'name' => '广东', + 'list' => array( + '101071' => array( + 'biz' => '江门朋赢', + 'sa' => '余镜苗', + 'mobile' => '18127125536' + ), + '100647' => array( + 'biz' => '珠海金浩', + 'sa' => '占杨', + 'mobile' => '18923392948' + ), + '100832' => array( + 'biz' => '中山金玺', + 'sa' => '黄美愉', + 'mobile' => '17329610587' + ), + '101252' => array( + 'biz' => '佛山鑫明宇', + 'sa' => '陈惠伦', + 'mobile' => '13790011910' + ), + '101289' => array( + 'biz' => '深圳东浩', + 'sa' => '余佳思', + 'mobile' => '15889556579' + ), + '101204' => array( + 'biz' => '东莞金屹', + 'sa' => '林耿文', + 'mobile' => '17620573545' + ), + '101043' => array( + 'biz' => '惠州新零致', + 'sa' => '张安琪', + 'mobile' => '15999955547' + ), + '100671' => array( + 'biz' => '梅州利兴', + 'sa' => '石绿绿', + 'mobile' => '14718175658' + ), + '101214' => array( + 'biz' => '汕头骏华', + 'sa' => '黎旭', + 'mobile' => '15766613213' + ), + '100917' => array( + 'biz' => '揭阳顺鹏', + 'sa' => '吴佳鸿', + 'mobile' => '19902714365' + ), + '101487' => array( + 'biz' => '广州长瑞', + 'sa' => '吴国腾', + 'mobile' => '15323380908' + ), + ) ), - '101071' => array( - 'biz' => '江门朋赢', - 'sa' => '余镜苗', - 'mobile' => '18127125536' - ), - '100647' => array( - 'biz' => '珠海金浩', - 'sa' => '占杨', - 'mobile' => '18923392948' - ), - '100832' => array( - 'biz' => '中山金玺', - 'sa' => '黄美愉', - 'mobile' => '17329610587' - ), - '101252' => array( - 'biz' => '佛山鑫明宇', - 'sa' => '陈惠伦', - 'mobile' => '13790011910' - ), - '101289' => array( - 'biz' => '深圳东浩', - 'sa' => '余佳思', - 'mobile' => '15889556579' - ), - '101204' => array( - 'biz' => '东莞金屹', - 'sa' => '林耿文', - 'mobile' => '17688624688' - ), - '101043' => array( - 'biz' => '惠州华致', - 'sa' => '张安琪', - 'mobile' => '15999955547' - ), - '100671' => array( - 'biz' => '梅州利兴', - 'sa' => '石绿绿', - 'mobile' => '14718175658' - ), - '101214' => array( - 'biz' => '汕头骏华', - 'sa' => '黎旭', - 'mobile' => '15766613213' - ), ); protected $log_dir; @@ -118,9 +139,8 @@ class Clues extends HD_Controller $statusAry = $this->clues_model->statusAry(); $params = $this->input->get(); - $this->data['province_id'] = $province_id = intval($params['province_id']); - $this->data['city_id'] = $city_id = intval($params['city_id']); - $this->data['county_id'] = $county_id = intval($params['county_id']); + $this->data['pro_id'] = $pro_id = intval($params['pro_id']); + $this->data['biz_id'] = $biz_id = intval($params['biz_id']); $page = $params['page'] = $params['page'] ? intval($params['page']) : 1; $size = $params['size'] = $params['size'] ? intval($params['size']) : 20; @@ -141,10 +161,9 @@ class Clues extends HD_Controller } strlen($params['status']) && $where["status"] = $params['status']; - strlen($params['status2']) && $where["status2"] = $params['status2']; - $province_id && $where['province_id'] = $province_id; - $city_id && $where['city_id'] = $city_id; - $county_id && $where['county_id'] = $county_id; + + $pro_id && $where['pro_id'] = $pro_id; + $biz_id && $where['biz_id'] = $biz_id; $count = $this->clues_model->count($where); $lists = []; @@ -185,7 +204,7 @@ class Clues extends HD_Controller $this->data['_title'] = '线索池列表'; - return $this->show_view('receiver/clues/lists', true); + return $this->show_view('hdcloud/clues/lists', true); } public function get() @@ -210,13 +229,6 @@ class Clues extends HD_Controller } } $dataInfo['editType'] = 0; - $re_cf = $this->clues_cfrom_model->get(array('id' => $re['cf_id'])); - $re_cf_title_p = ''; - if ($re_cf && $re_cf['pid']) { - $re_cf_pid = $this->clues_cfrom_model->get(array('id' => $re_cf['pid'])); - $re_cf_title_p = $re_cf_pid['title'] ? $re_cf_pid['title'] . '-' : ''; - } - $info_show['cfrom_title'] = $re_cf['title'] ? $re_cf_title_p . $re_cf['title'] : ''; $info_show['statusList'] = $statusList; $info_show['status2List'] = $status2List; $info_show['c_time'] = date('Y-m-d H:i', $re['c_time']); @@ -228,43 +240,10 @@ class Clues extends HD_Controller $dataInfo['city_id'] = $re['city_id']; $dataInfo['county_id'] = $re['county_id']; - //获取已分配店铺 - $cus = $this->customers_model->select(['rid' => $re['id']], '', '', '', 'biz_id'); - $biz_arr = []; - if ($cus) { - $biz_ids = implode(array_column($cus, 'biz_id'), ','); - if ($biz_ids) { - $where_biz["id in ($biz_ids)"] = null; - $cus_biz = $this->biz_model->select($where_biz, '', '', '', 'biz_name'); - $biz_arr = array_column($cus_biz, 'biz_name'); - } - } - $info_show['cus_bizs'] = implode($biz_arr, ','); - //附近门店 - if ($re['lat'] && $re['lng']) { - $info_show['near_bizs'] = $this->biz_model->nearby($re['lat'], $re['lng'], 1, 3, 'id,biz_name'); - } else { - $typeAry = $this->biz_model->type_ary(); - $type_ids = implode(',', array_keys($typeAry)); - $info_show['near_bizs'] = $this->biz_model->select(['city_id' => $re['city_id'], 'county_id' => $re['county_id'], "type in ($type_ids)" => null, 'status' => 1], 'id desc', 1, 3, 'id,biz_name'); - } - //获取分销用户 - $cf_user = ''; - if ($dataInfo['recommend_id']) { - $this->load->model('app/liche/app_liche_users_model'); - $user = $this->app_liche_users_model->get(['id' => $dataInfo['recommend_id']], 'id,nickname,up_uid'); - $user['up_uid'] && $up_user = $this->app_liche_users_model->get(['id' => $user['up_uid']], 'id,nickname'); //上一级分销用户 - if ($up_user) { - $cf_user = "{$up_user['nickname']}(一级) => {$user['nickname']}(二级)"; - } else { - $cf_user = $user['nickname']; - } - } - $info_show['cf_user'] = $cf_user; $this->data['info'] = $dataInfo; $this->data['info_show'] = $info_show; $this->data['_title'] = '线索详情'; - return $this->show_view('receiver/clues/edit', true); + return $this->show_view('hdcloud/clues/edit', true); } /** @@ -281,23 +260,9 @@ class Clues extends HD_Controller return $this->show_json(SYS_CODE_FAIL, '记录不存在'); } - $cf_id1 = ''; - $cf_id2 = ''; - if ($row['cf_id']) { - $row_cfrom = $this->clues_cfrom_model->get(array('id' => $row['cf_id'])); - if ($row_cfrom['pid']) { - $cf_id1 = $row_cfrom['pid']; - $cf_id2 = $row['cf_id']; - } else { - $cf_id1 = $row['cf_id']; - } - } - $info = array( 'name' => $row['name'], 'mobile' => $row['mobile'], - 'cf_id1' => $cf_id1, - 'cf_id2' => $cf_id2, ); $title = "编辑线索"; $action = "edit"; @@ -314,14 +279,12 @@ class Clues extends HD_Controller $where = array('status' => 1, 'pid' => 0); $select = 'id, title'; - $map_cfrom = $this->clues_cfrom_model->map('id', 'title', $where, '', 0, 0, $select); $this->data['info'] = $info; - $this->data['cfromAry'] = $map_cfrom; $this->data['action'] = $action; $this->data['_title'] = $title; - return $this->show_view('receiver/clues/get'); + return $this->show_view('hdcloud/clues/get'); } //添加单条数据 @@ -339,17 +302,10 @@ class Clues extends HD_Controller if ($this->clues_model->get(['mobile' => $info['mobile']])) { return $this->show_json(SYS_CODE_FAIL, '手机号已存在'); } - $cf_id = 0; - if ($info['cf_id2']) { - $cf_id = $info['cf_id2']; - } else if ($info['cf_id1']) { - $cf_id = $info['cf_id1']; - } $add = array( 'name' => $info['name'], 'mobile' => $info['mobile'], - 'cf_id' => $cf_id, 'admin_id' => $this->uid, 'c_time' => time(), ); @@ -538,228 +494,68 @@ class Clues extends HD_Controller } - //分配 - public function get_adviser() - { - $ids = $this->input->get('ids'); - if ($this->input->method() == 'post') { - $city_id = $this->input->post('city_id'); - $county_id = $this->input->post('county_id'); - $where = [ - 'status' => 1, - ]; - $city_id && $where['city_id'] = $city_id; - $county_id && $where['county_id'] = $county_id; - $typeAry = $this->biz_model->type_ary(); - $type_ids = implode(',', array_keys($typeAry)); - $type_ids && $where["type in ($type_ids)"] = null; - $bizList = $this->biz_model->select($where, '', '', '', 'id,biz_name'); - $this->data['bizList'] = $bizList; - return $this->show_json(SYS_CODE_SUCCESS, '操作成功'); + public function get_bizs(){ + $pro_id = $this->input->get('pro_id'); + + if($pro_id){ + $bizs = $this->bizs[$pro_id]; + if($bizs){ + + foreach ($bizs['list'] as $k => $v){ + $this->data[] = array( + 'id' => $k, + 'biz_name' => $v['biz'], + 'sa' => $v['sa'], + 'mobile' => $v['mobile'], + ); + } + } } - $this->data['ids'] = $ids; - return $this->show_view('receiver/clues/get_adviser'); + + return $this->show_json(SYS_CODE_SUCCESS); } - public function edit_adviser() + public function get_adviser() { - $this->load->library('receiver/clues_entity'); - $this->load->library('receiver/customers_entity'); + $id = $this->input->get('id'); + $this->data['id'] = $id; + return $this->show_view('hdcloud/clues/get_adviser'); + } + + public function edit_adviser(){ + $id = $this->input->post('id'); + $pro_id = $this->input->post('pro_id'); $biz_id = $this->input->post('biz_id'); - $ids = $this->input->post('ids'); - $ids_arr = explode(',', $ids); - $biz = $this->biz_model->get(['id' => $biz_id]); + $intent = $this->input->post('intent'); + $remark = $this->input->post('remark'); + + $biz = $this->bizs[$pro_id]['list'][$biz_id]; + if (!$biz) { return $this->show_json(SYS_CODE_FAIL, '请选择分配门店!'); } - if (!is_array($ids_arr)) { - return $this->show_json(SYS_CODE_FAIL, '参数错误!'); - } - $where = [ - "id in ($ids)" => null - ]; - $clues_rows = $this->clues_model->map('id', '', $where); - foreach ($ids_arr as $val) { - $clues_row = $clues_rows[$val][0]; - //判断是否已分配 - $cus_row = $this->customers_model->get(['rid' => $val, 'status>=' => 0]); - if ($clues_row && !$cus_row) { - $jsondata = json_decode($clues_row['jsondata'], true); - $add_data = [ - 'rid' => $val, - 'name' => $clues_row['name'], - 'mobile' => $clues_row['mobile'], - 'biz_id' => $biz_id, - 'city_id' => $biz['city_id'], - 'county_id' => $biz['county_id'], - 'brand_id' => $clues_row['brand_id'], - 's_id' => $clues_row['s_id'], - 'if_driver' => $clues_row['if_driver'], - 'cf_title' => '平台分配', - 'of_id' => 3, - 'of2_id' => 37, - 'cf_id' => $clues_row['cf_id'], - 'p_time' => date('Y-m-d H:i:s'), - 'c_time' => $clues_row['en_time'] == '0000-00-00 00:00:00' ? $clues_row['c_time'] : strtotime($clues_row['en_time']) - ]; - if ($biz['type'] == 5) {//异业店 - $add_data['cf_clues'] = '异业店'; - } - if ($jsondata['car']) { - isset($jsondata['car']['version']) && $add_data['v_id'] = $jsondata['car']['version']['id']; - $add_data['car_json'] = json_encode($jsondata['car'], JSON_UNESCAPED_UNICODE); - unset($jsondata['car']); - } - $jsondata && $add_data['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE); - $customers_id = $this->customers_model->add($add_data); - if ($customers_id) { - $this->clues_model->update(['status' => 1], ['id' => $val]); - //同步线索日志到客户日志 - $this->customers_entity->syn_clues($customers_id, $val); - $this->customers_entity->add_log($customers_id, $this->uid, $this->username, "平台分配", 0, 'admin'); - $this->clues_entity->add_log($val, $this->uid, $this->username, "分配给【{$biz['biz_name']}】商家"); - } - } - } - return $this->show_json(SYS_CODE_SUCCESS, '分配成功!'); - } + $biz['id'] = $biz_id; - public function lists_call() - { - $this->load->model('sys/sys_admin_model', 'mdAdmin'); - $cache = &load_cache('redis'); - $xz_admin_phone = $cache->get($this->cacheKeyPhone); - $params = $this->input->get(); - $username = $params['username']; - $params['page'] = $params['page'] ? intval($params['page']) : 1; - $params['size'] = $params['size'] ? intval($params['size']) : 20; - $lists = array(); - $where['status'] = 1; - if (!empty($username)) $where["username like '%$username%'"] = null; - if (!empty($params['mobile'])) $where['mobile'] = $params['mobile']; - $count = $this->mdAdmin->count($where); - if ($count) { - $res = $this->mdAdmin->select($where, 'id desc', $params['page'], $params['size'], 'id,username,mobile'); - foreach ($res as $key => $value) { - $setValue = array(); - $setValue['id'] = $value['id']; - $setValue['username'] = $value['username']; - $setValue['mobile'] = $value['mobile']; - $phone = $xz_admin_phone['admins'][$value['id']]; - if ($phone) { - $phone_btn = '取消分配'; - } else { - $phone = '未分配'; - $phone_btn = '分配号码'; - } - $setValue['phone'] = $phone; - $setValue['phone_btn'] = $phone_btn; - $lists[] = $setValue; + $clue_row = $this->clues_model->get(['id' => $id]); + if ($clue_row) { + if($clue_row['status']){ + return $this->show_json(SYS_CODE_FAIL, '已分配!'); } - } - $this->data['params'] = $params; - $this->data['_title'] = '虚似号分配'; - $this->data['pager'] = array('count' => ceil($count / $params['size']), 'curr' => $params['page'], 'totle' => $count); - $this->data['lists'] = $lists; - return $this->show_view('receiver/clues/lists_call', true); - } - public function edit_call() - { - $id = intval($this->input->post('id')); - $type = $this->input->post('type'); - if ($type != 3 && !$id) { - return $this->show_json(SYS_CODE_FAIL, '参数错误'); - } - $cache = &load_cache('redis'); - $xz_admin_phone = $cache->get($this->cacheKeyPhone); - $this->config->load('xcall', TRUE); - $mobiles = $this->config->item('mobile_list', 'xcall'); - $mobiles && shuffle($mobiles); - if ($type == 0) {//分配手机 - if (!$mobiles) { - return $this->show_json(SYS_CODE_FAIL, '无号码库!'); - } - $number = ''; - foreach ($mobiles as $key => $value) { - if (!$xz_admin_phone['numbers'][$value]) { - $number = $value; - break; - } - } - if ($number) { - $xz_admin_phone['admins'][$id] = $number; - $xz_admin_phone['numbers'][$number] = $id; - $cache->save($this->cacheKeyPhone, $xz_admin_phone); - return $this->show_json(SYS_CODE_SUCCESS, '分配号码成功'); - } else { - return $this->show_json(SYS_CODE_FAIL, '号码已全部分配完了'); - } - } else if ($type == 1) {//取消分配 - $number = $xz_admin_phone['admins'][$id]; - unset($xz_admin_phone['admins'][$id]); - unset($xz_admin_phone['numbers'][$number]); - $cache->save($this->cacheKeyPhone, $xz_admin_phone); - return $this->show_json(SYS_CODE_SUCCESS, '取消分配成功'); - } else if ($type == 3) {//全部重新分配 - if (!$mobiles) { - return $this->show_json(SYS_CODE_FAIL, '无号码库!'); - } - if (!$xz_admin_phone['admins']) { - return $this->show_json(SYS_CODE_FAIL, '未分配号码,不能重置'); - } - $xz_admin_phone_new = array(); - $i = 0; - foreach ($xz_admin_phone['admins'] as $key => $value) { - $number = $mobiles[$i]; - $id = $key; - if ($number) { - $xz_admin_phone_new['admins'][$id] = $number; - $xz_admin_phone_new['numbers'][$number] = $id; - } - $i++; - } - $cache->save($this->cacheKeyPhone, $xz_admin_phone_new); - return $this->show_json(SYS_CODE_SUCCESS, '重置已分配成功'); - } - } + $result = $this->push_neta($clue_row['name'], $clue_row['mobile'], $pro_id, $biz, $intent, $remark); + $json = json_decode($result, true); - /** - * 返回map select数据 - * @return bool - */ - function json_map_cfrom() - { - $pid = $this->input->post('pid'); - $status = $this->input->post('status'); + if($json['dataInfo']['rtnMessage'] == '处理成功'){ - $where = array(); - if (strlen($pid) > 0) { - $where['pid'] = $pid; - } + $this->clues_model->update(['status' => 1], ['id' => $id]); - if (strlen($status) > 0) { - $where['status'] = $status; - } else { - $where["status>-1"] = null; - } - $total = $this->clues_cfrom_model->count($where); - $map = array(); - if ($total) { - $orderby = 'id desc'; - $select = 'id, title'; - $rows = $this->clues_cfrom_model->select($where, $orderby, 0, 0, $select); - foreach ($rows as $v) { - $map[$v['id']] = $v['title']; + return $this->show_json(SYS_CODE_SUCCESS, '分配成功!'); } } - $this->data = $map; - return $this->show_json(SYS_CODE_SUCCESS); + return $this->show_json(SYS_CODE_FAIL, '分配失败!'); } private function upload() @@ -855,4 +651,49 @@ class Clues extends HD_Controller $this->data['bizinfo'] = $bizinfo; return $this->show_json(SYS_CODE_SUCCESS); } + + public function push_neta($customerName, $mobile, $pro_id, $biz, $intentModel = '', $remark = '') + { + $voId = $pro_id . date('mdHis') . sprintf("%06d", rand(1,999999)); + + $data[] = array( + 'voId' => $voId, + 'cusSource3' => '023409', + 'customerName' => $customerName, + 'dealerCode' => $biz['id'], + 'fromSystem' => "好店云", + 'mobile' => $mobile, + 'saMobile' => $biz['mobile'], + 'cusType' => '30111001', + 'remark' => $remark, + 'intentModel' => $intentModel, + ); + + $data = json_encode($data, JSON_UNESCAPED_UNICODE); + + //测试地址 + $url = 'https://salespp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue'; + //$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); + + return $response; + } } diff --git a/admin/views/hdcloud/clues/edit.php b/admin/views/hdcloud/clues/edit.php new file mode 100644 index 00000000..68420614 --- /dev/null +++ b/admin/views/hdcloud/clues/edit.php @@ -0,0 +1,598 @@ +
+
+
+
+
+
+
+ 状态 +
+
+ +
+
+
+
+
+
+ 二级状态 +
+
+ +
+
+
+
+ +
+
+
+
+
+
+ + 用户信息 + + + + +
+
+ + + + + + + + + + + + + + + + +
+
+
客户姓名:
+
+
+
+
客户电话:
+ {{infoShow.mobile_sub}} +
+
+
+
线索来源:
+ {{infoShow.cfrom_title}} +
+
+
+
加入时间:
+ {{infoShow.c_time}} +
+
+
+
最后报名时间:
+ {{infoShow.en_time}} +
+
+
+
分配商家:
+ + +
+
+
+
分销来源:
+ {{infoShow.cf_user}} +
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+ + 意向信息 + + + + +
+
+ + + + + + + + +
+
+
地区:
+ + +
+
+
+
推荐门店:
+ +
+
+
+ +
+
+
+
+
+
+
+
+ + 线索日志 + + + 新增小记 + +
+
+
+
+ + + + + + + + + + + $val) { ?> + + + + + + + + +
操作人员内容类型操作时间
+ + + + + + + +
+
+
+
+
+
+ + +
+
+ + + + diff --git a/admin/views/hdcloud/clues/get.php b/admin/views/hdcloud/clues/get.php new file mode 100644 index 00000000..41948e26 --- /dev/null +++ b/admin/views/hdcloud/clues/get.php @@ -0,0 +1,121 @@ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+
+ +
+
+
+ diff --git a/admin/views/hdcloud/clues/get_adviser.php b/admin/views/hdcloud/clues/get_adviser.php new file mode 100755 index 00000000..663f9676 --- /dev/null +++ b/admin/views/hdcloud/clues/get_adviser.php @@ -0,0 +1,124 @@ +
+ +
+ +
+
+
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+ +
+
+ +
+
+ + +
+
+
+ diff --git a/admin/views/hdcloud/clues/lists.php b/admin/views/hdcloud/clues/lists.php new file mode 100644 index 00000000..2587e390 --- /dev/null +++ b/admin/views/hdcloud/clues/lists.php @@ -0,0 +1,343 @@ + +
+
+ +
+ +
+ + +
+
共有条数据
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ID客户姓名客户电话所在地区状态创建时间操作
详情 + 分配 +
+
+
+
+
+
+ +
+
+ + +
+ diff --git a/admin/views/hdcloud/clues/lists_call.php b/admin/views/hdcloud/clues/lists_call.php new file mode 100644 index 00000000..bb5b8f34 --- /dev/null +++ b/admin/views/hdcloud/clues/lists_call.php @@ -0,0 +1,67 @@ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
ID用户名手机号分配号码操作
+
+
+
+
+
+ +
+
\ No newline at end of file diff --git a/api/controllers/plan/Syt.php b/api/controllers/plan/Syt.php index 2c213628..8d6c7475 100644 --- a/api/controllers/plan/Syt.php +++ b/api/controllers/plan/Syt.php @@ -637,7 +637,7 @@ class Syt extends CI_Controller $where = [ "activityId" => 27, "itemId" => 36, - 'id not in (select tagId from lc_market_sylive_activity_kpidata where activityId = 27 and kpi like "beforeOrder")' => null, + 'id not in (select tagId from lc_market_sylive_activity_kpidata where activityId = 27 and kpi like "browse")' => null, 'cfUserId >' => 0 ]; $rows = $this->market_sylive_order_model->select($where,'id desc',$page,$size); diff --git a/common/helpers/comm_helper.php b/common/helpers/comm_helper.php index 517681a5..27097f7b 100644 --- a/common/helpers/comm_helper.php +++ b/common/helpers/comm_helper.php @@ -962,8 +962,7 @@ if (!function_exists('http_host_com')) { if ($type == 'api') { $url = 'https://api.liche.cn'; } else if ($type == 'home') { - $url = "https://live.haodian.cn"; - //$url = "https://www.liche.cn"; + $url = "https://www.liche.cn"; } else if ($type == 'admin') { $url = "https://admin.liche.cn"; } diff --git a/common/models/hdcloud/Hdcloud_clues_model.php b/common/models/hdcloud/Hdcloud_clues_model.php index f3a85c34..2c3d3841 100644 --- a/common/models/hdcloud/Hdcloud_clues_model.php +++ b/common/models/hdcloud/Hdcloud_clues_model.php @@ -27,8 +27,8 @@ class Hdcloud_clues_model extends HD_Model public function statusAry($status = '') { $status_ary[0] = array('name' => '待处理', 'list' => array()); - $status_ary[1] = array('name' => '已分配', 'list' => array(1 => '强意向', 2 => '中意向', 3 => '弱意向')); - $status_ary[3] = array('name' => '无效线索', 'list' => array(7 => '明确拒绝', 8 => '误点', 9 => '战败')); + $status_ary[1] = array('name' => '已分配', 'list' => array()); + if (strlen($status)) { $return_status = $status_ary[$status]; } else { diff --git a/home/controllers/Welcome.php b/home/controllers/Welcome.php index 3d17997b..c6f721cb 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 = '15813115992';//客户手机 + $name = '欢天喜地小马哥'; //客户姓名 + $mobile = '18219376181';//客户手机 - $comments = '100832'; //门店编码 - $samobile = '17329610587';//销售手机 + $comments = '101043'; //门店编码 + $samobile = '15999955547';//销售手机 $city_id = '350200'; $voId = $city_id . date('mdHis') . sprintf("%06d", rand(1,999999)); @@ -35,7 +35,7 @@ class Welcome extends CI_Controller { 'saMobile' => $samobile, 'cusType' => '30111001', 'remark' => "", - 'intentModel' => "哪吒X", + 'intentModel' => "哪吒AYA", ); print_r(json_encode($data,JSON_UNESCAPED_UNICODE)); @@ -66,7 +66,7 @@ class Welcome extends CI_Controller { public function add_clues() { - $mobiles = array('13124078183','13950216673','13625099806','15806064642','18359124166','18506081931','18046404796','13960855123','18659119209','18359768996','13290930865','13799312264','18506068867','13609575537','18659229626','18759223604','18250495067','18006917070','18350186430','13950412215','13615054818','13101431157','18259150643','13960741877','13850182332','18965055255','15960099209','15985747193','18805022611','15377915618','13338443200','13805014290','13720825977','18359169978','18250853102','13805057858','18359168838','13788898541','13960987292','13459479065','17506079707','18750718803','17506061272','18396132185','13514078677','18259072881','18558752932','19959106359','17805950156','13489029633','13599548606','15060030091','15080042524','13905914852','18106021611'); + $mobiles = array('13049472202','15585368870','18584629183','15115587010','19909385819','15625380425','18565017555','13647638758','13068141528','15918972993','15307320324','15279175074','15629077890','18559034278','18725223562','17822040710','13713839257','18750923890','13958855501','15859898823','13051232698','18845262491','17092045062','13606914164','15638743863','13782110671','18845262491','13860475431','13163900932','13737356228','18268278796','13159241079','15158863727','18696655951','13183107838','18808131786','15818216088','13312352888','13078769899','18987509830','15597731673','13658525666','17395819188','13804561048','13924569675','18288759857','15919350098','13730684073','13057588119','13560163788','15558732182','18968671550','17502250513','18393862516','13984478060','13257767311','18063639666','13270852317','13777536321','18294902741'); foreach ($mobiles as $k => $v) { $city_id = '350200'; diff --git a/home/controllers/h5/market/sylive2/Act.php b/home/controllers/h5/market/sylive2/Act.php index 55be5956..5932d28b 100644 --- a/home/controllers/h5/market/sylive2/Act.php +++ b/home/controllers/h5/market/sylive2/Act.php @@ -288,6 +288,9 @@ class Act extends Wx { }else{ $this->data['posterTip'] = "{$user['nickname']}诚挚邀请您参与"; } + + $jsondata = json_decode($row['jsondata'], true); + $this->data['fillStyle'] = $jsondata['barrage']['color'] ? '#fff' : '#333';; $this->data['lists'] = $lists; $this->data['shareTitle'] = $shareTitle; //微信分享 diff --git a/home/views/h5/market/sylive/share_script.php b/home/views/h5/market/sylive/share_script.php index d87850a6..abd0ebf4 100644 --- a/home/views/h5/market/sylive/share_script.php +++ b/home/views/h5/market/sylive/share_script.php @@ -27,12 +27,12 @@ desc: '', // 分享描述 success: function () { // 用户成功分享后执行的回调函数 - alert(option.title); - option.success() + //alert(option.title); + //option.success() }, cancel: function () { // 用户取消分享后执行的回调函数 - option.error() + //option.error() } }); //自定义“分享给朋友”及“分享到QQ”按钮的分享内容 @@ -43,12 +43,12 @@ imgUrl: '', // 分享图标 success: function () { // 用户成功分享后执行的回调函数 - alert(option.title); - option.success() + //alert(option.title); + //option.success() }, cancel: function () { // 用户取消分享后执行的回调函数 - option.error() + //option.error() } }); diff --git a/home/views/h5/market/sylive2/act/index.php b/home/views/h5/market/sylive2/act/index.php index e9524a84..fcd49e4f 100644 --- a/home/views/h5/market/sylive2/act/index.php +++ b/home/views/h5/market/sylive2/act/index.php @@ -91,7 +91,11 @@ href="https://www.liche.cn/h5/market/sylive2/item/detail?skey=YV9pZD0yNiZpdGVtSWQ9MzU"> 支付9.9元瓜分百万红包 - + 99下定赢免单 + + {{info.btn_text}} diff --git a/home/views/h5/market/sylive2/act/share.php b/home/views/h5/market/sylive2/act/share.php index 35046ff1..cc930ae6 100644 --- a/home/views/h5/market/sylive2/act/share.php +++ b/home/views/h5/market/sylive2/act/share.php @@ -67,6 +67,7 @@ activeIndex:0, posterSrc:'', posterTip:'', + fillStyle:'', shareTx:, }, mounted() { @@ -134,7 +135,7 @@ codeimg.setAttribute("crossOrigin",'Anonymous')//如果二维码图片域名跨域,则保留此代码 codeimg.src = that.list[that.activeIndex].code codeimg.onload = function () { - ctx.fillStyle="#000"; + ctx.fillStyle=that.fillStyle; ctx.textAlign="center"; ctx.font="22px Georgia"; ctx.fillText(that.posterTip,that.canW/2,that.canH-34,);