学丽 5 years ago
parent
commit
e738321ca7

+ 58 - 0
KuDianProject.xcworkspace/xcuserdata/lxl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

13
             stopOnStyle = "0">
13
             stopOnStyle = "0">
14
          </BreakpointContent>
14
          </BreakpointContent>
15
       </BreakpointProxy>
15
       </BreakpointProxy>
16
+      <BreakpointProxy
17
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
18
+         <BreakpointContent
19
+            shouldBeEnabled = "Yes"
20
+            ignoreCount = "0"
21
+            continueAfterRunningActions = "No"
22
+            scope = "0"
23
+            stopOnStyle = "0">
24
+         </BreakpointContent>
25
+      </BreakpointProxy>
26
+      <BreakpointProxy
27
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
28
+         <BreakpointContent
29
+            shouldBeEnabled = "Yes"
30
+            ignoreCount = "0"
31
+            continueAfterRunningActions = "No"
32
+            filePath = "KuDianProject/TOP/Drawer/Control/KDPWebInteractionVC.m"
33
+            timestampString = "584958791.075596"
34
+            startingColumnNumber = "9223372036854775807"
35
+            endingColumnNumber = "9223372036854775807"
36
+            startingLineNumber = "106"
37
+            endingLineNumber = "106"
38
+            landmarkName = "-JumpGoodDetail:"
39
+            landmarkType = "7">
40
+         </BreakpointContent>
41
+      </BreakpointProxy>
42
+      <BreakpointProxy
43
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
44
+         <BreakpointContent
45
+            shouldBeEnabled = "Yes"
46
+            ignoreCount = "0"
47
+            continueAfterRunningActions = "No"
48
+            filePath = "KuDianProject/TOP/Drawer/Control/KDPWebInteractionVC.m"
49
+            timestampString = "584958791.076447"
50
+            startingColumnNumber = "9223372036854775807"
51
+            endingColumnNumber = "9223372036854775807"
52
+            startingLineNumber = "246"
53
+            endingLineNumber = "246"
54
+            landmarkName = "-webView:didFinishNavigation:"
55
+            landmarkType = "7">
56
+         </BreakpointContent>
57
+      </BreakpointProxy>
58
+      <BreakpointProxy
59
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
60
+         <BreakpointContent
61
+            shouldBeEnabled = "Yes"
62
+            ignoreCount = "0"
63
+            continueAfterRunningActions = "No"
64
+            filePath = "KuDianProject/TOP/Drawer/Control/KDPWebInteractionVC.m"
65
+            timestampString = "584958791.07686"
66
+            startingColumnNumber = "9223372036854775807"
67
+            endingColumnNumber = "9223372036854775807"
68
+            startingLineNumber = "260"
69
+            endingLineNumber = "260"
70
+            landmarkName = "-webView:didStartProvisionalNavigation:"
71
+            landmarkType = "7">
72
+         </BreakpointContent>
73
+      </BreakpointProxy>
16
    </Breakpoints>
74
    </Breakpoints>
17
 </Bucket>
75
 </Bucket>

+ 3 - 3
KuDianProject/APPKDURL.h

9
 #ifndef APPKDURL_h
9
 #ifndef APPKDURL_h
10
 #define APPKDURL_h
10
 #define APPKDURL_h
11
 
11
 
12
-//#define KDURL @"http://47.93.151.217:9523/" // 线上
13
-#define KDURL @"http://59.110.214.36:9090/" // 测试
12
+//#define KDURL @"http://47.93.151.217:9523/" //
13
+//#define KDURL @"http://59.110.214.36:9090/" // 测试
14
 #define KWai @"kwai://"
14
 #define KWai @"kwai://"
15
 
15
 
16
-//#define KDURL @"https://mapi.kuxuan-inc.com/"
16
+#define KDURL @"https://mapi.kuxuan-inc.com/"
17
 
17
 
18
 #define LoginURL [NSString stringWithFormat:@"%@api/users/loginCode",KDURL]//登录
18
 #define LoginURL [NSString stringWithFormat:@"%@api/users/loginCode",KDURL]//登录
19
 
19
 

+ 8 - 4
KuDianProject/Earning/Controller/KDPEarnViewController.m

25
     self.view.backgroundColor=[UIColor colorWithHexString:LineColor];
