diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index e562e4b5..b53f96ea 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -120,14 +120,16 @@ class Customers extends Wxapp } $car_json = json_decode($row['car_json'], true); $update = []; - if ($mobile) { - if (!mobile_valid($mobile)) { - throw new Exception('手机号格式错误', ERR_PARAMS_ERROR); + if($row['cf_title']!='平台分配'){ + if ($mobile) { + if (!mobile_valid($mobile)) { + throw new Exception('手机号格式错误', ERR_PARAMS_ERROR); + } + if ($this->customers_model->count(['biz_id' => $biz_id, 'mobile' => $mobile])) { + throw new Exception('客户已存在', API_CODE_FAIL); + } + $update['mobile'] = $mobile; } - if ($this->customers_model->count(['biz_id' => $biz_id, 'mobile' => $mobile])) { - throw new Exception('客户已存在', API_CODE_FAIL); - } - $update['mobile'] = $mobile; } $s_row = $this->auto_series_model->get(['id' => $car_id]); $ids_arr = [];