Browse Source

生日页面

iOS-Abel 2 years ago
parent
commit
65e1f561dc
26 changed files with 844 additions and 5 deletions
  1. 12 0
      Asteria.xcodeproj/project.pbxproj
  2. 1 0
      Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponListCell.h
  3. 12 4
      Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponListCell.m
  4. 3 1
      Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponsListViewController.m
  5. 6 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/Contents.json
  6. 22 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_bg.imageset/Contents.json
  7. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_bg.imageset/bg@2x.png
  8. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_bg.imageset/bg@3x.png
  9. 22 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_dayTime_bg.imageset/Contents.json
  10. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_dayTime_bg.imageset/路径 14506@2x.png
  11. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_dayTime_bg.imageset/路径 14506@3x.png
  12. 22 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_1.imageset/Contents.json
  13. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_1.imageset/组 11281@2x.png
  14. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_1.imageset/组 11281@3x.png
  15. 22 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_2.imageset/Contents.json
  16. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_2.imageset/组 11282@2x.png
  17. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_2.imageset/组 11282@3x.png
  18. 22 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_topImg.imageset/Contents.json
  19. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_topImg.imageset/礼帽@2x.png
  20. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_topImg.imageset/礼帽@3x.png
  21. 18 0
      Asteria/Fuction/UserCenter/VipCenter/ASBirthdayTreatViewController.h
  22. 536 0
      Asteria/Fuction/UserCenter/VipCenter/ASBirthdayTreatViewController.m
  23. 15 0
      Asteria/Fuction/UserCenter/VipCenter/ASVipCenterViewController.m
  24. 16 0
      Asteria/Fuction/UserCenter/VipCenter/ASVipCouponsViewController.h
  25. 108 0
      Asteria/Fuction/UserCenter/VipCenter/ASVipCouponsViewController.m
  26. 7 0
      Asteria/Fuction/UserCenter/VipCenter/Views/ASVipCenterLineItemView.m

+ 12 - 0
Asteria.xcodeproj/project.pbxproj

@@ -116,6 +116,8 @@
 		81C3B44429F6612800D79294 /* ASBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81C3B44329F6612800D79294 /* ASBaseViewController.m */; };
 		81C3B44A29F6661500D79294 /* ASBaseNavController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81C3B44929F6661500D79294 /* ASBaseNavController.m */; };
 		81C3B45529F66C1700D79294 /* UIView+PublicInit.m in Sources */ = {isa = PBXBuildFile; fileRef = 81C3B45429F66C1700D79294 /* UIView+PublicInit.m */; };
+		81C796242A4FD63A003083B8 /* ASVipCouponsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81C796232A4FD63A003083B8 /* ASVipCouponsViewController.m */; };
+		81C796272A4FD898003083B8 /* ASBirthdayTreatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81C796262A4FD898003083B8 /* ASBirthdayTreatViewController.m */; };
 		81DFA5592A4681E900DA708B /* ASPointEranCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5582A4681E900DA708B /* ASPointEranCell.m */; };
 		81DFA55D2A46C46D00DA708B /* ASWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA55C2A46C46D00DA708B /* ASWebViewController.m */; };
 		81DFA5602A46CC8E00DA708B /* CTMediator+ASWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA55F2A46CC8E00DA708B /* CTMediator+ASWebView.m */; };
@@ -441,6 +443,10 @@
 		81C3B45029F669C900D79294 /* ColorDefine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ColorDefine.h; sourceTree = "<group>"; };
 		81C3B45329F66C1700D79294 /* UIView+PublicInit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+PublicInit.h"; sourceTree = "<group>"; };
 		81C3B45429F66C1700D79294 /* UIView+PublicInit.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+PublicInit.m"; sourceTree = "<group>"; };
+		81C796222A4FD63A003083B8 /* ASVipCouponsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASVipCouponsViewController.h; sourceTree = "<group>"; };
+		81C796232A4FD63A003083B8 /* ASVipCouponsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASVipCouponsViewController.m; sourceTree = "<group>"; };
+		81C796252A4FD898003083B8 /* ASBirthdayTreatViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASBirthdayTreatViewController.h; sourceTree = "<group>"; };
+		81C796262A4FD898003083B8 /* ASBirthdayTreatViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASBirthdayTreatViewController.m; sourceTree = "<group>"; };
 		81DFA5572A4681E900DA708B /* ASPointEranCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASPointEranCell.h; sourceTree = "<group>"; };
 		81DFA5582A4681E900DA708B /* ASPointEranCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASPointEranCell.m; sourceTree = "<group>"; };
 		81DFA55B2A46C46D00DA708B /* ASWebViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASWebViewController.h; sourceTree = "<group>"; };
@@ -1240,6 +1246,10 @@
 			children = (
 				81E5EE8E2A498FC90075695F /* ASVipCenterViewController.h */,
 				81E5EE8F2A498FC90075695F /* ASVipCenterViewController.m */,
