...
|
...
|
@@ -48,19 +48,28 @@ Page({ |
|
|
},
|
|
|
onLoad: function (option) {
|
|
|
try{
|
|
|
console.log('====================================');
|
|
|
console.log(option);
|
|
|
console.log('====================================');
|
|
|
if(option){
|
|
|
let categoryId = option.categoryId;
|
|
|
let firstProductSkn = option.firstProductSkn;
|
|
|
// let navigate = option.navigate;
|
|
|
let sort = option.sort;
|
|
|
let subCategoryId = option.subCategoryId;
|
|
|
let title = option.title;
|
|
|
let firstProductSkn = option.firstProductSkn ? option.firstProductSkn : '';
|
|
|
let sort = option.sort ? option.sort : '';
|
|
|
let subCategoryId = option.subCategoryId ? option.subCategoryId : '';
|
|
|
let title = option.title ? option.title : '';
|
|
|
let gender = option.gender ? option.gender : '';
|
|
|
console.log("categoryId:"+categoryId+"==subCategoryId:"+subCategoryId+"==sort:"+sort+"==firstProductSkn:"+firstProductSkn);
|
|
|
|
|
|
this.data.categoryId = option.categoryId;
|
|
|
this.data.subCategoryId = option.subCategoryId;
|
|
|
this.data.sort = option.sort;
|
|
|
this.data.firstProductSkn = option.firstProductSkn;
|
|
|
this.data.categoryId = categoryId;
|
|
|
this.data.subCategoryId = subCategoryId;
|
|
|
this.data.sort = sort;
|
|
|
this.data.firstProductSkn = firstProductSkn;
|
|
|
this.data.title = title;
|
|
|
this.data.gender = gender;
|
|
|
|
|
|
tt.setNavigationBarTitle({
|
|
|
title: title
|
|
|
});
|
|
|
}
|
|
|
let systemInfo = tt.getSystemInfoSync();
|
|
|
let contentWidth = systemInfo.screenWidth;
|
...
|
...
|
@@ -81,10 +90,21 @@ Page({ |
|
|
},
|
|
|
onShow: function () {
|
|
|
if(this.data.isRefresh){
|
|
|
let filter = this.data.filter;
|
|
|
if(filter){
|
|
|
for(var i = 0; i < filter.length; i++){
|
|
|
let filterItem = filter[i];
|
|
|
let itemId = filterItem.filterId;
|
|
|
let selectedIdParam = filterItem.selectedIdParam;
|
|
|
if(selectedIdParam){
|
|
|
this.data.filterParams[itemId] = selectedIdParam;
|
|
|
}
|
|
|
}
|
|
|
let current = this.data.activeIndex
|
|
|
let tab = this.data.tabs[current];
|
|
|
this.fechProductList(tab,1);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
onTabClick: function (e) {
|
|
|
|
...
|
...
|
@@ -145,16 +165,18 @@ Page({ |
|
|
let categoryId = that.data.categoryId;
|
|
|
let subCategoryId = that.data.subCategoryId;
|
|
|
let firstProductSkn = that.data.firstProductSkn;
|
|
|
let title = that.data.title;
|
|
|
let gender = that.data.gender;
|
|
|
let param = {
|
|
|
method: "app.search.category",
|
|
|
firstProductSkn: firstProductSkn,
|
|
|
gender:"1,3",
|
|
|
limit: 10,
|
|
|
gender,
|
|
|
limit: 60,
|
|
|
page: currentPage,
|
|
|
sort: sort,
|
|
|
subCategoryId: subCategoryId,
|
|
|
title: "POLO",
|
|
|
order: order,
|
|
|
categoryId,
|
|
|
subCategoryId,
|
|
|
title
|
|
|
}
|
|
|
let params = Object.assign(filterParams, param);
|
|
|
api.get({data: params})
|
...
|
...
|
|