Browse Source

لینک مشاهده همه بسته به کانفیگ ویجت عوض بشه

hgh 1 year ago
parent
commit
a6e1e33bcb
1 changed files with 17 additions and 1 deletions
  1. 17 1
      src/components/Widgets/Content/ContentCarousel/ContentCarousel.vue

+ 17 - 1
src/components/Widgets/Content/ContentCarousel/ContentCarousel.vue

@@ -8,7 +8,7 @@
       </div>
       </div>
       <div>
       <div>
         <q-btn flat
         <q-btn flat
-               :to="{name: 'Public.ContentCategoryParentParent.List'}">
+               :to="getSeeAllContentsRout()">
           مشاهده همه
           مشاهده همه
           <svg xmlns="http://www.w3.org/2000/svg"
           <svg xmlns="http://www.w3.org/2000/svg"
                width="18.387"
                width="18.387"
@@ -138,6 +138,22 @@ export default {
 
 
       this.contents.loading = true
       this.contents.loading = true
       return APIGateway.content.index(params)
       return APIGateway.content.index(params)
+    },
+    getSeeAllContentsRout () {
+      let route = { name: 'Public.ContentCategoryParentParent.List' }
+
+      if (this.localOptions.categoryCategoryCategoryId) {
+        route = { name: 'Public.ContentCategoryParentParent.Show', params: { category_id: this.localOptions.categoryCategoryCategoryId } }
+      }
+
+      if (this.localOptions.categoryCategoryId) {
+        route = { name: 'Public.ContentCategoryParentParent.Show', params: { category_id: this.localOptions.categoryCategoryId } }
+      }
+
+      if (this.localOptions.categoryId) {
+        route = { name: 'Public.ContentCategoryParentParent.Show', params: { category_id: this.localOptions.categoryId } }
+      }
+      return route
     }
     }
   }
   }
 }
 }