Ver código fonte

优惠券列表布局基本完成

iOS-Abel 2 anos atrás
pai
commit
461657a69e
36 arquivos alterados com 735 adições e 13 exclusões
  1. 20 0
      Asteria.xcodeproj/project.pbxproj
  2. 1 0
      Asteria/ASUI/ColorDefine.h
  3. 1 1
      Asteria/ASUI/CustomView/UserInfoV/ASUserBaseInfoView.m
  4. 1 1
      Asteria/ASUI/Extensions/UITableView+ASBase.m
  5. 1 1
      Asteria/Fuction/Category/tipV/KWLenovoWordListView.m
  6. 3 0
      Asteria/Fuction/Home/Views/ASHomeTipCell.m
  7. 1 0
      Asteria/Fuction/Home/Views/productList/ASProductSortFilterView.m
  8. 18 0
      Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponListCell.h
  9. 316 0
      Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponListCell.m
  10. 18 0
      Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponsListViewController.h
  11. 100 0
      Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponsListViewController.m
  12. 1 3
      Asteria/Fuction/UserCenter/Points/ASPointsHomeViewController.m
  13. 2 1
      Asteria/Fuction/UserCenter/Points/view/ASPointDetailCell.m
  14. 1 1
      Asteria/Fuction/UserCenter/Points/view/ASPointDetailTableView.m
  15. 2 0
      Asteria/Fuction/UserCenter/Points/view/ASPointEranCell.m
  16. 6 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/Contents.json
  17. 50 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg1.imageset/Contents.json
  18. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg1.imageset/减去 5@2x.png
  19. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg1.imageset/减去 5@3x.png
  20. 50 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg2.imageset/Contents.json
  21. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg2.imageset/减去 13@2x.png
  22. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg2.imageset/减去 13@3x.png
  23. 50 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line1.imageset/Contents.json
  24. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line1.imageset/减去 8@2x.png
  25. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line1.imageset/减去 8@3x.png
  26. 50 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line2.imageset/Contents.json
  27. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line2.imageset/路径 14996@2x.png
  28. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line2.imageset/路径 14996@3x.png
  29. 22 0
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_sep.imageset/Contents.json
  30. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_sep.imageset/线段@2x.png
  31. BIN
      Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_sep.imageset/线段@3x.png
  32. 16 2
      Asteria/Fuction/UserCenter/UserCenterHome/ASUserCenterViewController.m
  33. 1 1
      Asteria/Fuction/UserCenter/UserCenterHome/views/ASSginView.m
  34. 1 1
      Asteria/Fuction/UserCenter/UserCenterHome/views/ASUserCenterEnterItemV.h
  35. 1 0
      Asteria/Fuction/UserCenter/UserCenterHome/views/ASUserCenterEnterItemV.m
  36. 2 1
      Asteria/Fuction/UserCenter/UserCenterHome/views/ASUserCenterTopView.m

+ 20 - 0
Asteria.xcodeproj/project.pbxproj

@@ -124,6 +124,8 @@
 		81DFA56A2A46D82200DA708B /* ASPointDetailTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5692A46D82200DA708B /* ASPointDetailTableView.m */; };
 		81DFA56D2A46D86500DA708B /* ASPointDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA56C2A46D86500DA708B /* ASPointDetailModel.m */; };
 		81DFA5712A46D95400DA708B /* ASPointDetailCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5702A46D95400DA708B /* ASPointDetailCell.m */; };
+		81DFA5752A47D97C00DA708B /* ASCouponsListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5742A47D97C00DA708B /* ASCouponsListViewController.m */; };
+		81DFA5782A47F28D00DA708B /* ASCouponListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 81DFA5772A47F28D00DA708B /* ASCouponListCell.m */; };
 		81E257EE2A120756004EEF71 /* ASUserCenterTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E257ED2A120756004EEF71 /* ASUserCenterTopView.m */; };
 		81E257F32A120975004EEF71 /* ASUserBaseInfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81E257F22A120975004EEF71 /* ASUserBaseInfoView.m */; };
 		81E257F62A12259B004EEF71 /* UserCenter.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81E257F52A12259B004EEF71 /* UserCenter.xcassets */; };
