cambio en la home
This commit is contained in:
parent
b718d7e4eb
commit
aaba794e6c
|
@ -8,6 +8,7 @@ import Card from "src/components/ui/Card.vue";
|
|||
import Container from "src/components/ui/Container.vue";
|
||||
import { useCartStore } from "src/stores/cart";
|
||||
import { useMobileStore } from "src/stores/mobileNav";
|
||||
import IconArrowCircleFilledRight from "../icons/IconArrowCircleFilledRight.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "HomePage",
|
||||
|
@ -18,7 +19,18 @@ export default defineComponent({
|
|||
Card,
|
||||
},
|
||||
setup() {
|
||||
const banners = ref([
|
||||
const banners = ref()
|
||||
const mobileStore = useMobileStore();
|
||||
const { isCarouselVisible, isOpenNav, screenWidth } =
|
||||
storeToRefs(mobileStore);
|
||||
|
||||
const cartStore = useCartStore();
|
||||
const { getProducts } = cartStore;
|
||||
const { products, homeSection } = storeToRefs(cartStore);
|
||||
|
||||
async function getBanners() {
|
||||
//const { data: { data } } = await apiBack("/banners/")
|
||||
return [
|
||||
{
|
||||
"url": "/assets/Cabecera-flornatura-1.jpg",
|
||||
"longName": "Regala un verano lleno de flores y plantas"
|
||||
|
@ -31,24 +43,14 @@ export default defineComponent({
|
|||
"url": "/assets/Cabecera-flornatura-3.jpg",
|
||||
"longName": "Regala un verano lleno de flores y plantas"
|
||||
}
|
||||
])
|
||||
const mobileStore = useMobileStore();
|
||||
const { isCarouselVisible, isOpenNav, screenWidth } =
|
||||
storeToRefs(mobileStore);
|
||||
|
||||
const cartStore = useCartStore();
|
||||
const { getProducts } = cartStore;
|
||||
const { products, homeSection } = storeToRefs(cartStore);
|
||||
|
||||
/*async function getBanners() {
|
||||
const { data: { data } } = await apiBack("/banners/")
|
||||
return data
|
||||
}*/
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await getProducts();
|
||||
//banners.value = await getBanners();
|
||||
banners.value = getBanners();
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue