categories changed
This commit is contained in:
@@ -160,27 +160,20 @@ export default {
|
|||||||
visible: true,
|
visible: true,
|
||||||
checkedCategories: [],
|
checkedCategories: [],
|
||||||
categories: [
|
categories: [
|
||||||
'Alimentación, bebida y tabaco',
|
'Alimentación',
|
||||||
'Arte y ocio',
|
'Agricultura ',
|
||||||
'Bebés y niños pequeños',
|
'Energía',
|
||||||
'Bricolaje',
|
'Hogar y jardín',
|
||||||
'Cámaras y ópticas',
|
'Moda y Textil',
|
||||||
'Casa y jardín',
|
'Salud y Cuidados',
|
||||||
'Economía e industria',
|
'Movilidad y Mensajería',
|
||||||
'Electrónica',
|
'Ocio y Deporte',
|
||||||
'Elementos religiosos y ceremoniales',
|
'Turismo y Gastronomía',
|
||||||
'Equipamiento deportivo',
|
'Cultura, Educación y Medios',
|
||||||
'Juegos y juguetes',
|
'Tecnología y Servicios Digitales',
|
||||||
'Maletas y bolsos de viaje',
|
'Economía Circular y Reparación',
|
||||||
'Material de oficina',
|
'Finanzas Éticas y Seguros',
|
||||||
'Mobiliario',
|
'Servicios Profesionales',
|
||||||
'Multimedia',
|
|
||||||
'Productos para adultos',
|
|
||||||
'Productos para mascotas y animales',
|
|
||||||
'Ropa y accesorios',
|
|
||||||
'Salud y belleza',
|
|
||||||
'Software',
|
|
||||||
'Vehículos y recambios',
|
|
||||||
],
|
],
|
||||||
priceRange: [0, 500],
|
priceRange: [0, 500],
|
||||||
priceRangeFilter: {},
|
priceRangeFilter: {},
|
||||||
|
|||||||
@@ -220,27 +220,20 @@ export default {
|
|||||||
},
|
},
|
||||||
// tagsArray: ['tag1', 'tag2', 'tag3', 'tag33'],
|
// tagsArray: ['tag1', 'tag2', 'tag3', 'tag33'],
|
||||||
categories: [
|
categories: [
|
||||||
'Alimentación, bebida y tabaco',
|
'Alimentación',
|
||||||
'Arte y ocio',
|
'Agricultura ',
|
||||||
'Bebés y niños pequeños',
|
'Energía',
|
||||||
'Bricolaje',
|
'Hogar y jardín',
|
||||||
'Cámaras y ópticas',
|
'Moda y Textil',
|
||||||
'Casa y jardín',
|
'Salud y Cuidados',
|
||||||
'Economía e industria',
|
'Movilidad y Mensajería',
|
||||||
'Electrónica',
|
'Ocio y Deporte',
|
||||||
'Elementos religiosos y ceremoniales',
|
'Turismo y Gastronomía',
|
||||||
'Equipamiento deportivo',
|
'Cultura, Educación y Medios',
|
||||||
'Juegos y juguetes',
|
'Tecnología y Servicios Digitales',
|
||||||
'Maletas y bolsos de viaje',
|
'Economía Circular y Reparación',
|
||||||
'Material de oficina',
|
'Finanzas Éticas y Seguros',
|
||||||
'Mobiliario',
|
'Servicios Profesionales',
|
||||||
'Multimedia',
|
|
||||||
'Productos para adultos',
|
|
||||||
'Productos para mascotas y animales',
|
|
||||||
'Ropa y accesorios',
|
|
||||||
'Salud y belleza',
|
|
||||||
'Software',
|
|
||||||
'Vehículos y recambios',
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="cards-grid">
|
<div class="cards-grid">
|
||||||
<div v-for="product in products" :key="product.id">
|
<div v-for="(product, key) in products" :key="product.id">
|
||||||
<ProductCard :key="product.key" :product="product" />
|
<ProductCard :key="key" :product="product" />
|
||||||
</div>
|
</div>
|
||||||
<div class="c-pagination">
|
<div class="c-pagination">
|
||||||
<BPagination
|
<BPagination
|
||||||
v-model="currentPage"
|
v-model="currentPage"
|
||||||
:v-if="products"
|
:v-if="relatedProducts"
|
||||||
:total-rows="rows"
|
:total-rows="rows"
|
||||||
:per-page="perPage"
|
:per-page="perPage"
|
||||||
/>
|
/>
|
||||||
@@ -29,11 +29,14 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
perPage: this.productsPerPage,
|
perPage: this.productsPerPage ? this.productsPerPage : 8,
|
||||||
rows: this.relatedProducts.length,
|
//rows: this.relatedProducts ? this.relatedProducts.length : 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
rows() {
|
||||||
|
return Array.isArray(this.relatedProducts) ? this.relatedProducts.length : 0
|
||||||
|
},
|
||||||
products() {
|
products() {
|
||||||
const initial = (this.currentPage - 1) * this.perPage
|
const initial = (this.currentPage - 1) * this.perPage
|
||||||
const final = this.currentPage * this.perPage
|
const final = this.currentPage * this.perPage
|
||||||
|
|||||||
@@ -35,27 +35,20 @@ export default {
|
|||||||
selectedCategory: '',
|
selectedCategory: '',
|
||||||
//TODO: change categories
|
//TODO: change categories
|
||||||
categories: [
|
categories: [
|
||||||
'Alimentación, bebida y tabaco',
|
'Alimentación',
|
||||||
'Arte y ocio',
|
'Agricultura ',
|
||||||
'Bebés y niños pequeños',
|
'Energía',
|
||||||
'Bricolaje',
|
'Hogar y jardín',
|
||||||
'Cámaras y ópticas',
|
'Moda y Textil',
|
||||||
'Casa y jardín',
|
'Salud y Cuidados',
|
||||||
'Economía e industria',
|
'Movilidad y Mensajería',
|
||||||
'Electrónica',
|
'Ocio y Deporte',
|
||||||
'Elementos religiosos y ceremoniales',
|
'Turismo y Gastronomía',
|
||||||
'Equipamiento deportivo',
|
'Cultura, Educación y Medios',
|
||||||
'Juegos y juguetes',
|
'Tecnología y Servicios Digitales',
|
||||||
'Maletas y bolsos de viaje',
|
'Economía Circular y Reparación',
|
||||||
'Material de oficina',
|
'Finanzas Éticas y Seguros',
|
||||||
'Mobiliario',
|
'Servicios Profesionales',
|
||||||
'Multimedia',
|
|
||||||
'Productos para adultos',
|
|
||||||
'Productos para mascotas y animales',
|
|
||||||
'Ropa y accesorios',
|
|
||||||
'Salud y belleza',
|
|
||||||
'Software',
|
|
||||||
'Vehículos y recambios',
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -39,27 +39,20 @@ export default {
|
|||||||
searchCategory: '',
|
searchCategory: '',
|
||||||
|
|
||||||
categories: [
|
categories: [
|
||||||
'Alimentación, bebida y tabaco',
|
'Alimentación',
|
||||||
'Arte y ocio',
|
'Agricultura ',
|
||||||
'Bebés y niños pequeños',
|
'Energía',
|
||||||
'Bricolaje',
|
'Hogar y jardín',
|
||||||
'Cámaras y ópticas',
|
'Moda y Textil',
|
||||||
'Casa y jardín',
|
'Salud y Cuidados',
|
||||||
'Economía e industria',
|
'Movilidad y Mensajería',
|
||||||
'Electrónica',
|
'Ocio y Deporte',
|
||||||
'Elementos religiosos y ceremoniales',
|
'Turismo y Gastronomía',
|
||||||
'Equipamiento deportivo',
|
'Cultura, Educación y Medios',
|
||||||
'Juegos y juguetes',
|
'Tecnología y Servicios Digitales',
|
||||||
'Maletas y bolsos de viaje',
|
'Economía Circular y Reparación',
|
||||||
'Material de oficina',
|
'Finanzas Éticas y Seguros',
|
||||||
'Mobiliario',
|
'Servicios Profesionales',
|
||||||
'Multimedia',
|
|
||||||
'Productos para adultos',
|
|
||||||
'Productos para mascotas y animales',
|
|
||||||
'Ropa y accesorios',
|
|
||||||
'Salud y belleza',
|
|
||||||
'Software',
|
|
||||||
'Vehículos y recambios',
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -173,15 +173,11 @@ export default {
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
'$route.query'(newValue) {
|
'$route.query'(newValue) {
|
||||||
console.log('New Value:', newValue)
|
console.log('New Value:', newValue.q)
|
||||||
//console.log('Route changed:', this.$route.fullPath)
|
//console.log('Route changed:', this.$route.fullPath)
|
||||||
//console.log('Current params:', this.$route.query)
|
//console.log('Current params:', this.$route.query)
|
||||||
this.queryText = newValue.q || ''
|
this.queryText = newValue.q || ''
|
||||||
if (newValue.q) {
|
this.updateData(newValue)
|
||||||
this.updateData(newValue)
|
|
||||||
} else {
|
|
||||||
window.location.reload()
|
|
||||||
}
|
|
||||||
Object.assign(this.$data, this.$options.data())
|
Object.assign(this.$data, this.$options.data())
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="">
|
<div class="c-content">
|
||||||
<div class="content">
|
|
||||||
<section class="hero-section">
|
<section class="hero-section">
|
||||||
<div class="gradient">
|
<div class="gradient">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -46,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<TextWithImageAndButton />
|
<TextWithImageAndButton />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -107,7 +106,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.c-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -12,7 +12,8 @@ export const useAuthStore = defineStore('auth', {
|
|||||||
cookiesAreAccepted: false,
|
cookiesAreAccepted: false,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
persist: true, // TODO: Enable persistence. Cookies will be stored 'auth' 👉🏻 https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt
|
//persist: true, // TODO: Enable persistence. Cookies will be stored 'auth' 👉🏻 https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt
|
||||||
|
|
||||||
// persist: {
|
// persist: {
|
||||||
// key: 'authentication-cookie',
|
// key: 'authentication-cookie',
|
||||||
// storage: piniaPluginPersistedstate.cookies({
|
// storage: piniaPluginPersistedstate.cookies({
|
||||||
|
|||||||
Reference in New Issue
Block a user