diff --git a/themes/default/checkout.blade.php b/themes/default/checkout.blade.php index b26201a4..ea9174e6 100644 --- a/themes/default/checkout.blade.php +++ b/themes/default/checkout.blade.php @@ -23,7 +23,7 @@
{{ __('shop/checkout.address') }}
- {{ __('shop/checkout.same_as_shipping_address') }} + {{ __('shop/checkout.same_as_shipping_address') }}
@@ -55,7 +55,7 @@ -
+
{{ __('shop/checkout.payment_address') }}
@@ -64,7 +64,7 @@
-
+
@{{ address.name }} @@ -171,9 +171,10 @@ payment_address_id: @json($current['payment_address_id']), payment_method_code: @json($current['payment_method_code']), shipping_method_code: @json($current['shipping_method_code']), - same_as_shipping_address: @json($current['same_as_shipping_address'] ?? true) , }, + // same_as_shipping_address: @json($current['same_as_shipping_address'] ?? true), + isAllAddress: false, isAllAddressPayment: false, @@ -214,6 +215,20 @@ // 计算属性 computed: { + same_as_shipping_address: { + get() { + return this.form.shipping_address_id == this.form.payment_address_id + }, + + set(e) { + if (e) { + this.form.payment_address_id = this.form.shipping_address_id + } else { + this.form.payment_address_id = ''; + } + } + }, + isSubmit() { // source.addresses.length > 0 && source.payment_methods.length > 0 && source.shipping_methods.length > 0 return this.source.addresses.length > 0 && this.source.payment_methods.length > 0 && this.source.shipping_methods.length > 0; @@ -241,6 +256,10 @@ this.dialogAddress.show = true }, + // shippingPaymentAddressChange() { + + // }, + addressFormSubmit(form) { const self = this;