|
@@ -7,7 +7,8 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
<product-category-filter v-model="categoryIds" :firstCategory="firstCategory"></product-category-filter>
|
|
<product-category-filter v-model="categoryIds" :firstCategory="firstCategory"></product-category-filter>
|
|
|
- <country v-model="countries"></country>
|
|
|
|
|
|
|
+ <country v-model="continent" :country.sync="countries"></country>
|
|
|
|
|
+ <product-brand v-model="brand" v-if="pageType === 'product'"></product-brand>
|
|
|
<product-tags v-model="tagIds" v-if="pageType === 'product'"></product-tags>
|
|
<product-tags v-model="tagIds" v-if="pageType === 'product'"></product-tags>
|
|
|
<enterprise-type v-model="enterpriseType" v-if="pageType === 'vendor'"></enterprise-type>
|
|
<enterprise-type v-model="enterpriseType" v-if="pageType === 'vendor'"></enterprise-type>
|
|
|
<application v-model="applicationField" v-if="pageType === 'product'"></application>
|
|
<application v-model="applicationField" v-if="pageType === 'product'"></application>
|
|
@@ -30,6 +31,7 @@ import Country from '../components/filter/Country';
|
|
|
import ProductTags from '../components/filter/ProductTags';
|
|
import ProductTags from '../components/filter/ProductTags';
|
|
|
import Application from '../components/filter/Application';
|
|
import Application from '../components/filter/Application';
|
|
|
import EnterpriseType from '../components/filter/EnterpriseType';
|
|
import EnterpriseType from '../components/filter/EnterpriseType';
|
|
|
|
|
+import ProductBrand from '../components/filter/ProductBrand.vue';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -40,7 +42,8 @@ export default {
|
|
|
tagIds: '',
|
|
tagIds: '',
|
|
|
applicationField: '',
|
|
applicationField: '',
|
|
|
enterpriseType: '',
|
|
enterpriseType: '',
|
|
|
- firstCategory: ''
|
|
|
|
|
|
|
+ firstCategory: '',
|
|
|
|
|
+ continent: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
@@ -48,13 +51,16 @@ export default {
|
|
|
if (this.$mp.options.pageType === 'vendor') {
|
|
if (this.$mp.options.pageType === 'vendor') {
|
|
|
this.categoryIds = this.$mp.options.categoryIds;
|
|
this.categoryIds = this.$mp.options.categoryIds;
|
|
|
this.countries = this.$mp.options.countries;
|
|
this.countries = this.$mp.options.countries;
|
|
|
|
|
+ this.continent = this.$mp.options.continent;
|
|
|
this.enterpriseType = this.$mp.options.enterpriseType;
|
|
this.enterpriseType = this.$mp.options.enterpriseType;
|
|
|
} else if (this.$mp.options.pageType === 'product') {
|
|
} else if (this.$mp.options.pageType === 'product') {
|
|
|
this.categoryIds = this.$mp.options.categoryIds;
|
|
this.categoryIds = this.$mp.options.categoryIds;
|
|
|
this.countries = this.$mp.options.countries;
|
|
this.countries = this.$mp.options.countries;
|
|
|
this.firstCategory = this.$mp.options.firstCategory;
|
|
this.firstCategory = this.$mp.options.firstCategory;
|
|
|
|
|
+ this.continent = this.$mp.options.continent;
|
|
|
this.tagIds = this.$mp.options.tagIds;
|
|
this.tagIds = this.$mp.options.tagIds;
|
|
|
this.applicationField = this.$mp.options.applicationField;
|
|
this.applicationField = this.$mp.options.applicationField;
|
|
|
|
|
+ this.brand = this.$mp.options.brand;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
@@ -62,7 +68,8 @@ export default {
|
|
|
Country,
|
|
Country,
|
|
|
ProductTags,
|
|
ProductTags,
|
|
|
Application,
|
|
Application,
|
|
|
- EnterpriseType
|
|
|
|
|
|
|
+ EnterpriseType,
|
|
|
|
|
+ ProductBrand
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
restart() {
|
|
restart() {
|
|
@@ -72,11 +79,13 @@ export default {
|
|
|
this.tagIds = '';
|
|
this.tagIds = '';
|
|
|
this.applicationField = '';
|
|
this.applicationField = '';
|
|
|
this.enterpriseType = '';
|
|
this.enterpriseType = '';
|
|
|
|
|
+ this.continent = '';
|
|
|
},
|
|
},
|
|
|
submit() {
|
|
submit() {
|
|
|
this.$store.commit('setFilterInfo', {
|
|
this.$store.commit('setFilterInfo', {
|
|
|
categoryIds: this.categoryIds,
|
|
categoryIds: this.categoryIds,
|
|
|
countries: this.countries,
|
|
countries: this.countries,
|
|
|
|
|
+ continent: this.continent,
|
|
|
brand: this.brand,
|
|
brand: this.brand,
|
|
|
tagIds: this.tagIds,
|
|
tagIds: this.tagIds,
|
|
|
applicationField: this.applicationField,
|
|
applicationField: this.applicationField,
|