学丽 5 years ago
parent
commit
b03354b897

+ 5 - 5
KuDianProject.xcodeproj/project.pbxproj

@@ -1596,7 +1596,7 @@
1596 1596
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1597 1597
 				CODE_SIGN_ENTITLEMENTS = KuDianProject/KuDianProject.entitlements;
1598 1598
 				CODE_SIGN_IDENTITY = "iPhone Developer";
1599
-				CODE_SIGN_STYLE = Automatic;
1599
+				CODE_SIGN_STYLE = Manual;
1600 1600
 				DEVELOPMENT_TEAM = WV23VEMQV8;
1601 1601
 				ENABLE_BITCODE = NO;
1602 1602
 				FRAMEWORK_SEARCH_PATHS = (
@@ -1679,7 +1679,7 @@
1679 1679
 				);
1680 1680
 				PRODUCT_BUNDLE_IDENTIFIER = com.KuDianProject.eight;
1681 1681
 				PRODUCT_NAME = "$(TARGET_NAME)";
1682
-				PROVISIONING_PROFILE_SPECIFIER = "";
1682
+				PROVISIONING_PROFILE_SPECIFIER = dev;
1683 1683
 				TARGETED_DEVICE_FAMILY = 1;
1684 1684
 			};
1685 1685
 			name = Debug;
@@ -1691,8 +1691,8 @@
1691 1691
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1692 1692
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1693 1693
 				CODE_SIGN_ENTITLEMENTS = KuDianProject/KuDianProject.entitlements;
1694
-				CODE_SIGN_IDENTITY = "iPhone Developer";
1695
-				CODE_SIGN_STYLE = Automatic;
1694
+				CODE_SIGN_IDENTITY = "iPhone Distribution";
1695
+				CODE_SIGN_STYLE = Manual;
1696 1696
 				DEVELOPMENT_TEAM = WV23VEMQV8;
1697 1697
 				ENABLE_BITCODE = NO;
1698 1698
 				FRAMEWORK_SEARCH_PATHS = (
@@ -1775,7 +1775,7 @@
1775 1775
 				);
1776 1776
 				PRODUCT_BUNDLE_IDENTIFIER = com.KuDianProject.eight;
1777 1777
 				PRODUCT_NAME = "$(TARGET_NAME)";
1778
-				PROVISIONING_PROFILE_SPECIFIER = "";
1778
+				PROVISIONING_PROFILE_SPECIFIER = dis;
1779 1779
 				TARGETED_DEVICE_FAMILY = 1;
1780 1780
 			};
1781 1781
 			name = Release;

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

@@ -29,13 +29,13 @@
29 29
             shouldBeEnabled = "Yes"
30 30
             ignoreCount = "0"
31 31
             continueAfterRunningActions = "No"
32
-            filePath = "KuDianProject/TOP/Drawer/Control/KDPWebInteractionVC.m"
33
-            timestampString = "584959676.7361929"
32
+            filePath = "KuDianProject/TOP/View/Detail/KDPPasteView.m"
33
+            timestampString = "584979530.172259"
34 34
             startingColumnNumber = "9223372036854775807"
35 35
             endingColumnNumber = "9223372036854775807"
36
-            startingLineNumber = "106"
37
-            endingLineNumber = "106"
38
-            landmarkName = "-JumpGoodDetail:"
36
+            startingLineNumber = "74"
37
+            endingLineNumber = "74"
38
+            landmarkName = "-clickTBBtuuton"
39 39
             landmarkType = "7">
40 40
          </BreakpointContent>
41 41
       </BreakpointProxy>

BIN
KuDianProject/.DS_Store


+ 2 - 2
KuDianProject/Info.plist

@@ -17,9 +17,9 @@
17 17
 	<key>CFBundlePackageType</key>
18 18
 	<string>APPL</string>
19 19
 	<key>CFBundleShortVersionString</key>
20
-	<string>1.0</string>
20
+	<string>1.0.1</string>
21 21
 	<key>CFBundleVersion</key>
22
-	<string>1</string>
22
+	<string>104</string>
23 23
 	<key>LSApplicationQueriesSchemes</key>
24 24
 	<array>
25 25
 		<string>wechat</string>

+ 1 - 1
KuDianProject/LiveData/Controller/KDPLiveRightTableViewCell.m