25
     self.view.backgroundColor=[UIColor colorWithHexString:LineColor];
26
     self.navBar.hidden=YES;
26
     self.navBar.hidden=YES;
27
     [self.view addSubview:self.headView];
27
     [self.view addSubview:self.headView];
28
+    [self.headView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(forecastVC)]];
28
     [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
29
     [self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
29
         make.top.right.left.mas_equalTo(0);
30
         make.top.right.left.mas_equalTo(0);
30
         make.height.mas_equalTo(196+KDStatusHeight);
31
         make.height.mas_equalTo(196+KDStatusHeight);
105
         _headView.userInteractionEnabled=YES;
106
         _headView.userInteractionEnabled=YES;
106
         __weak KDPEarnViewController *weakself=self;
107
         __weak KDPEarnViewController *weakself=self;
107
         _headView.forecastBlock = ^{
108
         _headView.forecastBlock = ^{
108
-            KDPForecastVC *foreV=[[KDPForecastVC alloc]init];
109
-            [weakself.navigationController pushViewController:foreV animated:YES];
109
+            [weakself forecastVC];
110
             
110
             
111
         };
111
         };
112
         _headView.drawcBlock = ^{
112
         _headView.drawcBlock = ^{
113
-            [self drawerClickButton];
113
+            [weakself drawerClickButton];
114
         };
114
         };
115
         
115
         
116
     }
116
     }
117
     return _headView;
117
     return _headView;
118
 }
118
 }
119
-
119
+-(void)forecastVC
120
+{
121
+    KDPForecastVC *foreV=[[KDPForecastVC alloc]init];
122
+    [self.navigationController pushViewController:foreV animated:YES];
123
+}
120
 
124
 
121
 -(UITableView *)tableView
125
 -(UITableView *)tableView
122
 {
126
 {

+ 1 - 1
KuDianProject/Earning/View/KDPEarnTableHeadView.m

102
     
102
     
103
     self.balanceButton =[[UIButton alloc]initWithFrame:CGRectMake(0, 0, backv.width/2, backv.height)];
103
     self.balanceButton =[[UIButton alloc]initWithFrame:CGRectMake(0, 0, backv.width/2, backv.height)];
104
     [self.balanceButton setImage:[UIImage imageNamed:@"account_balance_icon"] forState:UIControlStateNormal];
104
     [self.balanceButton setImage:[UIImage imageNamed:@"account_balance_icon"] forState:UIControlStateNormal];
105
-    [self.balanceButton setTitle:@"账余额" forState:UIControlStateNormal];
105
+    [self.balanceButton setTitle:@"账余额" forState:UIControlStateNormal];
106
     [self.balanceButton setTitleColor:[UIColor colorWithHexString:@"#333333"] forState:UIControlStateNormal];
106
     [self.balanceButton setTitleColor:[UIColor colorWithHexString:@"#333333"] forState:UIControlStateNormal];
107
     self.balanceButton.adjustsImageWhenHighlighted=NO;
107
     self.balanceButton.adjustsImageWhenHighlighted=NO;
108
     [self.balanceButton addTarget:self action:@selector(balanclickBtn) forControlEvents:UIControlEventTouchUpInside];
108
     [self.balanceButton addTarget:self action:@selector(balanclickBtn) forControlEvents:UIControlEventTouchUpInside];

+ 1 - 0
KuDianProject/LiveData/Controller/KDPLiveLeftViewController.m

65
     tipLabel.font = FONT_SYS(12);
65
     tipLabel.font = FONT_SYS(12);
66
     tipLabel.textColor = [UIColor colorWithHex:0xFF7075];
66
     tipLabel.textColor = [UIColor colorWithHex:0xFF7075];
67
     tipLabel.layer.cornerRadius = 11;
67
     tipLabel.layer.cornerRadius = 11;
68
+    tipLabel.textAlignment=NSTextAlignmentCenter;
68
     tipLabel.layer.masksToBounds = YES;
69
     tipLabel.layer.masksToBounds = YES;
69
     tipLabel.text = @"目前只统计直播期间该商品订单数哦";
70
     tipLabel.text = @"目前只统计直播期间该商品订单数哦";
70
     tipLabel.centerX = self.view.centerX;
71
     tipLabel.centerX = self.view.centerX;

+ 5 - 2
KuDianProject/Public/KDPNetworkRequestHTTP.m

61
                 //让用户退出
61
                 //让用户退出
62
                 [MBProgressHUD showMessage:@"您已在其他设备登录,是否重新登录"];
62
                 [MBProgressHUD showMessage:@"您已在其他设备登录,是否重新登录"];
63
                 [self appOpenLogin];
63
                 [self appOpenLogin];
64
-            }else{
65
-                
64
+            }else if([responseDict[@"errno"] isEqualToString:@"20001"]){
65
+                NSLog(@"商品已下架");
66
+                 [MBProgressHUD showMessage:responseDict[@"err"]];
67
+                UIViewController *currentVC = [[self alloc] getCurrentVC];
68
+                [currentVC.navigationController popViewControllerAnimated:YES];
66
             }
69
             }