+				81C796222A4FD63A003083B8 /* ASVipCouponsViewController.h */,
+				81C796232A4FD63A003083B8 /* ASVipCouponsViewController.m */,
+				81C796252A4FD898003083B8 /* ASBirthdayTreatViewController.h */,
+				81C796262A4FD898003083B8 /* ASBirthdayTreatViewController.m */,
 				81E5EE912A4A75DF0075695F /* Views */,
 			);
 			path = VipCenter;
@@ -1889,6 +1899,7 @@
 				81717CA12A3C0A3500648139 /* KWProductMenuFilterItemHeaderView.m in Sources */,
 				81C326662A36B794002EF442 /* VerScrollTextView.m in Sources */,
 				81E5EE972A4A822D0075695F /* ASVipCenterCollectCell.m in Sources */,
+				81C796272A4FD898003083B8 /* ASBirthdayTreatViewController.m in Sources */,
 				81717D372A3D322700648139 /* KWHisCollectHeaderView.m in Sources */,
 				9A8DD8C82A0B93F700573324 /* GoodsDetailsVM.m in Sources */,
 				9AD346132A08D60F005CA070 /* ZFLoadingView.m in Sources */,
@@ -1903,6 +1914,7 @@
 				811F42492A40536C00DA68F1 /* ASPointHeadView.m in Sources */,
 				817244B029F3B2EE005FA9C9 /* main.m in Sources */,
 				81717D202A3C4AE000648139 /* KWSearchSubTypeCell.m in Sources */,
+				81C796242A4FD63A003083B8 /* ASVipCouponsViewController.m in Sources */,
 				816020252A2F1C9E00E4A8F1 /* ASHomeMainListModel.m in Sources */,
 				81717CA82A3C0AAA00648139 /* KWProductListFilterModel.m in Sources */,
 				81717D252A3C512700648139 /* Target_Category.m in Sources */,

+ 1 - 0
Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponListCell.h

@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) btnClickBlock copyCallBack;
 
 - (void)setGiftCardStyle;
+- (void)setVipCouponStyle;
 
 @end
 

+ 12 - 4
Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponListCell.m

@@ -65,6 +65,14 @@
     
 }
 
+- (void)setVipCouponStyle {
+    self.codeLb.hidden = true;
+    self.codeTitleLb.text = @"COUPONS";
+    self.cpLb.text = @"GET";
+    self.usedLb.text = @"GOT";
+    
+}
+
 - (void)setGiftCardStyle {
     self.codeLb.hidden = true;
     self.codeTitleLb.text = @"GIFTCARD";
@@ -184,7 +192,7 @@
         make.height.equalTo(@17);
     }];
     
-    [self.bg2 addSubview:self.cpBt];
+    [self.bgV addSubview:self.cpBt];
     [self.cpBt mas_makeConstraints:^(MASConstraintMaker *make) {
         make.edges.equalTo(self.bg2);
     }];
@@ -356,9 +364,9 @@
 - (void)copyAction {
     if (!self.codeLb.text.isEmpty) {
         UIPasteboard.generalPasteboard.string = self.codeLb.text;
-        if (self.copyCallBack){
-            self.copyCallBack();
-        }
+    }
+    if (self.copyCallBack){
+        self.copyCallBack();
     }
 }
 

+ 3 - 1
Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponsListViewController.m

