diff --git a/frontend/components/global/BlogPost.vue b/frontend/components/global/BlogPost.vue index 7c43a15..acc4f26 100644 --- a/frontend/components/global/BlogPost.vue +++ b/frontend/components/global/BlogPost.vue @@ -10,6 +10,7 @@ type Props = { description: string; link: string; variant?: "sm" | "lg"; + image: string, } // props @@ -45,7 +46,7 @@ const {} = toRefs(props); @@ -104,7 +105,7 @@ const {} = toRefs(props); diff --git a/frontend/components/global/CategoryCard.vue b/frontend/components/global/CategoryCard.vue index 9948f97..d01749b 100644 --- a/frontend/components/global/CategoryCard.vue +++ b/frontend/components/global/CategoryCard.vue @@ -23,48 +23,50 @@ const { colorObject } = useImageColor(`#category-image-${id.value}`); diff --git a/frontend/components/home/Categories.vue b/frontend/components/home/Categories.vue index d255779..a95a60f 100644 --- a/frontend/components/home/Categories.vue +++ b/frontend/components/home/Categories.vue @@ -52,7 +52,7 @@ const onSwiper = (swiper: SwiperClass) => { dark-layer :id="slide.id" :category="slide.name" - :picture="slide.icon" + :picture="slide.image" :count="slide.product_count" description="توضیحات دسته بندی" /> diff --git a/frontend/components/home/LatestStories.vue b/frontend/components/home/LatestStories.vue index a9df01b..ef8c72c 100644 --- a/frontend/components/home/LatestStories.vue +++ b/frontend/components/home/LatestStories.vue @@ -24,6 +24,7 @@ const {} = toRefs(props);
{ }, { id: 1, - picture: product.value!.image2 + picture: product.value?.image2 ?? product.value!.image1 }, { id: 2, - picture: product.value!.image3 + picture: product.value!.image3 ?? product.value!.image1 } ]; }); @@ -46,9 +46,12 @@ const slides = computed(() => { {{ product!.price }}
-

- {{ product!.description }} -

+ +

+

{ category: params?.category, price_gte: params?.price_gte, price_lte: params?.price_lte, - offest: params?.page! * 9 - 9, + offset: params?.page ? Number(params.page) * 9 - 9 : 0, limit: 9, }, } diff --git a/frontend/pages/category.vue b/frontend/pages/category.vue index 34cb535..b62ffe4 100644 --- a/frontend/pages/category.vue +++ b/frontend/pages/category.vue @@ -17,11 +17,12 @@ const filteredCategories = computed(() => { if (debouncedSearch.value.length > 0) { return categories.value!.map((cat) => { - cat.subcategorys = cat.subcategorys.filter((subcat) => { + const copyOfCategory = { ...cat }; + copyOfCategory.subcategorys = copyOfCategory.subcategorys.filter((subcat) => { return subcat.name.includes(debouncedSearch.value); }); - return cat; + return copyOfCategory; }); } @@ -66,32 +67,43 @@ await useAsyncData(async () => {
-
-
-
- - {{ mainCategory.name }} - -
+
+ + +
diff --git a/frontend/pages/product/[id].vue b/frontend/pages/product/[id].vue index 1de326a..6ac127b 100644 --- a/frontend/pages/product/[id].vue +++ b/frontend/pages/product/[id].vue @@ -30,7 +30,7 @@ await useAsyncData(async () => { - +
diff --git a/frontend/public/img/blog-1.jpeg b/frontend/public/img/blog-1.jpeg new file mode 100644 index 0000000..8e3cab9 Binary files /dev/null and b/frontend/public/img/blog-1.jpeg differ diff --git a/frontend/public/img/blog-2.jpeg b/frontend/public/img/blog-2.jpeg new file mode 100644 index 0000000..1639cae Binary files /dev/null and b/frontend/public/img/blog-2.jpeg differ diff --git a/frontend/public/img/blog-3.jpeg b/frontend/public/img/blog-3.jpeg new file mode 100644 index 0000000..b03383b Binary files /dev/null and b/frontend/public/img/blog-3.jpeg differ diff --git a/frontend/public/img/blog-4.jpeg b/frontend/public/img/blog-4.jpeg new file mode 100644 index 0000000..647ce86 Binary files /dev/null and b/frontend/public/img/blog-4.jpeg differ diff --git a/frontend/types/global.d.ts b/frontend/types/global.d.ts index 6ee21e3..ee75637 100644 --- a/frontend/types/global.d.ts +++ b/frontend/types/global.d.ts @@ -57,6 +57,7 @@ declare global { "name": string, "slug": string, "icon": string, + "image" : string, "product_count": string, "parent": string, "show": boolean