|
|
|
@ -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 = [];
|
|
|
|
|