|
|
@@ -171,11 +171,7 @@ class ApproachOrderForm extends Model
|
|
|
if (!$receiveAddress = ReceiveAddress::find()->where(' ID=:ID', [':ID' => $this->addressId])->asArray()->one()) {
|
|
|
$this->addError($attribute, '收货地址不存在');
|
|
|
} else {
|
|
|
- if (($this->scenario == 'verifyIPay88') && (!$receiveAddress['ZIP_CODE'])){
|
|
|
- $this->addError($attribute, '收货地址没有邮编');
|
|
|
- } else {
|
|
|
- $this->_address = $receiveAddress;
|
|
|
- }
|
|
|
+ $this->_address = $receiveAddress;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -299,6 +295,13 @@ 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;
|