学丽 5 gadi atpakaļ
vecāks
revīzija
639bbaade2
35 mainītis faili ar 660 papildinājumiem un 11 dzēšanām
  1. 24 0
      KuDianProject.xcodeproj/project.pbxproj
  2. 10 0
      KuDianProject.xcworkspace/xcuserdata/lxl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 4 1
      KuDianProject/APPKDURL.h
  4. 3 3
      KuDianProject/Assets.xcassets/collection_select.imageset/Contents.json
  5. BIN
      KuDianProject/Assets.xcassets/collection_select.imageset/collection_select.png
  6. BIN
      KuDianProject/Assets.xcassets/collection_select.imageset/collection_select@2x.png
  7. BIN
      KuDianProject/Assets.xcassets/collection_select.imageset/collection_select@3x.png
  8. BIN
      KuDianProject/Assets.xcassets/collection_select.imageset/详情页 收藏 选中.png
  9. BIN
      KuDianProject/Assets.xcassets/collection_select.imageset/详情页 收藏 选中@2x.png
  10. BIN
      KuDianProject/Assets.xcassets/collection_select.imageset/详情页 收藏 选中@3x.png
  11. 23 0
      KuDianProject/Assets.xcassets/icon_message.imageset/Contents.json
  12. BIN
      KuDianProject/Assets.xcassets/icon_message.imageset/icon_message.png
  13. BIN
      KuDianProject/Assets.xcassets/icon_message.imageset/icon_message@2x.png
  14. BIN
      KuDianProject/Assets.xcassets/icon_message.imageset/icon_message@3x.png
  15. 23 0
      KuDianProject/Assets.xcassets/serviece_icon.imageset/Contents.json
  16. BIN
      KuDianProject/Assets.xcassets/serviece_icon.imageset/kefu_head.png
  17. BIN
      KuDianProject/Assets.xcassets/serviece_icon.imageset/kefu_head@2x.png
  18. BIN
      KuDianProject/Assets.xcassets/serviece_icon.imageset/kefu_head@3x.png
  19. 5 0
      KuDianProject/Earning/Chart/SSWlineIncomeChartView.m
  20. 5 0
      KuDianProject/Earning/Controller/KDPEarnViewController.m
  21. 17 0
      KuDianProject/Earning/Controller/KDPOderDetailListVC.h
  22. 165 0
      KuDianProject/Earning/Controller/KDPOderDetailListVC.m
  23. 17 0
      KuDianProject/Earning/Controller/KDPOrderDetailListNewVC.h
  24. 116 0
      KuDianProject/Earning/Controller/KDPOrderDetailListNewVC.m
  25. 1 0
      KuDianProject/Earning/View/KDPEarnTableHeadView.h
  26. 8 2
      KuDianProject/Earning/View/KDPEarnTableHeadView.m
  27. 19 0
      KuDianProject/Earning/View/KDPOrderTitleCell.h
  28. 55 0
      KuDianProject/Earning/View/KDPOrderTitleCell.m
  29. 1 0
      KuDianProject/MainTab/KDPNavBar.m
  30. 7 0
      KuDianProject/PrefixHeader.pch
  31. 11 2
      KuDianProject/Public/KDPNetworkRequestHTTP.m
  32. 37 1
      KuDianProject/TOP/Controller/KDPTopViewController.m
  33. 17 0
      KuDianProject/TOP/Drawer/View/KDPServiceView.h
  34. 88 0
      KuDianProject/TOP/Drawer/View/KDPServiceView.m
  35. 4 2
      KuDianProject/Vendors/XLPageViewController/XLPageViewController.m

+ 24 - 0
KuDianProject.xcodeproj/project.pbxproj

@@ -74,6 +74,7 @@
74 74
 		C53FD3FE22D33BD400687706 /* KDPForecastOrderListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C53FD3FD22D33BD400687706 /* KDPForecastOrderListVC.m */; };
75 75
 		C53FD40122D33C7A00687706 /* KDPForecastOrderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C53FD40022D33C7A00687706 /* KDPForecastOrderCell.m */; };
76 76
 		C53FD40422D34DBD00687706 /* KDPDrawerListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C53FD40322D34DBD00687706 /* KDPDrawerListCell.m */; };
77
+		C5AAE2F122D850C70080DFBE /* KDPServiceView.m in Sources */ = {isa = PBXBuildFile; fileRef = C5AAE2F022D850C70080DFBE /* KDPServiceView.m */; };
77 78
 		C5BAD0AF22D42EBA0084663A /* KDPCollectHistoryVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BAD0AE22D42EBA0084663A /* KDPCollectHistoryVC.m */; };
78 79
 		C5BAD0B222D42ECA0084663A /* KDPIDViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BAD0B122D42ECA0084663A /* KDPIDViewController.m */; };
79 80
 		C5BAD0B522D42ED50084663A /* KDPSetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BAD0B422D42ED50084663A /* KDPSetViewController.m */; };
@@ -93,6 +94,9 @@
93 94
 		C5BAD0E022D4845B0084663A /* KDPTodayListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BAD0DF22D4845B0084663A /* KDPTodayListCell.m */; };
94 95
 		C5BAD0E322D48C600084663A /* SSWLineChartView.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BAD0E122D48C600084663A /* SSWLineChartView.m */; };
95 96
 		C5BAD0E622D49AC80084663A /* KDPIDTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BAD0E522D49AC80084663A /* KDPIDTipView.m */; };
97
+		C5BEABCF22D821F800FE0CF3 /* KDPOderDetailListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BEABCE22D821F800FE0CF3 /* KDPOderDetailListVC.m */; };
98
+		C5BEABD222D8267A00FE0CF3 /* KDPOrderDetailListNewVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BEABD122D8267A00FE0CF3 /* KDPOrderDetailListNewVC.m */; };
99
+		C5BEABD522D8296600FE0CF3 /* KDPOrderTitleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BEABD422D8296600FE0CF3 /* KDPOrderTitleCell.m */; };
96 100
 		C5CEB25A22D71D4A00FA11B1 /* KDPPasteView.m in Sources */ = {isa = PBXBuildFile; fileRef = C5CEB25922D71D4A00FA11B1 /* KDPPasteView.m */; };
97 101
 		C5D561FC22CD97840035A714 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C5D561FB22CD97840035A714 /* AppDelegate.m */; };
