fixed some bugs and optimize codes

master
A1Gard 3 days ago
parent cf081b24fa
commit 73bc2d6b2e

@ -46,7 +46,7 @@ window.addEventListener('load', function () {
console.error('Error sending data:', error); console.error('Error sending data:', error);
}); });
} else { } else {
console.log('Data was sent recently. Skipping this time.'); // console.log('Data was sent recently. Skipping this time.');
} }

@ -17,7 +17,7 @@
{{ item[titleField] }} {{ item[titleField] }}
</template> </template>
<template v-else> <template v-else>
{{ item[titleField][xlang] }} {{ item[titleField]?.[xlang] ?? item[titleField] }}
</template> </template>
</li> </li>
@ -39,7 +39,7 @@
{{ item[titleField] }} {{ item[titleField] }}
</template> </template>
<template v-else> <template v-else>
{{ item[titleField][xlang] }} {{ item[titleField]?.[xlang] ?? item[titleField] }}
</template> </template>
<i class="ri-close-line" @click="rem(item[valueField])"></i> <i class="ri-close-line" @click="rem(item[valueField])"></i>
</span> </span>

@ -17,7 +17,7 @@
{{ item[titleField] }} {{ item[titleField] }}
</template> </template>
<template v-else> <template v-else>
{{ item[titleField][xlang] }} {{ item[titleField]?.[xlang] ?? item[titleField] }}
</template> </template>
</li> </li>
@ -39,7 +39,7 @@
{{ item[titleField] }} {{ item[titleField] }}
</template> </template>
<template v-else> <template v-else>
{{ item[titleField][xlang] }} {{ item[titleField]?.[xlang] ?? item[titleField] }}
</template> </template>
<i class="ri-close-line" @click="rem(item[valueField])"></i> <i class="ri-close-line" @click="rem(item[valueField])"></i>
</span> </span>

@ -16,7 +16,7 @@
{{ item[titleField] }} {{ item[titleField] }}
</template> </template>
<template v-else> <template v-else>
{{ item[titleField][xlang] }} {{ item[titleField]?.[xlang] ?? item[titleField] }}
</template> </template>
</li> </li>
</template> </template>
@ -39,7 +39,7 @@
{{ item[titleField] }} {{ item[titleField] }}
</template> </template>
<template v-else> <template v-else>
{{ item[titleField][xlang] }} {{ item[titleField]?.[xlang] ?? item[titleField] }}
</template> </template>
</option> </option>
</select> </select>

@ -29,7 +29,7 @@
<div class="p-2"> <div class="p-2">
@if($product->stock_status == 'IN_STOCK') @if($product->stock_status == 'IN_STOCK')
<a href="{{ route('client.product-card-toggle',$product->slug) }}" <a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary add-to-card"> class="btn btn-primary add-to-card w-100">
<i class="ri-shopping-bag-3-line"></i> <i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}} {{__("Add to card")}}
</a> </a>

@ -3,6 +3,7 @@ import {tns} from "tiny-slider/src/tiny-slider";
var sliderSimple ; var sliderSimple ;
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
try {
document.querySelectorAll('.SliderSimple')?.forEach(function (el) { document.querySelectorAll('.SliderSimple')?.forEach(function (el) {
if (el.classList.contains('.tns-slider')){ if (el.classList.contains('.tns-slider')){
console.log('ignore'); console.log('ignore');
@ -22,5 +23,8 @@ document.addEventListener('DOMContentLoaded', () => {
// speed:10000, // speed:10000,
}); });
}); });
} catch {
}
}); });

Loading…
Cancel
Save