|
|
@@ -146,10 +146,13 @@ class ApproachOrderForm extends Model
|
|
|
$this->addError($attribute, '收货地址不存在');
|
|
|
} else {
|
|
|
$this->_address = $receiveAddress;
|
|
|
- // 邮编根据最后一级的行政地区获得
|
|
|
+ // 邮编根据最后一级的行政地区获得, 如果没有则向上一级搜索
|
|
|
$this->zipCode = Region::getZipCode($receiveAddress['COUNTY']);
|
|
|
if (!$this->zipCode) {
|
|
|
- $this->addError($attribute, '收货地址邮编异常,请联系客服人员');
|
|
|
+ $this->zipCode = Region::getZipCode($receiveAddress['CITY']);
|
|
|
+ if (!$this->zipCode) {
|
|
|
+ $this->addError($attribute, '收货地址邮编异常,请联系客服人员');
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|