Просмотр исходного кода

1.修改iOS Apex Drivers Order动态加载。

Pen Li 7 лет назад
Родитель
Сommit
21a64b9c3c

+ 85 - 0
Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj

@@ -75,6 +75,15 @@
 		4280034320C0F146004D4F50 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033C20C0F145004D4F50 /* NSData+Base64.m */; };
 		4280034420C0F146004D4F50 /* NSData+CommonCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033E20C0F145004D4F50 /* NSData+CommonCrypto.m */; };
 		4280034520C0F146004D4F50 /* NSString+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280034020C0F145004D4F50 /* NSString+Base64.m */; };
+		42810FEB20E4C79100315156 /* RAHomeMoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42810FEA20E4C79100315156 /* RAHomeMoreViewController.m */; };
+		42810FEE20E4C93400315156 /* RAHomeMoreViewController+TableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 42810FED20E4C93400315156 /* RAHomeMoreViewController+TableDataSource.m */; };
+		42810FF120E4C94200315156 /* RAHomeMoreViewController+TableDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42810FF020E4C94200315156 /* RAHomeMoreViewController+TableDelegate.m */; };
+		42810FF320E4CE1200315156 /* fake_more_order.json in Resources */ = {isa = PBXBuildFile; fileRef = 42810FF220E4CE1100315156 /* fake_more_order.json */; };
+		4281100120E4D47000315156 /* JLRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 42810FF720E4D46F00315156 /* JLRefreshFooter.m */; };
+		4281100220E4D47000315156 /* JLRefreshHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 42810FFA20E4D46F00315156 /* JLRefreshHeader.m */; };
+		4281100320E4D47000315156 /* JLRefreshBasis.m in Sources */ = {isa = PBXBuildFile; fileRef = 42810FFC20E4D46F00315156 /* JLRefreshBasis.m */; };
+		4281100420E4D47000315156 /* UIScrollView+JLRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = 42810FFE20E4D46F00315156 /* UIScrollView+JLRefresh.m */; };
+		4281100520E4D47000315156 /* UIView+JLExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 4281100020E4D46F00315156 /* UIView+JLExtension.m */; };
 		429CF61C20E0E32E00CE8DAD /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 429CF61E20E0E32E00CE8DAD /* Localizable.strings */; };
 		42D8B8A320C2253E001C125F /* fake_order_list.json in Resources */ = {isa = PBXBuildFile; fileRef = 42D8B8A220C2253E001C125F /* fake_order_list.json */; };
 		42D8B8A820C23DD9001C125F /* RAOrderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D8B8A720C23DD9001C125F /* RAOrderDetailViewController.m */; };