67
             
70
             
68
             
71
             

+ 5 - 1
KuDianProject/Search/Controller/KDPSearchResultViewController.m

135
             self.page = 1;
135
             self.page = 1;
136
             [self requestGoodData];
136
             [self requestGoodData];
137
         }];
137
         }];
138
-        
138
+        if (@available(iOS 11.0, *)) {
139
+            _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
140
+        } else {
141
+            self.automaticallyAdjustsScrollViewInsets = NO;
142
+        }
139
         _collectionView.mj_footer = [MJRefreshBackNormalFooter  footerWithRefreshingBlock:^{
143
         _collectionView.mj_footer = [MJRefreshBackNormalFooter  footerWithRefreshingBlock:^{
140
             self.page ++;
144
             self.page ++;
141
             [self requestGoodData];
145
             [self requestGoodData];

+ 5 - 0
KuDianProject/Search/Controller/KDPSearchViewController.m

248
         _tableview.showsVerticalScrollIndicator = NO;
248
         _tableview.showsVerticalScrollIndicator = NO;
249
         _tableview.showsHorizontalScrollIndicator = NO;
249
         _tableview.showsHorizontalScrollIndicator = NO;
250
         _tableview.rowHeight = 50;
250
         _tableview.rowHeight = 50;
251
+        if (@available(iOS 11.0, *)) {
252
+            _tableview.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
253
+        } else {
254
+            self.automaticallyAdjustsScrollViewInsets = NO;
255
+        }
251
         [_tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"searchList"];
256
         [_tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"searchList"];
252
     }
257
     }
253
     return _tableview;
258
     return _tableview;

+ 5 - 1
KuDianProject/SupplyGood/Controller/KDPSupplyListViewController.m

108
             self.page = 1;
108
             self.page = 1;
109
             [self requestGoodData];
109
             [self requestGoodData];
110
         }];
110
         }];
111
-        
111
+        if (@available(iOS 11.0, *)) {
112
+            _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
113
+        } else {
114
+            self.automaticallyAdjustsScrollViewInsets = NO;
115
+        }
112
         _collectionView.mj_footer = [MJRefreshBackNormalFooter  footerWithRefreshingBlock:^{
116
         _collectionView.mj_footer = [MJRefreshBackNormalFooter  footerWithRefreshingBlock:^{
113
             self.page ++;
117
             self.page ++;
114
             [self requestGoodData];
118
             [self requestGoodData];

+ 23 - 9
KuDianProject/TOP/Controller/KDPGoodDetailVC.m

163
     
163
     
164
     UIButton *buybutton =[[UIButton alloc]initWithFrame:CGRectMake(collectButton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
164
     UIButton *buybutton =[[UIButton alloc]initWithFrame:CGRectMake(collectButton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
165
     
165
     
166
-    buybutton.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:(SCREEN_WIDTH-96)/2];
166
+    
167
     [buybutton setTitle:@"购买样品" forState:UIControlStateNormal];
167
     [buybutton setTitle:@"购买样品" forState:UIControlStateNormal];
168
     [bottomView addSubview:buybutton];
168
     [bottomView addSubview:buybutton];
169
     buybutton.titleLabel.font=[UIFont systemFontOfSize:14];
169
     buybutton.titleLabel.font=[UIFont systemFontOfSize:14];
170
-    [buybutton addTarget:self action:@selector(clickBuyButton) forControlEvents:UIControlEventTouchUpInside];
171
-    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:buybutton.bounds byRoundingCorners:UIRectCornerTopLeft| UIRectCornerBottomLeft cornerRadii:CGSizeMake(19.5, 19.5)];
172
-    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
173
-    maskLayer.frame = buybutton.bounds;
174
-    maskLayer.path = maskPath.CGPath;
175
-    buybutton.layer.mask = maskLayer;
170
+     buybutton.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:(SCREEN_WIDTH-96)/2];
171
+    
176
     
172
     
177
     UIButton *getKwaiButton =[[UIButton alloc]initWithFrame:CGRectMake(buybutton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
173
     UIButton *getKwaiButton =[[UIButton alloc]initWithFrame:CGRectMake(buybutton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
178
     getKwaiButton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
174
     getKwaiButton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
179
     [getKwaiButton setTitle:@"推广到快手" forState:UIControlStateNormal];
175
     [getKwaiButton setTitle:@"推广到快手" forState:UIControlStateNormal];
180
     getKwaiButton.titleLabel.font=[UIFont systemFontOfSize:14];
176
     getKwaiButton.titleLabel.font=[UIFont systemFontOfSize:14];
181
     [getKwaiButton addTarget:self action:@selector(kwaiClickButton) forControlEvents:UIControlEventTouchUpInside];
177
     [getKwaiButton addTarget:self action:@selector(kwaiClickButton) forControlEvents:UIControlEventTouchUpInside];
182
-    [bottomView addSubview:getKwaiButton];
178
+    
183
     UIBezierPath *maskPaths= [UIBezierPath bezierPathWithRoundedRect:getKwaiButton.bounds byRoundingCorners:UIRectCornerTopRight| UIRectCornerBottomRight cornerRadii:CGSizeMake(19.5, 19.5)];
179
     UIBezierPath *maskPaths= [UIBezierPath bezierPathWithRoundedRect:getKwaiButton.bounds byRoundingCorners:UIRectCornerTopRight| UIRectCornerBottomRight cornerRadii:CGSizeMake(19.5, 19.5)];
184
     CAShapeLayer *maskLayers = [[CAShapeLayer alloc] init];
180
     CAShapeLayer *maskLayers = [[CAShapeLayer alloc] init];
185
     maskLayers.frame = buybutton.bounds;
181
     maskLayers.frame = buybutton.bounds;
186
     maskLayers.path = maskPaths.CGPath;
182
     maskLayers.path = maskPaths.CGPath;
187
     getKwaiButton.layer.mask = maskLayers;
183
     getKwaiButton.layer.mask = maskLayers;
188
     
184
     
185
+     if (![KDPublicMethod JumpOpenURL:KWai]) {//没有安装快手,过审用
186
+         buybutton.frame=CGRectMake(collectButton.right, 3, SCREEN_WIDTH-96, 39);
187
+         buybutton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
188
+         buybutton.layer.cornerRadius=19.5;
189
+         buybutton.layer.masksToBounds=YES;
190
+     }else{
191
+         [bottomView addSubview:getKwaiButton];
192
+         [buybutton addTarget:self action:@selector(clickBuyButton) forControlEvents:UIControlEventTouchUpInside];
193
+         UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:buybutton.bounds byRoundingCorners:UIRectCornerTopLeft| UIRectCornerBottomLeft cornerRadii:CGSizeMake(19.5, 19.5)];
194
+         CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
195
+         maskLayer.frame = buybutton.bounds;
196
+         maskLayer.path = maskPath.CGPath;
197
+         buybutton.layer.mask = maskLayer;
198
+     }
189
 }
199
 }
190
 
200
 
191
 -(void)returnClickBtn
201
 -(void)returnClickBtn
207
 {
217
 {
208
     [super viewWillDisappear:animated];
218
     [super viewWillDisappear:animated];
209
 //    self.navBar.hidden=NO;
219
 //    self.navBar.hidden=NO;
210
-    
220
+    [LoadingView dismiss];
211
     [UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleLightContent;
221
     [UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleLightContent;
212
     self.tabBarController.tabBar.hidden=NO;
222
     self.tabBarController.tabBar.hidden=NO;
213
 }
223
 }
367
 #pragma mark----收藏
377
 #pragma mark----收藏
368
 -(void)detailCollectClickButton
378
 -(void)detailCollectClickButton
369
 {
379
 {
380
+    if (self.detailModel.goods_id.length<=0) {
381
+        return;
382
+    }
370
     [LoadingView show];
383
     [LoadingView show];
384
+    
371
     NSString *collect=self.detailModel.is_collect;
385
     NSString *collect=self.detailModel.is_collect;
372
     if (collect.integerValue == 0) {//收藏
386
     if (collect.integerValue == 0) {//收藏
373
         collect=@"1";
387
         collect=@"1";

+ 5 - 2
KuDianProject/TOP/Controller/KDPTopViewController.m

42
 @implementation KDPTopViewController
42
 @implementation KDPTopViewController
43
 -(void)initialieValues
43
 -(void)initialieValues
44
 {
44
 {
45
-    self.pageNum=@"1";
45
+    self.pageNum =@"1";
46
     self.selection_id=@"0";
46
     self.selection_id=@"0";
47
     self.selection_id_count=@"0";
47
     self.selection_id_count=@"0";
48
     self.selection_id_page=@"0";
48
     self.selection_id_page=@"0";
50
 }
50
 }
51
 - (void)viewDidLoad {
51
 - (void)viewDidLoad {
52
     [super viewDidLoad];
52
     [super viewDidLoad];
53
+    
53
     [self initialieValues];
54
     [self initialieValues];
54
     [self initUI];
55
     [self initUI];
55
     
56
     
391
     if ([KDPAccountTool isLogin]) {
392
     if ([KDPAccountTool isLogin]) {
392
         [self getUserTodayIncom];
393
         [self getUserTodayIncom];
393
         [self isOpenService];
394
         [self isOpenService];
394
-        [self initialieValues];
395
+        if (self.pageNum.integerValue ==1) {
396
+            [self initialieValues];
397
+        }
395
         [self getRecommendGood];
398
         [self getRecommendGood];
396
         [self getBanner];
399
         [self getBanner];
397
         [self messageUnreadNumData];
400
         [self messageUnreadNumData];

+ 6 - 4
KuDianProject/TOP/Drawer/Control/KDPCollectHistoryPageVC.m

22
 - (void)viewDidLoad {
22
 - (void)viewDidLoad {
23
     [super viewDidLoad];
23
     [super viewDidLoad];
24
     [self setUpPageVc];
24
     [self setUpPageVc];
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]; self.navigationController.navigationBar.barTintColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:SCREEN_WIDTH];
25
+    UIButton *returnBtn =[[UIButton alloc]initWithFrame:CGRectMake(0, KDStatusHeight, 44, 44)];
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];
29
+    
30
+ self.navigationController.navigationBar.barTintColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:SCREEN_WIDTH];
29
 }
31
 }
30
 - (void)setUpPageVc{
32
 - (void)setUpPageVc{
31
     self.navBar.hidden=YES;
33
     self.navBar.hidden=YES;

+ 3 - 0
KuDianProject/TOP/Drawer/Control/KDPWebInteractionVC.m

40
     [self configNavigationBar];
40
     [self configNavigationBar];
41
     [self addUserhandler];
41
     [self addUserhandler];
42
     [self loadRequest];
42
     [self loadRequest];
43
+    
43
 }
44
 }
44
 
45
 
45
 - (void)addNotification {
46
 - (void)addNotification {
185
                                                               cachePolicy:NSURLRequestReloadIgnoringCacheData
186
                                                               cachePolicy:NSURLRequestReloadIgnoringCacheData
186
                                                           timeoutInterval:15.0];
187
                                                           timeoutInterval:15.0];
187
     [self.webInterView loadRequest:theRequest];
188
     [self.webInterView loadRequest:theRequest];
189
+    
188
 }
190
 }
189
 
191
 
190
 - (void)viewWillAppear:(BOOL)animated {
192
 - (void)viewWillAppear:(BOOL)animated {
263
         self.progressView.progress = 0.6;
265
         self.progressView.progress = 0.6;
264
         
266
         
265
     }];
267
     }];
268
+    self.navBar.navTitleLabel.text=self.webInterView.title;
266
 }
269
 }
267
 
270
 
268
 -(void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
271
 -(void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler

+ 17 - 10
KuDianProject/TOP/View/Detail/KDPDetailGoodInformationView.m

29
 //        self.shopImgV.image=[UIImage imageNamed:@"taobao_icon"];
29
 //        self.shopImgV.image=[UIImage imageNamed:@"taobao_icon"];
30
 //        [self addSubview:self.shopImgV];
30
 //        [self addSubview:self.shopImgV];
31
         
31
         
32
-        self.detailTitleL=[[UILabel alloc]initWithFrame:CGRectMake(10, self.imgView.bottom+14, SCREEN_WIDTH-20, 45)];
32
+        self.detailTitleL=[[UILabel alloc]initWithFrame:CGRectMake(10, self.imgView.bottom+14, SCREEN_WIDTH-20, 42)];
33
         self.detailTitleL.numberOfLines=0;
33
         self.detailTitleL.numberOfLines=0;
34
         self.detailTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:@"        -------" linSpacing:4];
34
         self.detailTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:@"        -------" linSpacing:4];
35
         self.detailTitleL.textColor=[UIColor blackColor];
35
         self.detailTitleL.textColor=[UIColor blackColor];
58
             make.height.mas_equalTo(45);
58
             make.height.mas_equalTo(45);
59
             make.top.mas_equalTo(5);
59
             make.top.mas_equalTo(5);
60
         }];
60
         }];
61
-        
62
         self.profitsLabel=[[UILabel alloc]initWithFrame:CGRectMake(backV.width-88, 11, 78, 28)];
61
         self.profitsLabel=[[UILabel alloc]initWithFrame:CGRectMake(backV.width-88, 11, 78, 28)];
62
+        [self addSubview:self.profitsLabel];
63
+        
64
+        CGFloat heishgt=self.detailTitleL.bottom+5;
65
+        [self.profitsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
66
+            make.top.mas_equalTo(heishgt);
67
+            make.right.mas_equalTo(-10);
68
+            make.height.mas_equalTo(28);
69
+        }];
63
         self.profitsLabel.text=@"利润  --%";
70
         self.profitsLabel.text=@"利润  --%";
64
         self.profitsLabel.textColor=[UIColor whiteColor];
71
         self.profitsLabel.textColor=[UIColor whiteColor];
65
         self.profitsLabel.font=[UIFont systemFontOfSize:16];
72
         self.profitsLabel.font=[UIFont systemFontOfSize:16];
66
-        self.profitsLabel.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:78];
73
+        self.profitsLabel.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:150];
67
         self.profitsLabel.layer.cornerRadius=6;
