|
@@ -141,22 +141,23 @@
|
|
|
CategorySearchFilterViewController * filterVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"CategorySearchFilterViewController"];
|
|
CategorySearchFilterViewController * filterVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"CategorySearchFilterViewController"];
|
|
|
|
|
|
|
|
//----------fake category filter----------------
|
|
//----------fake category filter----------------
|
|
|
- NSData* json =nil;
|
|
|
|
|
- json=[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"debug_category_filter" ofType:@"json" ]];
|
|
|
|
|
- NSError *error=nil;
|
|
|
|
|
- NSMutableDictionary* filter = [[NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error] mutableCopy];
|
|
|
|
|
- [self.category_data setObject:filter forKey:@"filter"];
|
|
|
|
|
|
|
+// NSData* json =nil;
|
|
|
|
|
+// json=[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"debug_category_filter" ofType:@"json" ]];
|
|
|
|
|
+// NSError *error=nil;
|
|
|
|
|
+// NSMutableDictionary* filter = [[NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error] mutableCopy];
|
|
|
|
|
+// [self.category_data setObject:filter forKey:@"filter"];
|
|
|
//----------fake category filter----------------
|
|
//----------fake category filter----------------
|
|
|
|
|
|
|
|
filterVC.alert_cadedate =[[self.category_data objectForKey:@"filter"] objectForKey:@"alert"];
|
|
filterVC.alert_cadedate =[[self.category_data objectForKey:@"filter"] objectForKey:@"alert"];
|
|
|
filterVC.qty_cadedate=[[self.category_data objectForKey:@"filter"] objectForKey:@"qty"];
|
|
filterVC.qty_cadedate=[[self.category_data objectForKey:@"filter"] objectForKey:@"qty"];
|
|
|
filterVC.availability_cadedate=[[self.category_data objectForKey:@"filter"] objectForKey:@"availability"];
|
|
filterVC.availability_cadedate=[[self.category_data objectForKey:@"filter"] objectForKey:@"availability"];
|
|
|
- filterVC.OkClick =^(NSString* available,NSString* QTY,NSString* alert)
|
|
|
|
|
|
|
+ filterVC.price_cadedate=[[self.category_data objectForKey:@"filter"] objectForKey:@"price"];
|
|
|
|
|
+ filterVC.OkClick =^(NSString* available,NSString* QTY,NSString* alert,NSString* price)
|
|
|
{
|
|
{
|
|
|
- self.p_alert=available;
|
|
|
|
|
|
|
+ self.p_alert=alert;
|
|
|
self.p_QTY=QTY;
|
|
self.p_QTY=QTY;
|
|
|
- self.p_available=alert;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ self.p_available=available;
|
|
|
|
|
+ self.p_price=price;
|
|
|
|
|
|
|
|
self.offset = 0;
|
|
self.offset = 0;
|
|
|
[self reload];
|
|
[self reload];
|
|
@@ -169,7 +170,7 @@
|
|
|
self.p_alert=nil;
|
|
self.p_alert=nil;
|
|
|
self.p_QTY=nil;
|
|
self.p_QTY=nil;
|
|
|
self.p_available=nil;
|
|
self.p_available=nil;
|
|
|
-
|
|
|
|
|
|
|
+ self.p_price=nil;
|
|
|
|
|
|
|
|
self.offset = 0;
|
|
self.offset = 0;
|
|
|
[self reload];
|
|
[self reload];
|
|
@@ -929,7 +930,7 @@
|
|
|
self.isrefreshing=true;
|
|
self.isrefreshing=true;
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
|
|
- NSDictionary* category_more=[iSalesNetwork Category:self.categoryid customid:0 price_template:0 sort:0 filter:nil keyword:nil offset:self.offset limit:20 alert:self.p_alert qty:self.p_QTY available:self.p_available] ;
|
|
|
|
|
|
|
+ NSDictionary* category_more=[iSalesNetwork Category:self.categoryid customid:0 price_template:0 sort:0 filter:nil keyword:nil offset:self.offset limit:20 alert:self.p_alert qty:self.p_QTY available:self.p_available price:self.p_price] ;
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
|
|
@@ -1007,7 +1008,7 @@
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
|
|
- NSDictionary* category_data=[iSalesNetwork Category:self.categoryid customid:0 price_template:0 sort:0 filter:nil keyword:nil offset:0 limit:20 alert:self.p_alert qty:self.p_QTY available:self.p_available];
|
|
|
|
|
|
|
+ NSDictionary* category_data=[iSalesNetwork Category:self.categoryid customid:0 price_template:0 sort:0 filter:nil keyword:nil offset:0 limit:20 alert:self.p_alert qty:self.p_QTY available:self.p_available price:self.p_price];
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
|
|
@@ -1940,6 +1941,8 @@
|
|
|
|
|
|
|
|
CGRect frame =self.collectionview.frame;
|
|
CGRect frame =self.collectionview.frame;
|
|
|
|
|
|
|
|
|
|
+ CGSize size123 =self.collectionview.contentSize;
|
|
|
|
|
+
|
|
|
UICollectionViewFlowLayout *flowLayout =(UICollectionViewFlowLayout*)[self.collectionview collectionViewLayout];
|
|
UICollectionViewFlowLayout *flowLayout =(UICollectionViewFlowLayout*)[self.collectionview collectionViewLayout];
|
|
|
if(flowLayout.scrollDirection== UICollectionViewScrollDirectionVertical)
|
|
if(flowLayout.scrollDirection== UICollectionViewScrollDirectionVertical)
|
|
|
{
|
|
{
|
|
@@ -1949,7 +1952,7 @@
|
|
|
// NSLog(@"frame.size.height %f",frame.size.height);
|
|
// NSLog(@"frame.size.height %f",frame.size.height);
|
|
|
// NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
|
|
// NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
|
|
|
|
|
|
|
|
- if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) || self.collectionview.contentSize.height < frame.size.height)
|
|
|
|
|
|
|
+ if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) /*|| self.collectionview.contentSize.height < frame.size.height*/)
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -1971,7 +1974,7 @@
|
|
|
// NSLog(@"frame.size.height %f",frame.size.height);
|
|
// NSLog(@"frame.size.height %f",frame.size.height);
|
|
|
// NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
|
|
// NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
|
|
|
|
|
|
|
|
- if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) || self.collectionview.contentSize.width < frame.size.width)
|
|
|
|
|
|
|
+ if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) /*|| self.collectionview.contentSize.width < frame.size.width*/)
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
if(self.isrefreshing)
|
|
if(self.isrefreshing)
|