98 102
 		C5D561FF22CD97840035A714 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C5D561FE22CD97840035A714 /* ViewController.m */; };
@@ -279,6 +283,8 @@
279 283
 		C53FD40022D33C7A00687706 /* KDPForecastOrderCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPForecastOrderCell.m; sourceTree = "<group>"; };
280 284
 		C53FD40222D34DBD00687706 /* KDPDrawerListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPDrawerListCell.h; sourceTree = "<group>"; };
281 285
 		C53FD40322D34DBD00687706 /* KDPDrawerListCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPDrawerListCell.m; sourceTree = "<group>"; };
286
+		C5AAE2EF22D850C70080DFBE /* KDPServiceView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPServiceView.h; sourceTree = "<group>"; };
287
+		C5AAE2F022D850C70080DFBE /* KDPServiceView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPServiceView.m; sourceTree = "<group>"; };
282 288
 		C5BAD0AD22D42EBA0084663A /* KDPCollectHistoryVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPCollectHistoryVC.h; sourceTree = "<group>"; };
283 289
 		C5BAD0AE22D42EBA0084663A /* KDPCollectHistoryVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPCollectHistoryVC.m; sourceTree = "<group>"; };
284 290
 		C5BAD0B022D42ECA0084663A /* KDPIDViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPIDViewController.h; sourceTree = "<group>"; };
@@ -317,6 +323,12 @@
317 323
 		C5BAD0E222D48C600084663A /* SSWLineChartView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSWLineChartView.h; sourceTree = "<group>"; };
318 324
 		C5BAD0E422D49AC80084663A /* KDPIDTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPIDTipView.h; sourceTree = "<group>"; };
319 325
 		C5BAD0E522D49AC80084663A /* KDPIDTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPIDTipView.m; sourceTree = "<group>"; };
326
+		C5BEABCD22D821F800FE0CF3 /* KDPOderDetailListVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPOderDetailListVC.h; sourceTree = "<group>"; };
327
+		C5BEABCE22D821F800FE0CF3 /* KDPOderDetailListVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPOderDetailListVC.m; sourceTree = "<group>"; };
328
+		C5BEABD022D8267A00FE0CF3 /* KDPOrderDetailListNewVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPOrderDetailListNewVC.h; sourceTree = "<group>"; };
329
+		C5BEABD122D8267A00FE0CF3 /* KDPOrderDetailListNewVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPOrderDetailListNewVC.m; sourceTree = "<group>"; };
330
+		C5BEABD322D8296600FE0CF3 /* KDPOrderTitleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPOrderTitleCell.h; sourceTree = "<group>"; };
331
+		C5BEABD422D8296600FE0CF3 /* KDPOrderTitleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPOrderTitleCell.m; sourceTree = "<group>"; };
320 332
 		C5CEB25822D71D4A00FA11B1 /* KDPPasteView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KDPPasteView.h; sourceTree = "<group>"; };
321 333
 		C5CEB25922D71D4A00FA11B1 /* KDPPasteView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KDPPasteView.m; sourceTree = "<group>"; };
322 334
 		C5D561F722CD97840035A714 /* KuDianProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KuDianProject.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -729,6 +741,8 @@
729 741
 				C5BAD0C022D4482F0084663A /* KDPHistoryListCell.m */,
730 742
 				7662960922D7428400B2C0DB /* KDPMessageTableViewCell.h */,
731 743
 				7662960A22D7428400B2C0DB /* KDPMessageTableViewCell.m */,
744
+				C5AAE2EF22D850C70080DFBE /* KDPServiceView.h */,
745
+				C5AAE2F022D850C70080DFBE /* KDPServiceView.m */,
732 746
 			);
733 747
 			path = View;
734 748
 			sourceTree = "<group>";
@@ -840,6 +854,10 @@
840 854
 				C53FD3F722D330EA00687706 /* KDPForecastVC.m */,
841 855
 				C53FD3FC22D33BD400687706 /* KDPForecastOrderListVC.h */,
842 856
 				C53FD3FD22D33BD400687706 /* KDPForecastOrderListVC.m */,
857
+				C5BEABCD22D821F800FE0CF3 /* KDPOderDetailListVC.h */,
858
+				C5BEABCE22D821F800FE0CF3 /* KDPOderDetailListVC.m */,
859
+				C5BEABD022D8267A00FE0CF3 /* KDPOrderDetailListNewVC.h */,
860
+				C5BEABD122D8267A00FE0CF3 /* KDPOrderDetailListNewVC.m */,
843 861
 			);
844 862
 			path = Controller;
845 863
 			sourceTree = "<group>";
@@ -857,6 +875,8 @@
857 875
 				C53FD3FA22D3361F00687706 /* KDPForecastListCell.m */,
858 876
 				C53FD3FF22D33C7A00687706 /* KDPForecastOrderCell.h */,
859 877
 				C53FD40022D33C7A00687706 /* KDPForecastOrderCell.m */,
878
+				C5BEABD322D8296600FE0CF3 /* KDPOrderTitleCell.h */,
879
+				C5BEABD422D8296600FE0CF3 /* KDPOrderTitleCell.m */,
860 880
 			);
861 881
 			path = View;
862 882
 			sourceTree = "<group>";
@@ -1192,6 +1212,7 @@
1192 1212
 				C5D5627122CDFDF00035A714 /* KDPEarnTableHeadView.m in Sources */,
1193 1213
 				C5D561FF22CD97840035A714 /* ViewController.m in Sources */,
1194 1214
 				C5CEB25A22D71D4A00FA11B1 /* KDPPasteView.m in Sources */,
1215
+				C5BEABD522D8296600FE0CF3 /* KDPOrderTitleCell.m in Sources */,
1195 1216
 				76D7941322CDCC9C00C2ECFA /* KDPLiveDataViewController.m in Sources */,
1196 1217
 				764A24BF22D32CBC009B3891 /* KDPWebViewViewController.m in Sources */,
1197 1218
 				76D7942922CDD3CB00C2ECFA /* UIButton+WSLTitleImage.m in Sources */,
@@ -1203,6 +1224,7 @@
1203 1224
 				76D7942922CDD3CB00C2ECFA /* UIButton+WSLTitleImage.m in Sources */,
1204 1225
 				76D6EE8122D587D300E7AC1C /* KDPSearchViewController.m in Sources */,
1205 1226
 				C5BAD0CD22D46E150084663A /* KDPDetailGoodInformationView.m in Sources */,
