Prechádzať zdrojové kódy

搜索和category页面添加

iOS-Abel 2 rokov pred
rodič
commit
a8a6f638b3
25 zmenil súbory, kde vykonal 627 pridanie a 26 odobranie
  1. 12 0
      Asteria.xcodeproj/project.pbxproj
  2. 5 2
      Asteria/ASUI/SimpleBase/ASBaseViewController.h
  3. 76 1
      Asteria/ASUI/SimpleBase/ASBaseViewController.m
  4. 3 2
      Asteria/ASUI/alert/ASDefualtAlertV.m
  5. 1 0
      Asteria/ASUI/alert/ASHomeAlertWindow.h
  6. 8 0
      Asteria/ASUI/alert/ASHomeAlertWindow.m
  7. 22 0
      Asteria/Fuction/Category/Category.xcassets/search_his_clean.imageset/Contents.json
  8. BIN
      Asteria/Fuction/Category/Category.xcassets/search_his_clean.imageset/ICON_CLAER@2x.png
  9. BIN
      Asteria/Fuction/Category/Category.xcassets/search_his_clean.imageset/ICON_CLAER@3x.png
  10. 22 0
      Asteria/Fuction/Category/Category.xcassets/search_tf.imageset/Contents.json
  11. BIN
      Asteria/Fuction/Category/Category.xcassets/search_tf.imageset/搜索@2x.png
  12. BIN
      Asteria/Fuction/Category/Category.xcassets/search_tf.imageset/搜索@3x.png
  13. 7 2
      Asteria/Fuction/Category/Target_Category.m
  14. 2 2
      Asteria/Fuction/Category/tipV/KWHisCollectHeaderView.m
  15. 16 0
      Asteria/Fuction/Category/vc/ASCategoryViewController.h
  16. 164 0
      Asteria/Fuction/Category/vc/ASCategoryViewController.m
  17. 16 0
      Asteria/Fuction/Category/vc/ASSearchViewController.h
  18. 238 0
      Asteria/Fuction/Category/vc/ASSearchViewController.m
  19. 1 1
      Asteria/Fuction/Category/vc/KWSearchViewController.h
  20. 0 3
      Asteria/Fuction/Category/vc/KWSearchViewController.m
  21. 1 6
      Asteria/Fuction/Home/Views/productList/KWProductMenuFilterView.m
  22. 11 1
      Asteria/Fuction/UserCenter/Message/ASMessageListViewController.m
  23. 3 0
      Asteria/Fuction/UserCenter/Setting/ASInfomationSetController.m
  24. 2 6
      Asteria/Fuction/UserCenter/VipCenter/ASVipCouponsViewController.m
  25. 17 0
      Asteria/Tabber/AS_TabBarViewController.m

+ 12 - 0
Asteria.xcodeproj/project.pbxproj

@@ -104,6 +104,8 @@
 		817244B029F3B2EE005FA9C9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 817244AF29F3B2EE005FA9C9 /* main.m */; };
 		817244BE29F3B81C005FA9C9 /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = 817244BD29F3B81C005FA9C9 /* NotificationService.m */; };
 		817244C229F3B81C005FA9C9 /* NotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 817244BA29F3B81C005FA9C9 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		8186564A2A5BE9790049D861 /* ASSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 818656492A5BE9790049D861 /* ASSearchViewController.m */; };
+		8186564D2A5BF6010049D861 /* ASCategoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8186564C2A5BF6010049D861 /* ASCategoryViewController.m */; };
 		81932E2B29F7539B007C37AF /* UIColor+AS.m in Sources */ = {isa = PBXBuildFile; fileRef = 81932E2A29F7539B007C37AF /* UIColor+AS.m */; };
 		819900222A020A6F006FE68C /* LYTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 819900212A020A6F006FE68C /* LYTools.m */; };
 		81BEA6832A2D7CF3009D36C4 /* UITableView+ASBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 81BEA6822A2D7CF3009D36C4 /* UITableView+ASBase.m */; };
@@ -424,6 +426,10 @@
 		817244BC29F3B81C005FA9C9 /* NotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationService.h; sourceTree = "<group>"; };
 		817244BD29F3B81C005FA9C9 /* NotificationService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationService.m; sourceTree = "<group>"; };
 		817244BF29F3B81C005FA9C9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		818656482A5BE9790049D861 /* ASSearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASSearchViewController.h; sourceTree = "<group>"; };
+		818656492A5BE9790049D861 /* ASSearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASSearchViewController.m; sourceTree = "<group>"; };
+		8186564B2A5BF6010049D861 /* ASCategoryViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCategoryViewController.h; sourceTree = "<group>"; };
+		8186564C2A5BF6010049D861 /* ASCategoryViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCategoryViewController.m; sourceTree = "<group>"; };
 		81932E2929F7539B007C37AF /* UIColor+AS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIColor+AS.h"; sourceTree = "<group>"; };
 		81932E2A29F7539B007C37AF /* UIColor+AS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+AS.m"; sourceTree = "<group>"; };
 		8199001E2A0206F7006FE68C /* SizeDefine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SizeDefine.h; sourceTree = "<group>"; };
@@ -985,6 +991,10 @@
 				81717CF02A3C4ADE00648139 /* APCategoryViewController.m */,
 				81717CED2A3C4ADE00648139 /* KWSearchViewController.h */,
 				81717CEF2A3C4ADE00648139 /* KWSearchViewController.m */,
