学丽 5 年之前
父節點
當前提交
f9e29f7a2f

+ 9 - 9
KuDianProject/Earning/View/KDPEarningHeadView.m

@@ -50,15 +50,15 @@
50 50
     [imgv sd_setImageWithURL:[NSURL URLWithString:model.img]placeholderImage:[UIImage imageNamed:placholderImg]];
51 51
     [self.headImgBtn addSubview:imgv];
52 52
     
53
-    UIImageView *imgV=[[UIImageView alloc]init];
54
-    imgV.image=[UIImage imageNamed:@"LIVE"];
55
-    [backImgV addSubview:imgV];
56
-    [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
57
-        make.left.mas_equalTo(self.headImgBtn.mas_left).offset(5);
58
-        make.width.mas_equalTo(22);
59
-        make.height.mas_equalTo(9);
60
-        make.top.mas_equalTo(self.headImgBtn.mas_bottom).offset(-7);
61
-    }];
53
+//    UIImageView *imgV=[[UIImageView alloc]init];
54
+//    imgV.image=[UIImage imageNamed:@"LIVE"];
55
+//    [backImgV addSubview:imgV];
56
+//    [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
57
+//        make.left.mas_equalTo(self.headImgBtn.mas_left).offset(5);
58
+//        make.width.mas_equalTo(22);
59
+//        make.height.mas_equalTo(9);
60
+//        make.top.mas_equalTo(self.headImgBtn.mas_bottom).offset(-7);
61
+//    }];
62 62
    
63 63
     
64 64
     UILabel *titleL =[[UILabel alloc]initWithFrame:CGRectMake(50, KDStatusHeight, SCREEN_WIDTH-100, 44)];

+ 2 - 0
KuDianProject/Login/model/KDPAccountTool.m

@@ -50,12 +50,14 @@
50 50
  */
51 51
 + (BOOL)deleteAccount
52 52
 {
53
+   
53 54
     
54 55
     //加载模型
55 56
     KDPAccountModel *account=[NSKeyedUnarchiver unarchiveObjectWithFile:CCAccountPath];
56 57
     [MiPushSDK unsetAlias:account.token];
57 58
     [[NSUserDefaults standardUserDefaults]removeObjectForKey:UserPhone];
58 59
     [[NSUserDefaults standardUserDefaults]synchronize];
60
+    
59 61
     return [[NSFileManager defaultManager] removeItemAtPath:CCAccountPath error:nil];
60 62
     
61 63
 }

+ 1 - 0
KuDianProject/Public/KDPNetworkRequestHTTP.m

@@ -80,6 +80,7 @@
80 80
         }
81 81
     }];
82 82
 }
83
+
83 84
 +(void)appOpenLogin