1227
+				C5BEABD222D8267A00FE0CF3 /* KDPOrderDetailListNewVC.m in Sources */,
1206 1228
 				C5D5626222CDD6A10035A714 /* KDPLiveEarningCell.m in Sources */,
1207 1229
 				764A24CD22D43DE4009B3891 /* ActivityIndicatorView.m in Sources */,
1208 1230
 				C53FD3EA22D2E61F00687706 /* SSWCharts.m in Sources */,
@@ -1249,6 +1271,7 @@
1249 1271
 				764A24F822D4A39B009B3891 /* XLPageViewControllerUtil.m in Sources */,
1250 1272
 				76D6EE7722D4AA7D00E7AC1C /* KDPOrderDetailViewController.m in Sources */,
1251 1273
 				764A24F322D4A39B009B3891 /* XLPageViewController.m in Sources */,
1274
+				C5BEABCF22D821F800FE0CF3 /* KDPOderDetailListVC.m in Sources */,
1252 1275
 				764A24BC22D329F7009B3891 /* KDPPhoneLoginViewController.m in Sources */,
1253 1276
 				C5EB45DC22D5EA8D006A24F0 /* KDPOrderModel.m in Sources */,
1254 1277
 				76D6EE7A22D4AA9B00E7AC1C /* KDPOrderDetailTableViewCell.m in Sources */,
@@ -1271,6 +1294,7 @@
1271 1294
 				C5D5625F22CDCCD10035A714 /* KDPDrawerVC.m in Sources */,
1272 1295
 				C5D5626522CDD6AA0035A714 /* KDPBannerCell.m in Sources */,
1273 1296
 				C5BAD0DA22D47DD60084663A /* KDPTodayLiveDataVC.m in Sources */,
1297
+				C5AAE2F122D850C70080DFBE /* KDPServiceView.m in Sources */,
1274 1298
 				C5BAD0B522D42ED50084663A /* KDPSetViewController.m in Sources */,
1275 1299
 				C5D5624D22CD9FBC0035A714 /* UIColor+KDPColor.m in Sources */,
1276 1300
 				C53FD40422D34DBD00687706 /* KDPDrawerListCell.m in Sources */,

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

@@ -23,5 +23,15 @@
23 23
             stopOnStyle = "0">
24 24
          </BreakpointContent>
25 25
       </BreakpointProxy>
26
+      <BreakpointProxy
27
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
28
+         <BreakpointContent
29
+            shouldBeEnabled = "Yes"
30
+            ignoreCount = "0"
31
+            continueAfterRunningActions = "No"
32
+            scope = "0"
33
+            stopOnStyle = "0">
34
+         </BreakpointContent>
35
+      </BreakpointProxy>
26 36
    </Breakpoints>
27 37
 </Bucket>

+ 4 - 1
KuDianProject/APPKDURL.h

@@ -26,7 +26,8 @@
26 26
 
27 27
 #define ZSHZURl @"https://mapi.kuxuan-inc.com/cool_store/expert.html"
28 28
 
29
-#define custSerURL @"https://mapi.kuxuan-inc.com/cool_store/service/index.html"
29
+#define custSerURL  [NSString stringWithFormat:@"%@cool_store/service/index.html",KDURL]
30
+
30 31
 
31 32
 #define topIncomeUrl [NSString stringWithFormat:@"%@api/home/getHomeTopOrderInfo",KDURL]
32 33
 #define bannerURL [NSString stringWithFormat:@"%@api/adv/advByType",KDURL]
@@ -66,5 +67,7 @@
66 67
 
67 68
 #define hotGoodListURL [NSString stringWithFormat:@"%@api/order/listTodayGoods",KDURL]//列表
68 69
 #define SaleStatisticsURL [NSString stringWithFormat:@"%@api/order/getOrderStatistics",KDURL]//销量统计
70
+#define orderHeadTitleURL [NSString stringWithFormat:@"%@api/order/getOrderTop",KDURL]//订单t标题
69 71
 
72
+#define orderDetailListURL [NSString stringWithFormat:@"%@api/order/orderList",KDURL]
70 73
 #endif /* APPKDURL_h */

+ 3 - 3
KuDianProject/Assets.xcassets/collection_select.imageset/Contents.json

@@ -2,17 +2,17 @@
2 2
   "images" : [
3 3
     {
4 4
       "idiom" : "universal",
5
-      "filename" : "collection_select.png",
5
+      "filename" : "详情页 收藏 选中.png",
6 6
       "scale" : "1x"
7 7
     },
8 8
     {
9 9
       "idiom" : "universal",
10
-      "filename" : "collection_select@2x.png",
10
+      "filename" : "详情页 收藏 选中@2x.png",
11 11
       "scale" : "2x"
12 12
     },
13 13
     {
14 14
       "idiom" : "universal",
15
-      "filename" : "collection_select@3x.png",
15
+      "filename" : "详情页 收藏 选中@3x.png",
16 16
       "scale" : "3x"
17 17
     }
18 18
   ],

BIN
KuDianProject/Assets.xcassets/collection_select.imageset/collection_select.png


BIN
KuDianProject/Assets.xcassets/collection_select.imageset/collection_select@2x.png


BIN
KuDianProject/Assets.xcassets/collection_select.imageset/collection_select@3x.png


BIN
KuDianProject/Assets.xcassets/collection_select.imageset/详情页 收藏 选中.png


BIN
KuDianProject/Assets.xcassets/collection_select.imageset/详情页 收藏 选中@2x.png


BIN
KuDianProject/Assets.xcassets/collection_select.imageset/详情页 收藏 选中@3x.png


+ 23 - 0
KuDianProject/Assets.xcassets/icon_message.imageset/Contents.json

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "icon_message.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "icon_message@2x.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "icon_message@3x.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

BIN
KuDianProject/Assets.xcassets/icon_message.imageset/icon_message.png


BIN
KuDianProject/Assets.xcassets/icon_message.imageset/icon_message@2x.png


BIN
KuDianProject/Assets.xcassets/icon_message.imageset/icon_message@3x.png


+ 23 - 0
KuDianProject/Assets.xcassets/serviece_icon.imageset/Contents.json

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "kefu_head.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "kefu_head@2x.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "kefu_head@3x.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

BIN
KuDianProject/Assets.xcassets/serviece_icon.imageset/kefu_head.png


BIN
KuDianProject/Assets.xcassets/serviece_icon.imageset/kefu_head@2x.png