@@ -452,6 +454,10 @@
 		81DFA56C2A46D86500DA708B /* ASPointDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASPointDetailModel.m; sourceTree = "<group>"; };
 		81DFA56F2A46D95400DA708B /* ASPointDetailCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASPointDetailCell.h; sourceTree = "<group>"; };
 		81DFA5702A46D95400DA708B /* ASPointDetailCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASPointDetailCell.m; sourceTree = "<group>"; };
+		81DFA5732A47D97C00DA708B /* ASCouponsListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCouponsListViewController.h; sourceTree = "<group>"; };
+		81DFA5742A47D97C00DA708B /* ASCouponsListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCouponsListViewController.m; sourceTree = "<group>"; };
+		81DFA5762A47F28D00DA708B /* ASCouponListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCouponListCell.h; sourceTree = "<group>"; };
+		81DFA5772A47F28D00DA708B /* ASCouponListCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCouponListCell.m; sourceTree = "<group>"; };
 		81E257EC2A120756004EEF71 /* ASUserCenterTopView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASUserCenterTopView.h; sourceTree = "<group>"; };
 		81E257ED2A120756004EEF71 /* ASUserCenterTopView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASUserCenterTopView.m; sourceTree = "<group>"; };
 		81E257F12A120975004EEF71 /* ASUserBaseInfoView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASUserBaseInfoView.h; sourceTree = "<group>"; };
@@ -1116,6 +1122,7 @@
 		81D484DD2A0F40510075DC43 /* UserCenter */ = {
 			isa = PBXGroup;
 			children = (
+				81DFA5722A47D91400DA708B /* ConponsAndGiftCard */,
 				811F42432A40531C00DA68F1 /* Points */,
 				81E257F52A12259B004EEF71 /* UserCenter.xcassets */,
 				811F42422A40530200DA68F1 /* UserCenterHome */,
@@ -1160,6 +1167,17 @@
 			path = model;
 			sourceTree = "<group>";
 		};
+		81DFA5722A47D91400DA708B /* ConponsAndGiftCard */ = {
+			isa = PBXGroup;
+			children = (
+				81DFA5732A47D97C00DA708B /* ASCouponsListViewController.h */,
+				81DFA5742A47D97C00DA708B /* ASCouponsListViewController.m */,
+				81DFA5762A47F28D00DA708B /* ASCouponListCell.h */,
+				81DFA5772A47F28D00DA708B /* ASCouponListCell.m */,
+			);
+			path = ConponsAndGiftCard;
+			sourceTree = "<group>";
+		};
 		81E257EF2A12093A004EEF71 /* CustomView */ = {
 			isa = PBXGroup;
 			children = (
@@ -1914,6 +1932,7 @@
 				81DFA5602A46CC8E00DA708B /* CTMediator+ASWebView.m in Sources */,
 				81C3B44A29F6661500D79294 /* ASBaseNavController.m in Sources */,
 				9AD3460C2A08D60F005CA070 /* ZFVolumeBrightnessView.m in Sources */,
+				81DFA5752A47D97C00DA708B /* ASCouponsListViewController.m in Sources */,
 				9AD346072A08D60F005CA070 /* UIViewController+ZFPlayerRotation.m in Sources */,
 				8160200D2A2DD5C000E4A8F1 /* CTMediator+UserCenter.m in Sources */,
 				81DFA5712A46D95400DA708B /* ASPointDetailCell.m in Sources */,
@@ -1978,6 +1997,7 @@
 				9ACBEC252A14707400A8F97A /* AS_SignUpC.m in Sources */,
 				81717D1F2A3C4AE000648139 /* KWMoneyTypeHeadView.m in Sources */,
 				81EC47782A3426CE00516573 /* ASHomeLookingCollCell.m in Sources */,
+				81DFA5782A47F28D00DA708B /* ASCouponListCell.m in Sources */,
 				8160201C2A2F101C00E4A8F1 /* ASHomeTipCell.m in Sources */,
 				81717D1E2A3C4AE000648139 /* KWSearchMainTypeTableView.m in Sources */,
 				81EC47662A33035D00516573 /* ASHomeNewInCellTableViewCell.m in Sources */,

+ 1 - 0
Asteria/ASUI/ColorDefine.h

@@ -45,6 +45,7 @@
 #define _B1B1B1 ([UIColor colorWithHexString:@"#B1B1B1"])
 #define _E0FFF5 ([UIColor colorWithHexString:@"#E0FFF5"])
 
+#define _128273 ([UIColor colorWithHexString:@"#128273"])
 #define _1CBC9D ([UIColor colorWithHexString:@"#1CBC9D"])
 // as主题色 绿色
 #define _32CFB0 ([UIColor colorWithHexString:@"#32CFB0"])

+ 1 - 1
Asteria/ASUI/CustomView/UserInfoV/ASUserBaseInfoView.m

@@ -23,7 +23,7 @@
 
 
 - (void)setDemoData {
-    [self.avaterV setUserHeadV:@"" uName:@"new"];//@"https://www.shijuepi.com/uploads/allimg/201103/1-201103104255.jpg"
+    [self.avaterV setUserHeadV:@"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F5b342386-43ce-4ab5-bf30-c1bb7e2d85d8%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1690257640&t=8bdb74b6b68e2eeb05e1ab74bf6647ab" uName:@"new"];//@"https://www.shijuepi.com/uploads/allimg/201103/1-201103104255.jpg"
     self.uNameLb.text = @"new";
     self.vipLevelV.image = [UIImage imageNamed:@"uc_vip_level_1"];
     self.uNameLb.text = @"new";

+ 1 - 1
Asteria/ASUI/Extensions/UITableView+ASBase.m

@@ -10,7 +10,7 @@
 @implementation UITableView (ASBase)
 
 - (void)baseSet {
-    
+    self.backgroundColor = Col_FFF;
     self.separatorStyle = UITableViewCellSeparatorStyleNone;
     self.showsVerticalScrollIndicator = false;
     self.rowHeight = UITableViewAutomaticDimension;

+ 1 - 1
Asteria/Fuction/Category/tipV/KWLenovoWordListView.m

@@ -69,7 +69,7 @@
         tabV.backgroundColor = UIColor.whiteColor;
         tabV.delegate = self;
         tabV.dataSource = self;
-        tabV.separatorStyle = UITableViewCellSeparatorStyleNone;
+        [tabV baseSet];
         tabV.rowHeight = 34;
         [tabV registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
         _tableV = tabV;

+ 3 - 0
Asteria/Fuction/Home/Views/ASHomeTipCell.m

@@ -39,6 +39,8 @@
 - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
     self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
     if (self) {
+        self.contentView.backgroundColor = Col_FFF;
+        self.backgroundColor = Col_FFF;
         self.selectionStyle = UITableViewCellSelectionStyleNone;
         [self.contentView addSubview:self.collV];
         CGFloat margin = 10;
@@ -70,6 +72,7 @@
         layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
         UICollectionView *col = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, colH) collectionViewLayout:layout];
         [col registerClass:[ASHomeTipCollectCell class] forCellWithReuseIdentifier:@"ASHomeTipCollectCell"];
+        col.backgroundColor = UIColor.whiteColor;
         col.showsHorizontalScrollIndicator = false;
         col.delegate = self;
         col.dataSource = self;

+ 1 - 0
Asteria/Fuction/Home/Views/productList/ASProductSortFilterView.m

@@ -156,6 +156,7 @@
 - (UITableView *)tableV {
     if (!_tableV) {
         UITableView *v = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain];
+        [v baseSet];
         v.backgroundColor = UIColor.clearColor;
         v.delegate = self;
         v.dataSource = self;

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

@@ -0,0 +1,18 @@
+//
+//  ASCouponListCell.h
+//  Asteria
+//
+//  Created by iOS on 2023/6/25.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASCouponListCell : UITableViewCell
+
+@property (nonatomic, copy) btnClickBlock copyCallBack;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 316 - 0
Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponListCell.m

@@ -0,0 +1,316 @@
+//
+//  ASCouponListCell.m
+//  Asteria
+//
+//  Created by iOS on 2023/6/25.
+//
+
+#import "ASCouponListCell.h"
+
+@interface ASCouponListCell ()
+
+@property (nonatomic, strong) UIView *bgV;
+@property (nonatomic, strong) UIImageView *bg1;
+@property (nonatomic, strong) UIImageView *bg2;
+@property (nonatomic, strong) UIImageView *ln1;
+@property (nonatomic, strong) UIImageView *ln2;
+@property (nonatomic, strong) UIImageView *sep;
+
+@property (nonatomic, strong) UILabel *titleLb;
+@property (nonatomic, strong) UILabel *ruleLb;
+@property (nonatomic, strong) UILabel *dateLb;
+
+@property (nonatomic, strong) UILabel *cpLb;
+@property (nonatomic, strong) UILabel *codeTitleLb;
+@property (nonatomic, strong) UILabel *codeLb;
+
+@property (nonatomic, strong) UIButton *cpBt;
+
+@property (nonatomic, strong) UIImageView *usedTopV;
+
+
+@end
+
+@implementation ASCouponListCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if (self)
+    {
+        [self loadSubVs];
+        [self setDemoData];
+    }
+    return self;
+}
+
+- (void)setDemoData {
+    self.titleLb.text = @"$10 off";
+    self.ruleLb.text = @"For Order ≥ $99";
+    self.dateLb.text = @"DTAE:2022/09/01-2022/09/30";
+    
+    self.codeLb.text = @"3VIP55";
+}
+
+- (void)loadSubVs {
+    self.backgroundColor = UIColor.clearColor;
+    self.contentView.backgroundColor = UIColor.clearColor;
+    self.selectionStyle = UITableViewCellSelectionStyleNone;
+    [self.contentView addSubview:self.bgV];
+    [self.bgV addSubview:self.bg1];
+    [self.bgV addSubview:self.bg2];
+    [self.bgV addSubview:self.ln1];
+    [self.bgV addSubview:self.ln2];
+    [self.bgV addSubview:self.sep];
+    //229/106
+    [self.bgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@100);
+        make.leading.equalTo(self.contentView).offset(20);
+        make.trailing.equalTo(self.contentView).offset(-20);
+        make.top.equalTo(self.contentView).offset(15);
+        make.bottom.equalTo(self.contentView).offset(-5);
+    }];
+    
+    [self.bg1 mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.bgV);
+    }];
+    [self.bg2 mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.bottom.trailing.equalTo(self.bgV);
+        make.width.equalTo(self.bgV).multipliedBy(106.0/(229+106));
+    }];
+    [self.sep mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.equalTo(@1);
+        make.top.bottom.equalTo(self.bgV);
+        make.centerX.equalTo(self.bg2.mas_leading);
+    }];
+    
+    [self.ln1 mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.bgV);
+    }];
+    
+    [self.ln2 mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.leading.equalTo(self.bgV).offset(5);
+        make.trailing.equalTo(self.bgV).offset(-5);
+        make.top.equalTo(self.bgV).offset(5);
+        make.bottom.equalTo(self.bgV).offset(-5);
+    }];
+    
+    [self.bgV addSubview:self.titleLb];
+    [self.bgV addSubview:self.ruleLb];
+    [self.bgV addSubview:self.dateLb];
+    
+    UIStackView *st = [UIStackView baseStackV:true];
+    st.spacing = 0;
+    st.distribution = UIStackViewDistributionFill;
+    [self.bgV addSubview:st];
+    
+    [st addArrangedSubview:self.cpLb];
+    [st addArrangedSubview:self.codeTitleLb];
+    [st addArrangedSubview:self.codeLb];
+    
+    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.bgV).offset(16);
+        make.leading.equalTo(self.bgV).offset(30);
+        make.trailing.equalTo(self.sep.mas_leading).offset(-8);
+        make.height.equalTo(@34);
+    }];
+    [self.ruleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.titleLb.mas_bottom);
+        make.leading.trailing.equalTo(self.titleLb);
+        make.height.equalTo(@14);
+    }];
+    [self.dateLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.ruleLb.mas_bottom).offset(6);
+        make.leading.trailing.equalTo(self.titleLb);
+        make.height.equalTo(@14);
+    }];
+    
+    [st mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerY.equalTo(self.bg2);
+        make.centerX.equalTo(self.bg2).offset(-8);
+        make.width.equalTo(@80);
+    }];
+    
+    [self.cpLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@34);
+    }];
+    
+    [self.codeTitleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@17);
+    }];
+    
+    [self.codeLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.equalTo(@17);
+    }];
+    
+    [self.bg2 addSubview:self.cpBt];
+    [self.cpBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.equalTo(self.bg2);
+    }];
+    
+    st.transform = CGAffineTransformRotate(st.transform, -M_PI/2.0);
+    
+}
+
+- (UIView *)bgV {
+    if (!_bgV) {
+        UIView *v = [UIView baseV];
+        v.backgroundColor = UIColor.clearColor;
+        v.clipsToBounds = true;
+        _bgV = v;
+    }
+    return _bgV;
+}
+
+- (UIImageView *)bg1 {
+    if (!_bg1) {
+        UIImageView *v = [UIImageView baseImgV];
+        v.contentMode = UIViewContentModeScaleToFill;
+        v.clipsToBounds = true;
+        v.image = [UIImage imageNamed:@"uc_coupon_colorBg1"];
+        _bg1 = v;
+    }
+    return _bg1;
+}
+
+- (UIImageView *)bg2 {
+    if (!_bg2) {
+        UIImageView *v = [UIImageView baseImgV];
+        v.contentMode = UIViewContentModeScaleToFill;
+        v.userInteractionEnabled = true;
+        v.clipsToBounds = true;
+        v.image = [UIImage imageNamed:@"uc_coupon_colorBg2"];
+        _bg2 = v;
+    }
+    return _bg2;
+}
+
+- (UIImageView *)ln1 {
+    if (!_ln1) {
+        UIImageView *v = [UIImageView baseImgV];
+        v.contentMode = UIViewContentModeScaleToFill;
+        v.clipsToBounds = true;
+        v.image = [UIImage imageNamed:@"uc_coupon_line1"];
+        _ln1 = v;
+    }
+    return _ln1;
+}
+
+- (UIImageView *)ln2 {
+    if (!_ln2) {
+        UIImageView *v = [UIImageView baseImgV];
+        v.contentMode = UIViewContentModeScaleToFill;
+        v.clipsToBounds = true;
+        v.image = [UIImage imageNamed:@"uc_coupon_line2"];
+        _ln2 = v;
+    }
+    return _ln2;
+}
+
+- (UIImageView *)sep {
+    if (!_sep) {
+        UIImageView *v = [UIImageView baseImgV];
+        v.contentMode = UIViewContentModeScaleAspectFill;
+        v.clipsToBounds = true;
+        v.image = [UIImage imageNamed:@"uc_coupon_sep"];
+        _sep = v;
+    }
+    return _sep;
+}
+
+- (UILabel *)titleLb {
+    if (!_titleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_BlackItalic size:28];
+        lb.textColor = Col_000;
+        _titleLb = lb;
+    }
+    return _titleLb;
+}
+
+- (UILabel *)ruleLb {
+    if (!_ruleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_Regular size:12];
+        lb.textColor = _043632;
+        _ruleLb = lb;
+    }
+    return _ruleLb;
+}
+
+- (UILabel *)dateLb {
+    if (!_dateLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_Regular size:12];
+        lb.textColor = _128273;
+        _dateLb = lb;
+    }
+    return _dateLb;
+}
+
+- (UILabel *)cpLb {
+    if (!_cpLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_Black size:28];
+        lb.textColor = Col_FFF;
+        lb.text = @"COPY";
+        lb.textAlignment = NSTextAlignmentCenter;
+        _cpLb = lb;
+    }
+    return _cpLb;
+}
+
+- (UILabel *)codeTitleLb {
+    if (!_codeTitleLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.textColor = _043632;
+        lb.text = @"CODE";
+        _codeTitleLb = lb;
+    }
+    return _codeTitleLb;
+}
+
+- (UILabel *)codeLb {
+    if (!_codeLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.textColor = _043632;
+        _codeLb = lb;
+    }
+    return _codeLb;
+}
+
+- (UIButton *)cpBt {
+    if (!_cpBt) {
+        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
+        [bt addTarget: self action:@selector(copyAction) forControlEvents:UIControlEventTouchUpInside];
+        _cpBt = bt;
+    }
+    return _cpBt;
+}
+
+- (void)copyAction {
+    if (!self.codeLb.text.isEmpty) {
+        UIPasteboard.generalPasteboard.string = self.codeLb.text;
+        if (self.copyCallBack){
+            self.copyCallBack();
+        }
+    }
+}
+
+
+
+@end

