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