84 85
 {
85 86
     [[NSNotificationCenter defaultCenter]postNotificationName:@"exitLogin" object:nil];

+ 4 - 2
KuDianProject/Public/KDPublicMethod.m

@@ -146,8 +146,10 @@
146 146
 
147 147
 +(BOOL)is_hiddenMoney
148 148
 {
149
-    KDPAccountModel *model =[KDPAccountTool account];
150
-    if (model.is_hidden.integerValue == 1) {
149
+    //存储第一次打开APP,是否显示客服页面,
150
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
151
+    NSString *oneStep =[defaults objectForKey:@"hidden"];
152
+    if (oneStep.integerValue == 1) {
151 153
         return YES;
152 154
     }
153 155
     return NO;

+ 1 - 0
KuDianProject/TOP/Controller/KDPDrawerVC.m

@@ -124,6 +124,7 @@
124 124
         _listTabView.backgroundColor=[UIColor clearColor];
125 125
         _listTabView.emptyDataSetDelegate = self;
126 126
         _listTabView.emptyDataSetSource = self; _listTabView.separatorStyle=UITableViewCellSeparatorStyleNone;
127
+        _listTabView.scrollEnabled=NO;
127 128
         if (@available(iOS 11.0, *)) {
128 129
             _listTabView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
129 130
         } else {

+ 2 - 3
KuDianProject/TOP/Controller/KDPGoodDetailVC.m

@@ -146,7 +146,7 @@
146 146
     bottomView.backgroundColor=[UIColor whiteColor];
147 147
     [self.view addSubview:bottomView];
148 148
     
149
-    collectButton=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 86, KDTabBarHeight-KDTabBottomHeight-5)];
149
+    collectButton=[[UIButton alloc]initWithFrame:CGRectMake(0, 3, 86, 33)];
150 150
     collectButton.titleLabel.font=[UIFont systemFontOfSize:10];
151 151
    
152 152
     [collectButton setTitle:@"收藏" forState:UIControlStateNormal];
@@ -159,11 +159,10 @@
159 159
     [collectButton setButtonImageTitleStyle:ButtonImageTitleStyleCenterDown padding:3];
160 160
     [collectButton addTarget:self action:@selector(detailCollectClickButton) forControlEvents:UIControlEventTouchUpInside];
161 161
     [bottomView addSubview:collectButton];
162
-    
163 162
    
164 163
     
165
-    
166 164
     UIButton *buybutton =[[UIButton alloc]initWithFrame:CGRectMake(collectButton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
165
+    
167 166
     buybutton.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:(SCREEN_WIDTH-96)/2];
168 167
     [buybutton setTitle:@"购买样品" forState:UIControlStateNormal];
169 168
     [bottomView addSubview:buybutton];

+ 9 - 12
KuDianProject/TOP/Controller/KDPTopViewController.m

@@ -139,15 +139,15 @@
139 139
         make.top.mas_equalTo(KDStatusHeight+4);
140 140
         make.height.width.mas_equalTo(32);
141 141
     }];
142
-    UIImageView *imgV=[[UIImageView alloc]init];
143
-    imgV.image=[UIImage imageNamed:@"LIVE"];
144
-    [self.navBar addSubview:imgV];
145
-    [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
146
-        make.left.mas_equalTo(self.headImgBtn.mas_left).offset(5);
147
-        make.width.mas_equalTo(22);
148
-        make.height.mas_equalTo(9);
149
-        make.top.mas_equalTo(self.headImgBtn.mas_bottom).offset(-7);
150
-    }];
142
+//    UIImageView *imgV=[[UIImageView alloc]init];
143
+//    imgV.image=[UIImage imageNamed:@"LIVE"];
144
+//    [self.navBar addSubview:imgV];
145
+//    [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
146
+//        make.left.mas_equalTo(self.headImgBtn.mas_left).offset(5);
147
+//        make.width.mas_equalTo(22);
148
+//        make.height.mas_equalTo(9);
149
+//        make.top.mas_equalTo(self.headImgBtn.mas_bottom).offset(-7);
150
+//    }];
151 151
     [self.messageButton mas_makeConstraints:^(MASConstraintMaker *make) {
152 152
         make.right.mas_equalTo(-10);
153 153
         make.top.mas_equalTo(KDStatusHeight+10);
@@ -207,9 +207,6 @@
207 207
     }
208 208
     earinCell.orderNumgL.text=self.orderNumber;
209 209
     earinCell.rebet_money=self.order_rebate_money;
210
-//    earinCell.liveDataBlock = ^{
211
-//        self.tabBarController.selectedIndex=2;
212
-//    };
213 210
     return earinCell;
214 211
     
215 212
 }

+ 4 - 1
KuDianProject/TOP/Drawer/Control/KDPCollectHistoryVC.m

@@ -22,7 +22,10 @@
22 22
     [super viewDidLoad];
23 23
     self.page_num = 1;
24 24
     [self setNavUI];
25
-    [self.navBar addleftReturnButton:self selector:@selector(returnClickBtn)];
25
+    UIButton *returnBtn =[[UIButton alloc]initWithFrame:CGRectMake(0, KDStatusHeight, 0, 0)];
26
+    [returnBtn setImage:[UIImage imageNamed:@"return_white"] forState:UIControlStateNormal];
27
+    [returnBtn addTarget:self action:@selector(returnClickBtn) forControlEvents:UIControlEventTouchUpInside];
28
+    self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:returnBtn];
26 29
     [self reqeustData];
27 30
 }
28 31
 -(void)reqeustData

+ 1 - 1
KuDianProject/TOP/Drawer/View/KDPServiceView.m

@@ -35,7 +35,7 @@
35 35
         [backV addSubview:label];
36 36
         
37 37
         
38
-        UILabel *contentL=[[UILabel alloc]initWithFrame:CGRectMake(71, label.bottom+21, 140, 75)];
38
+        UILabel *contentL=[[UILabel alloc]initWithFrame:CGRectMake(69, label.bottom+21, 150, 75)];
39 39
         contentL.font=[UIFont systemFontOfSize:15];
40 40
         contentL.numberOfLines=3;
41 41
         contentL.textAlignment=NSTextAlignmentCenter;

+ 2 - 0
KuDianProject/TOP/View/Detail/KDPDetailGoodInformationView.h

@@ -20,8 +20,10 @@ NS_ASSUME_NONNULL_BEGIN
20 20
 @property(nonatomic,strong)UILabel *originalLabel;
21 21
 @property(nonatomic,copy)void(^returnBlock)(void);
22 22
 @property(nonatomic,strong)KDPGoodsModel *model;
23
+@property(nonatomic,strong)UILabel *profitsLabel;
23 24
 @property(nonatomic,strong)UIImageView *couponImgV;