+				818656482A5BE9790049D861 /* ASSearchViewController.h */,
+				818656492A5BE9790049D861 /* ASSearchViewController.m */,
+				8186564B2A5BF6010049D861 /* ASCategoryViewController.h */,
+				8186564C2A5BF6010049D861 /* ASCategoryViewController.m */,
 			);
 			path = vc;
 			sourceTree = "<group>";
@@ -2095,6 +2105,7 @@
 				81354BFC2A28998B0082C93A /* KWMineMoreProductTypeCell.m in Sources */,
 				9AD6A5492A1237D0001DE3D9 /* Target_Login.m in Sources */,
 				9A337E3A2A04EE1A00D058A5 /* Target_B.m in Sources */,
+				8186564D2A5BF6010049D861 /* ASCategoryViewController.m in Sources */,
 				9AD6A5452A1218E8001DE3D9 /* EamilTFmatchV.m in Sources */,
 				9AD345FF2A08D60F005CA070 /* ZFPlayerNotification.m in Sources */,
 				81717D282A3C55CC00648139 /* CTMediator+Categorys.m in Sources */,
@@ -2143,6 +2154,7 @@
 				81932E2B29F7539B007C37AF /* UIColor+AS.m in Sources */,
 				9ACBEC282A1472AF00A8F97A /* LoginSignUpV.m in Sources */,
 				9AD346152A08D60F005CA070 /* ZFPortraitControlView.m in Sources */,
