diff --git a/src/assets/images/icon_add.png b/src/assets/images/icon_add.png new file mode 100644 index 0000000..2f79eca Binary files /dev/null and b/src/assets/images/icon_add.png differ diff --git a/src/assets/images/icon_love.png b/src/assets/images/icon_love.png new file mode 100644 index 0000000..09d8203 Binary files /dev/null and b/src/assets/images/icon_love.png differ diff --git a/src/assets/images/icon_star.png b/src/assets/images/icon_star.png new file mode 100644 index 0000000..1ff1691 Binary files /dev/null and b/src/assets/images/icon_star.png differ diff --git a/src/components/base/footer.vue b/src/components/base/footer.vue index a6fc55b..6e16bb3 100644 --- a/src/components/base/footer.vue +++ b/src/components/base/footer.vue @@ -1,6 +1,18 @@ + + diff --git a/src/components/canvasShow/basics/classifyheader/mixin.js b/src/components/canvasShow/basics/classifyheader/mixin.js new file mode 100644 index 0000000..849e356 --- /dev/null +++ b/src/components/canvasShow/basics/classifyheader/mixin.js @@ -0,0 +1,59 @@ +import {funMixin} from '../../config/mixin' +import { getClassify,getProducts } from '../../config/api' + +export const commonMixin = { + name: 'classifyheaderComponent', + mixins: [funMixin], + props: { + terminal: { + type: Number, + default: 4 + }, + typeId: { + type: Number, + default: 1 + }, + shopId: { + type: Number, + default: 0 + }, + componentContent: { + type: Object + } + }, + data () { + return { + classifyData: [], + productData:[], + activeTab : 0, + beginIndex: 0 + } + }, + mounted() { + this.getData() + }, + methods: { + async getData() { + const response = await getClassify() + const res = response.data + this.classifyData = res.data + this.activeTab = 0 + this.getProducts(this.classifyData[this.activeTab].id) + }, + classifyChange(item, index){ + this.activeTab = index + this.getProducts(item.id) + }, + async getProducts(classifyId){ + let params = { + page: 1, + pageSize: 20, + classifyId : classifyId + } + const response = await getProducts(params) + const res = response.data + this.productData = res.data.list + this.$forceUpdate() + } + } +} diff --git a/src/components/canvasShow/basics/classifyheader/pc/index.vue b/src/components/canvasShow/basics/classifyheader/pc/index.vue new file mode 100644 index 0000000..7b6d5b9 --- /dev/null +++ b/src/components/canvasShow/basics/classifyheader/pc/index.vue @@ -0,0 +1,326 @@ + + + + + diff --git a/src/components/canvasShow/basics/product/mixin.js b/src/components/canvasShow/basics/product/mixin.js index cdf1f61..d59f68d 100644 --- a/src/components/canvasShow/basics/product/mixin.js +++ b/src/components/canvasShow/basics/product/mixin.js @@ -59,7 +59,7 @@ export const commonMixin = { async getData(isFirst) { let params = { page: 1, - pageSize: 99 + pageSize: 20 } if (this.componentContent.productData.sourceType === '1') { if(this.componentContent.productData.productIdList && this.componentContent.productData.productIdList.length>0){ @@ -77,7 +77,15 @@ export const commonMixin = { } return } - } else { + } else if(this.componentContent.productData.sourceType === '3'){ + params.type='4' + } else if(this.componentContent.productData.sourceType === '4'){ + params.type='5' + }else if(this.componentContent.productData.sourceType === '5'){ + params.type='6' + }else if(this.componentContent.productData.sourceType === '6'){ + params.type='7' + }else { return } const response = await getProducts(params) diff --git a/src/components/canvasShow/basics/product/pc/index.vue b/src/components/canvasShow/basics/product/pc/index.vue index dd6ef5e..3eaa96d 100644 --- a/src/components/canvasShow/basics/product/pc/index.vue +++ b/src/components/canvasShow/basics/product/pc/index.vue @@ -27,7 +27,7 @@
@@ -75,7 +130,7 @@ import {commonMixin} from '../mixin'