BIN
KuDianProject/Assets.xcassets/serviece_icon.imageset/kefu_head@3x.png


+ 5 - 0
KuDianProject/Earning/Chart/SSWlineIncomeChartView.m

@@ -65,6 +65,11 @@
65 65
 -(void)setYValuesArr:(NSMutableArray *)yValuesArr
66 66
 {
67 67
     _yValuesArr = yValuesArr;
68
+    //获取最大的
69
+    NSInteger maxValue = [[yValuesArr valueForKeyPath:@"@max.floatValue"] floatValue];
70
+    NSInteger keduValu =(maxValue+(5-maxValue%5))/5;
71
+    self.yScaleValue = keduValu;
72
+    
68 73
     [self layoutSubviews];
69 74
     [self draWUpdate];
70 75
 }

+ 5 - 0
KuDianProject/Earning/Controller/KDPEarnViewController.m

@@ -43,6 +43,10 @@
43 43
         [self.navigationController pushViewController:accountV animated:YES];
44 44
         
45 45
     };
46
+    headViews.orderBlock = ^{
47
+        KDPOderDetailListVC *listV=[[KDPOderDetailListVC alloc]init];
48
+        [self.navigationController pushViewController:listV animated:YES];
49
+    };
46 50
     
47 51
     self.tableView.tableHeaderView=headViews;
48 52
     [self IncomeAndOrderNumber];
@@ -108,6 +112,7 @@
108 112
         _headView.drawcBlock = ^{
109 113
             [self drawerClickButton];
110 114
         };
115
+        
111 116
     }
112 117
     return _headView;
113 118
 }

+ 17 - 0
KuDianProject/Earning/Controller/KDPOderDetailListVC.h

@@ -0,0 +1,17 @@
1
+//
2
+//  KDPOderDetailListVC.h
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import "KDPMainViewController.h"
10
+
11
+NS_ASSUME_NONNULL_BEGIN
12
+
13
+@interface KDPOderDetailListVC : KDPMainViewController
14
+
15
+@end
16
+
17
+NS_ASSUME_NONNULL_END

+ 165 - 0
KuDianProject/Earning/Controller/KDPOderDetailListVC.m

@@ -0,0 +1,165 @@
1
+//
2
+//  KDPOderDetailListVC.m
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import "KDPOderDetailListVC.h"
10
+
11
+@interface KDPOderDetailListVC ()<XLPageViewControllerDelegate,XLPageViewControllerDataSrouce>
12
+{
13
+    NSMutableArray *titleArray;
14
+    UIView *backv;
15
+    
16
+}
17
+@property (nonatomic, strong) XLPageViewController *pageVC;
18
+@property(nonatomic,strong)UILabel *tipeLabel;
19
+@end
20
+
21
+@implementation KDPOderDetailListVC
22
+
23
+- (void)viewDidLoad {
24
+    [super viewDidLoad];
25
+    self.navBar.hidden=NO;
26
+    self.navBar.navTitleLabel.text=@"订单明细";
27
+    [self.navBar addleftReturnButton:self selector:@selector(returnClickBtn)];
28
+    self.navigationController.navigationBar.hidden=YES;
29
+    
30
+    
31
+    self.view.backgroundColor=[UIColor whiteColor];
32
+     [self orderHeadTitle];
33
+    [self addtipeView];
34
+}
35
+-(void)addtipeView
36
+{
37
+    backv=[[UIView alloc]initWithFrame:CGRectMake(0, KDNavBarHeight, SCREEN_WIDTH, 50)];
38
+    backv.backgroundColor=[UIColor whiteColor];
39
+    
40
+    UIImageView *lineV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 5)];
41
+    lineV.backgroundColor=[UIColor colorWithHexString:LineColor];
42
+    [backv addSubview:lineV];
43
+    
44
+    UIImageView *iconimg=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_message"]];
45
+    iconimg.frame=CGRectMake(10, 15, 20, 20);
46
+    [backv addSubview:iconimg];
47
+    
48
+    self.tipeLabel=[[UILabel alloc]initWithFrame:CGRectMake(40, 5, SCREEN_WIDTH-50, 40)];
49
+    _tipeLabel.numberOfLines=2;
50
+    self.tipeLabel.textColor=[UIColor colorWithHexString:ThemeColor];
51
+    self.tipeLabel.font=[UIFont systemFontOfSize:12];
52
+    [backv addSubview:self.tipeLabel];
53
+    
54
+    UIImageView *bottomlineV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 45, SCREEN_WIDTH, 5)];
55
+    bottomlineV.backgroundColor=[UIColor colorWithHexString:LineColor];
56
+    [backv addSubview:bottomlineV];
57
+    
58
+    [self.view addSubview:backv];
59
+}
60
+- (void)setUpPageVc{
61
+   
62
+    XLPageViewControllerConfig *config = [[XLPageViewControllerConfig alloc] init];
63
+    //标题间距
64
+    config.titleSpace = 0;
65
+    //标题高度
66
+    config.titleViewHeight =70;
67
+   
68
+    config.titleViewInset = UIEdgeInsetsMake(0, 0, 0, 0);
69
+    config.titleWidth=SCREEN_WIDTH/titleArray.count;
70
+    if (self.tipeLabel.text.length>0) {
71
+       config.navHeight=KDNavBarHeight+50;
72
+    }else{
73
+        config.navHeight=KDNavBarHeight;
74
+    }
75
+    
76
+    config.contentHeight=SCREEN_HEIGHT-KDNavBarHeight;
77
+    
78
+    self.pageVC = [[XLPageViewController alloc] initWithConfig:config];
79
+    //需要先注册cell
80
+    [self.pageVC registerClass:KDPOrderTitleCell.class forTitleViewCellWithReuseIdentifier:@"title"];
81
+    self.pageVC.view.bounds = CGRectMake(0, KDNavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT);
82
+    self.pageVC.delegate = self;
83
+    self.pageVC.dataSource = self;
84
+    
85
+    [self addChildViewController:self.pageVC];
86
+    [self.view addSubview:self.pageVC.view];
87
+}
88
+-(void)orderHeadTitle
89
+{
90
+    [LoadingView show];
91
+    [KDPNetworkRequestHTTP postURL:orderHeadTitleURL params:nil success:^(id  _Nonnull json) {
92
+        [LoadingView dismiss];
93
+        if ([json[@"alert"] length]>0) {
94
+            self.tipeLabel.text=json[@"alert"];
95
+            backv.hidden=NO;
96
+        }else{
97
+            backv.hidden=YES;
98
+        }
99
+        
100
+        titleArray =[NSMutableArray arrayWithArray:json[@"list"]];
101
+        
102
+        [self setUpPageVc];
103
+    } failure:^(NSError * _Nonnull error) {
104
+        [LoadingView dismiss];
105
+    }];
106
+}
107
+#pragma mark - XLPageViewController datasource and delegate
108
+//cell创建方法
109
+- (XLPageTitleCell *)pageViewController:(XLPageViewController *)pageViewController titleViewCellForItemAtIndex:(NSInteger)index {
110
+    KDPOrderTitleCell *cell = [pageViewController dequeueReusableTitleViewCellWithIdentifier:@"title" forIndex:index];
111
+    NSDictionary *dic =titleArray[index];
112
+    cell.titlelabel.text=dic[@"title"];
113
+    cell.numLabel.text=[NSString stringWithFormat:@"%ld",[dic[@"count"]integerValue]];
114
+    return cell;
115
+}
116
+//通过此父类方法配置标题cell是否被选中样式
117
+- (void)configCellOfSelected:(BOOL)selected {
118
+    
119
+}
120
+
121
+//通过此父类方法配置标题cell动画;type:区分是当前选中cell/将要被选中的cell;progress:动画进度0~1
122
+- (void)showAnimationOfProgress:(CGFloat)progress type:(XLPageTitleCellAnimationType)type {
123
+    
124
+}
125
+- (NSInteger)pageViewControllerNumberOfPage{
126
+    
127
+    return titleArray.count;
128
+}
129
+
130
+- (NSString *)pageViewController:(XLPageViewController *)pageViewController titleForIndex:(NSInteger)index{
131
+    
132
+    NSDictionary *dic =titleArray[index];
133
+    return dic[@"title"];
134
+}
135
+
136
+- (void)pageViewController:(XLPageViewController *)pageViewController didSelectedAtIndex:(NSInteger)index{
137
+    NSLog(@"%ld",index);
138
+}
139
+
140
+- (UIViewController *)pageViewController:(XLPageViewController *)pageViewController viewControllerForIndex:(NSInteger)index{
141
+    KDPOrderDetailListNewVC *contentVC = [[KDPOrderDetailListNewVC alloc] init];
142
+    contentVC.typeDic=titleArray[index];
143
+    return contentVC;
144
+}
145
+
146
+
147
+-(void)returnClickBtn
148
+{
149
+    [self.navigationController popViewControllerAnimated:YES];
150
+    
151
+}
152
+
153
+-(void)viewWillAppear:(BOOL)animated
154
+{
155
+    [super viewWillAppear:animated];
156
+    self.navigationController.navigationBar.hidden=YES;
157
+    self.tabBarController.tabBar.hidden=YES;
158
+}
159
+-(void)viewWillDisappear:(BOOL)animated
160
+{
161
+    [super viewWillDisappear:animated];
162
+    self.tabBarController.tabBar.hidden=NO;
163
+}
164
+
165
+@end

