소스 검색

分类跳转优化

Abel 1 년 전
부모
커밋
9bd301bf3d

+ 4 - 2
Asteria/Fuction/Home/ASProductListViewController.m

@@ -218,7 +218,8 @@
         default: {
         default: {
             if (indexPath.row == 0 && self.vm.cateModel.image.length > 0) {
             if (indexPath.row == 0 && self.vm.cateModel.image.length > 0) {
                 ASProductListImageCell *c = [collectionView dequeueReusableCellWithReuseIdentifier:@"ASProductListImageCell" forIndexPath:indexPath];
                 ASProductListImageCell *c = [collectionView dequeueReusableCellWithReuseIdentifier:@"ASProductListImageCell" forIndexPath:indexPath];
-                [c setImgStr:[NSString stringWithFormat:@"https://%@%@",HostPath, self.vm.cateModel.image]];
+                [c setImgStr:self.vm.cateModel.image];
+//                [c setImgStr:[NSString stringWithFormat:@"https://%@%@",HostPath, self.vm.cateModel.image]];
                 return c;
                 return c;
                 
                 
             }
             }
@@ -463,7 +464,8 @@
 }
 }
 
 
 -(void)showSortV {
 -(void)showSortV {
-    [self.sortTypeV showAnimate:![self.keyWord isEqualToString:@""]];
+    BOOL isSearch = self.keyWord != nil && self.keyWord.length > 0;
+    [self.sortTypeV showAnimate:isSearch];
 }
 }
 
 
 -(void)showMenuV {
 -(void)showMenuV {

+ 2 - 1
Asteria/Fuction/Home/Target_Home.m

@@ -29,7 +29,8 @@
 - (UIViewController *)Action_getProductListVc:(NSDictionary *)params {
 - (UIViewController *)Action_getProductListVc:(NSDictionary *)params {
     ASProductListViewController *vc = [[ASProductListViewController alloc] init];
     ASProductListViewController *vc = [[ASProductListViewController alloc] init];
     vc.titleStr = params[@"title"];
     vc.titleStr = params[@"title"];
-    if ([params valueForKey:@"searchKey"] != nil) {
+    NSString *keyStr = [params valueForKey:@"searchKey"];
+    if (keyStr != nil && keyStr.length > 0) {
         vc.keyWord = params[@"searchKey"];
         vc.keyWord = params[@"searchKey"];
     }
     }
     if ([params valueForKey:@"type"] != nil) {
     if ([params valueForKey:@"type"] != nil) {

+ 2 - 2
Asteria/Fuction/Home/Views/productList/ASProductSortFilterView.m

@@ -73,7 +73,7 @@
 }
 }
 
 
 - (void)configSubV {
 - (void)configSubV {
-    self.titles = @[@"Popular",@"Price",@"Sold Quantity"];
+    self.titles = @[@"Featured",@"Price:Low to Heigh", @"Price:Heigh to Low",@"Best Selling"];
     self.currentIndex = 0;
     self.currentIndex = 0;
     
     
     [self addSubview:self.topV];
     [self addSubview:self.topV];
@@ -100,7 +100,7 @@
     [self.bottomV mas_makeConstraints:^(MASConstraintMaker *make) {
     [self.bottomV mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.topV.mas_bottom);
         make.top.equalTo(self.topV.mas_bottom);
         make.left.right.equalTo(self);
         make.left.right.equalTo(self);
-        make.height.equalTo(@(190 + kBottomSafeSpace));
+        make.height.equalTo(@(247 + kBottomSafeSpace));
         make.bottom.equalTo(self);
         make.bottom.equalTo(self);
     }];
     }];
     [self.tableV mas_makeConstraints:^(MASConstraintMaker *make) {
     [self.tableV mas_makeConstraints:^(MASConstraintMaker *make) {