作者 刘锟

update

@@ -195,7 +195,8 @@ class ProjectUpdate extends Command @@ -195,7 +195,8 @@ class ProjectUpdate extends Command
195 $custom_types = $data['data']['customposttypes'] ?? ''; 195 $custom_types = $data['data']['customposttypes'] ?? '';
196 196
197 $model = new WebSettingReceiving(); 197 $model = new WebSettingReceiving();
198 - if ($phones) { 198 + $has_phone = $model->read(['type' => 2]);
  199 + if (!$has_phone && $phones) {
199 $phone_arr = explode(',', $phones); 200 $phone_arr = explode(',', $phones);
200 foreach ($phone_arr as $v_phone) { 201 foreach ($phone_arr as $v_phone) {
201 if ($v_phone) { 202 if ($v_phone) {
@@ -215,7 +216,8 @@ class ProjectUpdate extends Command @@ -215,7 +216,8 @@ class ProjectUpdate extends Command
215 } 216 }
216 } 217 }
217 } 218 }
218 - if ($emails) { 219 + $has_email = $model->read(['type' => 1]);
  220 + if (!$has_email && $emails) {
219 $email_arr = explode(',', $emails); 221 $email_arr = explode(',', $emails);
220 foreach ($email_arr as $v_email) { 222 foreach ($email_arr as $v_email) {
221 if ($v_email) { 223 if ($v_email) {