+ 17 - 0
KuDianProject/Earning/Controller/KDPOrderDetailListNewVC.h

@@ -0,0 +1,17 @@
1
+//
2
+//  KDPOrderDetailListNewVC.h
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import "KDPMainViewController.h"
10
+
11
+NS_ASSUME_NONNULL_BEGIN
12
+
13
+@interface KDPOrderDetailListNewVC : KDPMainViewController
14
+@property(nonatomic,strong)NSDictionary *typeDic;
15
+@end
16
+
17
+NS_ASSUME_NONNULL_END

+ 116 - 0
KuDianProject/Earning/Controller/KDPOrderDetailListNewVC.m

@@ -0,0 +1,116 @@
1
+//
2
+//  KDPOrderDetailListNewVC.m
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import "KDPOrderDetailListNewVC.h"
10
+#import "KDPForecastOrderCell.h"
11
+@interface KDPOrderDetailListNewVC ()<UITableViewDelegate,UITableViewDataSource>
12
+{
13
+    
14
+    
15
+    NSInteger page_num;
16
+}
17
+@property(nonatomic,strong)UITableView *forecastView;
18
+@property(nonatomic,strong)NSMutableArray *dataArray;
19
+@end
20
+
21
+@implementation KDPOrderDetailListNewVC
22
+
23
+- (void)viewDidLoad {
24
+    [super viewDidLoad];
25
+    self.navBar.hidden=YES;
26
+    self.view.backgroundColor=[UIColor whiteColor];
27
+    page_num = 1;
28
+    
29
+    [self.view addSubview:self.forecastView];
30
+    [self ordeListData];
31
+}
32
+-(void)ordeListData
33
+{
34
+    [LoadingView show];
35
+    NSInteger type=[self.typeDic[@"type"] integerValue];
36
+    NSDictionary *dic=@{@"type":@(type),@"page":@(page_num)} ;
37
+    [KDPNetworkRequestHTTP postURL:orderDetailListURL params:dic success:^(id  _Nonnull json) {
38
+        [LoadingView dismiss];
39
+        if (page_num == 1) {
40
+            self.dataArray =[NSMutableArray array];
41
+        }
42
+        NSArray *arr = [NSArray yy_modelArrayWithClass:[KDPOrderModel class] json:json];
43
+        if (arr.count>0) {
44
+            [self.dataArray addObjectsFromArray:arr];
45
+            
46
+        }else{
47
+            [self.forecastView.mj_footer endRefreshingWithNoMoreData];
48
+        }
49
+        
50
+        [self.forecastView.mj_footer endRefreshing];
51
+        [self.forecastView.mj_header endRefreshing];
52
+        [self.forecastView reloadData];
53
+            
54
+    } failure:^(NSError * _Nonnull error) {
55
+        [LoadingView dismiss];
56
+    }];
57
+}
58
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
59
+{
60
+    KDPForecastOrderCell *listC=[tableView dequeueReusableCellWithIdentifier:@"foreorder"];
61
+    if (!listC) {
62
+        listC=[[KDPForecastOrderCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"foreorder"];
63
+        listC.selectionStyle=UITableViewCellSelectionStyleNone;
64
+    }
65
+    listC.model=self.dataArray[indexPath.row];
66
+    return listC;
67
+}
68
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
69
+{
70
+    return self.dataArray.count;
71
+}
72
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
73
+{
74
+    
75
+}
76
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
77
+{
78
+    return 110;
79
+}
80
+-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
81
+{
82
+    return 1;
83
+}
84
+-(UITableView *)forecastView
85
+{
86
+    if (!_forecastView) {
87
+        _forecastView=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.view.height-KDNavBarHeight-120)];
88
+        _forecastView.backgroundColor=[UIColor clearColor];
89
+        _forecastView.separatorStyle=UITableViewCellSeparatorStyleNone;
90
+        _forecastView.delegate=self;
91
+        _forecastView.dataSource=self;
92
+        _forecastView.showsVerticalScrollIndicator=NO;
93
+        _forecastView.mj_header=[MJRefreshNormalHeader headerWithRefreshingBlock:^{
94
+            page_num = 1;
95
+            [self ordeListData];
96
+        }];
97
+        _forecastView.mj_footer=[MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
98
+            page_num++;
99
+            [self ordeListData];
100
+        }];
101
+        
102
+    }
103
+    return _forecastView;
104
+}
105
+/*
106
+#pragma mark - Navigation
107
+
108
+// In a storyboard-based application, you will often want to do a little preparation before navigation
109
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
110
+    // Get the new view controller using [segue destinationViewController].
111
+    // Pass the selected object to the new view controller.
112
+}
113
+*/
114
+
115
+@end
116
+

