From 421e51a09219a0e920df440087279745a4b2ab14 Mon Sep 17 00:00:00 2001 From: pushuo <229102104@qq.com> Date: Wed, 20 Jul 2022 16:27:38 +0800 Subject: [PATCH] wip --- themes/default/product.blade.php | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/themes/default/product.blade.php b/themes/default/product.blade.php index 295eb8e8..fca8afdf 100644 --- a/themes/default/product.blade.php +++ b/themes/default/product.blade.php @@ -46,7 +46,7 @@
@{{ product.origin_price_format }}
-
+

@{{ variable.name }}

@@ -87,10 +87,15 @@ - +
@@ -198,16 +203,12 @@ this.product = sku; }, - addCart(isBuyNow) { - const data = { - sku_id: this.product.id, - quantity: this.quantity - }; - console.log(data); - return; - - $http.post('/carts', data).then((res) => { + addCart(isBuyNow = false) { + $http.post('/carts', {sku_id: this.product.id, quantity: this.quantity}).then((res) => { layer.msg(res.message) + if (isBuyNow) { + location.href = '{{ shop_route("checkout.index") }}' + } }) },