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