+ 18 - 0
Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponsListViewController.h

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

+ 100 - 0
Asteria/Fuction/UserCenter/ConponsAndGiftCard/ASCouponsListViewController.m

@@ -0,0 +1,100 @@
+//
+//  ASCouponsListViewController.m
+//  Asteria
+//
+//  Created by iOS on 2023/6/25.
+//
+
+#import "ASCouponsListViewController.h"
+#import "ASCouponListCell.h"
+
+@interface ASCouponsListViewController () <UITableViewDelegate,UITableViewDataSource>
+
+@property (nonatomic, strong) UIView *colorBgV;
+@property (nonatomic, strong) UITableView *tableV;
+
+@end
+
+@implementation ASCouponsListViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    [self loadSubVs];
+    [self configSubVs];
+    
+    
+}
+
+- (void)configSubVs {
+    self.titleStr = self.isCard ? @"My Giftcard" : @"Coupons";
+    [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:^{
+        [weakSelf.view makeToast:@"Code Copied"];
+    }];
+    return cell;
+}
+
+
+@end

+ 1 - 3
Asteria/Fuction/UserCenter/Points/ASPointsHomeViewController.m

@@ -77,9 +77,7 @@
         [v registerClass:[ASPointEranCell class] forCellReuseIdentifier:@"ASPointEranCell"];
         v.delegate  = self;
         v.dataSource = self;
