From 623fed1af3b36fa28b89fe2ed9154e9384717768 Mon Sep 17 00:00:00 2001 From: pushuo <229102104@qq.com> Date: Mon, 29 Aug 2022 15:48:39 +0800 Subject: [PATCH] wip --- themes/default/checkout.blade.php | 110 +++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 32 deletions(-) diff --git a/themes/default/checkout.blade.php b/themes/default/checkout.blade.php index ea9174e6..238a7523 100644 --- a/themes/default/checkout.blade.php +++ b/themes/default/checkout.blade.php @@ -23,32 +23,41 @@
{{ __('shop/checkout.address') }}
- {{ __('shop/checkout.same_as_shipping_address') }} + {{ __('shop/checkout.same_as_shipping_address') }} +
- +
-
-
+
+
@{{ address.name }} @{{ address.phone }}
@{{ address.zipcode }}
-
@{{ address.country }} @{{ address.zone }} @{{ address.city }} @{{ address.address_1 }}
+
@{{ address.country }} @{{ address.zone }} @{{ address.city }} + @{{ address.address_1 }}
- {{ __('shop/checkout.chosen') }} + {{ __('shop/checkout.chosen') }}
- {{ __('shop/checkout.edit') }} + {{ __('shop/checkout.edit') }}
- - + +
@@ -60,30 +69,38 @@
{{ __('shop/checkout.payment_address') }}
- +
-
-
+
+
@{{ address.name }} @{{ address.phone }}
@{{ address.zipcode }}
-
@{{ address.country }} @{{ address.zone }} @{{ address.city }} @{{ address.address_1 }}
+
@{{ address.country }} @{{ address.zone }} @{{ address.city }} + @{{ address.address_1 }}
- {{ __('shop/checkout.chosen') }} + {{ __('shop/checkout.chosen') }}
- {{ __('shop/checkout.edit') }} + {{ __('shop/checkout.edit') }}
- - + +
@@ -93,9 +110,12 @@
{{ __('shop/checkout.payment_method') }}
-
+
- +
@@ -109,9 +129,12 @@
{{ __('shop/checkout.delivery_method') }}
-
+
- +
@@ -146,11 +169,12 @@
    @foreach ($totals as $total) -
  • {{ $total['title'] }}{{ $total['amount_format'] }}
  • +
  • {{ $total['title'] }}{{ $total['amount_format'] }}
  • @endforeach
- +
@@ -205,11 +229,31 @@ }, addressRules: { - name: [{required: true, message: '{{ __('shop/checkout.enter_name') }}', trigger: 'blur'}, ], - phone: [{required: true, message: '{{ __('shop/checkout.enter_phone') }}', trigger: 'blur'}, ], - address_1: [{required: true, message: '{{ __('shop/checkout.enter_address') }}', trigger: 'blur'}, ], - zone_id: [{required: true, message: '{{ __('shop/checkout.select_province') }}', trigger: 'blur'}, ], - city: [{required: true, message: '{{ __('shop/checkout.enter_city') }}', trigger: 'blur'}, ], + name: [{ + required: true, + message: '{{ __('shop/checkout.enter_name') }}', + trigger: 'blur' + }, ], + phone: [{ + required: true, + message: '{{ __('shop/checkout.enter_phone') }}', + trigger: 'blur' + }, ], + address_1: [{ + required: true, + message: '{{ __('shop/checkout.enter_address') }}', + trigger: 'blur' + }, ], + zone_id: [{ + required: true, + message: '{{ __('shop/checkout.select_province') }}', + trigger: 'blur' + }, ], + city: [{ + required: true, + message: '{{ __('shop/checkout.enter_city') }}', + trigger: 'blur' + }, ], } }, @@ -223,6 +267,7 @@ set(e) { if (e) { this.form.payment_address_id = this.form.shipping_address_id + this.updateCheckout(this.form.payment_address_id, 'same_as_shipping_address') } else { this.form.payment_address_id = ''; } @@ -231,14 +276,15 @@ 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; + return this.source.addresses.length > 0 && this.source.payment_methods.length > 0 && this.source + .shipping_methods.length > 0; }, // isAddress: { // this.form.shipping_address_id == // } }, - beforeMount () { + beforeMount() { this.countryChange(this.dialogAddress.form.country_id); }, @@ -295,7 +341,7 @@ this.dialogAddress.index = null; Object.keys(this.dialogAddress.form).forEach(key => this.dialogAddress.form[key] = '') - this.dialogAddress.form.country_id = @json($country_id) + this.dialogAddress.form.country_id = @json($country_id) }, countryChange(e) { @@ -327,4 +373,4 @@ } }) -@endpush \ No newline at end of file +@endpush