@@ -166,7 +166,7 @@
166 166
     [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:statisModel.img]placeholderImage:[UIImage imageNamed:placholderImg]];
167 167
     self.titleLabel.text = statisModel.name;
168 168
     self.priceLabel.text = [NSString stringWithFormat:@"%.2f",[statisModel.money floatValue]];
169
-    self.profitLabel.text = [NSString stringWithFormat:@"%@%%",statisModel.commission_rate];
169
+    self.profitLabel.text = [NSString stringWithFormat:@"%@%%",statisModel.commission_rate_2];
170 170
     self.orderLabel.text = statisModel.predictCount;
171 171
     self.profitImageView.hidden = NO;
172 172
     if ([statisModel.commission_rate_2 integerValue] > [statisModel.commission_rate integerValue]) {

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

@@ -145,6 +145,7 @@
145 145
     KDPGoodsModel *goodModel = [[KDPGoodsModel alloc] init];
146 146
     goodModel.goods_id = statusModel.goods_id;
147 147
     goodModel.img = statusModel.img;
148
+    goodModel.commission_rate=statusModel.commission_rate_2;
148 149
     detailVC.model = goodModel;
149 150
     [self.navigationController pushViewController:detailVC animated:YES];
150 151
     

+ 15 - 4
KuDianProject/TOP/Controller/KDPGoodDetailVC.m

@@ -91,6 +91,9 @@
91 91
         if (self.detailModel.goods_point.length>0) {
92 92
             [self good_points];
93 93
         }
94
+        if (self.model.commission_rate.length>0) {
95
+            self.detailModel.commission_rate = self.model.commission_rate;
96
+        }
94 97
         self.infoView.model=self.detailModel;
95 98
         self.shopView.shopDic=self.detailModel.shop;
96 99
         [self loadRequestWeb];
@@ -168,7 +171,7 @@
168 171
     [bottomView addSubview:buybutton];
169 172
     buybutton.titleLabel.font=[UIFont systemFontOfSize:14];
170 173
      buybutton.backgroundColor=[UIColor gradientOneColor:[UIColor colorWithHexString:@"#FF235F"] toColor:[UIColor colorWithHexString:@"#FF7676"] Width:(SCREEN_WIDTH-96)/2];
171
-    
174
+    [buybutton addTarget:self action:@selector(clickBuyButton) forControlEvents:UIControlEventTouchUpInside];
172 175
     
173 176
     UIButton *getKwaiButton =[[UIButton alloc]initWithFrame:CGRectMake(buybutton.right, 3, (SCREEN_WIDTH-96)/2, 39)];
174 177
     getKwaiButton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
@@ -189,7 +192,7 @@
189 192
          buybutton.layer.masksToBounds=YES;
190 193
      }else{
191 194
          [bottomView addSubview:getKwaiButton];
192
-         [buybutton addTarget:self action:@selector(clickBuyButton) forControlEvents:UIControlEventTouchUpInside];
195
+         
193 196
          UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:buybutton.bounds byRoundingCorners:UIRectCornerTopLeft| UIRectCornerBottomLeft cornerRadii:CGSizeMake(19.5, 19.5)];
194 197
          CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
195 198
          maskLayer.frame = buybutton.bounds;
@@ -422,7 +425,11 @@
422 425
         return;
423 426
     }
424 427
     [LoadingView show];