24 25
 @property(nonatomic,strong)UILabel *couponPriceL;
26
+
25 27
 @end
26 28
 
27 29
 NS_ASSUME_NONNULL_END

+ 45 - 29
KuDianProject/TOP/View/Detail/KDPDetailGoodInformationView.m

@@ -15,16 +15,19 @@
15 15
     self=[super initWithFrame:frame];
16 16
     if (self) {
17 17
         
18
-        self.imgView=[[SDCycleScrollView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 355+KDStatusHeight)];
18
+        self.imgView=[[SDCycleScrollView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 395+KDStatusHeight)];
19 19
         self.imgView.backgroundColor=[UIColor colorWithHexString:LineColor];
20 20
         [self addSubview:self.imgView];
21 21
         
22
-       
22
+        UIView*backV=[[UIView alloc]initWithFrame:CGRectMake(0, self.imgView.height-50, SCREEN_WIDTH, 50)];
23
+        backV.backgroundColor=[UIColor colorWithHexString:@"#444444"];
24
+        [self addSubview:backV];
25
+        
23 26
         
24 27
         
25
-        self.shopImgV=[[UIImageView alloc]initWithFrame:CGRectMake(10, self.imgView.bottom+14, 20, 20)];
26
-        self.shopImgV.image=[UIImage imageNamed:@"taobao_icon"];
27
-        [self addSubview:self.shopImgV];
28
+//        self.shopImgV=[[UIImageView alloc]initWithFrame:CGRectMake(10, self.imgView.bottom+14, 20, 20)];
29
+//        self.shopImgV.image=[UIImage imageNamed:@"taobao_icon"];
30
+//        [self addSubview:self.shopImgV];
28 31
         
29 32
         self.detailTitleL=[[UILabel alloc]initWithFrame:CGRectMake(10, self.imgView.bottom+14, SCREEN_WIDTH-20, 45)];
30 33
         self.detailTitleL.numberOfLines=0;
@@ -34,17 +37,37 @@
34 37
         [self addSubview:self.detailTitleL];
35 38
         
36 39
         
37
-        self.priceL=[[UILabel alloc]initWithFrame:CGRectMake(10, self.detailTitleL.bottom+8, 300, 36)];
38
-        self.priceL.textColor=[UIColor blackColor];
40
+        self.priceL=[[UILabel alloc]initWithFrame:CGRectMake(10, 0, 300, 50)];
41
+        self.priceL.textColor=[UIColor whiteColor];
39 42
         self.priceL.font=[UIFont boldSystemFontOfSize:25];
40 43
         self.priceL.text=@"¥--";
41
-        [self addSubview:self.priceL];
42 44
         
43
-        self.originalLabel=[[UILabel alloc]initWithFrame:CGRectMake(10, self.priceL.bottom+5, 100, 14)];
44
-        self.originalLabel.textColor=[UIColor colorWithHexString:@"#A9A9A9"];
45
+        [backV addSubview:self.priceL];
46
+        [self.priceL mas_makeConstraints:^(MASConstraintMaker *make) {
47
+            make.height.mas_equalTo(50);
48
+            make.left.mas_equalTo(10);
49
+            make.top.mas_equalTo(0);
50
+        }];
51
+        
52
+        self.originalLabel=[[UILabel alloc]initWithFrame:CGRectMake(self.priceL.right+10, 0, 100, 50)];
53
+        self.originalLabel.textColor=[UIColor whiteColor];
45 54
         self.originalLabel.font=[UIFont systemFontOfSize:10];
46
-        [self addSubview:self.originalLabel];
55
+        [backV addSubview:self.originalLabel];
56
+        [self.originalLabel mas_makeConstraints:^(MASConstraintMaker *make) {
57
+            make.left.mas_equalTo(self.priceL.mas_right).offset(5);
58
+            make.height.mas_equalTo(45);
59
+            make.top.mas_equalTo(5);
60
+        }];
47 61
         
62
+        self.profitsLabel=[[UILabel alloc]initWithFrame:CGRectMake(backV.width-88, 11, 78, 28)];
63
+        self.profitsLabel.text=@"利润  --%";
64
+        self.profitsLabel.textColor=[UIColor whiteColor];
65
+        self.profitsLabel.font=[UIFont systemFontOfSize:16];
66
+        self.profitsLabel.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:78];
67
+        self.profitsLabel.layer.cornerRadius=6;
68
+        self.profitsLabel.layer.masksToBounds=YES;
69
+        self.profitsLabel.textAlignment=NSTextAlignmentCenter;
70
+        [backV addSubview:self.profitsLabel];
48 71
         //原件
49 72
         NSString *textStr =@"¥---";
50 73
         
@@ -53,17 +76,18 @@
53 76
         NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
54 77
         self.originalLabel.attributedText=attribtStr;
55 78
         
56
-        self.volumeL=[[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-150, self.originalLabel.top, 140, 14)];
79
+        self.volumeL=[[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-150, self.detailTitleL.bottom+5, 140, 14)];
57 80
         self.volumeL.textAlignment=NSTextAlignmentRight;
58 81
         self.volumeL.text=@"月销:--";
59 82
         self.volumeL.textColor=[UIColor colorWithHexString:@"#a9a9a9"];
60 83
         self.volumeL.font=[UIFont systemFontOfSize:10];
61 84
         [self addSubview:self.volumeL];
62 85
         
86
+        
63 87
         [self addSubview:self.couponImgV];
88
+        
64 89
         [self.couponImgV addSubview:self.couponPriceL];
65
-
66
-        self.couponImgV.frame=CGRectMake(SCREEN_WIDTH-70, self.priceL.top, 60, 16);
90
+        self.couponImgV.frame=CGRectMake(self.detailTitleL.left, self.volumeL.top-1, 60, 16);
67 91
         self.couponPriceL.frame=CGRectMake(20, 0, 40, 16);
68 92
         
69 93
         
@@ -88,27 +112,20 @@
88 112
     if (model.title.length<=0) {
89 113
         return;
90 114
     }
91
-    self.detailTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:[NSString stringWithFormat:@"        %@",model.title] linSpacing:5];
92
-    if (model.shop_type.integerValue == 1) {
93
-        self.shopImgV.image =[UIImage imageNamed:@"tm_icon"];
94
-    }else{
95
-        self.shopImgV.image =[UIImage imageNamed:@"taobao_icon"];
96
-        
97
-    }
115
+    self.detailTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:[NSString stringWithFormat:@"%@",model.title] linSpacing:5];
98 116
     
99 117
     self.volumeL.text=[NSString stringWithFormat:@"月销 %@",model.volume];
100 118
     
101
-    NSString *timetitle= [NSString stringWithFormat:@"¥%@/利润%@",model.discount_price,model.commission_rate];
102
-    NSString *prices =[NSString stringWithFormat:@"¥%@/",model.discount_price];
119
+    NSString *timetitle= [NSString stringWithFormat:@"利润 %@",model.commission_rate];
120
+    
103 121
     NSMutableAttributedString *timestr = [[NSMutableAttributedString alloc] initWithString:timetitle];
104
-    [timestr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#333333"] range:NSMakeRange(0,prices.length)];
105
-    [timestr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:16] range:NSMakeRange(prices.length,2)]; //设置字体字号和字体类别
106
-    [timestr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHexString:ThemeColor] range:NSMakeRange(prices.length,timetitle.length-prices.length)];
122
+    [timestr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0,3)]; //设置字体
123
+    self.profitsLabel.attributedText=timestr;
124
+    
125
+    self.priceL.text=[NSString stringWithFormat:@"¥%@",model.discount_price];
107 126
     
108
-    self.priceL.attributedText=timestr;
109 127
     //原价
110 128
     NSString *textStr =[NSString stringWithFormat:@"¥%@",model.price];
111
-    
112 129
     //中划线
113 130
     NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
114 131
     NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
@@ -120,7 +137,6 @@
120 137
     [array addObjectsFromArray:model.small_img];
121 138
     self.imgView.imageURLStringsGroup=array;
122 139
 
123
-    
124 140
     if (model.coupon_price.floatValue>0) {
125 141
         self.couponImgV.hidden=NO;
126 142
         self.couponPriceL.text=model.coupon_price;

+ 7 - 6
KuDianProject/TOP/View/KDPLiveEarningCell.m

@@ -175,18 +175,19 @@
175 175
 #pragma mark---金额隐私切换
176 176
 -(void)changeBtnclickBtn:(UIButton *)bnt
177 177
 {
178
-    KDPAccountModel *model=[KDPAccountTool account];
179
-    
180
-    if (model.is_hidden.integerValue == 0) {
181
-        model.is_hidden = @"1";
178
+    //存储第一次打开APP,是否显示客服页面,
179
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
180
+    NSString *oneStep =[defaults objectForKey:@"hidden"];
181
+    if (oneStep.integerValue == 0) {
182
+        [defaults setValue:@"1" forKey:@"hidden"];
182 183
         bnt.selected=YES;
183 184
         
184 185
     }else{
185
-        model.is_hidden = @"0";
186
+        [defaults setValue:@"0" forKey:@"hidden"];
186 187
         bnt.selected=NO;
187 188
         
188 189
     }
189
-    [KDPAccountTool saveAccount:model];
190
+    [defaults synchronize];
190 191
     [self ishidden_rebat];
191 192
 }
192 193
 -(void)setRebet_money:(NSString *)rebet_money