74
         self.profitsLabel.layer.cornerRadius=6;
68
         self.profitsLabel.layer.masksToBounds=YES;
75
         self.profitsLabel.layer.masksToBounds=YES;
69
         self.profitsLabel.textAlignment=NSTextAlignmentCenter;
76
         self.profitsLabel.textAlignment=NSTextAlignmentCenter;
70
-        [backV addSubview:self.profitsLabel];
77
+       
71
         //原件
78
         //原件
72
         NSString *textStr =@"¥---";
79
         NSString *textStr =@"¥---";
73
         
80
         
76
         NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
83
         NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
77
         self.originalLabel.attributedText=attribtStr;
84
         self.originalLabel.attributedText=attribtStr;
78
         
85
         
79
-        self.volumeL=[[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-150, self.detailTitleL.bottom+5, 140, 14)];
80
-        self.volumeL.textAlignment=NSTextAlignmentRight;
86
+        self.volumeL=[[UILabel alloc]initWithFrame:CGRectMake(self.detailTitleL.left, self.detailTitleL.bottom+10, 60, 16)];
87
+        self.volumeL.textAlignment=NSTextAlignmentLeft;
81
         self.volumeL.text=@"月销:--";
88
         self.volumeL.text=@"月销:--";
82
         self.volumeL.textColor=[UIColor colorWithHexString:@"#a9a9a9"];
