From c3f59dc96ca7bba2efe52df12521e92223c514c4 Mon Sep 17 00:00:00 2001 From: lcc <805383944@qq.com> Date: Mon, 16 Dec 2024 17:32:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9F=AD=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=92=8C=E5=90=8E=E5=8F=B0=E5=AE=A2=E6=88=B7=E7=94=B5?= =?UTF-8?q?=E8=AF=9D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/controllers/Login.php | 4 +++- admin/controllers/receiver/Customer.php | 23 ++++++++++++++++++----- admin/views/login.php | 10 +++++++++- admin/views/receiver/customer/get.php | 2 +- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/admin/controllers/Login.php b/admin/controllers/Login.php index 59c7d1fc..7be88d17 100644 --- a/admin/controllers/Login.php +++ b/admin/controllers/Login.php @@ -140,7 +140,9 @@ class Login extends CI_Controller $domain = implode('.', $domain); $this->input->set_cookie(LOGIN_CODE_COOKIE, $this->encryption->encrypt(json_encode($code)), 60 * 5, $domain); - send_sms($mobile, $code); +// send_sms($mobile, $code); + $content = "【理车宝】" . "您的验证码为:{$code},请勿泄露于他人!"; + b2m_send_sms($mobile,$content); } } diff --git a/admin/controllers/receiver/Customer.php b/admin/controllers/receiver/Customer.php index ba90a672..7b83fce7 100644 --- a/admin/controllers/receiver/Customer.php +++ b/admin/controllers/receiver/Customer.php @@ -112,7 +112,7 @@ class Customer extends HD_Controller 'cid' => $val['cid'], 'name' => $val['name'], 'mobile' => $val['mobile'], - 'mobile_sub' => $mobile_sub, + 'mobile_sub' => $this->get_mobile(['of_id' => $val['of_id'], 'mobile' => $mobile_sub]), 'level' => $val['level'], 'of_title' => $of_title, 'of_id' => $val['of_id'], @@ -635,7 +635,7 @@ class Customer extends HD_Controller 'id' => $row['id'], 'name' => $row['name'], 'level' => $row['level'], - 'mobile' => $mobile_sub, + 'mobile' => $this->get_mobile(['of_id' => $row['of_id'], 'mobile' => $mobile_sub]), 'of_title' => $of_title, 'wx_name' => $this->customers_model->wxgrAry($row['wxgr']), 'c_time' => date('Y-m-d H:i:s', $row['c_time']), @@ -648,6 +648,7 @@ class Customer extends HD_Controller 'biz' => $row_biz['biz_name'], 'time_name' => $row['clue_id'] ? '派单时间' : '建档时间', 'brand_detail' => $brand_detail, + 'role' => $this->role ); //到店信息 @@ -971,7 +972,9 @@ class Customer extends HD_Controller 'brand_detail' => '关注品牌', 'series_detail' => '关注车型' ]; - + if ($this->role == 8) { + unset($indexs['mobile']); + } $count = $this->customers_model->count($where); $data = []; @@ -1002,7 +1005,7 @@ class Customer extends HD_Controller $row = array( 'id' => $id, 'name' => $val['name'], - 'mobile' => $val['mobile'], + 'mobile' => $this->get_mobile(['of_id' => $val['of_id'], 'mobile' => $val['mobile']]), 'level' => $val['level'], 'status_name' => $status_arr[$val['status']], 'city_name' => $val['city_name'], @@ -1236,5 +1239,15 @@ class Customer extends HD_Controller return $show; } - + private function get_mobile($params) + { + $mobile = $params['mobile']; + if (!$mobile) { + return ''; + } elseif (in_array($params['of_id'], [1, 2]) && $this->role == 8) { + return mobile_asterisk($mobile); + } else { + return $mobile; + } + } } diff --git a/admin/views/login.php b/admin/views/login.php index 76e1dd27..6c850958 100644 --- a/admin/views/login.php +++ b/admin/views/login.php @@ -113,12 +113,17 @@ } function getCode(obj) { - settime($(obj)); + let mobile = "=$mobile?>"; let need_code = $('[name="need_code"]').val(); if (need_code == 'logsms'){ mobile = $('[name="number"]').val(); } + if(!mobile){ + layer.msg("请输入手机号") + return false + } + settime($(obj)); $('[name="need_code"]').val('get'); $.ajax({ 'url': 'get_code', @@ -131,6 +136,9 @@ if (need_code == 'logsms'){ $('[name="need_code"]').val(need_code); } + }, + error: function(xhr, status, error) { + console.error('Error:', error); } }) } diff --git a/admin/views/receiver/customer/get.php b/admin/views/receiver/customer/get.php index 292f8bf1..01c6fa5c 100644 --- a/admin/views/receiver/customer/get.php +++ b/admin/views/receiver/customer/get.php @@ -45,7 +45,7 @@