425
-    [KDPNetworkRequestHTTP postURL:KwaiJumpURL params:@{@"goods_id":self.detailModel.goods_id} success:^(id  _Nonnull json) {
428
+    NSDictionary *dics=@{@"goods_id":self.detailModel.goods_id};
429
+    if (self.detailModel.coupon_price.length>0) {
430
+        dics=@{@"goods_id":self.detailModel.goods_id,@"coupon_price":self.detailModel.coupon_price};
431
+    }
432
+    [KDPNetworkRequestHTTP postURL:KwaiJumpURL params:dics success:^(id  _Nonnull json) {
426 433
         [LoadingView dismiss];
427 434
         /**
428 435
          弹框状态 1:用户没有快手Pid
@@ -451,7 +458,11 @@
451 458
     if (self.detailModel.goods_id.length<=0) {
452 459
         return;
453 460
     }
454
-    [KDPNetworkRequestHTTP postURL:BuyURL params:@{@"goods_id":self.detailModel.goods_id} success:^(id  _Nonnull json) {
461
+    NSDictionary *dics=@{@"goods_id":self.detailModel.goods_id};
462
+    if (self.detailModel.coupon_price.length>0) {
463
+        dics=@{@"goods_id":self.detailModel.goods_id,@"coupon_price":self.detailModel.coupon_price};
464
+    }
465
+    [KDPNetworkRequestHTTP postURL:KwaiJumpURL params:dics success:^(id  _Nonnull json) {
455 466
         UIPasteboard * pastboard = [UIPasteboard generalPasteboard];
456 467
         pastboard.string=json[@"data"][@"tkl"];
457 468
         if (![KDPublicMethod JumpOpenURL:KWai]) {//没有安装快手,过审用

+ 141 - 1
KuDianProject/TOP/Controller/KDPNoticeViewController.m

@@ -9,10 +9,12 @@
9 9
 #import "KDPNoticeViewController.h"
10 10
 #import "KDPNoticeModel.h"
11 11
 #import "KDPMessageTableViewCell.h"
12
+#import "KDPForecastVC.h"
13
+#import "KDPAccountVC.h"
12 14
 @interface KDPNoticeViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetDelegate,DZNEmptyDataSetSource>
13 15
 
14 16
 @property (nonatomic, strong) UITableView *tableView;
15
-
17
+@property(nonatomic,strong)UIView *messageNoView;
16 18
 @property (nonatomic, strong) NSMutableArray *dataSource;
17 19
 
18 20
 @property (nonatomic, assign) NSInteger page;
@@ -32,6 +34,14 @@
32 34
     [super viewDidLoad];
33 35
     // Do any additional setup after loading the view.
34 36
     [self setUpNav];
37
+     [self.view addSubview:self.messageNoView];
38
+    if (![self isOpenNotice]) {//是否开启通知
39
+        self.messageNoView.hidden=NO;
40
+        self.tableView.frame=CGRectMake(0, KDNavBarHeight+50, SCREEN_WIDTH, SCREEN_HEIGHT-KDNavBarHeight-50);
41
+    }else{
42
+        self.messageNoView.hidden=YES;
43
+        self.tableView.frame=CGRectMake(0, KDNavBarHeight+10, SCREEN_WIDTH, SCREEN_HEIGHT-KDNavBarHeight-10);
44
+    }
35 45
     self.view.backgroundColor = [UIColor colorWithHex:0xF2F2F2];
36 46
     [self.view addSubview:self.tableView];
37 47
 }
@@ -159,6 +169,27 @@
159 169
 - (BOOL)emptyDataSetShouldAllowScroll:(UIScrollView *)scrollView{
160 170
     return YES;
161 171
 }
172
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
173
+{
174
+    KDPNoticeModel *model =self.dataSource[indexPath.row];
175
+    [self messageisreadLoad:model];
176
+    switch (model.message_type.integerValue) {
177
+        case 2://商品详情
178
+            [self goodDetailWithModel:model];
179
+            break;
180
+        case 3://版本更新
181
+            [self updataArrrapp];
182
+            break;
183
+        case 4://收入结算
184
+            [self ForecastVClist];
185
+            break;
186
+        case 5://提现通过
187
+            [self myAccountList];
188
+            break;
189
+        default:
190
+            break;
191
+    }
192
+}
162 193
 
163 194
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView{
164 195
     return [[NSAttributedString alloc] initWithString:@"还没有记录" attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:0x333333],NSFontAttributeName:FONT_SYS(12)}];
@@ -167,4 +198,113 @@
167 198
 - (CGFloat )spaceHeightForEmptyDataSet:(UIScrollView *)scrollView{
168 199
     return 30;
169 200
 }
201
+
202
+-(void)messageisreadLoad:(KDPNoticeModel *)model
203
+{
204
+    [LoadingView show];
205
+    [KDPNetworkRequestHTTP postURL:[NSString stringWithFormat:@"%@api/message_push/messageClick",KDURL] params:@{@"message_id":model.Id,@"person_group":model.person_group,@"is_view":model.is_view} success:^(id  _Nonnull json) {
206
+        [LoadingView dismiss];
207
+        
208
+    } failure:^(NSError * _Nonnull error) {
209
+        [LoadingView dismiss];
210
+        
211
+    }];
212
+}
213
+
214
+#pragma mark----收入结算
215
+-(void)ForecastVClist
216
+{
217
+    KDPForecastVC *forecastV =[[KDPForecastVC alloc]init];
218
+    [self.navigationController pushViewController:forecastV animated:YES];
219
+}
220
+
221
+#pragma mark---商品详情
222
+-(void)goodDetailWithModel:(KDPNoticeModel *)model
223
+{
224
+    KDPGoodDetailVC *detailVC = [[KDPGoodDetailVC alloc] init];
225
+    KDPGoodsModel *goodM =[[KDPGoodsModel alloc]init];
226
+    goodM.goods_id=model.goods_id;
227
+    detailVC.model = goodM;
228
+    [self.navigationController pushViewController:detailVC animated:YES];
229
+}
230
+/**
231
+ 版本更新
232
+ */
233
+- (void)updataArrrapp {
234
+    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:APP_STORE_URL]];
235
+}
236
+
237
+#pragma mark---提现通过
238
+-(void)myAccountList
239
+{
240
+    KDPAccountVC *drawV =[[KDPAccountVC alloc]init];
241
+    [self.navigationController pushViewController:drawV animated:YES];
242
+}
243
+
244
+-(UIView *)messageNoView
245
+{
246
+    if (!_messageNoView) {
247
+        _messageNoView =[[UIView alloc]initWithFrame:CGRectMake(0, KDNavBarHeight, SCREEN_WIDTH, 50)];
248
+        _messageNoView.backgroundColor=[UIColor colorWithHexString:LineColor];
249
+       
250
+        UIButton *backBtn =[[UIButton alloc]initWithFrame:CGRectMake(0, 10, SCREEN_WIDTH,30)];
251
+        backBtn.backgroundColor =[UIColor whiteColor];
252
+        [self.messageNoView addSubview:backBtn];
253
+        
254
+        UIButton *openButton =[[UIButton alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-56, 6.5, 40,17)];
255
+        [openButton setTitle:@"开启" forState:UIControlStateNormal];
256
+         [openButton setTitleColor:[UIColor colorWithHexString:ThemeColor] forState:UIControlStateNormal];
257
+        openButton.layer.cornerRadius=8.5;
258
+        openButton.layer.masksToBounds=YES;
259
+        openButton.layer.borderColor =[UIColor colorWithHexString:ThemeColor].CGColor;
260
+        openButton.layer.borderWidth=0.5;
261
+       
262
+        openButton.titleLabel.font =[UIFont systemFontOfSize:9];
263
+      
264
+        [openButton addTarget:self action:@selector(openNotice) forControlEvents:UIControlEventTouchUpInside];
265
+        [backBtn addSubview:openButton];
266
+        
267
+        UIImageView *messageIcon =[[UIImageView alloc]initWithFrame:CGRectMake(15, 7.5, 15, 15)];
268
+        messageIcon.image =[UIImage imageNamed:@"icon_message"];
269
+        [backBtn addSubview:messageIcon];
270
+        
271
+        UILabel *tipL =[[UILabel alloc]initWithFrame:CGRectMake(40, 0, 300, 30)];
272
+        tipL.textColor=[UIColor colorWithHexString:ThemeColor];
273
+        tipL.font=[UIFont systemFontOfSize:12];
274
+        [backBtn addSubview:tipL];
275
+        tipL.text=@"您还未开启消息通知,开启获取最新通知";
276
+        tipL.tag = 1234;
277
+        
278
+    }
279
+    return _messageNoView;
280
+}
281
+#pragma mark---开启通知
282
+-(void)openNotice
283
+{
284
+    UIApplication *application = [UIApplication sharedApplication];
285
+    NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
286
+    if ([application canOpenURL:url]) {
287
+        if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) {
288
+            if (@available(iOS 10.0, *)) {
289
+                [application openURL:url options:@{} completionHandler:nil];
290
+            } else {
291
+                // Fallback on earlier versions
292
+            }
293
+        } else {
294
+            [application openURL:url];
295
+        }
296
+    }
297
+}
298
+//判断是否开启通知
299
+- (BOOL)isOpenNotice { // 判断用户是否允许接收通知
300
+    BOOL isEnable = NO;
301
+    if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0f) { // iOS版本 >=8.0 处理逻辑
302
+        UIUserNotificationSettings *setting = [[UIApplication sharedApplication] currentUserNotificationSettings];
303
+        isEnable = (UIUserNotificationTypeNone == setting.types) ? NO : YES;
304
+    } else { // iOS版本 <8.0 处理逻辑
305
+        UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
306
+        isEnable = (UIRemoteNotificationTypeNone == type) ? NO : YES;
307
+    }
308
+    return isEnable;
309
+}
170 310
 @end

