Authored by 肖亚东

筛选不显示修改 — review by 黄敬囿

... ... @@ -49,12 +49,12 @@ Page({
onLoad: function (option) {
try{
if(option){
let categoryId = option.categoryId;
let firstProductSkn = option.firstProductSkn ? option.firstProductSkn : '';
let categoryId = option.categoryId || '';
let 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 : '';
let subCategoryId = option.subCategoryId || '';
let title = option.title || '';
let gender = option.gender || '';
console.log("categoryId:"+categoryId+"==subCategoryId:"+subCategoryId+"==sort:"+sort+"==firstProductSkn:"+firstProductSkn);
this.data.categoryId = categoryId;
... ... @@ -124,11 +124,11 @@ Page({
if(tabData && tabData.page){
page = tabData.page;
}
this.fechProductList(tab,page);
this.fechProductList(tab, page);
}
},
fechProductList: function (tab,currentPage) {
fechProductList: function (tab, currentPage) {
let filterParams = this.data.filterParams;
let id = tab.id;
let orderType = tab.iconType;
... ... @@ -167,6 +167,7 @@ Page({
let param = {
method: "app.search.category",
firstProductSkn: firstProductSkn,
order,
gender,
limit: 60,
page: currentPage,
... ... @@ -207,6 +208,9 @@ Page({
// tablist[id].iconUrl = iconUrl;
// console.log("id:"+id)
console.log('====================================');
console.log(tabs);
console.log('====================================');
that.setData({
tabs: tabs,
activeIndex: id,
... ...
... ... @@ -2,8 +2,8 @@
<tabCell id="tabCell" tabs="{{tabs}}" bind:onTabClick="onTabClick"/>
<view style="position: absolute;top: 92rpx;width: {{contentWidth}}px;height:{{contentHeight}}px;">
<swiper current="{{activeIndex}}">
<swiper-item tt:for="{{tabs}}" tt:for-item="tab" tt:key="{{tabs[activeIndex].id}}" catchtouchmove='catchTouchMove'>
<block tt:if="{{tab && tab.data && tab.data.product_list && tab.data.product_list.length >0}}">
<swiper-item tt:for="{{tabs}}" tt:for-item="tab" tt:key="{{index}}" catchtouchmove='catchTouchMove'>
<block tt:if="{{tab && tab.data && tab.data.product_list && tab.data.product_list .length > 0}}">
<scroll-view style="height:{{contentHeight}}px" scroll-y="true" bindscrolltolower="onLoadMore">
<view class="scroll-content">
<block tt:for="{{tab.data.product_list}}" tt:for-item="product" tt:key="{{index}}">
... ...