2 Commits 6c82085073 ... 965679af38

Autor SHA1 Mensagem Data
  学丽 965679af38 Merge branch 'master' of http://101.200.220.49:8001/liuxueli/KDProject 5 anos atrás
  学丽 e738321ca7 线上 5 anos atrás

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

@@ -13,5 +13,63 @@
13 13
             stopOnStyle = "0">
14 14
          </BreakpointContent>
15 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 74
    </Breakpoints>
17 75
 </Bucket>

+ 3 - 3
KuDianProject/APPKDURL.h

@@ -9,11 +9,11 @@
9 9
 #ifndef APPKDURL_h
10 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 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 18
 #define LoginURL [NSString stringWithFormat:@"%@api/users/loginCode",KDURL]//登录
19 19
 

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

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

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

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

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

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

+ 5 - 2
KuDianProject/Public/KDPNetworkRequestHTTP.m

@@ -61,8 +61,11 @@
61 61
                 //让用户退出
62 62
                 [MBProgressHUD showMessage:@"您已在其他设备登录,是否重新登录"];
63 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,7 +135,11 @@
135 135
             self.page = 1;
136 136
             [self requestGoodData];
137 137
         }];
138
-        
138
+        if (@available(iOS 11.0, *)) {
139
+            _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
140
+        } else {
141
+            self.automaticallyAdjustsScrollViewInsets = NO;
142
+        }
139 143
         _collectionView.mj_footer = [MJRefreshBackNormalFooter  footerWithRefreshingBlock:^{
140 144
             self.page ++;
141 145
             [self requestGoodData];

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

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

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

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

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

@@ -163,29 +163,39 @@
163 163
     
164 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 167
     [buybutton setTitle:@"购买样品" forState:UIControlStateNormal];
168 168
     [bottomView addSubview:buybutton];
169 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 173
     UIButton *getKwaiButton =[[UIButton alloc]initWithFrame:CGRectMake(buybutton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
178 174
     getKwaiButton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
179 175
     [getKwaiButton setTitle:@"推广到快手" forState:UIControlStateNormal];
180 176
     getKwaiButton.titleLabel.font=[UIFont systemFontOfSize:14];
181 177
     [getKwaiButton addTarget:self action:@selector(kwaiClickButton) forControlEvents:UIControlEventTouchUpInside];
182
-    [bottomView addSubview:getKwaiButton];
178
+    
183 179
     UIBezierPath *maskPaths= [UIBezierPath bezierPathWithRoundedRect:getKwaiButton.bounds byRoundingCorners:UIRectCornerTopRight| UIRectCornerBottomRight cornerRadii:CGSizeMake(19.5, 19.5)];
184 180
     CAShapeLayer *maskLayers = [[CAShapeLayer alloc] init];
185 181
     maskLayers.frame = buybutton.bounds;
186 182
     maskLayers.path = maskPaths.CGPath;
187 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 201
 -(void)returnClickBtn
@@ -207,7 +217,7 @@
207 217
 {
208 218
     [super viewWillDisappear:animated];
209 219
 //    self.navBar.hidden=NO;
210
-    
220
+    [LoadingView dismiss];
211 221
     [UIApplication sharedApplication].statusBarStyle=UIStatusBarStyleLightContent;
212 222
     self.tabBarController.tabBar.hidden=NO;
213 223
 }
@@ -367,7 +377,11 @@
367 377
 #pragma mark----收藏
368 378
 -(void)detailCollectClickButton
369 379
 {
380
+    if (self.detailModel.goods_id.length<=0) {
381
+        return;
382
+    }
370 383
     [LoadingView show];
384
+    
371 385
     NSString *collect=self.detailModel.is_collect;
372 386
     if (collect.integerValue == 0) {//收藏
373 387
         collect=@"1";

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

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

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

@@ -22,10 +22,12 @@
22 22
 - (void)viewDidLoad {
23 23
     [super viewDidLoad];
24 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 32
 - (void)setUpPageVc{
31 33
     self.navBar.hidden=YES;

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

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

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

@@ -29,7 +29,7 @@
29 29
 //        self.shopImgV.image=[UIImage imageNamed:@"taobao_icon"];
30 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 33
         self.detailTitleL.numberOfLines=0;
34 34
         self.detailTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:@"        -------" linSpacing:4];
35 35
         self.detailTitleL.textColor=[UIColor blackColor];
@@ -58,16 +58,23 @@
58 58
             make.height.mas_equalTo(45);
59 59
             make.top.mas_equalTo(5);
60 60
         }];
61
-        
62 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 70
         self.profitsLabel.text=@"利润  --%";
64 71
         self.profitsLabel.textColor=[UIColor whiteColor];
65 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 74
         self.profitsLabel.layer.cornerRadius=6;
68 75
         self.profitsLabel.layer.masksToBounds=YES;
69 76
         self.profitsLabel.textAlignment=NSTextAlignmentCenter;
70
-        [backV addSubview:self.profitsLabel];
77
+       
71 78
         //原件
72 79
         NSString *textStr =@"¥---";
73 80
         
@@ -76,18 +83,18 @@
76 83
         NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
77 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 88
         self.volumeL.text=@"月销:--";
82 89
         self.volumeL.textColor=[UIColor colorWithHexString:@"#a9a9a9"];
83 90
         self.volumeL.font=[UIFont systemFontOfSize:10];
84 91
         [self addSubview:self.volumeL];
85 92
         
86 93
         
87
-        [self addSubview:self.couponImgV];
94
+        [backV addSubview:self.couponImgV];
88 95
         
89 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 98
         self.couponPriceL.frame=CGRectMake(20, 0, 40, 16);
92 99
         
93 100
         
@@ -116,10 +123,10 @@
116 123
     
117 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 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 130
     self.profitsLabel.attributedText=timestr;
124 131
     
125 132
     self.priceL.text=[NSString stringWithFormat:@"¥%@",model.discount_price];

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

@@ -30,7 +30,7 @@
30 30
         [backV addSubview:self.recomShopiconImg];
31 31
         [backV addSubview:self.recomVolumeL];
32 32
         [backV addSubview:self.recomPriceL];
33
-        [backV addSubview:self.recomOriginL];
33
+//        [backV addSubview:self.recomOriginL];
34 34
         [backV addSubview:self.recomprofitL];
35 35
         
36 36
         [self.recomImgV mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -55,7 +55,7 @@
55 55
         [self.recomShopL mas_makeConstraints:^(MASConstraintMaker *make) {
56 56
             make.left.mas_equalTo(self.recomShopiconImg.mas_right).offset(6);
57 57
             make.top.mas_equalTo(self.recomTitleL.mas_bottom).offset(7);
58
-            
58
+            make.right.mas_equalTo(self.recomVolumeL.mas_left);
59 59
             make.height.mas_equalTo(17);
60 60
             
61 61
         }];
@@ -74,22 +74,21 @@
74 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 84
         [self.recomprofitL mas_makeConstraints:^(MASConstraintMaker *make) {
85 85
             make.right.mas_equalTo(-10);
86 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 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 92
             make.height.mas_equalTo(16);
94 93
             make.width.mas_equalTo(60);
95 94
             make.left.mas_equalTo(self.recomPriceL.mas_left);
@@ -244,7 +243,10 @@
244 243
 {
245 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 250
     [self.recomImgV sd_setImageWithURL:[NSURL URLWithString:model.img]placeholderImage:[UIImage imageNamed:placholderImg]];
249 251
     self.recomShopL.text=model.shop_title;
250 252
      self.recomTitleL.attributedText=[KDPublicMethod sethanggaoWithStr:model.title linSpacing:5];
@@ -261,14 +263,24 @@
261 263
     NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
262 264
     // 赋值
263 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 273
     if (model.coupon_price.floatValue>0) {
268 274
         self.couponImgV.hidden=NO;
269 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 279
     }else{
271 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
 }