diff --git a/themes/default/cart/cart.blade.php b/themes/default/cart/cart.blade.php index b938f012..e4adcef8 100644 --- a/themes/default/cart/cart.blade.php +++ b/themes/default/cart/cart.blade.php @@ -114,6 +114,7 @@ + @hook('carts.footer') @endsection @push('add-scripts') @@ -126,15 +127,13 @@ amount: @json($data['amount']), amount_format: @json($data['amount_format']), }, - // components: {}, - // 计算属性 + computed: { allSelected: { get() { return !this.products.length ? false : this.products.every(s => s.selected) }, set(val) { - // return this.products.map(e => e.selected = val) this.selectedBtnSelected() } @@ -144,9 +143,7 @@ return this.products.map(e => e.quantity).reduce((n,m) => n + m); }, }, - // 侦听器 - watch: {}, - // 组件方法 + methods: { checkedBtnToCheckout() { if (!this.products.some(e => e.selected)) { @@ -173,7 +170,6 @@ }, checkedCartTr(index) { - // this.products[index].selected = !this.products[index].selected; this.selectedBtnSelected(); }, @@ -193,9 +189,6 @@ bk.getCarts() } }, - // 实例被挂载后调用 - mounted () { - }, }) @endpush diff --git a/themes/default/checkout.blade.php b/themes/default/checkout.blade.php index 700cec31..98a21646 100644 --- a/themes/default/checkout.blade.php +++ b/themes/default/checkout.blade.php @@ -21,6 +21,8 @@
+ @hook('checkout.body.header') + @include('checkout._address')
@@ -61,6 +63,8 @@ @endforeach
+ + @hook('checkout.body.footer')
@@ -84,6 +88,8 @@ {{ $carts['quantity'] }}
+ @hook('checkout.total.header') +
@foreach ($carts['carts'] as $cart)
@@ -113,13 +119,17 @@
+ + @hook('checkout.total.footer')
- @endsection + + @hook('checkout.footer') +@endsection @push('add-scripts')