+ 1 - 0
KuDianProject/Earning/View/KDPEarnTableHeadView.h

@@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
20 20
 @property(nonatomic,strong)UIButton *incomeButton;
21 21
 @property(nonatomic,copy)NSString *chartcate;
22 22
 @property(nonatomic,copy)NSString *chartType;
23
+@property(nonatomic,copy)void(^orderBlock)(void);
23 24
 @property(nonatomic,copy)void(^accountBlock)(void);
24 25
 @end
25 26
 

+ 8 - 2
KuDianProject/Earning/View/KDPEarnTableHeadView.m

@@ -115,7 +115,7 @@
115 115
     [self.orderButton setImage:[UIImage imageNamed:@"order_detail"] forState:UIControlStateNormal];
116 116
     [self.orderButton setTitle:@"订单明细" forState:UIControlStateNormal];
117 117
     [self.orderButton setTitleColor:[UIColor colorWithHexString:@"#333333"] forState:UIControlStateNormal];
118
-    
118
+    [self.orderButton addTarget:self action:@selector(orderDetailClickBtn) forControlEvents:UIControlEventTouchUpInside];
119 119
     self.orderButton.titleLabel.font=[UIFont systemFontOfSize:15];
120 120
     [self.orderButton setTitleEdgeInsets:UIEdgeInsetsMake(0, 10, 0, 0)];
121 121
     [backv addSubview:self.orderButton];
@@ -149,7 +149,13 @@
149 149
         self.accountBlock();
150 150
     }
151 151
 }
152
-
152
+#pragma mark---订单明细
153
+-(void)orderDetailClickBtn
154
+{
155
+    if (self.orderBlock) {
156
+        self.orderBlock();
157
+    }
158
+}
153 159
 
154 160
 -(void)requestChartData
155 161
 {

+ 19 - 0
KuDianProject/Earning/View/KDPOrderTitleCell.h

@@ -0,0 +1,19 @@
1
+//
2
+//  KDPOrderTitleCell.h
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import "XLPageTitleCell.h"
10
+
11
+NS_ASSUME_NONNULL_BEGIN
12
+
13
+@interface KDPOrderTitleCell : XLPageTitleCell
14
+@property(nonatomic,strong)UILabel *titlelabel;
15
+@property(nonatomic,strong)UILabel *numLabel;
16
+
17
+@end
18
+
19
+NS_ASSUME_NONNULL_END

+ 55 - 0
KuDianProject/Earning/View/KDPOrderTitleCell.m

@@ -0,0 +1,55 @@
1
+//
2
+//  KDPOrderTitleCell.m
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import "KDPOrderTitleCell.h"
10
+
11
+@implementation KDPOrderTitleCell
12
+-(instancetype)initWithFrame:(CGRect)frame
13
+{
14
+    self=[super initWithFrame:frame];
15
+    if (self) {
16
+        
17
+        
18
+        
19
+        self.textLabel.hidden = true;
20
+        
21
+        
22
+        self.numLabel =[[UILabel alloc]initWithFrame:CGRectMake(0, 10, self.width, 20)];
23
+        self.numLabel.textColor=[UIColor colorWithHexString:fontColor];
24
+        self.numLabel.font=[UIFont systemFontOfSize:14];
25
+        self.numLabel.textAlignment=NSTextAlignmentCenter;
26
+        [self addSubview:self.numLabel];
27
+        
28
+        self.titlelabel =[[UILabel alloc]initWithFrame:CGRectMake(0, 35, self.width, 25)];
29
+        self.titlelabel.font=[UIFont systemFontOfSize:14];
30
+        self.titlelabel.textColor=[UIColor colorWithHexString:fontColor];
31
+        self.titlelabel.textAlignment=NSTextAlignmentCenter;
32
+        [self addSubview:self.titlelabel];
33
+        
34
+        UIImageView *lineV=[[UIImageView alloc]initWithFrame:CGRectMake(0, self.height-5, self.width, 5)];
35
+        lineV.backgroundColor=[UIColor colorWithHexString:LineColor];
36
+        [self addSubview:lineV];
37
+    }
38
+    return self;
39
+}
40
+//通过此父类方法配置cell是否被选中
41
+- (void)configCellOfSelected:(BOOL)selected {
42
+    
43
+    UIColor *textColor = selected ? [UIColor colorWithHexString:ThemeColor] : [UIColor colorWithHexString:fontColor];
44
+    
45
+    self.titlelabel.textColor = textColor;
46
+    
47
+    self.numLabel.textColor = textColor;
48
+}
49
+
50
+//通过此父类方法配置cell动画
51
+- (void)showAnimationOfProgress:(CGFloat)progress type:(XLPageTitleCellAnimationType)type {
52
+    
53
+}
54
+
55
+@end

+ 1 - 0
KuDianProject/MainTab/KDPNavBar.m

@@ -42,6 +42,7 @@
42 42
     UIButton *returnBtn =[[UIButton alloc]initWithFrame:CGRectMake(0, KDStatusHeight, 44, 44)];
43 43
     [returnBtn setImage:[UIImage imageNamed:@"return_white"] forState:UIControlStateNormal];
44 44
     [returnBtn addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside];
45
+//    [returnBtn bringSubviewToFront:[UIApplication sharedApplication].keyWindow];
45 46
     [self addSubview:returnBtn];
46 47
     
47 48
 }

