diff --git a/components/category/category-scroller.vue b/components/category/category-scroller.vue new file mode 100644 index 0000000..8d2b8bf --- /dev/null +++ b/components/category/category-scroller.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/components/category/category-side-list.vue b/components/category/category-side-list.vue new file mode 100644 index 0000000..760d369 --- /dev/null +++ b/components/category/category-side-list.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/components/category/sort-bar.vue b/components/category/sort-bar.vue new file mode 100644 index 0000000..d0805e8 --- /dev/null +++ b/components/category/sort-bar.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/components/category/sub-tag-bar.vue b/components/category/sub-tag-bar.vue new file mode 100644 index 0000000..3d1d087 --- /dev/null +++ b/components/category/sub-tag-bar.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/components/category/tpl-category-goods.vue b/components/category/tpl-category-goods.vue new file mode 100644 index 0000000..70a8bd0 --- /dev/null +++ b/components/category/tpl-category-goods.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/pages/tabbar/category/category.vue b/pages/tabbar/category/category.vue index c4b251d..9869579 100644 --- a/pages/tabbar/category/category.vue +++ b/pages/tabbar/category/category.vue @@ -24,7 +24,7 @@ - + {{ item.name }} @@ -53,6 +53,12 @@ + @@ -61,10 +67,17 @@ import { ref, computed } from 'vue' import { onLoad, onReady } from '@dcloudio/uni-app' import { getCategoryList } from '@/api/goods.js' import { getThemeStyle } from '@/utils/theme' +import { DEFAULT_CATEGORY_PAGE_SETTING } from '@/utils/categoryPageSetting' import { useStore } from '@/store' +import TplCategoryGoods from '@/components/category/tpl-category-goods.vue' const store = useStore() +const categoryPageSetting = computed( + () => store.state.categoryPageSetting || DEFAULT_CATEGORY_PAGE_SETTING +) +const pageTemplate = computed(() => categoryPageSetting.value.template || 1) + const currentId = ref(0) const tabList = ref([]) // 左侧标题列表 const categoryList = ref([]) // 右侧分类数据列表