Commit ca57cf3c by houweibin

1,moncler商品滑动至底会出现无数据ui的问题。

2,首页商品列表出现重复的问题
parent b1906ed2
...@@ -424,10 +424,13 @@ static NSString *idStr = @"KWMBrandCaramelCell"; ...@@ -424,10 +424,13 @@ static NSString *idStr = @"KWMBrandCaramelCell";
} }
[KWMPPCacheUtil saveDataToCache:parameters urlKey:CACHE_KEY_SDK_getProductsPage products:result]; [KWMPPCacheUtil saveDataToCache:parameters urlKey:CACHE_KEY_SDK_getProductsPage products:result];
if(!result || result.count == 0){ if(!result || result.count == 0){
if(tagetPage == 1){
weakSelf.vNoneGoods.hidden = NO; weakSelf.vNoneGoods.hidden = NO;
[weakSelf.dataList removeAllObjects]; [weakSelf.dataList removeAllObjects];
[self.tbvBrandCaramel reloadData]; [self.tbvBrandCaramel reloadData];
}
weakSelf.hasNextPage = NO; weakSelf.hasNextPage = NO;
[weakSelf appendDataList:[NSArray array] setPage:tagetPage];
}else{ }else{
if(tagetPage == 1){ if(tagetPage == 1){
[weakSelf.dataList removeAllObjects]; [weakSelf.dataList removeAllObjects];
......
...@@ -350,6 +350,10 @@ typedef enum{ ...@@ -350,6 +350,10 @@ typedef enum{
[self.client getProductsPage:cpage inCollection:collection.identifier withTags:tags sortOrder:BUYCollectionSortCollectionDefault completion:^(NSArray<BUYProduct *> * _Nullable products, NSUInteger page, BOOL reachedEnd, NSError * _Nullable error) { [self.client getProductsPage:cpage inCollection:collection.identifier withTags:tags sortOrder:BUYCollectionSortCollectionDefault completion:^(NSArray<BUYProduct *> * _Nullable products, NSUInteger page, BOOL reachedEnd, NSError * _Nullable error) {
if (!error) { if (!error) {
[KWMPPCacheUtil saveDataToCache:parameters urlKey:CACHE_KEY_SDK_getCollectionByHandle_getProductsPage products:products]; [KWMPPCacheUtil saveDataToCache:parameters urlKey:CACHE_KEY_SDK_getCollectionByHandle_getProductsPage products:products];
if(isHome && cpage == 1){
//清除预先显示的缓存商品
self.productArray.removeAllObjects;
}
[self setValue:products forKeyPath:valueKeyPath]; [self setValue:products forKeyPath:valueKeyPath];
[self.cvHome reloadData]; [self.cvHome reloadData];
}else{ }else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment