完善右侧购物车弹窗层功能

This commit is contained in:
pushuo 2022-11-04 16:02:57 +08:00
parent f1a8d55eec
commit eb0b08bd6c
2 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,7 @@
* @link https://beikeshop.com
* @Author pu shuo <pushuo@guangda.work>
* @Date 2022-08-16 18:47:18
* @LastEditTime 2022-11-04 14:18:43
* @LastEditTime 2022-11-04 16:00:27
*/
$(function () {
@ -49,6 +49,12 @@ $(function () {
return $(this).find('i.bi-check-circle-fill').data('id');
}).get();
if (!checkedIds.length) {
$('#offcanvas-right-cart .to-checkout').addClass('disabled')
} else {
$('#offcanvas-right-cart .to-checkout').removeClass('disabled')
}
$http.post(`/carts/select`, {cart_ids: checkedIds}, {hload: true}).then((res) => {
updateMiniCartData(res);
})

View File

@ -62,7 +62,7 @@
</div>
</div>
<div class="p-4">
<a href="{{ shop_route('checkout.index') }}" class="btn w-100 btn-dark">{{ __('shop/carts.to_checkout') }}</a>
<a href="{{ shop_route('checkout.index') }}" class="btn w-100 btn-dark to-checkout {{ !$check ? 'disabled' : '' }}">{{ __('shop/carts.to_checkout') }}</a>
<a href="{{ shop_route('carts.index') }}" class="btn w-100 btn-outline-dark mt-2">{{ __('shop/carts.check_cart') }}</a>
</div>
</div>