@@ -92,7 +92,9 @@
     ASCouponListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ASCouponListCell" forIndexPath:indexPath];
     __weak typeof(self) weakSelf = self;
     [cell setCopyCallBack:^{
-        [weakSelf.view makeToast:@"Code Copied"];
+        if (!weakSelf.isCard) {
+            [weakSelf.view makeToast:@"Code Copied"];
+        }
     }];
     if (self.isCard) {
         [cell setGiftCardStyle];

+ 6 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 22 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_bg.imageset/Contents.json

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

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_bg.imageset/bg@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_bg.imageset/bg@3x.png


+ 22 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_dayTime_bg.imageset/Contents.json

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

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_dayTime_bg.imageset/路径 14506@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_dayTime_bg.imageset/路径 14506@3x.png


+ 22 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_1.imageset/Contents.json

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

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_1.imageset/组 11281@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_1.imageset/组 11281@3x.png


+ 22 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_2.imageset/Contents.json

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

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_2.imageset/组 11282@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_titleImg_2.imageset/组 11282@3x.png


+ 22 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_topImg.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/UserCenter/UserCenter.xcassets/BirthDay/birth_topImg.imageset/礼帽@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/BirthDay/birth_topImg.imageset/礼帽@3x.png


+ 18 - 0
Asteria/Fuction/UserCenter/VipCenter/ASBirthdayTreatViewController.h

@@ -0,0 +1,18 @@
+//
+//  ASBirthdayTreatViewController.h
+//  Asteria
+//
+//  Created by iOS on 2023/7/1.
+//
+
+#import "ASBaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASBirthdayTreatViewController : ASBaseViewController
+
+@property (nonatomic,assign) BOOL isBirthday;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 536 - 0
Asteria/Fuction/UserCenter/VipCenter/ASBirthdayTreatViewController.m

@@ -0,0 +1,536 @@
+//
+//  ASBirthdayTreatViewController.m
+//  Asteria
+//
+//  Created by iOS on 2023/7/1.
+//
+
+#import "ASBirthdayTreatViewController.h"
+
+@interface ASBirthdayTreatViewController ()
+
+@property (nonatomic, strong) UIScrollView *scrollV;
+@property (nonatomic, strong) UIView *bgV;
+@property (nonatomic, strong) UIImageView *bgImgV;
+
+@property (nonatomic, strong) UIImageView *topImgV;
+@property (nonatomic, strong) UIImageView *titleImgV;
+@property (nonatomic, strong) UILabel * contentLB;
+
+@property (nonatomic, strong) UILabel * codeDesLB;
+
+@property (nonatomic, strong) UIView *btnV;
+@property (nonatomic, strong) UIButton *startBt;
+
+@property (nonatomic, strong) UIView *dateV;
+@property (nonatomic, strong) UILabel *monthLb;
+@property (nonatomic, strong) UILabel *dayLb;
+@property (nonatomic, strong) UIImageView *dayBgV;
+@property (nonatomic, strong) UILabel *yearLb;
+
+@end
+
+@implementation ASBirthdayTreatViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    self.titleStr = @"Birthday Treat";
+    [self setNavRightSearch:^{
+        
+    }];
+    
+    [self loadSubviews];
+    [self configSubVs];
+    
+    
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+//    KWLoginedUserModel *info = [KWLoginedManager.shareInstance getCurrentLoginedUser];
+//    if (info.isBirthday) {
+//        @weakify(self);
+//        [self.vm getVIPCouponData:^(BOOL flag) {
+//            if (flag) {
+//                weak_self.codeDesLB.text = [NSString stringWithFormat: @"USE CODE: %@\nGET DISCOUNT & GIFTPACK", weak_self.vm.code];
+//                NSString *birthStr = [NSString stringWithFormat: @"Our Gift To You?\n$%@ To Spend On Your\nFavorite Hair.", weak_self.vm.amount];
+//                weak_self.contentLB.text = birthStr;
+//            }
+//
+//
+//        }];
+//    }
+    
+}
+
+- (void)configSubVs {
+    
+    self.statusBgV.backgroundColor = _E0FFF5;
+    self.customNavBar.backgroundColor = _F0FFFA;
+    
+    self.titleImgV.image = [UIImage imageNamed:self.isBirthday ? @"birth_titleImg_2" : @"birth_titleImg_1"];
+    self.codeDesLB.hidden = !self.isBirthday;
+    self.btnV.hidden = !self.isBirthday;
+        
+//    KWLoginedUserModel *info = [KWLoginedManager.shareInstance getCurrentLoginedUser];
+//    NSDate *date = [NSDate dateWithString:info.dob format:@"yyyy-MM-dd hh:mm:ss"];
+    NSDate *date = [NSDate new];
+
+        self.dayLb.text = [NSString stringWithFormat:@"%ld" ,date.day];
+        
+        NSString *monStr = @"JANUARY";
+        NSInteger mon = date.month;
+        switch (mon) {
+            case 1:
+                monStr = @"JANUARY";
+                break;
+            case 2:
+                monStr = @"FEBRUARY";
+                break;
+            case 3:
+                monStr = @"MARCH";
+                break;
+            case 4:
+                monStr = @"APRIL";
+                break;
+            case 5:
+                monStr = @"MAY";
+                break;
+            case 6:
+                monStr = @"JUNE";
+                break;
+            case 7:
+                monStr = @"JULY";
+                break;
+            case 8:
+                monStr = @"AUGUST";
+                break;
+            case 9:
+                monStr = @"SEPTEMBER";
+                break;
+            case 10:
+                monStr = @"OCTOBER";
+                break;
+            case 11:
+                monStr = @"NOVEMBER";
+                break;
+            default:
+                monStr = @"DECEMBER";
+                break;
+        }
+        self.monthLb.text = monStr;
+        self.yearLb.text = [NSString stringWithFormat:@"%ld" ,date.year];// @"2000";
+    
+    NSString *birthStr = @"Our Gift To You?\n$30 To Spend On Your\nFavorite Hair.";
+    NSString *defualtStr = [NSString stringWithFormat: @"hello,%@ %@\nThanks for giving us the opportunity to celebratingyour birthday with you in the future.You’re going to receive our special birthday treat.\nLook forward to your special day to come.", @"USER", @"NAME"];//info.lastname, info.firstname];
+    self.contentLB.text = self.isBirthday ? birthStr : defualtStr;
+    
+    
+}
+
+
+- (void)loadSubviews {
+    
+    [self.view addSubview:self.scrollV];
+    [self.scrollV addSubview:self.bgV];
+    
+    [self.scrollV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.customNavBar.mas_bottom);
+        make.right.left.bottom.equalTo(self.view);
+    }];
+    [self.bgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.scrollV);
+        make.width.equalTo(self.view);
+        make.height.greaterThanOrEqualTo([NSNumber numberWithFloat:SCREEN_HEIGHT - (NavigationBarHeight+StatusHeight)]);
+    }];
+    
+//    UIImageView *tl_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_top_left"]];
+//    UIImageView *tr_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_top_right"]];
+//    UIImageView *bl_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_bottom_left"]];
+//    UIImageView *br_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_bottom_right"]];
+//    UIImageView *top_line_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_line_top"]];
+//    UIImageView *bottom_line_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_line_top"]];
+//    UIImageView *left_line_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_line_left"]];
+//    UIImageView *right_line_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_line_left"]];
+//
+//    UIImageView *top_left_bg_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_top_left_bg"]];
+//    UIImageView *bottom_right_bg_imgV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_birth_top_left_bg"]];
+//
+//    [self.bgV addSubview:top_left_bg_imgV];
+//    [self.bgV addSubview:bottom_right_bg_imgV];
+//    [self.bgV addSubview:tl_imgV];
+//    [self.bgV addSubview:tr_imgV];
+//    [self.bgV addSubview:bl_imgV];
+//    [self.bgV addSubview:br_imgV];
+//    [self.bgV addSubview:top_line_imgV];
+//    [self.bgV addSubview:bottom_line_imgV];
+//    [self.bgV addSubview:left_line_imgV];
+//    [self.bgV addSubview:right_line_imgV];
+    
+//    [top_left_bg_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.top.equalTo(@0);
+//        make.left.equalTo(self.bgV).offset(0);
+//        make.width.height.equalTo(@180);
+//    }];
+//
+//    [bottom_right_bg_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.bottom.equalTo(@0);
+//        make.right.equalTo(self.bgV).offset(0);
+//        make.width.height.equalTo(@180);
+//    }];
+//
+//    bottom_right_bg_imgV.transform = CGAffineTransformMakeRotation(M_PI);
+//
+//    [tl_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.top.equalTo(@50);
+//        make.left.equalTo(self.bgV).offset(20);
+//        make.width.height.equalTo(@24);
+//    }];
+//    [tr_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.top.equalTo(@50);
+//        make.right.equalTo(self.bgV).offset(-20);
+//        make.width.height.equalTo(@24);
+//    }];
+//    [bl_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.bottom.equalTo(self.bgV).offset(-50);
+//        make.left.equalTo(self.bgV).offset(20);
+//        make.width.height.equalTo(@24);
+//    }];
+//    [br_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.bottom.equalTo(self.bgV).offset(-50);
+//        make.right.equalTo(self.bgV).offset(-20);
+//        make.width.height.equalTo(@24);
+//    }];
+//
+//    [top_line_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.centerX.equalTo(self.bgV);
+//        make.width.equalTo(self.bgV).offset(-120);
+//        make.top.equalTo(self.bgV).offset(50);
+//    }];
+//    [bottom_line_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.centerX.equalTo(self.bgV);
+//        make.width.equalTo(self.bgV).offset(-120);
+//        make.bottom.equalTo(self.bgV.mas_bottom).offset(-50);
+//    }];
+//
+//    [left_line_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.equalTo(tl_imgV.mas_left);
+//        make.top.equalTo(tl_imgV.mas_bottom).offset(20);
+//        make.bottom.equalTo(bl_imgV.mas_top).offset(-20);
+//    }];
+//
+//    [right_line_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.right.equalTo(tr_imgV.mas_right);
+//        make.top.equalTo(tr_imgV.mas_bottom).offset(20);
+//        make.bottom.equalTo(br_imgV.mas_top).offset(-20);
+//    }];
+    
+    
+    [self.bgV addSubview:self.bgImgV];
+    [self.bgImgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.bgV);
+    }];
+    
+    
+    UIStackView *stackV = [[UIStackView alloc] init];
+    stackV.axis = UILayoutConstraintAxisVertical;
+    stackV.distribution = UIStackViewDistributionFill;
+    stackV.alignment = UIStackViewAlignmentFill;
+    stackV.spacing = 20;
+    
+    
+    [self.bgV addSubview:stackV];
+    [stackV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.equalTo(self.bgV);
+        make.width.equalTo([NSNumber numberWithFloat:SCREEN_WIDTH - 120]);
+        make.top.equalTo(self.bgV.mas_top).offset(38);
+        make.bottom.equalTo(self.bgV.mas_bottom).offset(-150);
+    }];
+    
+    
+    UIStackView *topSt = [[UIStackView alloc] init];
+    topSt.axis = UILayoutConstraintAxisVertical;
+    topSt.distribution = UIStackViewDistributionFill;
+    topSt.alignment = UIStackViewAlignmentFill;
+    topSt.spacing = 8;
+    
+    [topSt addArrangedSubview:self.topImgV];
+    [self.topImgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@102);
+    }];
+    
+    [topSt addArrangedSubview:self.titleImgV];
+    [self.titleImgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@68);
+    }];
+    [stackV addArrangedSubview:topSt];
+    
+    [stackV addArrangedSubview:self.contentLB];
+//    [stackV addArrangedSubview:self.lineV];
+//    [self.lineV mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.height.equalTo(@50);
+//    }];
+    
+    [stackV addArrangedSubview:self.btnV];
+    
+    [self.btnV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@45);
+    }];
+    
+    [self.btnV addSubview:self.startBt];
+    
+    [self.startBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@45);
+        make.width.equalTo([NSNumber numberWithFloat:SCREEN_WIDTH-150]);
+        make.center.equalTo(self.btnV);
+    }];
+    
+    [stackV addArrangedSubview:self.codeDesLB];
+    [self.codeDesLB mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@48);
+    }];
+    
+    
+    
+    
+    [stackV addArrangedSubview:self.dateV];
+    [self.dateV addSubview:self.monthLb];
+    [self.dateV addSubview:self.dayBgV];
+    [self.dateV addSubview:self.dayLb];
+    [self.dateV addSubview:self.yearLb];
+    
+    [self.monthLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@17);
+        make.centerX.equalTo(self.dateV);
+        make.top.equalTo(self.dateV).offset(10);
+    }];
+    [self.dayBgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@45);
+        make.width.equalTo(@36.5);
+        make.centerX.equalTo(self.dateV);
+        make.top.equalTo(self.monthLb.mas_bottom).offset(5);
+    }];
+    [self.dayLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.center.equalTo(self.dayBgV);
+        make.height.equalTo(self.dayBgV);
+        make.width.equalTo(self.dayBgV);
+    }];
+    [self.yearLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@17);
+        make.centerX.equalTo(self.dateV);
+        make.top.equalTo(self.dayBgV.mas_bottom).offset(5);
+        make.bottom.equalTo(self.dateV).offset(-10);
+    }];
+    
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [self viewAddLineColorBg:self.bgV colorArr:@[
+            (id)_E0FFF5.CGColor,
+            (id)Col_FFF.CGColor
+        ]];
+    });
+}
+
+- (UIScrollView *)scrollV {
+    if (!_scrollV) {
+        UIScrollView *v = [UIScrollView new];
+        v.showsVerticalScrollIndicator = false;
+        v.showsHorizontalScrollIndicator = false;
+        v.backgroundColor = Col_FFF;
+        _scrollV = v;
+    }
+    return _scrollV;
+}
+
+- (UIView *)bgV {
+    if (!_bgV) {
+        UIView *v = [UIView new];
+        _bgV = v;
+    }
+    return _bgV;
+}
+
+- (UIImageView *)bgImgV {
+    if (!_bgImgV) {
+        UIImageView *v = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"birth_bg"]];
+        v.contentMode = UIViewContentModeScaleToFill;
+        _bgImgV = v;
+    }
+    return  _bgImgV;
+}
+
+- (UIImageView *)topImgV {
+    if (!_topImgV) {
+        UIImageView *v = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"birth_topImg"]];
+        v.contentMode = UIViewContentModeScaleAspectFit;
+        _topImgV = v;
+    }
+    return  _topImgV;
+}
+
+- (UIImageView *)titleImgV {
+    if (!_titleImgV) {
+        UIImageView *v = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"birth_titleImg_1"]];
+        v.contentMode = UIViewContentModeScaleAspectFit;
+        _titleImgV = v;
+    }
+    return  _titleImgV;
+}
+
+
+- (UILabel *)contentLB {
+    if (!_contentLB) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.numberOfLines = 0;
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.textColor = UIColor.blackColor;
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.qmui_lineHeight = 24;
+        _contentLB = lb;
+    }
+    return  _contentLB;
+}
+
+//- (UIView *)lineV {
+//    if (!_lineV) {
+//        UIView *v = [UIView new];
+//        v.backgroundColor = UIColor.clearColor;
+//        UIView *line = [UIView new];
+//        line.backgroundColor = UIColor.blackColor;
+//        [v addSubview:line];
+//        [line mas_makeConstraints:^(MASConstraintMaker *make) {
+//            make.width.equalTo([NSNumber numberWithFloat:SCREEN_WIDTH-140]);
+//            make.height.equalTo(@1);
+//            make.center.equalTo(v);
+//        }];
+//        _lineV = v;
+//    }
+//    return  _lineV;
+//}
+
+- (UILabel *)codeDesLB {
+    if (!_codeDesLB) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.numberOfLines = 0;
+        lb.textColor = _043632;
+        lb.font = [UIFont fontWithName:Rob_Regular size:12];
+        lb.qmui_lineHeight = 24;
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.lineBreakMode = NSLineBreakByWordWrapping;
+        lb.text = @"USE CODE: BIRTHDAY\nGET DISCOUNT & GIFTPACK";
+        _codeDesLB = lb;
+    }
+    return  _codeDesLB;
+}
+
+- (UIView *)btnV {
+    if (!_btnV) {
+        UIView *v = [UIView new];
+        v.backgroundColor = UIColor.clearColor;
+        _btnV = v;
+    }
+    return _btnV;
+}
+
+- (UIButton *)startBt {
+    if (!_startBt) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        bt.backgroundColor = [UIColor blackColor];
+        bt.layer.cornerRadius = 4;
+        bt.layer.masksToBounds = true;
+        [bt setTitle:@"GET THE PARTY STARTED" forState:UIControlStateNormal];
+        [bt setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+        bt.titleLabel.font = [UIFont fontWithName:Rob_Regular size:16];
+        [bt addTarget:self action:@selector(btnAction) forControlEvents:UIControlEventTouchUpInside];
+        _startBt = bt;
+    }
+    return _startBt;
+}
+
+- (void)btnAction {
+//    if (![self.vm.typeId isEqualToString:@""]) {
+//        KWProductListViewController *vc = [[KWProductListViewController alloc] init];
+//        vc.titleName = @"HD Lace";
+//        vc.type = self.vm.typeId;
+//        [self.navigationController pushViewController:vc animated:YES];
+//    } else {
+//        [self.view makeToast:@"Get Birth Products Type Error"];
+//    }
+}
+
+- (UIView *)dateV {
+    if (!_dateV) {
+        UIView *v = [UIView new];
+        v.backgroundColor = UIColor.clearColor;
+        _dateV = v;
+    }
+    return _dateV;
+}
+
+- (UILabel *)monthLb {
+    if (!_monthLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.numberOfLines = 0;
+        lb.textColor = UIColor.blackColor;
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.qmui_lineHeight = 20;
+        _monthLb = lb;
+    }
+    return  _monthLb;
+}
+
+- (UILabel *)dayLb {
+    if (!_dayLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.numberOfLines = 0;
+        lb.textColor = UIColor.blackColor;
+        lb.font = [UIFont fontWithName:Rob_Bold size:20];
+        lb.qmui_lineHeight = 20;
+        lb.textAlignment = NSTextAlignmentCenter;
+        _dayLb = lb;
+    }
+    return  _dayLb;
+}
+
+- (UILabel *)yearLb {
+    if (!_yearLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.numberOfLines = 0;
+        lb.textColor = UIColor.blackColor;
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.qmui_lineHeight = 20;
+        _yearLb = lb;
+    }
+    return  _yearLb;
+}
+
+- (UIImageView *)dayBgV {
+    if (!_dayBgV) {
+        UIImageView *v = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"birth_dayTime_bg"]];
+        v.contentMode = UIViewContentModeScaleAspectFit;
+        _dayBgV = v;
+    }
+    return _dayBgV;
+}
+
+
+
+
+- (void)viewAddLineColorBg:(UIView *)bgV colorArr:(NSArray *)colors {
+    CAGradientLayer *layer = [[CAGradientLayer alloc] init];
+    layer.frame = bgV.bounds;
+    layer.colors = colors;
+    layer.startPoint = CGPointMake(0.44, 0.2);
+    layer.endPoint = CGPointMake(0.5, 1);
+    layer.locations = @[@0,@1.0f];
+    layer.name = @"colorLayer";
+    [bgV.layer insertSublayer:layer atIndex:0];
+}
+
+
+
+
+@end
+