@@ -233,6 +242,23 @@
 		4280033E20C0F145004D4F50 /* NSData+CommonCrypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+CommonCrypto.m"; sourceTree = "<group>"; };
 		4280033F20C0F145004D4F50 /* NSString+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Base64.h"; sourceTree = "<group>"; };
 		4280034020C0F145004D4F50 /* NSString+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Base64.m"; sourceTree = "<group>"; };
+		42810FE920E4C79100315156 /* RAHomeMoreViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAHomeMoreViewController.h; sourceTree = "<group>"; };
+		42810FEA20E4C79100315156 /* RAHomeMoreViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAHomeMoreViewController.m; sourceTree = "<group>"; };
+		42810FEC20E4C93400315156 /* RAHomeMoreViewController+TableDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAHomeMoreViewController+TableDataSource.h"; sourceTree = "<group>"; };
+		42810FED20E4C93400315156 /* RAHomeMoreViewController+TableDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAHomeMoreViewController+TableDataSource.m"; sourceTree = "<group>"; };
+		42810FEF20E4C94200315156 /* RAHomeMoreViewController+TableDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAHomeMoreViewController+TableDelegate.h"; sourceTree = "<group>"; };
+		42810FF020E4C94200315156 /* RAHomeMoreViewController+TableDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAHomeMoreViewController+TableDelegate.m"; sourceTree = "<group>"; };
+		42810FF220E4CE1100315156 /* fake_more_order.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = fake_more_order.json; sourceTree = "<group>"; };
+		42810FF620E4D46F00315156 /* JLRefreshFooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JLRefreshFooter.h; sourceTree = "<group>"; };
+		42810FF720E4D46F00315156 /* JLRefreshFooter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JLRefreshFooter.m; sourceTree = "<group>"; };
+		42810FF920E4D46F00315156 /* JLRefreshHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JLRefreshHeader.h; sourceTree = "<group>"; };
+		42810FFA20E4D46F00315156 /* JLRefreshHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JLRefreshHeader.m; sourceTree = "<group>"; };
+		42810FFB20E4D46F00315156 /* JLRefreshBasis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JLRefreshBasis.h; sourceTree = "<group>"; };
+		42810FFC20E4D46F00315156 /* JLRefreshBasis.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JLRefreshBasis.m; sourceTree = "<group>"; };
+		42810FFD20E4D46F00315156 /* UIScrollView+JLRefresh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+JLRefresh.h"; sourceTree = "<group>"; };
+		42810FFE20E4D46F00315156 /* UIScrollView+JLRefresh.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+JLRefresh.m"; sourceTree = "<group>"; };
+		42810FFF20E4D46F00315156 /* UIView+JLExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+JLExtension.h"; sourceTree = "<group>"; };
+		4281100020E4D46F00315156 /* UIView+JLExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+JLExtension.m"; sourceTree = "<group>"; };
 		429CF61F20E0E35D00CE8DAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
 		42D8B8A220C2253E001C125F /* fake_order_list.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = fake_order_list.json; sourceTree = "<group>"; };
 		42D8B8A620C23DD9001C125F /* RAOrderDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAOrderDetailViewController.h; sourceTree = "<group>"; };
@@ -346,6 +372,7 @@
 		4205FD5E20C1359C00DB42B4 /* Home */ = {
 			isa = PBXGroup;
 			children = (
+				42810FE820E4C77800315156 /* More */,
 				4205FD5F20C135CF00DB42B4 /* RAHomeViewController.h */,
 				4205FD6020C135CF00DB42B4 /* RAHomeViewController.m */,
 				4205FD6A20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.h */,
@@ -553,9 +580,57 @@
 			path = ../../common/AES;
 			sourceTree = "<group>";
 		};
+		42810FE820E4C77800315156 /* More */ = {
+			isa = PBXGroup;
+			children = (
+				42810FE920E4C79100315156 /* RAHomeMoreViewController.h */,
+				42810FEA20E4C79100315156 /* RAHomeMoreViewController.m */,
+				42810FEC20E4C93400315156 /* RAHomeMoreViewController+TableDataSource.h */,
+				42810FED20E4C93400315156 /* RAHomeMoreViewController+TableDataSource.m */,
+				42810FEF20E4C94200315156 /* RAHomeMoreViewController+TableDelegate.h */,
+				42810FF020E4C94200315156 /* RAHomeMoreViewController+TableDelegate.m */,
+			);
+			path = More;
+			sourceTree = "<group>";
+		};
+		42810FF420E4D46F00315156 /* Refresh */ = {
+			isa = PBXGroup;
+			children = (
+				42810FF520E4D46F00315156 /* Footer */,
+				42810FF820E4D46F00315156 /* Header */,
+				42810FFB20E4D46F00315156 /* JLRefreshBasis.h */,
+				42810FFC20E4D46F00315156 /* JLRefreshBasis.m */,
+				42810FFD20E4D46F00315156 /* UIScrollView+JLRefresh.h */,
+				42810FFE20E4D46F00315156 /* UIScrollView+JLRefresh.m */,
+				42810FFF20E4D46F00315156 /* UIView+JLExtension.h */,
+				4281100020E4D46F00315156 /* UIView+JLExtension.m */,
+			);
+			name = Refresh;
+			path = ../../common/customUI/Refresh;
+			sourceTree = "<group>";
+		};
+		42810FF520E4D46F00315156 /* Footer */ = {
+			isa = PBXGroup;
+			children = (
+				42810FF620E4D46F00315156 /* JLRefreshFooter.h */,
+				42810FF720E4D46F00315156 /* JLRefreshFooter.m */,
+			);
+			path = Footer;
+			sourceTree = "<group>";
+		};
+		42810FF820E4D46F00315156 /* Header */ = {
+			isa = PBXGroup;
+			children = (
+				42810FF920E4D46F00315156 /* JLRefreshHeader.h */,
+				42810FFA20E4D46F00315156 /* JLRefreshHeader.m */,
+			);
+			path = Header;
+			sourceTree = "<group>";
+		};
 		42D8B8A120C224EE001C125F /* FakeData */ = {
 			isa = PBXGroup;
 			children = (
+				42810FF220E4CE1100315156 /* fake_more_order.json */,
 				4255EC8E20C5260400E5DA24 /* fake_order_edit.json */,
 				42D8B8DF20C28755001C125F /* fake_order_detail.json */,
 				42D8B8A220C2253E001C125F /* fake_order_list.json */,
@@ -678,6 +753,7 @@
 			isa = PBXGroup;
 			children = (
 				71EAA34720B957D5002F003C /* Apex And Drivers.entitlements */,
+				42810FF420E4D46F00315156 /* Refresh */,
 				4205FD4C20C0F50C00DB42B4 /* Alert */,
 				42529D2820C0E9CE000C0F4D /* Utils */,
 				42529D2620C0E98A000C0F4D /* Config */,
@@ -782,6 +858,7 @@
 				424204DE20C6156E005AEED9 /* QRCode.storyboard in Resources */,
 				424204F020C66D2D005AEED9 /* PhotoPreview.storyboard in Resources */,
 				429CF61C20E0E32E00CE8DAD /* Localizable.strings in Resources */,
+				42810FF320E4CE1200315156 /* fake_more_order.json in Resources */,
 				4280034220C0F146004D4F50 /* LICENSE in Resources */,
 				4258D16120CE296E00067071 /* logout.png in Resources */,
 				425B97EA20C7BF4E00B35713 /* Upload.storyboard in Resources */,
@@ -812,6 +889,7 @@
 				42D8B8DE20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.m in Sources */,
 				425B97E520C7BD3800B35713 /* UIView+Toast.m in Sources */,
 				42529D2B20C0EA0A000C0F4D /* RAUtils.m in Sources */,
+				4281100420E4D47000315156 /* UIScrollView+JLRefresh.m in Sources */,
 				4205FD6620C13BF400DB42B4 /* RAOrderCell.m in Sources */,
 				42529D2120C0E8EC000C0F4D /* NetworkUtils.m in Sources */,
 				42D8B8CF20C2657D001C125F /* RADetailBaseModel.m in Sources */,
@@ -828,6 +906,7 @@
 				42D8B8CC20C24B27001C125F /* RADetailActionModel.m in Sources */,
 				4205FD5820C0F6F100DB42B4 /* RAConvertor.m in Sources */,
 				4205FD5320C0F50C00DB42B4 /* JLCustomerAlertController.m in Sources */,
+				4281100120E4D47000315156 /* JLRefreshFooter.m in Sources */,
 				4255EC6820C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.m in Sources */,
 				4255EC9C20C5286D00E5DA24 /* RAEditMultInputModel.m in Sources */,
 				4255EC7420C5096400E5DA24 /* RAOrderEditViewController.m in Sources */,
@@ -839,21 +918,25 @@
 				42D8B8D220C267C7001C125F /* RADetailActionsLayout.m in Sources */,
 				425B97D020C78ABE00B35713 /* RAUploadManager.m in Sources */,
 				42D8B8B420C2463D001C125F /* RADetailLocationCell.m in Sources */,
+				4281100520E4D47000315156 /* UIView+JLExtension.m in Sources */,
 				423C6A4E20C909FC00455E27 /* RANotificationNameCenter.m in Sources */,
 				42529D3A20C0EA3F000C0F4D /* mztools.c in Sources */,
 				4205FD5C20C1316200DB42B4 /* RABaseViewController.m in Sources */,
 				425B97E220C7BC4A00B35713 /* RAUploadListViewController.m in Sources */,
 				42D8B8B120C2462D001C125F /* RADetailMultLineCell.m in Sources */,
+				42810FF120E4C94200315156 /* RAHomeMoreViewController+TableDelegate.m in Sources */,
 				4280034120C0F146004D4F50 /* AESCrypt.m in Sources */,
 				42529D2520C0E97E000C0F4D /* RADataProvider.m in Sources */,
 				424204DC20C61561005AEED9 /* RAQRCodeScannerViewController.m in Sources */,
 				42D8B8D520C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.m in Sources */,
 				424204E720C668AE005AEED9 /* RATakePhotoPreviewController.m in Sources */,
+				42810FEE20E4C93400315156 /* RAHomeMoreViewController+TableDataSource.m in Sources */,
 				4205FD6C20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.m in Sources */,
 				4255EC9F20C5287D00E5DA24 /* RAEditPhotoModel.m in Sources */,
 				4205FD5420C0F50C00DB42B4 /* JLCustomerNavigationAlertController.m in Sources */,
 				42D8B8A820C23DD9001C125F /* RAOrderDetailViewController.m in Sources */,
 				42D8B8AE20C245D5001C125F /* RADetailSingleLineCell.m in Sources */,
+				42810FEB20E4C79100315156 /* RAHomeMoreViewController.m in Sources */,
 				425B97E820C7BF4000B35713 /* ApexDriverUploadListVC.m in Sources */,
 				4255EC6520C4E24500E5DA24 /* RADetailActionSelectionViewController.m in Sources */,
 				4255EC8A20C5211700E5DA24 /* RAEditMultInputCell.m in Sources */,
@@ -864,11 +947,13 @@
 				71EAA34120B95720002F003C /* main.m in Sources */,
 				4255EC6E20C4E29B00E5DA24 /* RADetailActionSelectionCell.m in Sources */,
 				4205FD4820C0F33500DB42B4 /* LoginViewController.m in Sources */,
+				4281100320E4D47000315156 /* JLRefreshBasis.m in Sources */,
 				4255EC7920C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m in Sources */,
 				42D8B8BB20C2486C001C125F /* RADetailActionSubCell.m in Sources */,
 				71EAA33320B9571B002F003C /* AppDelegate.m in Sources */,
 				4205FD6F20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.m in Sources */,
 				42D8B8C520C24AB4001C125F /* RADetailLocationModel.m in Sources */,
+				4281100220E4D47000315156 /* JLRefreshHeader.m in Sources */,
 				42529D4020C0EA59000C0F4D /* Reachability.m in Sources */,
 				4255EC9320C526FE00E5DA24 /* RAEditBaseModel.m in Sources */,
 				42529D3920C0EA3F000C0F4D /* ioapi.c in Sources */,

+ 145 - 0
Redant Drivers/Apex And Drivers/FakeData/fake_more_order.json

@@ -0,0 +1,145 @@
+{
+  "result": 2,
+  "orders": [{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        },{
+          "orderID": "00000001",
+          "orderNo": "AFS180530001200",
+          "containerNo": "TCNU6432476",
+          "date": "5/30/2018",
+          "status": 2,
+          "title": "Pickup Order New"
+        }
+  ]
+}

+ 4 - 1
Redant Drivers/Apex And Drivers/FakeData/fake_order_list.json

@@ -4,6 +4,7 @@
     {
       "type": 2,
       "title": "New Order",
+      "totalCount":3,
       "orders": [
         {
           "orderID": "00000001",
@@ -34,6 +35,7 @@
     {
       "type": 1,
       "title": "Processing Order",
+      "totalCount":23,
       "orders": [
         {
           "orderID": "00000001",
@@ -64,6 +66,7 @@
     {
       "type": 0,
       "title": "Finish Order",
+      "totalCount":23,
       "orders": [
         {
           "orderID": "00000001",
@@ -92,4 +95,4 @@
       ]
     }
   ]
-}
+}

+ 149 - 0
Redant Drivers/Apex And Drivers/Home/Home.storyboard

@@ -159,5 +159,154 @@
             </objects>
             <point key="canvasLocation" x="-79.200000000000003" y="128.18590704647679"/>
         </scene>
+        <!--Home More View Controller-->
+        <scene sceneID="zUT-kE-485">
+            <objects>
+                <viewController storyboardIdentifier="RAHomeMoreViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="rq3-P6-oJU" customClass="RAHomeMoreViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="cU7-dM-brp">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="X0i-v6-QMb">
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <prototypes>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RAOrderCell" rowHeight="120" id="Skn-d2-ZCi" customClass="RAOrderCell">
+                                        <rect key="frame" x="0.0" y="28" width="375" height="120"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Skn-d2-ZCi" id="fJB-KB-1Fw">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="120"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Xp-zb-7Ya">
+                                                    <rect key="frame" x="5" y="5" width="365" height="109.5"/>
+                                                    <subviews>
+                                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="FDn-7f-r7i">
+                                                            <rect key="frame" x="10" y="36" width="60" height="60"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="height" constant="60" id="JYb-02-EUv"/>
+                                                                <constraint firstAttribute="width" constant="60" id="haw-9A-ATo"/>
+                                                            </constraints>
+                                                        </imageView>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pickup Order New" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Erv-Jh-gKY">
+                                                            <rect key="frame" x="10" y="5" width="325" height="21"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="height" constant="21" id="Bd1-WE-OUn"/>
+                                                            </constraints>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QOi-AI-kif">
+                                                            <rect key="frame" x="80" y="80" width="34.5" height="17"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="poS-lq-bjc">
+                                                            <rect key="frame" x="340" y="5.5" width="20" height="20"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="height" constant="20" id="G2B-fl-iTa"/>
+                                                                <constraint firstAttribute="width" constant="20" id="Jnw-Fu-4Uf"/>
+                                                            </constraints>
+                                                        </imageView>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5/30/2018" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zPE-Be-KVC">
+                                                            <rect key="frame" x="120" y="80" width="67" height="17"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AFS180530001200" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XEo-6C-1rh">
+                                                            <rect key="frame" x="152.5" y="36" width="125" height="17"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order No.:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gDN-mh-cR7">
+                                                            <rect key="frame" x="80" y="36" width="67.5" height="17"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Container No.:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MdI-bS-3zE">
+                                                            <rect key="frame" x="80" y="58" width="93" height="17"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="TCNU6432476" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nVf-At-hXD">
+                                                            <rect key="frame" x="178" y="58" width="98.5" height="17"/>
+                                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                            <nil key="textColor"/>
+                                                            <nil key="highlightedColor"/>
+                                                        </label>
+                                                    </subviews>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                    <constraints>
+                                                        <constraint firstItem="gDN-mh-cR7" firstAttribute="leading" secondItem="FDn-7f-r7i" secondAttribute="trailing" constant="10" id="0cc-OD-uCA"/>
+                                                        <constraint firstItem="QOi-AI-kif" firstAttribute="top" secondItem="MdI-bS-3zE" secondAttribute="bottom" constant="5" id="0dK-aW-Y6M"/>
+                                                        <constraint firstItem="Erv-Jh-gKY" firstAttribute="top" secondItem="6Xp-zb-7Ya" secondAttribute="top" constant="5" id="0m4-jx-cBe"/>
+                                                        <constraint firstItem="MdI-bS-3zE" firstAttribute="top" secondItem="gDN-mh-cR7" secondAttribute="bottom" constant="5" id="5ZY-9W-On4"/>
+                                                        <constraint firstItem="XEo-6C-1rh" firstAttribute="leading" secondItem="gDN-mh-cR7" secondAttribute="trailing" constant="5" id="Aky-24-TsC"/>
+                                                        <constraint firstItem="poS-lq-bjc" firstAttribute="centerY" secondItem="Erv-Jh-gKY" secondAttribute="centerY" id="Ewb-m4-sdJ"/>
+                                                        <constraint firstItem="nVf-At-hXD" firstAttribute="centerY" secondItem="MdI-bS-3zE" secondAttribute="centerY" id="JQP-i3-wOV"/>
+                                                        <constraint firstItem="Erv-Jh-gKY" firstAttribute="leading" secondItem="6Xp-zb-7Ya" secondAttribute="leading" constant="10" id="MCS-Wi-Mi5"/>
+                                                        <constraint firstItem="gDN-mh-cR7" firstAttribute="top" secondItem="FDn-7f-r7i" secondAttribute="top" id="OPx-EH-r5x"/>
+                                                        <constraint firstItem="QOi-AI-kif" firstAttribute="leading" secondItem="MdI-bS-3zE" secondAttribute="leading" id="PE4-kj-9ka"/>
+                                                        <constraint firstItem="MdI-bS-3zE" firstAttribute="leading" secondItem="gDN-mh-cR7" secondAttribute="leading" id="QFd-rb-m9L"/>
+                                                        <constraint firstItem="poS-lq-bjc" firstAttribute="leading" secondItem="Erv-Jh-gKY" secondAttribute="trailing" constant="5" id="UUr-1E-E64"/>
+                                                        <constraint firstAttribute="trailing" secondItem="poS-lq-bjc" secondAttribute="trailing" constant="5" id="ZEs-7A-24P"/>
+                                                        <constraint firstItem="FDn-7f-r7i" firstAttribute="top" secondItem="Erv-Jh-gKY" secondAttribute="bottom" constant="10" id="bCM-Sb-reR"/>
+                                                        <constraint firstItem="FDn-7f-r7i" firstAttribute="leading" secondItem="Erv-Jh-gKY" secondAttribute="leading" id="rmP-5A-Ijy"/>
+                                                        <constraint firstItem="zPE-Be-KVC" firstAttribute="centerY" secondItem="QOi-AI-kif" secondAttribute="centerY" id="u1N-XE-8fd"/>
+                                                        <constraint firstItem="zPE-Be-KVC" firstAttribute="leading" secondItem="QOi-AI-kif" secondAttribute="trailing" constant="5" id="uMx-xV-QvM"/>
+                                                        <constraint firstItem="XEo-6C-1rh" firstAttribute="centerY" secondItem="gDN-mh-cR7" secondAttribute="centerY" id="wUu-ii-rg8"/>
+                                                        <constraint firstItem="nVf-At-hXD" firstAttribute="leading" secondItem="MdI-bS-3zE" secondAttribute="trailing" constant="5" id="wXx-hy-QsZ"/>
+                                                    </constraints>
+                                                </view>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="6Xp-zb-7Ya" firstAttribute="centerY" secondItem="fJB-KB-1Fw" secondAttribute="centerY" id="7lg-Ge-GzJ"/>
+                                                <constraint firstItem="6Xp-zb-7Ya" firstAttribute="leading" secondItem="fJB-KB-1Fw" secondAttribute="leading" constant="5" id="Ojs-Sm-buP"/>
+                                                <constraint firstAttribute="trailing" secondItem="6Xp-zb-7Ya" secondAttribute="trailing" constant="5" id="WaR-a3-UHk"/>
+                                                <constraint firstItem="6Xp-zb-7Ya" firstAttribute="top" secondItem="fJB-KB-1Fw" secondAttribute="top" constant="5" id="WrD-ey-nWT"/>
+                                                <constraint firstItem="6Xp-zb-7Ya" firstAttribute="centerX" secondItem="fJB-KB-1Fw" secondAttribute="centerX" id="ZIQ-Rv-YZH"/>
+                                                <constraint firstAttribute="bottom" secondItem="6Xp-zb-7Ya" secondAttribute="bottom" constant="5" id="hfN-WW-Ehd"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="containerNoLabel" destination="nVf-At-hXD" id="4Jj-3C-vhy"/>
+                                            <outlet property="contentContainer" destination="6Xp-zb-7Ya" id="jDc-VQ-ge6"/>
+                                            <outlet property="dateLabel" destination="zPE-Be-KVC" id="zSY-Nu-f5v"/>
+                                            <outlet property="markView" destination="poS-lq-bjc" id="7zY-ak-N3W"/>
+                                            <outlet property="orderNoLabel" destination="XEo-6C-1rh" id="hpG-Wc-5fV"/>
+                                            <outlet property="statusView" destination="FDn-7f-r7i" id="zHf-k4-BIO"/>
+                                            <outlet property="titleLabel" destination="Erv-Jh-gKY" id="zeC-jH-ZYk"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="rq3-P6-oJU" id="EBd-dp-jb7"/>
+                                    <outlet property="delegate" destination="rq3-P6-oJU" id="cEC-oI-XCk"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="4rG-TS-sz5" firstAttribute="bottom" secondItem="X0i-v6-QMb" secondAttribute="bottom" id="Gh4-eD-Q0L"/>
+                            <constraint firstItem="4rG-TS-sz5" firstAttribute="trailing" secondItem="X0i-v6-QMb" secondAttribute="trailing" id="PkI-y6-aZU"/>
+                            <constraint firstItem="X0i-v6-QMb" firstAttribute="leading" secondItem="4rG-TS-sz5" secondAttribute="leading" id="fia-lF-MgV"/>
+                            <constraint firstItem="X0i-v6-QMb" firstAttribute="top" secondItem="4rG-TS-sz5" secondAttribute="top" id="qIv-3m-mUy"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="4rG-TS-sz5"/>
+                    </view>
+                    <connections>
+                        <outlet property="homeMoreTableView" destination="X0i-v6-QMb" id="MIm-Wf-bsJ"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="a36-Fz-dNB" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-79.200000000000003" y="128.18590704647679"/>
+        </scene>
     </scenes>
 </document>

+ 13 - 0
Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController+TableDataSource.h

@@ -0,0 +1,13 @@
+//
+//  RAHomeMoreViewController+TableDataSource.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/28.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeMoreViewController.h"
+
+@interface RAHomeMoreViewController (TableDataSource) <UITableViewDataSource>
+
+@end

+ 33 - 0
Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController+TableDataSource.m

@@ -0,0 +1,33 @@
+//
+//  RAHomeMoreViewController+TableDataSource.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/28.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeMoreViewController+TableDataSource.h"
+#import "RAOrderCell.h"
+
+
+@implementation RAHomeMoreViewController (TableDataSource)
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.orderCount;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAOrderCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAOrderCell" forIndexPath:indexPath];
+    
+    RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
+    cell.orderModel = order;
+    
+    return cell;
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController+TableDelegate.h

@@ -0,0 +1,13 @@
+//
+//  RAHomeMoreViewController+TableDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/28.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeMoreViewController.h"
+
+@interface RAHomeMoreViewController (TableDelegate) <UITableViewDelegate>
+
+@end

+ 25 - 0
Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController+TableDelegate.m

@@ -0,0 +1,25 @@
+//
+//  RAHomeMoreViewController+TableDelegate.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/28.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeMoreViewController+TableDelegate.h"
+
+@implementation RAHomeMoreViewController (TableDelegate)
+
+#pragma mark - TableView Delegate
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 120.0f;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
+    [self pushDetailViewControllerForModel:order];
+}
+
+@end

+ 21 - 0
Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController.h

@@ -0,0 +1,21 @@
+//
+//  RAHomeMoreViewController.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/28.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RABaseViewController.h"
+#import "RAHomeOrderModel.h"
+
+@interface RAHomeMoreViewController : RABaseViewController
+
+@property (nonatomic,assign) RAOrderStatus type;
+@property (nonatomic,assign,readonly) NSUInteger orderCount;
+
+- (RAHomeOrderModel *)orderModelForIndexPath:(NSIndexPath *)indexPath;
+
+- (void)pushDetailViewControllerForModel:(RAHomeOrderModel *)model;
+
+@end

+ 218 - 0
Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController.m

@@ -0,0 +1,218 @@
+//
+//  RAHomeMoreViewController.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/28.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAHomeMoreViewController.h"
+#import "RAProgressHUD.h"
+#import "RAOrderDetailViewController.h"
+#import "JLRefreshFooter.h"
+
+static const NSInteger limit = 20;
+
+typedef enum {
+    
+    LoadDataActionTypeInitial,
+    LoadDataActionTypeReLoad,
+    LoadDataActionTypeLoadMore
+    
+} LoadDataActionType;
+
+@interface RAHomeMoreViewController ()<JLRefreshDelegate>
+
+@property (nonatomic,strong) IBOutlet UITableView *homeMoreTableView;
+@property (nonatomic,strong) UIRefreshControl *refreshControl;
+
+@property (nonatomic,strong) NSMutableArray<RAHomeOrderModel *> *orderArray;
+@property (nonatomic,strong) JLRefreshFooter *refreshFooter;
+
+@end
+
+@implementation RAHomeMoreViewController
+
++ (instancetype)viewControllerFromStoryboard {
+    RAHomeMoreViewController *homeMoreVC = [[UIStoryboard storyboardWithName:@"Home" bundle:nil] instantiateViewControllerWithIdentifier:[self storyboardID]];
+    return homeMoreVC;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self configureTableView];
+    
+    [self loadData];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+#pragma mark - Configure
+
+- (void)configureTableView {
+    
+    if (@available(iOS 11.0, *)) {
+        self.homeMoreTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+    } else{
+        self.automaticallyAdjustsScrollViewInsets = NO;
+    }
+    
+    self.homeMoreTableView.tableFooterView = [UIView new];
+    self.homeMoreTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
+    
+    UIRefreshControl *refresh = [[UIRefreshControl alloc] init];
+    [refresh addTarget:self action:@selector(refreshControlValueChanged:) forControlEvents:UIControlEventValueChanged];
+    [self.homeMoreTableView addSubview:refresh];
+    self.refreshControl = refresh;
+    
+    self.refreshFooter = [[JLRefreshFooter alloc] init];
+    self.refreshFooter.refreshDelegate = self;
+    self.homeMoreTableView.jl_footer = self.refreshFooter;
+}
+
+#pragma mark - Lazy
+
+- (NSMutableArray<RAHomeOrderModel *> *)orderArray {
+    if (!_orderArray) {
+        _orderArray = [NSMutableArray array];
+    }
+    return _orderArray;
+}
+
+#pragma mark - Getter
+
+- (RAHomeOrderModel *)orderModelForIndexPath:(NSIndexPath *)indexPath {
+    return [self.orderArray objectAtIndex:indexPath.row];
+}
+
+- (NSUInteger)orderCount {
+    return self.orderArray.count;
+}
+
+#pragma mark - Action
+
+- (void)refreshControlValueChanged:(UIRefreshControl *)refresh {
+    [self reloadData];
+}
+
+#pragma mark - Controller Action
+
+- (void)pushDetailViewControllerForModel:(RAHomeOrderModel *)model {
+    
+    [self pushDetailViewControllerForOrderID:model.orderID];
+}
+
+- (void)pushDetailViewControllerForOrderID:(NSString *)orderID {
+    
+    if (!orderID) {
+        return;
+    }
+    RAOrderDetailViewController *detailVC = [RAOrderDetailViewController viewControllerFromStoryboard];
+    detailVC.orderID = orderID;
+    [self.navigationController pushViewController:detailVC animated:YES];
+}
+
+#pragma mark - Load Data
+
+- (void)loadData:(LoadDataActionType)actionType {
+    
+    NSInteger offset = 0;
+    if (actionType == LoadDataActionTypeLoadMore) {
+        offset = self.orderCount;
+    }
+    
+    // show progress
+    RAProgressHUD *hud = [RAProgressHUD showHUDOnView:self.view];
+    
+    __weak typeof(self) weakSelf = self;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        
+        NSDictionary *json = [RADataProvider requestMoreOrder:self.type offset:offset limit:limit];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            
+            // dismiss progress
+            [hud dismiss];
+            if (weakSelf.refreshControl.isRefreshing) {
+                [weakSelf.refreshControl endRefreshing];
+            }
+            
+            if (weakSelf) {
+                __strong typeof(weakSelf) strongSelf = weakSelf;
+                
+                if (actionType == LoadDataActionTypeLoadMore) {
+                    [weakSelf.refreshFooter performSelector:@selector(endRefresh)];
+                }
+                
+                int result = [[json objectForKey:@"result"] intValue];
+                if (result == RESULT_TRUE) {
+                    
+                    NSArray *orders = [json objectForKey:@"orders"];
+                    
+                    if (actionType != LoadDataActionTypeLoadMore) {
+                        [self.orderArray removeAllObjects];
+                    } else {
+                        if (orders.count < limit) {
+                            [weakSelf.refreshFooter performSelector:@selector(noMoreData)];
+                        }
+                    }
+                    
+                    for (int i = 0; i < orders.count; i++) {
+                        NSDictionary *order = [orders objectAtIndex:i];
+                        RAHomeOrderModel *orderModel = [RAHomeOrderModel new];
+                        [orderModel setValuesForKeysWithDictionary:order];
+                        [self.orderArray addObject:orderModel];
+                    }
+                    
+                    [strongSelf.homeMoreTableView reloadData];
+                    
+                } else {
+                    // process error
+                    NSString *msg = [json objectForKey:@"err_msg"];
+                    [strongSelf showAlertTilte:@"Warning" message:msg];
+                }
+            }
+            
+        });
+        
+    });
+}
+
+- (void)loadData {
+    [self loadData:LoadDataActionTypeInitial];
+}
+
+- (void)reloadData {
+    [self loadData:LoadDataActionTypeReLoad];
+}
+
+- (void)loadMore {
+    [self loadData:LoadDataActionTypeLoadMore];
+}
+
+#pragma mark - Refresh Delegate
+
+- (void)jl_beginRefresh:(JLRefreshBasis *)refresh {
+    
+    if (refresh == self.refreshFooter) {
+        if(refresh.state==JLRefreshStateNoMore) //数据取完不再加载
+            return;
+        [self loadMore];
+    }
+}
+
+- (void)jl_pullRefresh:(JLRefreshBasis *)refresh state:(JLRefreshState)state percentage:(float)percentage {
+    
+}
+
+- (void)jl_endRefresh:(JLRefreshBasis *)refresh {
+    
+}
+
+
+@end

+ 6 - 6
Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDelegate.m

@@ -27,15 +27,16 @@
     
     label.text = [self titleForSection:section];
 
-    UIButton *expandBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    UIButton *expandBtn = [UIButton buttonWithType:UIButtonTypeSystem];
     expandBtn.frame = CGRectMake(CGRectGetWidth(tableView.bounds) - 90, 11, 80, 22);
-    [expandBtn setTitle:@"Hide" forState:UIControlStateNormal];
-    [expandBtn setTitle:@"Show" forState:UIControlStateSelected];
+    [expandBtn setTitle:@"More" forState:UIControlStateNormal];
+//    [expandBtn setTitleColor:expandBtn.tintColor forState:UIControlStateNormal];
+//    [expandBtn setTitleColor:UIColorFromRGB(0xffffff) forState:UIControlStateHighlighted];
     expandBtn.tag = section;
     [expandBtn addTarget:self action:@selector(sectionExpandSwithBtnClick:) forControlEvents:UIControlEventTouchUpInside];
     [header addSubview:expandBtn];
     
-    expandBtn.selected = ![self isExpandAtSection:section];
+    expandBtn.hidden = ![self hasMoreOrderForSection:section];
     
     return header;
 }
@@ -54,8 +55,7 @@
 #pragma mark - Action
 
 - (void)sectionExpandSwithBtnClick:(UIButton *)sender {
-    sender.selected = !sender.isSelected;
-    [self setExpand:!sender.isSelected forSection:sender.tag];
+    [self showMoreOrderForSection:sender.tag];
 }
 
 @end

+ 2 - 2
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.h

@@ -23,12 +23,12 @@
 - (NSUInteger)orderCountForSection:(NSInteger)section;
 - (RAHomeOrderModel *)orderModelForIndexPath:(NSIndexPath *)indexPath;
 - (NSString *)titleForSection:(NSInteger)section;
-- (BOOL)isExpandAtSection:(NSInteger)section;
+- (BOOL)hasMoreOrderForSection:(NSInteger)section;
 
 #pragma mark - Controller Action
 
 - (void)pushDetailViewControllerForModel:(RAHomeOrderModel *)model;
 
-- (void)setExpand:(BOOL)expand forSection:(NSInteger)section;
+- (void)showMoreOrderForSection:(NSInteger)section;
 
 @end

+ 15 - 11
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m

@@ -11,6 +11,7 @@
 #import "RAOrderDetailViewController.h"
 #import "RAProgressHUD.h"
 #import "ApexDriverUploadListVC.h"
+#import "RAHomeMoreViewController.h"
 
 @interface RAHomeSectionModel : NSObject
 
@@ -18,8 +19,8 @@
 @property (nonatomic,strong) NSArray <RAHomeOrderModel *> *orders;
 @property (nonatomic,copy) NSString *title;
 @property (nonatomic,readonly) NSInteger ordersCount;
-@property (nonatomic,assign) BOOL expand;
 @property (nonatomic,assign) NSInteger section;
+@property (nonatomic,assign) NSInteger totalCount;
 
 @end
 
@@ -27,7 +28,7 @@
 
 - (instancetype)init {
     if (self = [super init]) {
-        self.expand = YES;
+        
     }
     return self;
 }
@@ -49,9 +50,6 @@
 }
 
 - (NSInteger)ordersCount {
-    if (!self.expand) {
-        return 0;
-    }
     return self.orders.count;
 }
 
@@ -67,6 +65,10 @@
     return curIndex;
 }
 
