master
yulingwei 4 years ago
parent cdf2d903cd
commit 34df4e5a8e

@ -334,8 +334,18 @@ class IndexController extends HomeController
/**
* 发动手机验证码
*/
public function telsafecode($phone = '', $delay = 10, $flag = true)
public function telsafecode($phone = '', $exceptExists=1, $delay = 10, $flag = true)
{
$exists = M('promote', 'tab_')->where(['login_phone'=>$phone])->find();
if (!$exceptExists) {
if ($exists) {
return $this->ajaxReturn(['status'=>0,'msg'=>'手机号已被绑定']);
}
} else {
if (!$exists) {
return $this->ajaxReturn(['status'=>0,'msg'=>'手机号未被绑定']);
}
}
$taskClient = new TaskClient();
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];

@ -586,8 +586,20 @@ class SafeController extends BaseController{
/**
* 发动手机验证码
*/
public function telsafecode($phone = '', $delay = 10, $flag = true)
public function telsafecode($phone = '', $exceptExists=1, $delay = 10, $flag = true)
{
$exists = M('promote', 'tab_')->where(['login_phone'=>$phone])->find();
if (!$exceptExists) {
if ($exists) {
return $this->ajaxReturn(['status'=>0,'msg'=>'手机号已被绑定']);
}
} else {
echo 222;
if (!$exists) {
return $this->ajaxReturn(['status'=>0,'msg'=>'手机号未被绑定']);
}
}
$taskClient = new TaskClient();
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];

@ -231,7 +231,7 @@
$.ajax({
type:'post',
dataType:'json',
data:'phone='+phone,
data:{'phone':phone, 'exceptExists':0},
url:'{:U("telsafecode")}',
success:function(data) {
if (data.status ==1) {

Loading…
Cancel
Save