Kirin 4 anni fa
parent
commit
6fdec9da30
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      app/models/store/StoreOrder.php

+ 3 - 3
app/models/store/StoreOrder.php

@@ -346,9 +346,9 @@ class StoreOrder extends BaseModel
                 if (!$test && !$free_check && !$store_order && $distance > $store['radius']) return self::setErrorInfo('地址在派送范围外!', true);
 
             } else {
-                if ((!$real_name || !$phone) && !$test) return self::setErrorInfo('请填写姓名和电话', true);
-                $addressInfo['real_name'] = $real_name;
-                $addressInfo['phone'] = $phone;
+                if ((!$real_name || !$phone) && !$test && !$exchange_id) return self::setErrorInfo('请填写姓名和电话', true);
+                $addressInfo['real_name'] = $real_name ?? '';
+                $addressInfo['phone'] = $phone ?? '';
                 $addressInfo['province'] = '';
                 $addressInfo['city'] = '';
                 $addressInfo['district'] = '';