|
|
|
@ -692,20 +692,17 @@ class PaymentController extends BaseController
|
|
|
|
|
$this->error('手机号不能为空');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$is_hav = M("payment_member")
|
|
|
|
|
->where("mobile = '{$data['mobile']}'")
|
|
|
|
|
->find();
|
|
|
|
|
|
|
|
|
|
if ($is_hav) {
|
|
|
|
|
$this->error('手机号已经存在');
|
|
|
|
|
if(strlen($data['mobile']) < 11) {
|
|
|
|
|
$this->error('手机号格式错误');
|
|
|
|
|
// $this->error('手机号格式错误');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$is_hav = M("payment_member")
|
|
|
|
|
->where("name = '{$data['name']}'")
|
|
|
|
|
->where("mobile = '{$data['mobile']}'")
|
|
|
|
|
->find();
|
|
|
|
|
|
|
|
|
|
if ($is_hav) {
|
|
|
|
|
$this->error('名称已经存在');
|
|
|
|
|
$this->error('手机号已经存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$is_success = M("payment_member")
|
|
|
|
@ -749,11 +746,15 @@ class PaymentController extends BaseController
|
|
|
|
|
// $this->error('手机号不能为空');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($data['id'] == 1) {
|
|
|
|
|
$hav_mobile = M("payment_member")
|
|
|
|
|
->where("id = '{$data['id']}'")
|
|
|
|
|
->find();
|
|
|
|
|
|
|
|
|
|
if ($data['id'] == 1 && $hav_mobile['mobile']!=$data['mobile']) {
|
|
|
|
|
$verify = $_REQUEST['verify'];
|
|
|
|
|
|
|
|
|
|
if (!A("Public")->checksafecode($data['mobile'], $verify)) {
|
|
|
|
|
$this->ajaxReturn(["error"=>"验证码错误"]);
|
|
|
|
|
$this->ajaxReturn(['status'=>0,'msg'=>'验证码错误']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -771,15 +772,6 @@ class PaymentController extends BaseController
|
|
|
|
|
// $this->error('账号不存在');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$is_hav = M("payment_member")
|
|
|
|
|
->where("mobile = '{$data['name']}' and id != {$data['id']}")
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
if($is_hav) {
|
|
|
|
|
$this->ajaxReturn(['status'=>0,'msg'=>'名称重复请验证']);
|
|
|
|
|
// $this->error('名称重复请验证');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$is_hav = M("payment_member")
|
|
|
|
|
->where("mobile = '{$data['mobile']}' and id != {$data['id']}")
|
|
|
|
|
->find();
|
|
|
|
|