|
@@ -35,6 +35,7 @@ class WebSettingReceivingLogic extends BaseLogic |
|
@@ -35,6 +35,7 @@ class WebSettingReceivingLogic extends BaseLogic |
|
35
|
* @time :2023/5/8 16:26
|
35
|
* @time :2023/5/8 16:26
|
|
36
|
*/
|
36
|
*/
|
|
37
|
public function setting_receiving_save(){
|
37
|
public function setting_receiving_save(){
|
|
|
|
38
|
+ $result_err = [];
|
|
38
|
$data = [];
|
39
|
$data = [];
|
|
39
|
DB::connection('custom_mysql')->beginTransaction();
|
40
|
DB::connection('custom_mysql')->beginTransaction();
|
|
40
|
try {
|
41
|
try {
|
|
@@ -44,6 +45,7 @@ class WebSettingReceivingLogic extends BaseLogic |
|
@@ -44,6 +45,7 @@ class WebSettingReceivingLogic extends BaseLogic |
|
44
|
// 使用正则表达式匹配中国大陆手机号
|
45
|
// 使用正则表达式匹配中国大陆手机号
|
|
45
|
$pattern = '/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/';
|
46
|
$pattern = '/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/';
|
|
46
|
if (!preg_match($pattern, $v['values'])) {
|
47
|
if (!preg_match($pattern, $v['values'])) {
|
|
|
|
48
|
+ $result_err[] = $v['values'];
|
|
47
|
continue;
|
49
|
continue;
|
|
48
|
}
|
50
|
}
|
|
49
|
}
|
51
|
}
|
|
@@ -51,6 +53,7 @@ class WebSettingReceivingLogic extends BaseLogic |
|
@@ -51,6 +53,7 @@ class WebSettingReceivingLogic extends BaseLogic |
|
51
|
// 使用正则表达式匹配中国大陆手机号
|
53
|
// 使用正则表达式匹配中国大陆手机号
|
|
52
|
$pattern = '/^1[3456789]\d{9}$/';
|
54
|
$pattern = '/^1[3456789]\d{9}$/';
|
|
53
|
if (!preg_match($pattern, $v['values'])) {
|
55
|
if (!preg_match($pattern, $v['values'])) {
|
|
|
|
56
|
+ $result_err[] = $v['values'];
|
|
54
|
continue;
|
57
|
continue;
|
|
55
|
}
|
58
|
}
|
|
56
|
}
|
59
|
}
|
|
@@ -68,6 +71,6 @@ class WebSettingReceivingLogic extends BaseLogic |
|
@@ -68,6 +71,6 @@ class WebSettingReceivingLogic extends BaseLogic |
|
68
|
$this->fail('编辑失败,请联系管理员');
|
71
|
$this->fail('编辑失败,请联系管理员');
|
|
69
|
}
|
72
|
}
|
|
70
|
(new SyncService())->projectAcceptAddress($this->user['project_id']);
|
73
|
(new SyncService())->projectAcceptAddress($this->user['project_id']);
|
|
71
|
- return $this->success();
|
74
|
+ return $this->success($result_err);
|
|
72
|
}
|
75
|
}
|
|
73
|
} |
76
|
} |