+- (BOOL)hasMoreOrder {
+    return self.totalCount > self.ordersCount;
+}
+
 @end
 
 #pragma mark - View Controller
@@ -220,9 +222,9 @@
     return sectionModel.title;
 }
 
-- (BOOL)isExpandAtSection:(NSInteger)section {
+- (BOOL)hasMoreOrderForSection:(NSInteger)section {
     RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:section];
-    return sectionModel.expand;
+    return [sectionModel hasMoreOrder];
 }
 
 #pragma mark - Data
@@ -306,11 +308,13 @@
     [self.navigationController pushViewController:detailVC animated:YES];
 }
 
-- (void)setExpand:(BOOL)expand forSection:(NSInteger)section {
-    RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:section];
-    sectionModel.expand = expand;
+- (void)showMoreOrderForSection:(NSInteger)section {
     
-    [self.homeOrderTableView reloadSections:[NSIndexSet indexSetWithIndex:section] withRowAnimation:UITableViewRowAnimationNone];
+    RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:section];
+    RAHomeMoreViewController *homeMoreVC = [RAHomeMoreViewController viewControllerFromStoryboard];
+    homeMoreVC.title = sectionModel.title;
+    homeMoreVC.type = sectionModel.type;
+    [self.navigationController pushViewController:homeMoreVC animated:YES];
 }
 
 #pragma mark - Nofitication Selector