89
         self.volumeL.textColor=[UIColor colorWithHexString:@"#a9a9a9"];
83
         self.volumeL.font=[UIFont systemFontOfSize:10];
90
         self.volumeL.font=[UIFont systemFontOfSize:10];
84
         [self addSubview:self.volumeL];
91
         [self addSubview:self.volumeL];
85
         
92
         
86
         
93
         
87
-        [self addSubview:self.couponImgV];
94
+        [backV addSubview:self.couponImgV];
88
         
95
         
89
         [self.couponImgV addSubview:self.couponPriceL];
96
         [self.couponImgV addSubview:self.couponPriceL];
90
-        self.couponImgV.frame=CGRectMake(self.detailTitleL.left, self.volumeL.top-1, 60, 16);
97
+        self.couponImgV.frame=CGRectMake(backV.width-70, 17, 60, 16);
91
         self.couponPriceL.frame=CGRectMake(20, 0, 40, 16);
98
         self.couponPriceL.frame=CGRectMake(20, 0, 40, 16);
92
         
99
         
93
         
100
         
116
     
123
     
117
     self.volumeL.text=[NSString stringWithFormat:@"月销 %@",model.volume];
124
     self.volumeL.text=[NSString stringWithFormat:@"月销 %@",model.volume];
118
     