+ 3 - 1
KuDianProject/TOP/Controller/KDPTopViewController.m

@@ -248,7 +248,9 @@
248 248
     }
249 249
     if (indexPath.section == 2) {
250 250
         KDPGoodDetailVC *goodDetail=[[KDPGoodDetailVC alloc]init];
251
-        goodDetail.model=self.dataArray[indexPath.row];
251
+        KDPGoodsModel *models=self.dataArray[indexPath.row];
252
+        
253
+        goodDetail.model=models;
252 254
         [self.navigationController pushViewController:goodDetail animated:YES];
253 255
     }
254 256
 }

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

@@ -106,6 +106,10 @@ static NSString *kd_h5_open_goodDetail=@"kd_h5_open_goodDetail";
106 106
     NSDictionary *dict = [KDPublicMethod dictionaryWithJsonString:message.body];
107 107
     KDPGoodsModel *model =[[KDPGoodsModel alloc]init];
108 108
     model.goods_id = [NSString stringWithFormat:@"%@",dict[@"goodsid"]];
109
+    if ([dict[@"commissionRate"]length]>0) {
110
+        model.commission_rate= [NSString stringWithFormat:@"%@",dict[@"commissionRate"]];
111
+    }
112
+    
109 113
     KDPGoodDetailVC *detailVC = [[KDPGoodDetailVC alloc] init];
