|
@@ -27,19 +27,14 @@ var productList = new Vue({
|
|
userIdentity: '',
|
|
userIdentity: '',
|
|
userToken: '',
|
|
userToken: '',
|
|
addhtml:'<span class="tag">美博会</span>',
|
|
addhtml:'<span class="tag">美博会</span>',
|
|
- brandLists: [
|
|
|
|
- { name: '斯蒂芬斯', isChecked: false },
|
|
|
|
- { name: 'Beautsecre', isChecked: false },
|
|
|
|
- { name: '意大利DEP', isChecked: false },
|
|
|
|
- { name: '美生美', isChecked: false },
|
|
|
|
- { name: '三诺激光', isChecked: false },
|
|
|
|
- { name: '三诺激光', isChecked: false },
|
|
|
|
- { name: '三诺激光', isChecked: false },
|
|
|
|
- { name: '三诺激光', isChecked: false },
|
|
|
|
- { name: '三诺激光', isChecked: false },
|
|
|
|
- { name: '三诺激光', isChecked: false },
|
|
|
|
- { name: '三诺激光', isChecked: false },
|
|
|
|
- ],
|
|
|
|
|
|
+ brandParam: {
|
|
|
|
+ keyword: '',
|
|
|
|
+ id: '',
|
|
|
|
+ idType: '',
|
|
|
|
+ identity: 0
|
|
|
|
+ },
|
|
|
|
+ brandLists: [],
|
|
|
|
+ defaultBrandLists:[],
|
|
checkedBrandList:[],
|
|
checkedBrandList:[],
|
|
checkedBrandLength:0,
|
|
checkedBrandLength:0,
|
|
isProductScreen:false,
|
|
isProductScreen:false,
|
|
@@ -142,6 +137,23 @@ var productList = new Vue({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getCommoditySearchQUeryBrand:function() { // 查询筛选项品牌
|
|
|
|
+ var _self = this;
|
|
|
|
+ ProductApi.getCommoditySearchQUeryBrand(_self.brandParam,function (response) {
|
|
|
|
+ console.log(response);
|
|
|
|
+ if (response.code === 0 && response.data ) {
|
|
|
|
+ var data = response.data;
|
|
|
|
+ _self.defaultBrandLists = data.map((el, index) => {
|
|
|
|
+ el.isChecked = false;
|
|
|
|
+ return el;
|
|
|
|
+ })
|
|
|
|
+ _self.brandLists = _self.defaultBrandLists.slice(0,8)
|
|
|
|
+ console.log('品牌=============>', this.brandLists)
|
|
|
|
+ }else {
|
|
|
|
+ console.log('查询品牌列表异常')
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
choiceBrand:function(brand,index){// 选择品牌
|
|
choiceBrand:function(brand,index){// 选择品牌
|
|
var _self = this;
|
|
var _self = this;
|
|
brand.isChecked = !brand.isChecked
|
|
brand.isChecked = !brand.isChecked
|
|
@@ -158,15 +170,27 @@ var productList = new Vue({
|
|
},
|
|
},
|
|
hanldCheckedActivi:function(){// 选择促销商品选项
|
|
hanldCheckedActivi:function(){// 选择促销商品选项
|
|
this.isActiviChecked = !this.isActiviChecked;
|
|
this.isActiviChecked = !this.isActiviChecked;
|
|
|
|
+ if(this.isActiviChecked){
|
|
|
|
+ this.listQuery.promotionFlag = 1
|
|
|
|
+ }else{
|
|
|
|
+ this.listQuery.promotionFlag = 0
|
|
|
|
+ }
|
|
},
|
|
},
|
|
hanldCheckedNews:function(){// 选择新品选项
|
|
hanldCheckedNews:function(){// 选择新品选项
|
|
this.isNewsChecked = !this.isNewsChecked;
|
|
this.isNewsChecked = !this.isNewsChecked;
|
|
|
|
+ if(this.isNewsChecked){
|
|
|
|
+ this.listQuery.newFlag = 1
|
|
|
|
+ }else{
|
|
|
|
+ this.listQuery.newFlag = 0
|
|
|
|
+ }
|
|
},
|
|
},
|
|
showIsProductScreen:function(){//
|
|
showIsProductScreen:function(){//
|
|
this.isProductScreen = true;
|
|
this.isProductScreen = true;
|
|
},
|
|
},
|
|
handleConfirmScreen:function(){
|
|
handleConfirmScreen:function(){
|
|
this.isProductScreen = false;
|
|
this.isProductScreen = false;
|
|
|
|
+ this.params.num = 1;
|
|
|
|
+ this.getListByKeyword();
|
|
}
|
|
}
|
|
// getListByCategory: function (path, categoryId) {
|
|
// getListByCategory: function (path, categoryId) {
|
|
// var _self = this;
|
|
// var _self = this;
|
|
@@ -208,7 +232,7 @@ var productList = new Vue({
|
|
this.params.size = 10;
|
|
this.params.size = 10;
|
|
this.params.num = 1;
|
|
this.params.num = 1;
|
|
}
|
|
}
|
|
- this.params.keyword = getUrlParam("keyword") ? getUrlParam("keyword") : "";
|
|
|
|
|
|
+ this.params.keyword = this.brandParam.keyword = getUrlParam("keyword") ? getUrlParam("keyword") : "";
|
|
// 搜索框赋值
|
|
// 搜索框赋值
|
|
$('#topSearch').find('[data-select]').attr("data-select", 0).text("产品");
|
|
$('#topSearch').find('[data-select]').attr("data-select", 0).text("产品");
|
|
$('#topSearch').find('.jqSelect').find('select').val(0);
|
|
$('#topSearch').find('.jqSelect').find('select').val(0);
|
|
@@ -228,7 +252,8 @@ var productList = new Vue({
|
|
}
|
|
}
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
this.getListByKeyword();
|
|
this.getListByKeyword();
|
|
-
|
|
|
|
|
|
+ // 获取对应品牌列表
|
|
|
|
+ this.getCommoditySearchQUeryBrand();
|
|
// if (this.searchFlag) {
|
|
// if (this.searchFlag) {
|
|
// // 获取列表数据
|
|
// // 获取列表数据
|
|
// this.getListByKeyword();
|
|
// this.getListByKeyword();
|
|
@@ -274,6 +299,7 @@ var productList = new Vue({
|
|
_self.params.num = next;
|
|
_self.params.num = next;
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
_self.getListByKeyword();
|
|
_self.getListByKeyword();
|
|
|
|
+
|
|
// if (_self.searchFlag) {
|
|
// if (_self.searchFlag) {
|
|
// // 获取列表数据
|
|
// // 获取列表数据
|
|
// _self.getListByKeyword();
|
|
// _self.getListByKeyword();
|