125
     
119
-    NSString *timetitle= [NSString stringWithFormat:@"利润 %@",model.commission_rate];
126
+    NSString *timetitle= [NSString stringWithFormat:@"  利润 %@   ",model.commission_rate];
120
     
127
     
121
     NSMutableAttributedString *timestr = [[NSMutableAttributedString alloc] initWithString:timetitle];
128
     NSMutableAttributedString *timestr = [[NSMutableAttributedString alloc] initWithString:timetitle];
122
-    [timestr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0,3)]; //设置字体
129
+    [timestr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0,4)]; //设置字体
123
     self.profitsLabel.attributedText=timestr;
130
     self.profitsLabel.attributedText=timestr;
124
     
131
     
125
     self.priceL.text=[NSString stringWithFormat:@"¥%@",model.discount_price];
132
     self.priceL.text=[NSString stringWithFormat:@"¥%@",model.discount_price];

+ 26 - 14
KuDianProject/TOP/View/KDPRecommendGoodCell.m

30
         [backV addSubview:self.recomShopiconImg];
30
         [backV addSubview:self.recomShopiconImg];
31
         [backV addSubview:self.recomVolumeL];
31
         [backV addSubview:self.recomVolumeL];
32
         [backV addSubview:self.recomPriceL];
32
         [backV addSubview:self.recomPriceL];
33
-        [backV addSubview:self.recomOriginL];
33
+//        [backV addSubview:self.recomOriginL];
34
         [backV addSubview:self.recomprofitL];
34
         [backV addSubview:self.recomprofitL];
35
         
35
         
36
         [self.recomImgV mas_makeConstraints:^(MASConstraintMaker *make) {
36
         [self.recomImgV mas_makeConstraints:^(MASConstraintMaker *make) {
55
         [self.recomShopL mas_makeConstraints:^(MASConstraintMaker *make) {
55
         [self.recomShopL mas_makeConstraints:^(MASConstraintMaker *make) {
56
             make.left.mas_equalTo(self.recomShopiconImg.mas_right).offset(6);
56
             make.left.mas_equalTo(self.recomShopiconImg.mas_right).offset(6);
57
             make.top.mas_equalTo(self.recomTitleL.mas_bottom).offset(7);
57
             make.top.mas_equalTo(self.recomTitleL.mas_bottom).offset(7);
58
-            
58
+            make.right.mas_equalTo(self.recomVolumeL.mas_left);
59
             make.height.mas_equalTo(17);
59
             make.height.mas_equalTo(17);
60
             
60
             
61
         }];
61
         }];
74
             make.height.mas_equalTo(25);
74
             make.height.mas_equalTo(25);
75
         }];
75
         }];
76
         
76
         
77
-        [self.recomOriginL mas_makeConstraints:^(MASConstraintMaker *make) {
78
-            make.left.mas_equalTo(self.recomPriceL.mas_right).offset(8);
79
-            make.height.mas_equalTo(25);
80
-             make.top.mas_equalTo(self.recomPriceL.mas_top);
81
-            
82
-        }];
77
+//        [self.recomOriginL mas_makeConstraints:^(MASConstraintMaker *make) {
78
+//            make.left.mas_equalTo(self.recomPriceL.mas_right).offset(8);
79
+//            make.height.mas_equalTo(25);
80
+//             make.top.mas_equalTo(self.recomPriceL.mas_top);
81
+//
82
+//        }];
83
         
83
         
