增加短信登录和后台客户电话显示
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<td class="table-td"><span class="mr5">客户姓名:</span>{{info.name}}</td>
|
||||
<td class="table-td"><span class="mr5">客户电话:</span>{{info.mobile}}
|
||||
<a href="javascript:void(0);" data-modal="/common/bind_mobile?id=<?= $info['id'] ?>&type=customer"
|
||||
class="am-btn am-btn-sm am-btn-success ml5" data-title="获取手机号">
|
||||
class="am-btn am-btn-sm am-btn-success ml5" data-title="获取手机号" v-if="info.role!=8">
|
||||
拨打
|
||||
</a>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user