浏览代码

一些功能

Kirin 4 年之前
父节点
当前提交
6fdec9da30
共有 1 个文件被更改,包括 3 次插入3 次删除
  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);
                 if (!$test && !$free_check && !$store_order && $distance > $store['radius']) return self::setErrorInfo('地址在派送范围外!', true);
 
 
             } else {
             } 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['province'] = '';
                 $addressInfo['city'] = '';
                 $addressInfo['city'] = '';
                 $addressInfo['district'] = '';
                 $addressInfo['district'] = '';