Functions.php 581 B

1234567891011121314151617181920
  1. <?php
  2. namespace common\components\delivery\services\adapter;
  3. Class Functions {
  4. public static function getMobile($order){
  5. if(isset($order['customMobile']) && $order['customMobile'] != '') {
  6. return $order['customMobile'];
  7. }
  8. if(isset($order['receiveMobile']) && $order['receiveMobile'] != '') {
  9. return $order['receiveMobile'];
  10. }
  11. if(isset($order['bookMobile']) && $order['bookMobile'] != '') {
  12. return $order['bookMobile'];
  13. }
  14. throw new \Exception('收件人手机号不存在');
  15. }
  16. }