Kaynağa Gözat

手机号判断

shish 4 yıl önce
ebeveyn
işleme
1b49d8d8df
1 değiştirilmiş dosya ile 11 ekleme ve 0 silme
  1. 11 0
      app-hd/controllers/OrderController.php

+ 11 - 0
app-hd/controllers/OrderController.php

@@ -357,6 +357,17 @@ class OrderController extends BaseController
         }
         }
         $post['customId'] = $customId;
         $post['customId'] = $customId;
 
 
+        if (isset($post['receiveMobile']) && !empty($post['receiveMobile'])) {
+            if (stringUtil::isMobile($post['receiveMobile'])) {
+                util::fail('请填写正常的收花人手机号');
+            }
+        }
+        if (isset($post['bookMobile']) && !empty($post['bookMobile'])) {
+            if (stringUtil::isMobile($post['bookMobile'])) {
+                util::fail('请填写正常的订花人手机号');
+            }
+        }
+
         $hasPay = $post['hasPay'] ?? dict::getDict('hasPay', 'unPay');
         $hasPay = $post['hasPay'] ?? dict::getDict('hasPay', 'unPay');
 
 
         $productJson = $post['product'] ?? '';
         $productJson = $post['product'] ?? '';