浏览代码

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

hgh 1 年之前
父节点
当前提交
a6e1e33bcb
共有 1 个文件被更改,包括 17 次插入 和 1 次删除
  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>
         <q-btn flat
-               :to="{name: 'Public.ContentCategoryParentParent.List'}">
+               :to="getSeeAllContentsRout()">
           مشاهده همه
           <svg xmlns="http://www.w3.org/2000/svg"
                width="18.387"
@@ -138,6 +138,22 @@ export default {
 
       this.contents.loading = true
       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
     }
   }
 }