-        v.separatorStyle = UITableViewCellSeparatorStyleNone;
-        v.backgroundColor = Col_FFF;
-        v.showsVerticalScrollIndicator = false;
+        [v baseSet];
         v.tableHeaderView = self.headV;
         _tableV = v;
     }

+ 2 - 1
Asteria/Fuction/UserCenter/Points/view/ASPointDetailCell.m

@@ -49,8 +49,9 @@
 }
 
 - (void)confgSubV {
+    self.backgroundColor = Col_FFF;
+    self.contentView.backgroundColor = Col_FFF;
     self.selectionStyle = UITableViewCellSelectionStyleNone;
-    self.contentView.backgroundColor = [UIColor whiteColor];
     
     [self.contentView addSubview:self.bgV];
     [self.bgV addSubview:self.titleLb];

+ 1 - 1
Asteria/Fuction/UserCenter/Points/view/ASPointDetailTableView.m

@@ -23,7 +23,7 @@
 }
     
 - (void)configSelf {
-    self.separatorStyle = UITableViewCellSeparatorStyleNone;
+    [self baseSet];
     [self registerClass:[ASPointDetailCell class] forCellReuseIdentifier:@"ASPointDetailCell"];
     self.delegate = self;
     self.dataSource = self;

+ 2 - 0
Asteria/Fuction/UserCenter/Points/view/ASPointEranCell.m

@@ -46,6 +46,8 @@
 
 
 - (void)loadSubVs {
+    self.backgroundColor = Col_FFF;
+    self.contentView.backgroundColor = Col_FFF;
     self.selectionStyle = UITableViewCellSelectionStyleNone;
     [self.contentView addSubview:self.lineV];
     [self.contentView addSubview:self.titleLb];

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

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

+ 50 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg1.imageset/Contents.json

@@ -0,0 +1,50 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "减去 5@2x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 99,
+          "left" : 29,
+          "right" : 29,
+          "top" : 99
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "2x"
+    },
+    {
+      "filename" : "减去 5@3x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 149,
+          "left" : 44,
+          "right" : 44,
+          "top" : 149
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg1.imageset/减去 5@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg1.imageset/减去 5@3x.png


+ 50 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg2.imageset/Contents.json

@@ -0,0 +1,50 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "减去 13@2x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 30,
+          "left" : 106,
+          "right" : 106,
+          "top" : 30
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "2x"
+    },
+    {
+      "filename" : "减去 13@3x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 46,
+          "left" : 159,
+          "right" : 160,
+          "top" : 46
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg2.imageset/减去 13@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_colorBg2.imageset/减去 13@3x.png


+ 50 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line1.imageset/Contents.json

@@ -0,0 +1,50 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "减去 8@2x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 99,
+          "left" : 32,
+          "right" : 33,
+          "top" : 99
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "2x"
+    },
+    {
+      "filename" : "减去 8@3x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 149,
+          "left" : 48,
+          "right" : 49,
+          "top" : 149
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line1.imageset/减去 8@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line1.imageset/减去 8@3x.png


+ 50 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line2.imageset/Contents.json

@@ -0,0 +1,50 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "路径 14996@2x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 90,
+          "left" : 31,
+          "right" : 31,
+          "top" : 89
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "2x"
+    },
+    {
+      "filename" : "路径 14996@3x.png",
+      "idiom" : "universal",
+      "resizing" : {
+        "cap-insets" : {
+          "bottom" : 134,
+          "left" : 45,
+          "right" : 47,
+          "top" : 134
+        },
+        "center" : {
+          "height" : 1,
+          "mode" : "tile",
+          "width" : 1
+        },
+        "mode" : "9-part"
+      },
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line2.imageset/路径 14996@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_line2.imageset/路径 14996@3x.png


+ 22 - 0
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_sep.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/coupons/uc_coupon_sep.imageset/线段@2x.png


BIN
Asteria/Fuction/UserCenter/UserCenter.xcassets/coupons/uc_coupon_sep.imageset/线段@3x.png


+ 16 - 2
Asteria/Fuction/UserCenter/UserCenterHome/ASUserCenterViewController.m

@@ -10,7 +10,7 @@
 #import "KWMineHomeOrderHeadView.h"
 #import "KWMineHomeOrderListCell.h"
 #import "KWMineMoreProductsCell.h"
-
+#import "ASCouponsListViewController.h"
 #import "ASPointsHomeViewController.h"
 
 
@@ -47,15 +47,28 @@
     [self.tableHeadV.signV configDayArr:4 currentDay:7 status:false];
     
     
+    __weak typeof(self) weakSelf = self;
     [self.tableHeadV.itemsV setItemTapCallBack:^(NSInteger tag) {
         // -2编辑头像 -1设置 0 vip  1优惠券 2积分 3 钱包 4联系 5浏览历史
         switch (tag) {
             case -2:
                 
+                break;
+            case 0: {
+                ASCouponsListViewController *vc = [[ASCouponsListViewController alloc] init];
+                vc.isCard = false;
+                [weakSelf.navigationController pushViewController:vc animated:true];
+            }
+                break;
+            case 1: {
+                ASCouponsListViewController *vc = [[ASCouponsListViewController alloc] init];
+                vc.isCard = true;
+                [weakSelf.navigationController pushViewController:vc animated:true];
+            }
                 break;
             case 2: {
                 ASPointsHomeViewController *vc = [[ASPointsHomeViewController alloc] init];
-                [self.navigationController pushViewController:vc animated:true];
+                [weakSelf.navigationController pushViewController:vc animated:true];
             }
             default:
                 break;
@@ -183,6 +196,7 @@
         v.delegate = self;
         v.dataSource = self;
         [v baseSet];
+        
         _tableV = v;
     }
     return _tableV;

+ 1 - 1
Asteria/Fuction/UserCenter/UserCenterHome/views/ASSginView.m

@@ -93,7 +93,7 @@
 }
 
 - (void)loadSubV {
-    
+    self.backgroundColor = Col_FFF;
     [self addSubview:self.bgV];
     [self.bgV addSubview:self.colorBgV];
     [self.bgV addSubview:self.titleLb];

+ 1 - 1
Asteria/Fuction/UserCenter/UserCenterHome/views/ASUserCenterEnterItemV.h

@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface ASUserCenterEnterItemV : UIView
 
-/// -2编辑头像 -1设置 0 vip  1优惠券 2积分 3 钱包 4联系 5浏览历史
+/// -2编辑头像 -1设置 0 优惠券  1礼品卡 2积分 3vip  4联系  5消息
 @property (nonatomic, copy) void(^itemTapCallBack)(NSInteger tag);
 
 @end

+ 1 - 0
Asteria/Fuction/UserCenter/UserCenterHome/views/ASUserCenterEnterItemV.m

@@ -32,6 +32,7 @@
 }
 
 - (void)configSubV {
+    self.backgroundColor = Col_FFF;
     [self addSubview:self.bgV];
     [self.bgV mas_makeConstraints:^(MASConstraintMaker *make) {
         make.leading.top.equalTo(self).offset(10);

+ 2 - 1
Asteria/Fuction/UserCenter/UserCenterHome/views/ASUserCenterTopView.m

@@ -37,7 +37,8 @@
 @implementation ASUserCenterTopView
 
 - (void)setDemoData {
-    [self.bgAvaterV setUserHeadV:@"" uName:@"new"];
+    
+    [self.bgAvaterV setUserHeadV:@"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F5b342386-43ce-4ab5-bf30-c1bb7e2d85d8%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1690257640&t=8bdb74b6b68e2eeb05e1ab74bf6647ab" uName:@"new"];
     [self.bgAvaterV setBorderColor:[UIColor clearColor] width:0];
 }