+ 15 - 0
Asteria/Fuction/UserCenter/VipCenter/ASVipCenterViewController.m

@@ -9,6 +9,8 @@
 #import "ASUserBaseInfoView.h"
 #import "ASVipCenterLineItemView.h"
 #import "ASVipCenterCollectCell.h"
+#import "ASVipCouponsViewController.h"
+#import "ASBirthdayTreatViewController.h"
 
 @interface ASVipCenterViewController () <UICollectionViewDelegate,UICollectionViewDataSource>
 
@@ -62,6 +64,8 @@
     self.statusBgV.backgroundColor = _E0FFF5;
     self.customNavBar.backgroundColor = _F0FFFA;
     
+    
+    
 }
 
 // MARK: - loadSubVs
@@ -191,6 +195,17 @@
         ASVipCenterLineItemView *v = [[ASVipCenterLineItemView alloc] initWithFrame:CGRectZero];
         [v setData:title canGoNext:true];
         v.tag = 90000+i;
+        __weak typeof(v) weakV = v;
+        v.selectCallBack = ^{
+            if (weakV.tag%100 == 0) {
+                ASVipCouponsViewController *vc = [ASVipCouponsViewController new];
+                [self.navigationController pushViewController:vc animated:true];
+            } else {
+                ASBirthdayTreatViewController *vc = [ASBirthdayTreatViewController new];
+                vc.isBirthday = arc4random()%2 == 1;
+                [self.navigationController pushViewController:vc animated:true];
+            }
+        };
         [self.bottomVArr addObject:v];
         [stv addArrangedSubview:v];
     }