+ 7 - 0
KuDianProject/PrefixHeader.pch

@@ -66,6 +66,7 @@
66 66
 #import "KDPAccountModel.h"
67 67
 #import "KDPBalanceModel.h"
68 68
 #import "KDPOrderModel.h"
69
+#import "KDPServiceView.h"
69 70
 
70 71
 // 类别
71 72
 #import "UIView+Gradient.h"
@@ -77,5 +78,11 @@
77 78
 #import "UINavigationController+FDFullscreenPopGesture.h"
78 79
 #import "UICollectionViewCell+Extension.h"
79 80
 #import "KDPPasteView.h"
81
+#import "KDPOderDetailListVC.h"
82
+#import "XLPageViewController.h"
83
+#import "KDPCollectHistoryVC.h"
84
+
85
+#import "KDPOrderTitleCell.h"
80 86
 
87
+#import "KDPOrderDetailListNewVC.h"
81 88
 #endif /* PrefixHeader_pch */

+ 11 - 2
KuDianProject/Public/KDPNetworkRequestHTTP.m

@@ -8,6 +8,7 @@
8 8
 
9 9
 #import "KDPNetworkRequestHTTP.h"
10 10
 #import <AdSupport/AdSupport.h>
11
+#import "KDPPhoneLoginViewController.h"
11 12
 @implementation KDPNetworkRequestHTTP
12 13
 + (void)postURL:(NSString *)url params:(NSDictionary *)params success:(void(^)(id json))success failure:(void(^)(NSError *error))failure
13 14
 {
@@ -54,11 +55,11 @@
54 55
             }else if([responseDict[@"errno"] isEqualToString:@"4001"]) {
55 56
                 //让用户退出
56 57
                  [MBProgressHUD showMessage:@"登录信息过期,请重新登录"];
57
-               
58
+                [self appOpenLogin];
58 59
             }else if([responseDict[@"errno"] isEqualToString:@"4002"]) {
59 60
                 //让用户退出
60 61
                 [MBProgressHUD showMessage:@"您已在其他设备登录,是否重新登录"];
61
-                
62
+                [self appOpenLogin];
62 63
             }else{
63 64
                 
64 65
             }
@@ -79,6 +80,12 @@
79 80
         }
80 81
     }];
81 82
 }
83
++(void)appOpenLogin
84
+{
85
+    [KDPAccountTool deleteAccount];
86
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:[[UINavigationController alloc]initWithRootViewController:[[KDPPhoneLoginViewController alloc]init]] animated:YES completion:nil];
87
+    
88
+}
82 89
 
