|
|
@@ -171,7 +171,11 @@ class ApproachOrderForm extends Model
|
|
|
if (!$receiveAddress = ReceiveAddress::find()->where(' ID=:ID', [':ID' => $this->addressId])->asArray()->one()) {
|
|
|
$this->addError($attribute, '收货地址不存在');
|
|
|
} else {
|
|
|
- $this->_address = $receiveAddress;
|
|
|
+ if (!$receiveAddress['ZIP_CODE']){
|
|
|
+ $this->addError($attribute, '收货地址没有填写邮编');
|
|
|
+ } else {
|
|
|
+ $this->_address = $receiveAddress;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -295,13 +299,6 @@ class ApproachOrderForm extends Model
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- // 收货地址校验
|
|
|
- if (!$receiveAddress = ReceiveAddress::find()->where(' ID=:ID', [':ID' => $this->addressId])->asArray()->one()) {
|
|
|
- throw new Exception('收货地址不存在');
|
|
|
- } else if (!$receiveAddress['ZIP_CODE']){
|
|
|
- throw new Exception('收货地址中没有填写邮编');
|
|
|
- }
|
|
|
-
|
|
|
$ids = $this->goodsId;
|
|
|
$totalAmount = 0;
|
|
|
$totalPv = 0;
|