+ 16 - 0
Asteria/Fuction/UserCenter/VipCenter/ASVipCouponsViewController.h

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

+ 108 - 0
Asteria/Fuction/UserCenter/VipCenter/ASVipCouponsViewController.m

@@ -0,0 +1,108 @@
+//
+//  ASVipCouponsViewController.m
+//  Asteria
+//
+//  Created by iOS on 2023/7/1.
+//
+
+#import "ASVipCouponsViewController.h"
+#import "ASCouponListCell.h"
+#import "ASDefualtAlertV.h"
+#import "ASHomeAlertWindow.h"
+
+@interface ASVipCouponsViewController () <UITableViewDelegate,UITableViewDataSource>
+
+@property (nonatomic, strong) UIView *colorBgV;
+@property (nonatomic, strong) UITableView *tableV;
+
+@end
+
+@implementation ASVipCouponsViewController
+
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self loadSubVs];
+    [self configSubVs];
+    
+    
+}
+
+- (void)configSubVs {
+    self.titleStr = @"VIP Exclusive Coupon";
+    [self setNavRightSearch:^{
+        
+    }];
+    self.statusBgV.backgroundColor = _E0FFF5;
+    self.customNavBar.backgroundColor = _F0FFFA;
+    
+}
+
+// MARK: - loadSubVs
+- (void)loadSubVs {
+    [self.view addSubview:self.colorBgV];
+    [self.view addSubview:self.tableV];
+    
+    [self.colorBgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.customNavBar.mas_bottom);
+        make.leading.trailing.bottom.equalTo(self.view);
+    }];
+    
+    [self.tableV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.customNavBar.mas_bottom);
+        make.leading.trailing.bottom.equalTo(self.view);
+    }];
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [UIView viewAddHorColorBg:self.colorBgV colorArr:@[
+            (id)_E0FFF5.CGColor,
+            (id)Col_FFF.CGColor
+        ] startP:CGPointMake(0.5, 0.2) endP:CGPointMake(0.5, 1)];
+    });
+}
+
+// MARK: - subVs
+- (UIView *)colorBgV {
+    if (!_colorBgV) {
+        UIView *v = [UIView baseV];
+        v.backgroundColor = Col_FFF;
+        _colorBgV = v;
+    }
+    return _colorBgV;
+}
+
+- (UITableView *)tableV {
+    if (!_tableV) {
+        UITableView *v = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
+        [v baseSet];
+        v.backgroundColor = UIColor.clearColor;
+        v.delegate  = self;
+        v.dataSource = self;
+        [v registerClass:[ASCouponListCell class] forCellReuseIdentifier:@"ASCouponListCell"];
+        _tableV = v;
+    }
+    return _tableV;
+}
+
+
+// MARK: - UITableViewDelegate,UITableViewDataSource
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return 10;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    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];
+        
+    }];
+    [cell setVipCouponStyle];
+    return cell;
+}
+
+
+@end

+ 7 - 0
Asteria/Fuction/UserCenter/VipCenter/Views/ASVipCenterLineItemView.m

@@ -26,6 +26,12 @@
     self.bt.hidden = !canGoNext;
 }
 
+- (void)selectBtAction {
+    if (self.selectCallBack) {
+        self.selectCallBack();
+    }
+}
+
 - (instancetype)initWithFrame:(CGRect)frame {
     self = [super initWithFrame:frame];
     if (self) {
@@ -97,6 +103,7 @@
 - (UIButton *)bt {
     if (!_bt) {
         UIButton *b = [UIButton buttonWithType:UIButtonTypeCustom];
+        [b addTarget:self action:@selector(selectBtAction) forControlEvents:UIControlEventTouchUpInside];
         _bt = b;
     }
     return _bt;