110 114
     detailVC.model = model;
111 115
 
@@ -116,6 +120,9 @@ static NSString *kd_h5_open_goodDetail=@"kd_h5_open_goodDetail";
116 120
     NSDictionary *dict = [KDPublicMethod dictionaryWithJsonString:message.body];
117 121
     KDPGoodsModel *model =[[KDPGoodsModel alloc]init];
118 122
     model.goods_id = [NSString stringWithFormat:@"%@",dict[@"goodsId"]];
123
+    if ([dict[@"commissionRate"]length]>0) {
124
+        model.commission_rate= [NSString stringWithFormat:@"%@",dict[@"commissionRate"]];
125
+    }
119 126
     KDPGoodDetailVC *detailVC = [[KDPGoodDetailVC alloc] init];
120 127
     detailVC.model = model;
121 128
     

+ 3 - 2
KuDianProject/TOP/View/Detail/KDPDetailGoodInformationView.m

@@ -83,7 +83,7 @@
83 83
         NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:textStr attributes:attribtDic];
84 84
         self.originalLabel.attributedText=attribtStr;
85 85
         
86
-        self.volumeL=[[UILabel alloc]initWithFrame:CGRectMake(self.detailTitleL.left, self.detailTitleL.bottom+10, 60, 16)];
86
+        self.volumeL=[[UILabel alloc]initWithFrame:CGRectMake(self.detailTitleL.left, self.detailTitleL.bottom+10, 100, 16)];
87 87
         self.volumeL.textAlignment=NSTextAlignmentLeft;
88 88
         self.volumeL.text=@"月销:--";
89 89
         self.volumeL.textColor=[UIColor colorWithHexString:@"#a9a9a9"];
@@ -123,6 +123,7 @@
123 123
     
124 124
     self.volumeL.text=[NSString stringWithFormat:@"月销 %@",model.volume];
125 125
     
126
+    
126 127
     NSString *timetitle= [NSString stringWithFormat:@"  利润 %@   ",model.commission_rate];
127 128
     
128 129
     NSMutableAttributedString *timestr = [[NSMutableAttributedString alloc] initWithString:timetitle];
@@ -182,7 +183,7 @@
182 183
     if (!_couponPriceL) {
183 184
         _couponPriceL=[[UILabel alloc]init];
184 185
         _couponPriceL.text=@"---";
185
-        _couponPriceL.textColor=[UIColor colorWithHexString:ThemeColor];
186
+        _couponPriceL.textColor=[UIColor colorWithHexString:@"#FFFFFF"];
186 187
         _couponPriceL.font=[UIFont systemFontOfSize:12];
187 188
         _couponPriceL.textAlignment=NSTextAlignmentCenter;
188 189