1405/03/20-fix bug in update cart
This commit is contained in:
@@ -79,36 +79,39 @@
|
||||
</div>
|
||||
|
||||
<!-- Total and Checkout -->
|
||||
<div class="fixed bottom-20 left-0 right-0 bg-white border-t border-gray-200 p-4 shadow-lg z-1">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<div class="text-lg font-semibold">مجموع:</div>
|
||||
<div class="flex flex-col gap-2 ">
|
||||
<div class="text-primary font-bold text-xl">
|
||||
{{ usePrice(displaytotalPrice) }}
|
||||
<div class=" flex justify-center fixed bottom-20 left-0 right-0 z-1">
|
||||
<div class="md:w-[426px] w-full bg-white border-t border-gray-200 p-4 shadow-lg">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<div class="text-lg font-semibold">مجموع:</div>
|
||||
<div class="flex flex-col gap-2 ">
|
||||
<div class="text-primary font-bold text-xl">
|
||||
{{ usePrice(displaytotalPrice) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="!text-primary font-bold text-xs line-through cursor-pointer "
|
||||
v-if="discountInfo?.amount>0"
|
||||
@click="showDiscountModal=true">
|
||||
{{ usePrice(totalPrice) }}
|
||||
</div>
|
||||
<div v-else
|
||||
class="!text-primary font-bold text-xs underline-solid underline cursor-pointer"
|
||||
@click="showDiscountModal=true">
|
||||
کد تخفیف دارم
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="!text-primary font-bold text-xs line-through cursor-pointer "
|
||||
v-if="discountInfo?.amount>0"
|
||||
@click="showDiscountModal=true">
|
||||
{{ usePrice(totalPrice) }}
|
||||
</div>
|
||||
<div v-else
|
||||
class="!text-primary font-bold text-xs underline-solid underline cursor-pointer"
|
||||
@click="showDiscountModal=true">
|
||||
کد تخفیف دارم
|
||||
</div>
|
||||
|
||||
<BasicButton
|
||||
class="w-full py-3"
|
||||
type="primary"
|
||||
size="large"
|
||||
@click="handleCheckout"
|
||||
>
|
||||
تسویه حساب
|
||||
</BasicButton>
|
||||
</div>
|
||||
<BasicButton
|
||||
class="w-full py-3"
|
||||
type="primary"
|
||||
size="large"
|
||||
@click="handleCheckout"
|
||||
>
|
||||
تسویه حساب
|
||||
</BasicButton>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -423,6 +426,10 @@ onMounted(async () => {
|
||||
try {
|
||||
await initPrice()
|
||||
await refreshCart()
|
||||
const refreshCartInfo=setInterval(async () => {
|
||||
await refreshCart()
|
||||
// await getUpPrice()
|
||||
}, 10000)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user