+				8186564A2A5BE9790049D861 /* ASSearchViewController.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 5 - 2
Asteria/ASUI/SimpleBase/ASBaseViewController.h

@@ -15,9 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, strong) UIView *customNavBar;
 @property (nonatomic, copy) NSString *titleStr;
 @property (nonatomic, strong) UIImage *titleImg;
+@property (nonatomic, strong) UIView *nav_bottomLineV;
 
-@property (nonatomic, strong) UIView *leftV;
-@property (nonatomic, strong) UIView *rightV;
 
 @property (nonatomic, strong) UILabel *nav_titleLB;
 
@@ -25,6 +24,10 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)setNavRightSearch:(btnClickBlock)nav_searchAction;
 
+- (void)hiddenEmpty;
+
+- (void)showEmptyV:(UIView *)v;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 76 - 1
Asteria/ASUI/SimpleBase/ASBaseViewController.m

@@ -14,13 +14,16 @@
 @property (nonatomic, strong) UIButton *tfBt;
 @property (nonatomic, copy) btnClickBlock tapSearchBlock;
 
-@property (nonatomic, strong) UIView *nav_bottomLineV;
+
 
 @property (nonatomic, strong) UIButton *backBt;
 
 @property (nonatomic, strong) UIButton *searchNavBt;
 @property (nonatomic, copy) btnClickBlock nav_searchBlock;
 
+@property (nonatomic, strong) UIView *emptyV;
+@property (nonatomic, strong) UIView *emptylb;
+
 
 
 @end
@@ -32,6 +35,42 @@
     self.nav_titleLB.text = _titleStr;
 }
 
+- (void)hiddenEmpty {
+    self.emptyV.hidden = true;
+}
+
+- (void)showEmptyV:(UIView *)v {
+    if (self.emptyV.superview != nil) {
+        self.emptyV.hidden = false;
+        [self.emptyV.superview bringSubviewToFront:self.emptyV];
+        return;
+    }
+    if (v == nil) {
+        [self.view addSubview:self.emptyV];
+        [self.emptyV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(self.customNavBar.mas_bottom);
+            make.leading.trailing.bottom.equalTo(self.view);
+        }];
+    } else {
+        [v addSubview:self.emptyV];
+        [self.emptyV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.equalTo(v);
+            make.width.height.equalTo(v);
+        }];
+    }
+    self.emptyV.hidden = false;
+    [self.emptyV.superview bringSubviewToFront:self.emptyV];
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [UIView viewAddHorColorBg:self.emptyV colorArr:@[
+            (id)_E0FFF5.CGColor,
+            (id)Col_FFF.CGColor
+        ] startP:CGPointMake(0.5, 0.25) endP:CGPointMake(0.5, 1)];
+        [self.emptyV bringSubviewToFront:self.emptylb];
+    });
+    
+}
+
 
 - (void)viewDidLoad {
     [super viewDidLoad];
@@ -115,10 +154,21 @@
     if (self.navigationController.viewControllers.count > 1) {
         self.backBt.hidden = false;
     }
+    
+    
+    [self.emptyV addSubview:self.emptylb];
+    [self.emptylb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.leading.equalTo(self.emptyV).offset(30);
+        make.trailing.equalTo(self.emptyV).offset(-30);
+        make.centerY.equalTo(self.emptyV).offset(-30);
+        make.top.greaterThanOrEqualTo(self.emptyV).offset(20);
+    }];
 }
 
 // MARK: - actions
 - (void)searchBtAction {
+    UIViewController *vc = [CTMediator.sharedInstance getSearchVc:@{}];
+    [self presentViewController:vc animated:true completion:nil];
     if (self.tapSearchBlock) {
         self.tapSearchBlock();
     }
@@ -127,6 +177,29 @@
 
 // MARK: - subVs
 
+- (UIView *)emptyV {
+    if (!_emptyV) {
+        UIView *v = [UIView baseV];
+        v.backgroundColor = Col_FFF;
+        v.hidden = true;
+        _emptyV = v;
+    }
+    return _emptyV;
+}
+
+- (UIView *)emptylb {
+    if (!_emptylb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_Medium size:72];
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.numberOfLines = 0;
+        lb.text = @"No Data";
+        lb.textColor = _043632;
+        _emptylb = lb;
+    }
+    return _emptylb;
+}
+
 - (UIView *)statusBgV {
     if (!_statusBgV) {
         UIView *v = [UIView baseV];
@@ -231,6 +304,8 @@
 
 // MARK: - actions
 - (void)search_navAction {
+    UIViewController *vc = [CTMediator.sharedInstance getSearchVc:@{}];
+    [self presentViewController:vc animated:true completion:nil];
     if (self.nav_searchBlock) {
         self.nav_searchBlock();
     }

+ 3 - 2
Asteria/ASUI/alert/ASDefualtAlertV.m

@@ -55,9 +55,10 @@
     [self.bgV addSubview:self.msgLb];
     [self.bgV addSubview:self.closeBt];
     [self.msgLb mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.bottom.trailing.equalTo(self.bgV).offset(-30);
+        make.bottom.equalTo(self.bgV).offset(-30);
+        make.trailing.equalTo(self.bgV).offset(-20);
         make.top.equalTo(self.closeBt.mas_bottom).offset(10);
-        make.leading.equalTo(self.bgV).offset(30);
+        make.leading.equalTo(self.bgV).offset(20);
     }];
     [self.closeBt mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self.bgV).offset(10);

+ 1 - 0
Asteria/ASUI/alert/ASHomeAlertWindow.h

@@ -22,6 +22,7 @@ typedef enum : NSUInteger {
 
 + (void)clearWindow;
 + (void)showCustomVc:(UIView *)v position:(ASAlertPosition)postion;
++ (void)alertMsg:(NSString *)message;
 
 @end
 

+ 8 - 0
Asteria/ASUI/alert/ASHomeAlertWindow.m

@@ -7,6 +7,7 @@
 
 #import "ASHomeAlertWindow.h"
 #import "ASHomeAlertViewController.h"
+#import "ASDefualtAlertV.h"
 
 ASHomeAlertWindow * _Nullable homeAlertW;
 
@@ -41,6 +42,13 @@ ASHomeAlertWindow * _Nullable homeAlertW;
     [self makeKeyAndVisible];
 }
 
++ (void)alertMsg:(NSString *)message {
+    ASDefualtAlertV *v = [[ASDefualtAlertV alloc] initWithFrame:CGRectZero];
+    [v setMsg:message];
+    [v setViewStyle:ASAlertWidthStyleLittle];
+    [ASHomeAlertWindow showCustomVc:v position:ASAlertPositionCenter];
+}
+
 + (void)showCustomVc:(UIView *)v position:(ASAlertPosition)postion {
     ASHomeAlertWindow *w = [[ASHomeAlertWindow alloc] initWithFrame: UIScreen.mainScreen.bounds];
     w.backgroundColor = UIColor.clearColor;

+ 22 - 0
Asteria/Fuction/Category/Category.xcassets/search_his_clean.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "ICON_CLAER@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "ICON_CLAER@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Asteria/Fuction/Category/Category.xcassets/search_his_clean.imageset/ICON_CLAER@2x.png


BIN
Asteria/Fuction/Category/Category.xcassets/search_his_clean.imageset/ICON_CLAER@3x.png


+ 22 - 0
Asteria/Fuction/Category/Category.xcassets/search_tf.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "搜索@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "搜索@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Asteria/Fuction/Category/Category.xcassets/search_tf.imageset/搜索@2x.png


BIN
Asteria/Fuction/Category/Category.xcassets/search_tf.imageset/搜索@3x.png


+ 7 - 2
Asteria/Fuction/Category/Target_Category.m

@@ -8,6 +8,8 @@
 #import "Target_Category.h"
 #import "APCategoryViewController.h"
 #import "APOnlySearchViewController.h"
+#import "ASSearchViewController.h"
+#import "ASBaseNavController.h"
 
 @implementation Target_Category
 
@@ -17,8 +19,11 @@
 }
 
 - (UIViewController *)Action_getSearchVc:(NSDictionary *)params {
-    APOnlySearchViewController *vc = [[APOnlySearchViewController alloc] init];
-    return  vc;
+    ASSearchViewController *vc = [ASSearchViewController new];
+    ASBaseNavController *nav = [[ASBaseNavController alloc] initWithRootViewController:vc];
+    nav.modalPresentationStyle = UIModalPresentationFullScreen;
+//    APOnlySearchViewController *vc = [[APOnlySearchViewController alloc] init];
+    return  nav;
 }
 
 

+ 2 - 2
Asteria/Fuction/Category/tipV/KWHisCollectHeaderView.m

@@ -34,7 +34,7 @@
     
     [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(self).offset(13);
-        make.centerX.equalTo(self);
+        make.left.equalTo(self).offset(20);
         make.bottom.equalTo(self).offset(-7);
         make.height.equalTo(@20);
     }];
@@ -62,7 +62,7 @@
         UILabel *lb = [[UILabel alloc] init];
         lb.font = [UIFont fontWithName:Rob_Bold size:14];
         lb.textColor = [UIColor colorWithHexString:@"#0b0b0b"];
-        lb.textAlignment = NSTextAlignmentCenter;
+        lb.textAlignment = NSTextAlignmentLeft;
         lb.backgroundColor = [UIColor clearColor];
         lb.numberOfLines = 1;
         _titleLb = lb;

+ 16 - 0
Asteria/Fuction/Category/vc/ASCategoryViewController.h

@@ -0,0 +1,16 @@
+//
+//  ASCategoryViewController.h
+//  Asteria
+//
+//  Created by iOS on 2023/7/10.
+//
+
+#import "ASBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASCategoryViewController : ASBaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 164 - 0
Asteria/Fuction/Category/vc/ASCategoryViewController.m

@@ -0,0 +1,164 @@
+//
+//  ASCategoryViewController.m
+//  Asteria
+//
+//  Created by iOS on 2023/7/10.
+//
+
+#import "ASCategoryViewController.h"
+#import "KWSearchMainTypeTableView.h"
+#import "KWSearchSubTypeTableView.h"
+
+@interface ASCategoryViewController ()
+
+@property (nonatomic, strong) KWSearchMainTypeTableView *leftTableV;
+@property (nonatomic, strong) KWSearchSubTypeTableView *rightTableV;
+@property (nonatomic, strong) UIView *bottomV;
+@property (nonatomic, strong) UIButton *cusBackBt;
+
+@end
+
+@implementation ASCategoryViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self loadSubVs];
+    
+}
+
+- (void)loadSubVs {
+    self.statusBgV.backgroundColor = _E0FFF5;
+    self.customNavBar.backgroundColor = _E0FFF5;
+    self.titleStr = @"Category";
+    
+    [self.customNavBar addSubview:self.cusBackBt];
+    [self.cusBackBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.trailing.equalTo(self.customNavBar).offset(-10);
+        make.centerY.equalTo(self.customNavBar);
+        make.width.height.equalTo(@44);
+    }];
+    
+    [self.view addSubview:self.bottomV];
+    [self.bottomV addSubview:self.leftTableV];
+    [self.bottomV addSubview:self.rightTableV];
+    
+    [self.bottomV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.customNavBar.mas_bottom).offset(10);
+        make.left.right.equalTo(self.view);
+        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
+    }];
+    
+    [self.leftTableV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.equalTo(@130);
+        make.left.top.bottom.equalTo(self.bottomV);
+    }];
+    [self.rightTableV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.bottom.right.equalTo(self.bottomV);
+        make.left.equalTo(self.leftTableV.mas_right);
+    }];
+    
+}
+
+
+// MARK: - actions
+- (void)toResult:(NSString *)key type:(NSString *)type keyWord:(NSString *)word {
+   NSDictionary *para = @{
+       @"type":type,  //String
+       @"title":key,//String
+       @"searchKey":word,//String
+   };
+   UIViewController *vc = [CTMediator.sharedInstance getProductListVc:para];
+   
+   [self.navigationController pushViewController:vc animated:true];
+}
+
+- (void)backAction {
+   [self dismissViewControllerAnimated:true completion:nil];
+}
+
+
+// MARK: - subvs
+- (KWSearchMainTypeTableView *)leftTableV {
+    if (!_leftTableV) {
+        KWSearchMainTypeTableView *leftTab = [[KWSearchMainTypeTableView alloc] initWithFrame:CGRectMake(0, 10, 180, self.view.bounds.size.height) style:UITableViewStylePlain];
+        @weakify(self);
+        _leftTableV = leftTab;
+        leftTab.callBack = ^{
+            NSInteger selectIndex = weak_self.leftTableV.selectIndex;
+            if (selectIndex >= weak_self.leftTableV.arr.count) {
+                weak_self.rightTableV.arr = weak_self.leftTableV.moneyType.children;
+                [weak_self.rightTableV reloadData];
+                return;
+            }
+            
+           KWMainTypeModel *m = weak_self.leftTableV.arr[selectIndex];
+
+            if (m.children.count == 0) {
+                [self toResult:m.title type:m.Id keyWord:@""];
+            } else {
+                weak_self.rightTableV.arr = m.children;
+                [weak_self.rightTableV reloadData];
+            }
+        };
+    }
+    return _leftTableV;
+}
+
+- (KWSearchSubTypeTableView *)rightTableV {
+    if(!_rightTableV) {
+        KWSearchSubTypeTableView *tab = [[KWSearchSubTypeTableView alloc] initWithFrame:CGRectMake(0, 10, 180, self.view.bounds.size.height) style:UITableViewStylePlain];
+        _rightTableV = tab;
+        @weakify(self);
+        [_rightTableV setCallBack:^(NSIndexPath * _Nonnull indexP) {
+            KWSearchSubTypeModel *m = weak_self.rightTableV.arr[indexP.section].children[indexP.item];
+            [weak_self toResult:m.title type:m.Id keyWord:@""];
+        }];
+        [_rightTableV setCallBackSection:^(NSInteger index) {
+            KWSubTypeSectionModel *m = weak_self.rightTableV.arr[index];
+            if (m.isMoneyType) {
+                [MBProgressHUD showHUDAddedTo:weak_self.view animated:true];
+//                [weak_self.vm switchCurrencie:m callback:^(BOOL flag) {
+//
+//                    if (flag) {
+//                        [[NSNotificationCenter defaultCenter] postNotificationName:MoneyTypeChanged object:nil];
+//                        [weak_self.vm reqCurrenciesList:^{
+//                            [MBProgressHUD hideHUDForView:weak_self.view animated:true];
+//                            weak_self.leftTableV.moneyType = weak_self.vm.moneyType;
+//                            weak_self.rightTableV.arr = weak_self.vm.moneyType.children;
+//                            [weak_self.rightTableV reloadData];
+//                        }];
+//                    } else {
+//                        [MBProgressHUD hideHUDForView:weak_self.view animated:true];
+//                    }
+//                }];
+                return;
+            }
+            [weak_self toResult:m.title type:m.Id keyWord:@""];
+        }];
+    }
+    return _rightTableV;
+}
+
+- (UIButton *)cusBackBt {
+    if (!_cusBackBt) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        [bt setImage:[UIImage imageNamed:@"nav_back"] forState:UIControlStateNormal];
+        [bt addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
+        _cusBackBt = bt;
+    }
+    return _cusBackBt;
+}
+
+
+-(UIView *)bottomV {
+    if (!_bottomV) {
+        UIView *v = [[UIView alloc] init];
+        v.backgroundColor = [UIColor colorWithHexString:@"#ffffff"];
+        _bottomV = v;
+    }
+    return _bottomV;
+}
+
+
+
+@end

+ 16 - 0
Asteria/Fuction/Category/vc/ASSearchViewController.h

@@ -0,0 +1,16 @@
+//
+//  ASSearchViewController.h
+//  Asteria
+//
+//  Created by iOS on 2023/7/10.
+//
+
+#import "ASBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASSearchViewController : ASBaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 238 - 0
Asteria/Fuction/Category/vc/ASSearchViewController.m

@@ -0,0 +1,238 @@
+//
+//  ASSearchViewController.m
+//  Asteria
+//
+//  Created by iOS on 2023/7/10.
+//
+
+#import "ASSearchViewController.h"
+#import "KWHisAndHotWordsView.h"
+#import "KWLenovoWordListView.h"
+
+@interface ASSearchViewController () <UITextFieldDelegate>
+
+@property (nonatomic, strong) UITextField *searchTf;
+@property (nonatomic, strong) KWHisAndHotWordsView *hisWordV;
+@property (nonatomic, strong) KWLenovoWordListView *lenovoV;
+@property (nonatomic, strong) UIButton *cusBackBt;
+
+
+
+@end
+
+@implementation ASSearchViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self loadSubVs];
+    
+    
+    
+}
+
+- (void)loadSubVs {
+    self.customNavBar.backgroundColor = _E0FFF5;
+    self.statusBgV.backgroundColor = _E0FFF5;
+    self.customNavBar.frame = CGRectMake(0, kStatusBarH, KScreenWidth, 70);
+    self.nav_bottomLineV.frame = CGRectMake(0, 70-1, KScreenWidth, 1);
+    [self.customNavBar addSubview:self.cusBackBt];
+    [self.customNavBar addSubview:self.searchTf];
+    
+    [self.cusBackBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.leading.equalTo(self.customNavBar).offset(10);
+        make.centerY.equalTo(self.customNavBar);
+        make.width.height.equalTo(@44);
+    }];
+    
+    [self.searchTf mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(self.cusBackBt.mas_right).offset(10);
+        make.right.equalTo(self.customNavBar).offset(-20);
+        make.height.equalTo(@45);
+        make.top.equalTo(self.customNavBar).offset(13);
+        make.bottom.equalTo(self.customNavBar).offset(-12);
+    }];
+    
+    [self.view addSubview:self.hisWordV];
+    [self.hisWordV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.leading.trailing.bottom.equalTo(self.view);
+        make.top.equalTo(self.customNavBar.mas_bottom);
+    }];
+    
+    [self.view addSubview:self.lenovoV];
+    self.lenovoV.hidden = true;
+    [self.lenovoV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.leading.trailing.equalTo(self.searchTf);
+        make.top.equalTo(self.searchTf.mas_bottom);
+        make.height.equalTo(@0);
+    }];
+}
+
+
+// MARK: - subVs
+-(UITextField *)searchTf {
+    if (!_searchTf) {
+        UITextField *tf = [[UITextField alloc] init];
+        tf.delegate = self;
+        tf.borderStyle = UITextBorderStyleNone;
+        tf.backgroundColor = UIColor.whiteColor;
+        tf.font = [UIFont fontWithName:Rob_Regular size:14];
+        tf.textAlignment = NSTextAlignmentLeft;
+        tf.placeholder = @"SEARCH FOR PRODUCTS";
+        tf.textColor = _0B0B0B;
+        tf.layer.masksToBounds = true;
+        tf.clearButtonMode = UITextFieldViewModeAlways;
+        UIView *tfLeftV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 45)];
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        btn.frame = tfLeftV.bounds;
+        [btn setImage:[UIImage imageNamed:@"search_tf"] forState:UIControlStateNormal];
+        [tfLeftV addSubview:btn];
+        tf.leftView = tfLeftV;
+        tf.leftViewMode = UITextFieldViewModeAlways;
+        _searchTf = tf;
+    }
+    return  _searchTf;
+}
+
+-(KWHisAndHotWordsView *)hisWordV {
+    if (!_hisWordV) {
+        KWHisAndHotWordsView *v = [[KWHisAndHotWordsView alloc] initWithFrame:CGRectZero];
+        v.isSearch = true;
+        @weakify(self);
+        [v setCallBack:^(NSString * _Nonnull word) {
+            weak_self.searchTf.text = word;
+            [self.hisWordV.vm addSearchData:word];
+            [weak_self toResult:word type:@"" keyWord:word];
+        }];
+        [v setHotCallBack:^(KWSearchHotKeyModel * _Nonnull hot) {
+            NSString *word = hot.title;
+            if (hot.type != 1) {
+                [self.hisWordV.vm addSearchData:word];
+                [weak_self toResult:word type:hot.code keyWord:@""];
+                return;
+            }
+            [self.hisWordV.vm addSearchData:word];
+            [weak_self toResult:word type:@"" keyWord:word];
+        }];
+        _hisWordV = v;
+    }
+    return  _hisWordV;
+}
+
+- (KWLenovoWordListView *)lenovoV {
+    if (!_lenovoV) {
+        KWLenovoWordListView *v = [[KWLenovoWordListView alloc] initWithFrame:CGRectMake(self.searchTf.frame.origin.x, self.customNavBar.maxY - 8, self.searchTf.frame.size.width, 200)];
+        @weakify(self);
+        [v setCallBack:^(NSString * _Nonnull word) {
+            weak_self.searchTf.text = word;
+            [self.hisWordV.vm addSearchData:word];
+            [weak_self toResult:word type:@"" keyWord:word];
+        }];
+        _lenovoV = v;
+    }
+    return  _lenovoV;
+}
+
+- (UIButton *)cusBackBt {
+    if (!_cusBackBt) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        [bt setImage:[UIImage imageNamed:@"nav_back"] forState:UIControlStateNormal];
+        [bt addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
+        _cusBackBt = bt;
+    }
+    return _cusBackBt;
+}
+
+// MARK: - events
+/// show lenovo Words
+- (void) showLenovoV:(NSString *)key {
+    self.lenovoV.hidden = false;
+    [self.lenovoV setData:@[@"124356",@"124356",@"124356",@"124356",@"124356",@"124356",@"124356",@"124356",@"124356",] origen:CGPointMake(self.searchTf.frame.origin.x, self.customNavBar.maxY - 8)];
+    
+//    @weakify(self);
+//    [self.hisVm getAboutKeyList:key back:^{
+//        if (weak_self.hisVm.aboutKeys.count > 0 && [self.searchTf.text isEqualToString:key]) {
+//            weak_self.lenovoV.hidden = false;
+//            [weak_self.lenovoV setData:weak_self.hisVm.aboutKeys origen:CGPointMake(self.searchTf.frame.origin.x, self.customNavBar.maxY - 8)];
+//        } else {
+//            weak_self.lenovoV.hidden = true;
+//        }
+//    }];
+    
+   
+}
+
+- (void)hideLenovoV {
+    self.lenovoV.hidden = true;
+}
+
+// MARK: - pushResult
+- (void)toResult:(NSString *)key type:(NSString *)type keyWord:(NSString *)word {
+    NSDictionary *para = @{
+        @"type":type,  //String
+        @"title":key,//String
+        @"searchKey":word,//String
+    };
+    UIViewController *vc = [CTMediator.sharedInstance getProductListVc:para];
+    
+    [self.navigationController pushViewController:vc animated:true];
+}
+
+- (void)backAction {
+    [self dismissViewControllerAnimated:true completion:nil];
+}
+
+// MARK: - uitextfiled delegate
+
+- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
+    
+    NSString *txt = textField.text;
+    if ([txt isEqualToString:@""] ) {
+        [self hideLenovoV];
+    } else {
+       
+        [self showLenovoV:txt];
+    }
+    
+    return  true;
+}
+
+- (BOOL)textFieldShouldClear:(UITextField *)textField {
+//    self.hisVm.aboutKeys = @[];
+    [self hideLenovoV];
+    return true;
+}
+
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    NSString *txt = textField.text;
+    txt = [txt stringByReplacingCharactersInRange:range withString:string];
+    if ([txt isEqualToString:@""] ) {
+        [self hideLenovoV];
+    } else {
+       
+        
+        [self showLenovoV:txt];
+    }
+    
+    return  true;
+}
+
+- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
+    return  true;
+}
+
+- (void)textFieldDidEndEditing:(UITextField *)textField {
+    [self hideLenovoV];
+}
+
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+    [textField resignFirstResponder];
+    NSString *key = textField.text;
+    if (![key isEmpty]){
+        [self.hisWordV.vm addSearchData:key];
+        [self toResult:key type:@"" keyWord:key];
+    }
+    return true;
+}
+
+
+@end

+ 1 - 1
Asteria/Fuction/Category/vc/KWSearchViewController.h

@@ -18,8 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) KWSearchMainTypeTableView *leftTableV;
 @property (nonatomic, strong) KWSearchSubTypeTableView *rightTableV;
-@property (nonatomic, strong) UIView *topV;
 @property (nonatomic, strong) UIView *bottomV;
+@property (nonatomic, strong) UIView *topV;
 @property (nonatomic,strong) UITextField *searchTf;
 @property (nonatomic, strong) KWHisAndHotWordsView *hisWordV;
 

+ 0 - 3
Asteria/Fuction/Category/vc/KWSearchViewController.m

@@ -246,9 +246,6 @@
         tf.textAlignment = NSTextAlignmentLeft;
         tf.placeholder = @"SEARCH FOR PRODUCTS";
         tf.textColor = _0B0B0B;
-//        tf.layer.borderColor = [UIColor blackColor].CGColor;
-//        tf.layer.borderWidth = 1;
-//        tf.layer.cornerRadius = 4;
         tf.layer.masksToBounds = true;
         tf.clearButtonMode = UITextFieldViewModeAlways;
         UIView *tfLeftV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 45)];

+ 1 - 6
Asteria/Fuction/Home/Views/productList/KWProductMenuFilterView.m

@@ -8,7 +8,6 @@
 #import "KWProductMenuFilterView.h"
 #import "KWProductMenuFilterItemHeaderView.h"
 #import "ASProductlistFilterPriceCollectCell.h"
-#import "ASDefualtAlertV.h"
 #import "ASHomeAlertWindow.h"
 
 @interface KWProductMenuFilterView ()
@@ -160,11 +159,7 @@
 
 - (void)clearBtAction {
     [self.vm.selectDic removeAllObjects];
-//    [KWClearTipWindow show:true];
-    ASDefualtAlertV *v = [[ASDefualtAlertV alloc] initWithFrame:CGRectZero];
-    [v setMsg:@"All Selection Properties Have Been Cleared"];
-    [v setViewStyle:ASAlertWidthStyleLittle];
-    [ASHomeAlertWindow showCustomVc:v position:ASAlertPositionCenter];
+    [ASHomeAlertWindow alertMsg:@"All Selection Properties Have Been Cleared"];
     [self.collectV reloadData];
 }
 

+ 11 - 1
Asteria/Fuction/UserCenter/Message/ASMessageListViewController.m

@@ -144,12 +144,22 @@
 //
 //    [[KWPushMessageHandler shareInstance] handleMessage:m.title messageId:m.message_id pushPara:m.push_para pushType:m.push_type];
     
+    UIViewController *vc = [CTMediator.sharedInstance getWebViewVc:@{
+        @"title":@"Message",
+        @"url":@"https://baidu.com"
+    }];
+    [self.navigationController pushViewController:vc animated:true];
+    
     return;
     
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    
+    if (arc4random()%2 == 1) {
+        [self showEmptyV:self.tableV];
+        return  0;
+    }
+    [self hiddenEmpty];
     return  40;//self.vm.messageList.count;
 }
 

+ 3 - 0
Asteria/Fuction/UserCenter/Setting/ASInfomationSetController.m

@@ -8,6 +8,7 @@
 #import "ASInfomationSetController.h"
 #import "KWTextField.h"
 #import <BRPickerView/BRPickerView.h>
+#import "ASHomeAlertWindow.h"
 
 @interface ASInfomationSetController () <UITextFieldDelegate>
 
@@ -372,6 +373,8 @@
 
 - (void)bottomBtAction {
     
+    [ASHomeAlertWindow alertMsg:@"Successfully Change  Information, Please Log In Again"];
+    
 //    KWLoginedUserModel *tempInfo = [[KWLoginedUserModel alloc] init];
 //    tempInfo.firstname = self.nameTf.text;
 //    tempInfo.lastname = self.lastNTf.text;

+ 2 - 6
Asteria/Fuction/UserCenter/VipCenter/ASVipCouponsViewController.m

@@ -7,7 +7,6 @@
 
 #import "ASVipCouponsViewController.h"
 #import "ASCouponListCell.h"
-#import "ASDefualtAlertV.h"
 #import "ASHomeAlertWindow.h"
 
 @interface ASVipCouponsViewController () <UITableViewDelegate,UITableViewDataSource>
@@ -94,11 +93,8 @@
     ASCouponListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ASCouponListCell" forIndexPath:indexPath];
     __weak typeof(self) weakSelf = self;
     [cell setCopyCallBack:^{
-        ASDefualtAlertV *v = [[ASDefualtAlertV alloc] initWithFrame:CGRectZero];
-        [v setMsg:@"Coupon Received Please Check In My Coupon"];
-        [v setViewStyle:ASAlertWidthStyleLittle];
-        [ASHomeAlertWindow showCustomVc:v position:ASAlertPositionCenter];
-        
+        [ASHomeAlertWindow alertMsg:@"Coupon Received Please Check In My Coupon"];
+         
     }];
     [cell setVipCouponStyle];
     return cell;

+ 17 - 0
Asteria/Tabber/AS_TabBarViewController.m

@@ -39,6 +39,14 @@
         QMUINavigationController *uikitNavController = [[QMUINavigationController alloc] initWithRootViewController:vcAry[i]];
         UITabBarItem *tabBarItem = [[UITabBarItem alloc] initWithTitle:titleArr[i] image:[UIImageMake(imgArr[i]) imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] tag:i];
         
+        if (i == 2) {
+            tabBarItem.qmui_badgeFont = [UIFont fontWithName:Rob_Regular size:11];
+            tabBarItem.qmui_badgeOffset = CGPointMake(-8, 13);
+            tabBarItem.qmui_badgeContentEdgeInsets = UIEdgeInsetsMake(3, 3, 3, 3);
+            tabBarItem.qmui_badgeInteger = 0;
+            tabBarItem.qmui_badgeTextColor = Col_FFF;
+            tabBarItem.qmui_badgeBackgroundColor = Col_000;
+        }
         tabBarItem.selectedImage = [UIImageMake(selimgArr[i]) imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
         uikitNavController.tabBarItem = tabBarItem;
         [tabvcAry addObject:uikitNavController];
@@ -46,4 +54,13 @@
     self.viewControllers = tabvcAry;
 }
 
+
+- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
+    if (self.tabBar.items.count > 2) {
+        UITabBarItem *temp = self.tabBar.items[2];
+        temp.qmui_badgeInteger =  arc4random()%100;
+        
+    }
+}
+
 @end