+ 2 - 0
Redant Drivers/Apex And Drivers/RADataProvider.h

@@ -16,6 +16,8 @@
 
 + (NSDictionary *)requestOrderList;
 
++ (NSDictionary *)requestMoreOrder:(NSInteger)orderType offset:(NSInteger)offset limit:(NSInteger)limit;
+
 + (NSDictionary *)requestOrderDetail:(NSString *)orderID;
 
 + (NSDictionary *)requestUpdateOrder:(NSString *)orderID driverAction:(NSInteger)action;

+ 15 - 0
Redant Drivers/Apex And Drivers/RADataProvider.m

@@ -182,6 +182,21 @@
     return [self handleJsonData:json];
 }
 
++ (NSDictionary *)requestMoreOrder:(NSInteger)orderType offset:(NSInteger)offset limit:(NSInteger)limit {
+    
+    sleep(2.0);
+    return [self loadFakeData:@"fake_more_order.json"];
+    //    return [self fakeError];
+    
+    
+    NSMutableDictionary *params = [NSMutableDictionary dictionary];
+    
+    
+    NSData* json=[self get_json:URL_HOST parameters:params  file:nil];
+    
+    return [self handleJsonData:json];
+}
+
 + (NSDictionary *)requestOrderDetail:(NSString *)orderID {
     
 //    sleep(3.0);