83 90
 /**
84 91
  *普通get请求
@@ -127,9 +134,11 @@
127 134
             }else if([responseDict[@"errno"] isEqualToString:@"4001"]) {
128 135
                 //让用户退出
129 136
                 [MBProgressHUD showMessage:@"登录信息过期,请重新登录"];
137
+                 [self appOpenLogin];
130 138
                 
131 139
             }else if([responseDict[@"errno"] isEqualToString:@"4002"]) {
132 140
                 //让用户退出
141
+                 [self appOpenLogin];
133 142
                 [MBProgressHUD showMessage:@"您已在其他设备登录,是否重新登录"];
134 143
                 
135 144
             }else{

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

@@ -24,6 +24,7 @@
24 24
 @property(nonatomic,strong)UIButton *messageButton;//右侧消息按钮
25 25
 
26 26
 @property(nonatomic,strong)UICollectionView *dataCollectionView;
27
+@property(nonatomic,strong)KDPServiceView *serviceView;
27 28
 
28 29
 
29 30
 //服务端传参
@@ -354,7 +355,7 @@
354 355
 -(void)viewWillAppear:(BOOL)animated
355 356
 {
356 357
     [super viewWillAppear:animated];
357
-   
358
+    self.tabBarController.tabBar.hidden=NO;
358 359
     [self updateData];
359 360
 }
360 361
 -(void)viewWillDisappear:(BOOL)animated
@@ -367,6 +368,7 @@
367 368
 {
368 369
     if ([KDPAccountTool isLogin]) {
369 370
         [self getUserTodayIncom];
371
+        [self isOpenService];
370 372
         order_timer = [NSTimer timerWithTimeInterval:30 target:self selector:@selector(order_timerAction) userInfo:nil repeats:YES];
371 373
         [[NSRunLoop mainRunLoop] addTimer:order_timer forMode:NSDefaultRunLoopMode];
372 374
          [self setUserHeadImg];
@@ -386,4 +388,38 @@
386 388
     UIImageView *imgv=[self.headImgBtn viewWithTag:1000];
387 389
     [imgv sd_setImageWithURL:[NSURL URLWithString:model.img]];
388 390
 }
391
+
392
+#pragma mark---打开服务提示页面
393
+
394
+-(KDPServiceView *)serviceView
395
+{
396
+    if (!_serviceView) {
397
+        _serviceView=[[KDPServiceView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
398
+        __weak KDPTopViewController *weakself=self;
399
+        _serviceView.serviceBlock = ^{
400
+            KDPWebInteractionVC *pidV=[[KDPWebInteractionVC alloc]init];
401
+            pidV.url=custSerURL;
402
+            [weakself cw_pushViewController:pidV];
403
+            [weakself.serviceView removeFromSuperview];
404
+        };
405
+    }
406
+    return _serviceView;
407
+}
408
+#pragma mark---判断是否打开客服页面
409
+-(void)isOpenService
410
+{
411
+    //存储第一次打开APP,是否显示客服页面,
412
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
413
+    NSString *oneStep =[defaults objectForKey:@"step"];
414
+    if (oneStep.integerValue == 0) {
415
+        [UIView animateWithDuration:0.3 animations:^{
416
+            [[UIApplication sharedApplication].keyWindow addSubview:self.serviceView];
417
+            
418
+        }];
419
+        
420
+        [defaults setValue:@"1" forKey:@"step"];
421
+        [defaults synchronize];
422
+    }
423
+    
424
+}
389 425
 @end

+ 17 - 0
KuDianProject/TOP/Drawer/View/KDPServiceView.h

@@ -0,0 +1,17 @@
1
+//
2
+//  KDPServiceView.h
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import <UIKit/UIKit.h>
10
+
11
+NS_ASSUME_NONNULL_BEGIN
12
+
13
+@interface KDPServiceView : UIView
14
+@property(nonatomic,copy)void(^serviceBlock)(void);
15
+@end
16
+
17
+NS_ASSUME_NONNULL_END

+ 88 - 0
KuDianProject/TOP/Drawer/View/KDPServiceView.m

@@ -0,0 +1,88 @@
1
+//
2
+//  KDPServiceView.m
3
+//  KuDianProject
4
+//
5
+//  Created by 学丽 on 2019/7/12.
6
+//  Copyright © 2019 KDP. All rights reserved.
7
+//
8
+
9
+#import "KDPServiceView.h"
10
+
11
+@implementation KDPServiceView
12
+
13
+-(instancetype)initWithFrame:(CGRect)frame
14
+{
15
+    self=[super initWithFrame:frame];
16
+    if (self) {
17
+        self.backgroundColor=[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.4];
18
+        UIView *backV=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 281, 286)];
19
+        backV.backgroundColor=[UIColor whiteColor];
20
+        backV.layer.cornerRadius=9;
21
+        backV.layer.masksToBounds=YES;
22
+        [self addSubview:backV];
23
+        backV.center=self.center;
24
+        
25
+        UIImageView *imgv=[[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/2-32, backV.top-32, 64, 64)];
26
+        imgv.image=[UIImage imageNamed:@"serviece_icon"];
27
+        [self addSubview:imgv];
28
+        
29
+        
30
+        UILabel *label =[[UILabel alloc]initWithFrame:CGRectMake(0, 54, backV.width, 25)];
31
+        label.textAlignment=NSTextAlignmentCenter;
32
+        label.text=@"使用酷店的三个步骤:";
33
+        label.textColor=[UIColor colorWithHexString:fontColor];
34
+        label.font=[UIFont systemFontOfSize:18];
35
+        [backV addSubview:label];
36
+        
37
+        
38
+        UILabel *contentL=[[UILabel alloc]initWithFrame:CGRectMake(71, label.bottom+21, 140, 75)];
39
+        contentL.font=[UIFont systemFontOfSize:15];
40
+        contentL.numberOfLines=3;
41
+        contentL.textAlignment=NSTextAlignmentCenter;
42
+        contentL.textColor=[UIColor colorWithHexString:fontColor];
43
+        
44
+        
45
+        [backV addSubview:contentL];
46
+        NSString *contentstr=@"① 绑定快手小店Pid \n② 将商品推广到快手\n③ 查看订单和收益";
47
+        NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:contentstr];
48
+        NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
49
+        [paragraphStyle1 setLineSpacing:8];
50
+        [attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [contentstr length])];
51
+        [contentL setAttributedText:attributedString1];
52
+        
53
+        UIButton *buyButton=[[UIButton alloc]initWithFrame:CGRectMake(26, contentL.bottom+26, 230, 43)];
54
+        buyButton.layer.cornerRadius=21.5;
55
+        buyButton.layer.masksToBounds=YES;
56
+        [backV addSubview:buyButton];
57
+        
58
+        buyButton.backgroundColor=[UIColor colorWithHexString:ThemeColor];
59
+        buyButton.titleLabel.font=[UIFont systemFontOfSize:14];
60
+        [buyButton setTitle:@"了解更多" forState:UIControlStateNormal];
61
+        [backV addSubview:buyButton];
62
+        [buyButton addTarget:self action:@selector(clickTBBtuuton) forControlEvents:UIControlEventTouchUpInside];
63
+        
64
+        UIButton *kwaiBtn=[[UIButton alloc]initWithFrame:CGRectMake(26, buyButton.bottom+10, 230, 20)];
65
+        [kwaiBtn setTitle:@"跳过" forState:UIControlStateNormal];
66
+        kwaiBtn.titleLabel.font=[UIFont systemFontOfSize:14];
67
+        [kwaiBtn setTitleColor:[UIColor colorWithHexString:@"#666666"] forState:UIControlStateNormal];
68
+        [backV addSubview:kwaiBtn];
69
+        
70
+        [kwaiBtn addTarget:self action:@selector(cancelButton) forControlEvents:UIControlEventTouchUpInside];
71
+    }
72
+    return self;
73
+}
74
+-(void)cancelButton
75
+{
76
+    [self removeFromSuperview];
77
+}
78
+-(void)clickTBBtuuton
79
+{
80
+    if (self.serviceBlock) {
81
+        self.serviceBlock();
82
+    }
83
+}
84
+-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
85
+{
86
+    [self removeFromSuperview];
87
+}
88
+@end

+ 4 - 2
KuDianProject/Vendors/XLPageViewController/XLPageViewController.m

@@ -135,6 +135,7 @@ typedef NS_ENUM(NSInteger,XLScrollDirection) {
135 135
     [super viewDidLayoutSubviews];
136 136
     
137 137
     //更新contentview位置
138
+    
138 139
     self.contentView.frame = self.view.bounds;
139 140
     
140 141
     
@@ -147,10 +148,11 @@ typedef NS_ENUM(NSInteger,XLScrollDirection) {
147 148
        
148 149
         
149 150
         
150
-        self.titleView.frame = CGRectMake(0,self.config.navHeight, self.contentView.bounds.size.width, self.config.titleViewHeight);
151
+        self.titleView.frame = CGRectMake(0,0, self.contentView.bounds.size.width, self.config.titleViewHeight);
151 152
         //更新pageVC位置
152 153
         //更新pageVC位置
153
-        self.pageVC.view.frame = CGRectMake(0, self.config.titleViewHeight+self.config.navHeight, self.contentView.bounds.size.width, self.contentView.bounds.size.height - self.config.titleViewHeight-self.config.navHeight);
154
+        self.pageVC.view.frame = CGRectMake(0, self.config.titleViewHeight, self.contentView.bounds.size.width, self.contentView.bounds.size.height - self.config.titleViewHeight);
155
+        self.view.frame=CGRectMake(0, self.config.navHeight, self.view.size.width, self.view.size.height-self.config.navHeight);
154 156
         
155 157
     }
156 158
     if (self.config.showTitleInNavigationBar) {