84
         [self.recomprofitL mas_makeConstraints:^(MASConstraintMaker *make) {
84
         [self.recomprofitL mas_makeConstraints:^(MASConstraintMaker *make) {
85
             make.right.mas_equalTo(-10);
85
             make.right.mas_equalTo(-10);
86
             make.height.mas_equalTo(26);
86
             make.height.mas_equalTo(26);
87
-            make.width.mas_equalTo(78);
88
-            make.top.mas_equalTo(self.recomVolumeL.mas_bottom).offset(21);
87
+             make.top.mas_equalTo(self.recomVolumeL.mas_bottom).offset(21);
89
         }];
88
         }];
90
         
89
         
91
         [self.couponImgV mas_makeConstraints:^(MASConstraintMaker *make) {
90
         [self.couponImgV mas_makeConstraints:^(MASConstraintMaker *make) {
92
-            make.top.mas_equalTo(self.recomPriceL.mas_bottom).offset(6);
91
+            make.top.mas_equalTo(self.recomShopiconImg.mas_bottom).offset(42);
93
             make.height.mas_equalTo(16);
92
             make.height.mas_equalTo(16);
94
             make.width.mas_equalTo(60);
93
             make.width.mas_equalTo(60);
95
             make.left.mas_equalTo(self.recomPriceL.mas_left);
94
             make.left.mas_equalTo(self.recomPriceL.mas_left);
244
 {
243
 {
245
     _model = model;
244
     _model = model;
246
     //设置字体字号和字体类别
245
     //设置字体字号和字体类别
247
-    self.recomprofitL.text=[NSString stringWithFormat:@"利润%@",model.commission_rate];
246
+    NSString *timetitle= [NSString stringWithFormat:@" 利润 %@   ",model.commission_rate];
247
+    NSMutableAttributedString *timestr = [[NSMutableAttributedString alloc] initWithString:timetitle];
248
+    [timestr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0,3)]; //设置字体
249
+    self.recomprofitL.attributedText=timestr;
248
     [self.recomImgV sd_setImageWithURL:[NSURL URLWithString:model.img]placeholderImage:[UIImage imageNamed:placholderImg]];
250
     [self.recomImgV sd_setImageWithURL:[NSURL URLWithString:model.img]placeholderImage:[UIImage imageNamed:placholderImg]];
249
     self.recomShopL.text=model.shop_title;
251
     self.recomShopL.text=model.shop_title;
250
      self.recomTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:model.title linSpacing:5];
252
      self.recomTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:model.title linSpacing:5];
261
     NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
263
     NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
262
     // 赋值
264
     // 赋值
263
     self.recomOriginL.attributedText = attribtStr;
265
     self.recomOriginL.attributedText = attribtStr;
264
-     self.recomPriceL.text=[NSString stringWithFormat:@"¥%@",model.discount_price];
265
-    self.recomVolumeL.text=[NSString stringWithFormat:@"月销%@",model.volume];
266
     
266
     
267
+    NSString *pricetitle= [NSString stringWithFormat:@"¥%@",model.discount_price];
268
+    NSMutableAttributedString *prictS = [[NSMutableAttributedString alloc] initWithString:pricetitle];
269
+    [prictS addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12] range:NSMakeRange(0,1)]; //设置字体
270
+    self.recomPriceL.attributedText=prictS;
271
+    self.recomVolumeL.text=[NSString stringWithFormat:@"月销%@",model.volume];
272
+   
267
     if (model.coupon_price.floatValue>0) {
273
     if (model.coupon_price.floatValue>0) {
268
         self.couponImgV.hidden=NO;
274
         self.couponImgV.hidden=NO;
269
         self.couponPriceL.text=model.coupon_price;
275
         self.couponPriceL.text=model.coupon_price;
276
+        [self.recomPriceL mas_updateConstraints:^(MASConstraintMaker *make) {
277
+            make.top.mas_equalTo(self.recomShopiconImg.mas_bottom).offset(11);
278
+        }];
270
     }else{
279
     }else{
271
         self.couponImgV.hidden=YES;
280
         self.couponImgV.hidden=YES;
281
+        [self.recomPriceL mas_updateConstraints:^(MASConstraintMaker *make) {
282
+           make.top.mas_equalTo(self.recomShopiconImg.mas_bottom).offset(25);
283
+        }];
272
     }
284
     }
273
     
285
     
274
 }
286
 }