diff --git a/zhiche--delivery.xcodeproj/project.pbxproj b/zhiche--delivery.xcodeproj/project.pbxproj index d3282f505b4ad8c4f6c73b1eaaf81dae8ecddab5..378b415850f8f999045caf711d2633815e2b3dfe 100644 --- a/zhiche--delivery.xcodeproj/project.pbxproj +++ b/zhiche--delivery.xcodeproj/project.pbxproj @@ -17,6 +17,11 @@ 823CDAFD1D000B040090BDE8 /* pay_balance_check_press@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 823CDAF91D000B040090BDE8 /* pay_balance_check_press@3x.png */; }; 823CDAFE1D000B040090BDE8 /* pay_balance_check_unpress@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 823CDAFA1D000B040090BDE8 /* pay_balance_check_unpress@2x.png */; }; 823CDAFF1D000B040090BDE8 /* pay_balance_check_unpress@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 823CDAFB1D000B040090BDE8 /* pay_balance_check_unpress@3x.png */; }; + 823E9CF51D012D1B00750F58 /* NewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 823E9CF41D012D1B00750F58 /* NewViewController.m */; }; + 823E9CF81D01504700750F58 /* RefundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 823E9CF71D01504700750F58 /* RefundViewController.m */; }; + 823E9CFB1D01528600750F58 /* InstroctionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 823E9CFA1D01528600750F58 /* InstroctionViewController.m */; }; + 823E9CFE1D0153D700750F58 /* ServeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 823E9CFD1D0153D700750F58 /* ServeViewController.m */; }; + 823E9D011D01597300750F58 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 823E9D001D01597300750F58 /* AboutViewController.m */; }; 8249863C1CF47350002A568A /* InvoiceDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8249863B1CF47350002A568A /* InvoiceDetailViewController.m */; }; 8249863F1CF541ED002A568A /* MessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8249863E1CF541ED002A568A /* MessageViewController.m */; }; 824986461CF54D21002A568A /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 824986441CF54D21002A568A /* MessageCell.m */; }; @@ -99,6 +104,7 @@ 828682771CE3029600C03447 /* TopBackView.m in Sources */ = {isa = PBXBuildFile; fileRef = 828682761CE3029600C03447 /* TopBackView.m */; }; 8286827A1CE305A200C03447 /* common_top_line@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 828682781CE305A200C03447 /* common_top_line@2x.png */; }; 8286827B1CE305A200C03447 /* common_top_line@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 828682791CE305A200C03447 /* common_top_line@3x.png */; }; + 829AB5491D016475008ECBCF /* InvoiceShowViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 829AB5481D016475008ECBCF /* InvoiceShowViewController.m */; }; 829D41BD1CFFBEE20021CD7E /* MineOrderModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 829D41BC1CFFBEE20021CD7E /* MineOrderModel.m */; }; 82B365891CDDD23F009302BA /* InstallCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 82B365881CDDD23F009302BA /* InstallCell.m */; }; 82B3658C1CDDD6C5009302BA /* common_list_arrows_more@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 82B3658A1CDDD6C5009302BA /* common_list_arrows_more@2x.png */; }; @@ -186,6 +192,16 @@ 823CDAF91D000B040090BDE8 /* pay_balance_check_press@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pay_balance_check_press@3x.png"; sourceTree = ""; }; 823CDAFA1D000B040090BDE8 /* pay_balance_check_unpress@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pay_balance_check_unpress@2x.png"; sourceTree = ""; }; 823CDAFB1D000B040090BDE8 /* pay_balance_check_unpress@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pay_balance_check_unpress@3x.png"; sourceTree = ""; }; + 823E9CF31D012D1B00750F58 /* NewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewViewController.h; sourceTree = ""; }; + 823E9CF41D012D1B00750F58 /* NewViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewViewController.m; sourceTree = ""; }; + 823E9CF61D01504700750F58 /* RefundViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefundViewController.h; sourceTree = ""; }; + 823E9CF71D01504700750F58 /* RefundViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RefundViewController.m; sourceTree = ""; }; + 823E9CF91D01528600750F58 /* InstroctionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstroctionViewController.h; sourceTree = ""; }; + 823E9CFA1D01528600750F58 /* InstroctionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstroctionViewController.m; sourceTree = ""; }; + 823E9CFC1D0153D700750F58 /* ServeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServeViewController.h; sourceTree = ""; }; + 823E9CFD1D0153D700750F58 /* ServeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServeViewController.m; sourceTree = ""; }; + 823E9CFF1D01597300750F58 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = ""; }; + 823E9D001D01597300750F58 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = ""; }; 8249863A1CF47350002A568A /* InvoiceDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvoiceDetailViewController.h; sourceTree = ""; }; 8249863B1CF47350002A568A /* InvoiceDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InvoiceDetailViewController.m; sourceTree = ""; }; 8249863D1CF541ED002A568A /* MessageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageViewController.h; sourceTree = ""; }; @@ -342,6 +358,8 @@ 828682761CE3029600C03447 /* TopBackView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopBackView.m; sourceTree = ""; }; 828682781CE305A200C03447 /* common_top_line@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "common_top_line@2x.png"; sourceTree = ""; }; 828682791CE305A200C03447 /* common_top_line@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "common_top_line@3x.png"; sourceTree = ""; }; + 829AB5471D016475008ECBCF /* InvoiceShowViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InvoiceShowViewController.h; sourceTree = ""; }; + 829AB5481D016475008ECBCF /* InvoiceShowViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InvoiceShowViewController.m; sourceTree = ""; }; 829D41BB1CFFBEE20021CD7E /* MineOrderModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineOrderModel.h; sourceTree = ""; }; 829D41BC1CFFBEE20021CD7E /* MineOrderModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineOrderModel.m; sourceTree = ""; }; 82B365871CDDD23F009302BA /* InstallCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstallCell.h; sourceTree = ""; }; @@ -490,6 +508,25 @@ path = Other; sourceTree = ""; }; + 823E9CF21D012CA400750F58 /* 客服中心 */ = { + isa = PBXGroup; + children = ( + 823E9CF31D012D1B00750F58 /* NewViewController.h */, + 823E9CF41D012D1B00750F58 /* NewViewController.m */, + 823E9CF61D01504700750F58 /* RefundViewController.h */, + 823E9CF71D01504700750F58 /* RefundViewController.m */, + 823E9CF91D01528600750F58 /* InstroctionViewController.h */, + 823E9CFA1D01528600750F58 /* InstroctionViewController.m */, + 823E9CFC1D0153D700750F58 /* ServeViewController.h */, + 823E9CFD1D0153D700750F58 /* ServeViewController.m */, + 823E9CFF1D01597300750F58 /* AboutViewController.h */, + 823E9D001D01597300750F58 /* AboutViewController.m */, + 829AB5471D016475008ECBCF /* InvoiceShowViewController.h */, + 829AB5481D016475008ECBCF /* InvoiceShowViewController.m */, + ); + path = "客服中心"; + sourceTree = ""; + }; 8255DFAE1CDC61BC00D8981B = { isa = PBXGroup; children = ( @@ -692,6 +729,7 @@ 8255E0031CDC63DB00D8981B /* Controller */ = { isa = PBXGroup; children = ( + 823E9CF21D012CA400750F58 /* 客服中心 */, 8277E4511CE5AB260010A1F1 /* InstallViewController.h */, 8277E4521CE5AB260010A1F1 /* InstallViewController.m */, 828239911CF2B525004BCB77 /* ManagerController.h */, @@ -1294,7 +1332,7 @@ TargetAttributes = { 8255DFB61CDC61BC00D8981B = { CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 4XNLUU7QFE; + DevelopmentTeam = 2GVKM3P79U; }; 8255DFCF1CDC61BC00D8981B = { CreatedOnToolsVersion = 7.3.1; @@ -1456,6 +1494,7 @@ C2E20CF71CE472CE00EA5913 /* SmallCarTableCell.m in Sources */, 827531521CEAA59100976B85 /* QNPHAssetResource.m in Sources */, 82CE2DE71CF97351000D0749 /* CollectionViewCell.m in Sources */, + 829AB5491D016475008ECBCF /* InvoiceShowViewController.m in Sources */, C22F65541CE1789300639B6F /* ChooseAddressVC.m in Sources */, 8275315A1CEAA59100976B85 /* QNUserAgent.m in Sources */, 825CF8A11CE4675700B386CD /* DepartViewController.m in Sources */, @@ -1481,8 +1520,11 @@ 82CFFABE1CF43C2900581A33 /* InvoiceViewController.m in Sources */, 8249863F1CF541ED002A568A /* MessageViewController.m in Sources */, C2E96FA31CE2D4A900DB0E51 /* ChooseAddressCell.m in Sources */, + 823E9CFE1D0153D700750F58 /* ServeViewController.m in Sources */, + 823E9D011D01597300750F58 /* AboutViewController.m in Sources */, 82F972DF1CF7E7FA0082F93E /* TESTViewController.m in Sources */, 82C9DC321CE1BE0500A0B8C8 /* MineOrderDetailCell.m in Sources */, + 823E9CF51D012D1B00750F58 /* NewViewController.m in Sources */, C2E20CF11CE410DC00EA5913 /* CarShipVC.m in Sources */, 82F973421CF8361A0082F93E /* ExecuteViewController.m in Sources */, 82F973361CF824060082F93E /* ExecuteCell.m in Sources */, @@ -1490,6 +1532,7 @@ 827531461CEAA59100976B85 /* QNResolver.m in Sources */, 8277E4531CE5AB260010A1F1 /* InstallViewController.m in Sources */, 827F3AD31CF97EA700A33E13 /* CollectionReusableView.m in Sources */, + 823E9CF81D01504700750F58 /* RefundViewController.m in Sources */, 827531611CEAA59100976B85 /* QNUploadOption.m in Sources */, 8277E4561CE5AB900010A1F1 /* LoginViewController.m in Sources */, 8249863C1CF47350002A568A /* InvoiceDetailViewController.m in Sources */, @@ -1522,6 +1565,7 @@ 828682771CE3029600C03447 /* TopBackView.m in Sources */, 8275314A1CEAA59100976B85 /* README.md in Sources */, 82CFFAC11CF43FEE00581A33 /* InvoiceCell.m in Sources */, + 823E9CFB1D01528600750F58 /* InstroctionViewController.m in Sources */, 827531401CEAA59100976B85 /* QNNetworkInfo.m in Sources */, 827531551CEAA59100976B85 /* QNDns.m in Sources */, C2E96FA61CE2DB7C00DB0E51 /* NewBtn.m in Sources */, @@ -1691,7 +1735,7 @@ GCC_PREFIX_HEADER = "zhiche--delivery/Delivery/Singleton/Header.h"; INFOPLIST_FILE = "zhiche--delivery/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.isgalaa.unicorn; + PRODUCT_BUNDLE_IDENTIFIER = com.galaa.unicorn; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; }; @@ -1707,7 +1751,7 @@ GCC_PREFIX_HEADER = "zhiche--delivery/Delivery/Singleton/Header.h"; INFOPLIST_FILE = "zhiche--delivery/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.isgalaa.unicorn; + PRODUCT_BUNDLE_IDENTIFIER = com.galaa.unicorn; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; }; diff --git a/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/UserInterfaceState.xcuserstate b/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/UserInterfaceState.xcuserstate index eb07d160cb9f0aafd5bd67e87dc9b975259d5668..c4e4d872b87df310df766b48725b0119355832ba 100644 Binary files a/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/UserInterfaceState.xcuserstate and b/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index ed9a9b4d42c454d27017c91c04ce8b8a518ac029..5004102c41560655c98316e6bf58854b7adcacb6 100644 --- a/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/zhiche--delivery.xcworkspace/xcuserdata/leebruce.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -2,4 +2,22 @@ + + + + + + diff --git a/zhiche--delivery/Delivery/Login/LoginViewController.m b/zhiche--delivery/Delivery/Login/LoginViewController.m index 2982c74f75e142bcdcda694fea13649d0258dfc5..a10d6b68a3dff3fade0aaf4f4312c7419a604614 100644 --- a/zhiche--delivery/Delivery/Login/LoginViewController.m +++ b/zhiche--delivery/Delivery/Login/LoginViewController.m @@ -240,6 +240,7 @@ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [self dismissViewControllerAnimated:YES completion:nil]; + [self.navigationController popViewControllerAnimated:YES]; }); } diff --git a/zhiche--delivery/Delivery/Main/.DS_Store b/zhiche--delivery/Delivery/Main/.DS_Store index 9702a6f5018116eedc6570d11d5deba41f4cbe9d..3dc457c7b0b4bb3de3dc41115032bcce671013a2 100644 Binary files a/zhiche--delivery/Delivery/Main/.DS_Store and b/zhiche--delivery/Delivery/Main/.DS_Store differ diff --git "a/zhiche--delivery/Delivery/Main/2/Cell/\345\205\266\344\273\226cell/OtherCell.m" "b/zhiche--delivery/Delivery/Main/2/Cell/\345\205\266\344\273\226cell/OtherCell.m" index cf47bf6fc666e5414d30caac2c3248ffd091cdd0..49c7abac18cbc229c795c46d0cc585084c33ca4f 100644 --- "a/zhiche--delivery/Delivery/Main/2/Cell/\345\205\266\344\273\226cell/OtherCell.m" +++ "b/zhiche--delivery/Delivery/Main/2/Cell/\345\205\266\344\273\226cell/OtherCell.m" @@ -34,7 +34,7 @@ }]; - [self.checkButton setTitle:@"取消订单" forState:UIControlStateNormal]; + [self.checkButton setTitle:@"查看详情" forState:UIControlStateNormal]; [self.checkButton setTitleColor:BlackColor forState:UIControlStateNormal]; self.checkButton.titleLabel.font = Font(15); @@ -59,7 +59,7 @@ }]; - [self.repostButton setTitle:@"支付订金" forState:UIControlStateNormal]; + [self.repostButton setTitle:@"重新发布" forState:UIControlStateNormal]; [self.repostButton setTitleColor:BlackColor forState:UIControlStateNormal]; self.repostButton.titleLabel.font = Font(15); @@ -100,6 +100,13 @@ }]; label2.backgroundColor = GrayColor; + + + self.repostButton.hidden = YES; + self.deleteButton.hidden = YES; + label2.hidden = YES; + label1.hidden = YES; + } @@ -110,14 +117,14 @@ //订单号 self.orderNumberL.text = [NSString stringWithFormat:@"%@",model.orderCode]; //起始地 - self.startAddress.text = [NSString stringWithFormat:@"%@-%@",model.departCityName,model.departCountyName]; + self.startAddress.text = [NSString stringWithFormat:@"%@",model.departCityName]; //状态 self.statusLabel.text = [NSString stringWithFormat:@"%@",model.statusText]; //起始地详细地址 - self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departAddr]; + self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departUnit]; //起始时间 @@ -125,10 +132,10 @@ self.startTimeL.text = [NSString stringWithFormat:@"%@",model.deliveryDate]; //终止地 - self.endAddress.text = [NSString stringWithFormat:@"%@-%@",model.receiptCityName,model.receiptCountyName]; + self.endAddress.text = [NSString stringWithFormat:@"%@",model.receiptCityName]; //终止地详细地址 - self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptAddr]; + self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptUnit]; //终止日期 // self.endTimeL.text = [NSString stringWithFormat:@"%@",[self backDateWithString:model.arriveDate]]; diff --git "a/zhiche--delivery/Delivery/Main/2/Cell/\345\256\214\346\210\220cell/FinishOrderCell.m" "b/zhiche--delivery/Delivery/Main/2/Cell/\345\256\214\346\210\220cell/FinishOrderCell.m" index d3ee0eec695a23af8015ac7c74d5d69b9a227dc5..74e5961df9086851f8a212efe44b4ade521117e1 100644 --- "a/zhiche--delivery/Delivery/Main/2/Cell/\345\256\214\346\210\220cell/FinishOrderCell.m" +++ "b/zhiche--delivery/Delivery/Main/2/Cell/\345\256\214\346\210\220cell/FinishOrderCell.m" @@ -25,6 +25,9 @@ __weak typeof(self) weakSelf = self; self.detailButton = [UIButton buttonWithType:UIButtonTypeCustom]; [self.contentView addSubview:self.detailButton]; + + + [self.detailButton mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(weakSelf.carStyleL.mas_bottom).offset(5); @@ -56,23 +59,23 @@ //订单号 self.orderNumberL.text = [NSString stringWithFormat:@"%@",model.orderCode]; //起始地 - self.startAddress.text = [NSString stringWithFormat:@"%@-%@",model.departCityName,model.departCountyName]; + self.startAddress.text = [NSString stringWithFormat:@"%@",model.departCityName]; //状态 self.statusLabel.text = [NSString stringWithFormat:@"%@",model.statusText]; //起始地详细地址 - self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departAddr]; + self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departUnit]; //起始时间 self.startTimeL.text = [NSString stringWithFormat:@"%@",model.deliveryDate]; //终止地 - self.endAddress.text = [NSString stringWithFormat:@"%@-%@",model.receiptCityName,model.receiptCountyName]; + self.endAddress.text = [NSString stringWithFormat:@"%@",model.receiptCityName]; //终止地详细地址 - self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptAddr]; + self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptUnit]; //终止日期 self.endTimeL.text = [NSString stringWithFormat:@"%@",model.arriveDate]; diff --git "a/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.h" "b/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.h" index e04effd37ee0e95e22925daf153a3c7fc5510247..b9c3dbf3ffae3460488147bf67fbd32895094d83 100644 --- "a/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.h" +++ "b/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.h" @@ -11,8 +11,9 @@ @interface ForntCell : OrderRootCell -@property (nonatomic,strong) UIButton *cancelButton; -@property (nonatomic,strong) UIButton *payButton; +@property (nonatomic,strong) UIButton *cancelButton;//取消订单 +@property (nonatomic,strong) UIButton *payButton;//支付订金 +@property (nonatomic,strong) UIButton *payLastMoneyButton;//支付余款 @property (nonatomic,strong) MineOrderModel *model; diff --git "a/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.m" "b/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.m" index 91479c87d5025a75e9011c2eca2d3fe8f9d3be71..2a24bf97d8b8b8e426fcbf85eae511a59ad49fb3 100644 --- "a/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.m" +++ "b/zhiche--delivery/Delivery/Main/2/Cell/\345\276\205\344\273\230\346\254\276cell/ForntCell.m" @@ -23,16 +23,17 @@ -(void)initSubviews { - __weak typeof(self) weakSelf = self; +// __weak typeof(self) weakSelf = self; + + CGRect rightFrame = CGRectMake(screenWidth - screenWidth/4.0, 125, screenWidth/4.0, 35); + CGRect leftFrame = CGRectMake(screenWidth /2.0, 125, screenWidth/4.0, 35); + + self.cancelButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.contentView addSubview:self.cancelButton]; - [self.cancelButton mas_makeConstraints:^(MASConstraintMaker *make) { - - make.top.mas_equalTo(weakSelf.carStyleL.mas_bottom).offset(5); - make.right.mas_offset(0); - make.size.mas_offset(CGSizeMake(screenWidth/4.0, 35)); - - }]; + self.cancelButton.frame = rightFrame; + + + [self.cancelButton setTitle:@"取消订单" forState:UIControlStateNormal]; [self.cancelButton setTitleColor:BlackColor forState:UIControlStateNormal]; @@ -40,67 +41,81 @@ UILabel *label = [[UILabel alloc]init]; [self.contentView addSubview:label]; - [label mas_makeConstraints:^(MASConstraintMaker *make) { - - make.right.mas_equalTo(weakSelf.cancelButton.mas_left).offset(0); - make.size.mas_offset(CGSizeMake(0.5, 34)); - make.top.equalTo(weakSelf.cancelButton);; - - }]; + label.frame = CGRectMake(CGRectGetMinX(self.cancelButton.frame) - 0.5, CGRectGetMinY(self.cancelButton.frame), 0.5, 34); + label.backgroundColor = GrayColor; self.payButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.contentView addSubview:self.payButton]; - [self.payButton mas_makeConstraints:^(MASConstraintMaker *make) { - - make.top.equalTo(weakSelf.cancelButton); - make.right.mas_equalTo(label.mas_left).offset(0); - make.size.mas_offset(CGSizeMake(screenWidth/4.0, 35)); + self.payButton.frame = leftFrame; + + - - }]; [self.payButton setTitle:@"支付订金" forState:UIControlStateNormal]; [self.payButton setTitleColor:BlackColor forState:UIControlStateNormal]; self.payButton.titleLabel.font = Font(15); UILabel *label1 = [[UILabel alloc]init]; + label1.frame = CGRectMake(screenWidth - screenWidth/2.0 - 0.5, CGRectGetMinY(self.cancelButton.frame), 0.5, 34); [self.contentView addSubview:label1]; - [label1 mas_makeConstraints:^(MASConstraintMaker *make) { - - make.right.mas_equalTo(weakSelf.payButton.mas_left).offset(0); - make.size.mas_offset(CGSizeMake(0.5, 34)); - make.top.equalTo(weakSelf.cancelButton);; - - }]; + label1.backgroundColor = GrayColor; + label1.tag = 502; + + + + self.payLastMoneyButton = [UIButton buttonWithType:UIButtonTypeCustom]; + self.payLastMoneyButton.frame = rightFrame; + + + [self.payLastMoneyButton setTitle:@"支付余款" forState:UIControlStateNormal]; + [self.payLastMoneyButton setTitleColor:BlackColor forState:UIControlStateNormal]; + self.payLastMoneyButton.titleLabel.font = Font(15); } + + -(void)setModel:(MineOrderModel *)model { if (_model != model) { + if ([model.statusText isEqualToString:@"已确定"]) { + + [self.contentView addSubview:self.cancelButton]; + [self.contentView addSubview:self.payButton]; + + } else { + +// + UILabel *label = [self.contentView viewWithTag:502]; + label.hidden = YES; + [self.contentView addSubview:self.payLastMoneyButton]; + + } + + + //订单号 self.orderNumberL.text = [NSString stringWithFormat:@"%@",model.orderCode]; //起始地 - self.startAddress.text = [NSString stringWithFormat:@"%@-%@",model.departCityName,model.departCountyName]; + self.startAddress.text = [NSString stringWithFormat:@"%@",model.departCityName]; //状态 self.statusLabel.text = [NSString stringWithFormat:@"%@",model.statusText]; //起始地详细地址 - self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departAddr]; + self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departUnit]; //起始时间 self.startTimeL.text = [NSString stringWithFormat:@"%@",model.deliveryDate]; //终止地 - self.endAddress.text = [NSString stringWithFormat:@"%@-%@",model.receiptCityName,model.receiptCountyName]; + self.endAddress.text = [NSString stringWithFormat:@"%@",model.receiptCityName]; //终止地详细地址 - self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptAddr]; + self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptUnit]; //终止日期 self.endTimeL.text = [NSString stringWithFormat:@"%@",model.arriveDate]; diff --git "a/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.h" "b/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.h" index 2db7089d39861fcb686f9a3f2a91b09805aee273..f323dc3a40d4374a1ad722082c2529ef0b8caa44 100644 --- "a/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.h" +++ "b/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.h" @@ -11,8 +11,9 @@ @interface ExecuteCell : OrderRootCell -@property (nonatomic,strong) UIButton *cancelButton; -@property (nonatomic,strong) UIButton *topayButton; +@property (nonatomic,strong) UIButton *cancelButton;//取消订单 +@property (nonatomic,strong) UIButton *topayButton;//支付订金 +@property (nonatomic,strong) UIButton *payLastMoneyButton;//支付余额 @property (nonatomic,strong) MineOrderModel *model; diff --git "a/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.m" "b/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.m" index 8290b9b8231b16bbefb8eccb73802cd59f34334c..b32f7834ecc21663ce82ed98bbb145d3af10aa0d 100644 --- "a/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.m" +++ "b/zhiche--delivery/Delivery/Main/2/Cell/\350\277\220\350\276\223\344\270\255cell/ExecuteCell.m" @@ -23,17 +23,17 @@ -(void)initSubviews { - __weak typeof(self) weakSelf = self; +// __weak typeof(self) weakSelf = self; + + CGRect rightFrame = CGRectMake(screenWidth - screenWidth/4.0, 125, screenWidth/4.0, 35); + CGRect leftFrame = CGRectMake(screenWidth /2.0, 125, screenWidth/4.0, 35); + + //取消 self.cancelButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.contentView addSubview:self.cancelButton]; - [self.cancelButton mas_makeConstraints:^(MASConstraintMaker *make) { - - make.top.mas_equalTo(weakSelf.carStyleL.mas_bottom).offset(5); - make.right.mas_offset(0); - make.size.mas_offset(CGSizeMake(screenWidth/4.0, 35)); - - }]; + + + self.cancelButton.frame = rightFrame; [self.cancelButton setTitle:@"取消订单" forState:UIControlStateNormal]; [self.cancelButton setTitleColor:BlackColor forState:UIControlStateNormal]; @@ -41,31 +41,41 @@ UILabel *label = [[UILabel alloc]init]; [self.contentView addSubview:label]; - [label mas_makeConstraints:^(MASConstraintMaker *make) { - - make.right.mas_equalTo(weakSelf.cancelButton.mas_left).offset(0); - make.size.mas_offset(CGSizeMake(0.5, 34)); - make.top.equalTo(weakSelf.cancelButton);; - - }]; + label.frame = CGRectMake(CGRectGetMinX(self.cancelButton.frame) - 0.5, CGRectGetMinY(self.cancelButton.frame), 0.5, 34); + label.backgroundColor = GrayColor; - //支付余额 + + //支付订金 + self.topayButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.contentView addSubview:self.topayButton]; - [self.topayButton mas_makeConstraints:^(MASConstraintMaker *make) { - - make.top.mas_equalTo(weakSelf.carStyleL.mas_bottom).offset(5); - make.right.mas_offset(0); - make.size.mas_offset(CGSizeMake(screenWidth/4.0, 35)); - - }]; + + self.topayButton.frame = leftFrame; - [self.topayButton setTitle:@"支付余额" forState:UIControlStateNormal]; + [self.topayButton setTitle:@"支付订金" forState:UIControlStateNormal]; [self.topayButton setTitleColor:BlackColor forState:UIControlStateNormal]; self.topayButton.titleLabel.font = Font(15); - self.topayButton.hidden = YES; + + + UILabel *label1 = [[UILabel alloc]init]; + [self.contentView addSubview:label1]; + + label1.frame = CGRectMake(screenWidth - screenWidth/2.0 - 0.5, CGRectGetMinY(self.cancelButton.frame), 0.5, 34); + label1.backgroundColor = GrayColor; + label1.tag = 503; + + + + //支付余额 + + self.payLastMoneyButton = [UIButton buttonWithType:UIButtonTypeCustom]; + + self.payLastMoneyButton.frame = rightFrame; + + [self.payLastMoneyButton setTitle:@"支付余额" forState:UIControlStateNormal]; + [self.payLastMoneyButton setTitleColor:BlackColor forState:UIControlStateNormal]; + self.payLastMoneyButton.titleLabel.font = Font(15); @@ -75,13 +85,27 @@ { if (_model != model) { + + if ([model.statusText isEqualToString:@"已确定"]) { + + [self.contentView addSubview:self.cancelButton]; + [self.contentView addSubview:self.topayButton]; + + + } else { + [self.contentView addSubview:self.payLastMoneyButton]; + UILabel *label = [self.contentView viewWithTag:503]; + label.hidden = YES; + } + + //订单号 self.orderNumberL.text = [NSString stringWithFormat:@"%@",model.orderCode]; //起始地 - self.startAddress.text = [NSString stringWithFormat:@"%@-%@",model.departCityName,model.departCountyName]; + self.startAddress.text = [NSString stringWithFormat:@"%@",model.departCityName]; //起始地详细地址 - self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departAddr]; + self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departUnit]; //状态 self.statusLabel.text = [NSString stringWithFormat:@"%@",model.statusText]; @@ -90,10 +114,10 @@ self.startTimeL.text = [NSString stringWithFormat:@"%@",model.deliveryDate]; //终止地 - self.endAddress.text = [NSString stringWithFormat:@"%@-%@",model.receiptCityName,model.receiptCountyName]; + self.endAddress.text = [NSString stringWithFormat:@"%@",model.receiptCityName]; //终止地详细地址 - self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptAddr]; + self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptUnit]; //终止日期 self.endTimeL.text = [NSString stringWithFormat:@"%@",model.arriveDate]; diff --git a/zhiche--delivery/Delivery/Main/2/Controller/MineOrderVC.m b/zhiche--delivery/Delivery/Main/2/Controller/MineOrderVC.m index 5a1bc0f88a6b0e766d3567d5bb2c8ecbbd810469..de2f5b5efd280dbc3fd994d4f7e312b65b90428a 100644 --- a/zhiche--delivery/Delivery/Main/2/Controller/MineOrderVC.m +++ b/zhiche--delivery/Delivery/Main/2/Controller/MineOrderVC.m @@ -150,13 +150,14 @@ [Common requestWithUrlString:urlString contentType:application_json finished:^(id responseObj) { + if (self.dataArray.count > 0 ) { [self.dataArray removeAllObjects]; } if ([responseObj[@"success"] boolValue]) { - NSArray *array = responseObj[@"data"][@"data"]; + NSArray *array = responseObj[@"data"][@"orders"]; for (id obj in array) { MineOrderModel *model = [[MineOrderModel alloc]init]; @@ -372,18 +373,22 @@ if (_number == 0) { NSString *cellString = @"fukuanCell"; - ForntCell *cell = [tableView dequeueReusableCellWithIdentifier:cellString]; - if (!cell) { - cell = [[ForntCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellString]; - } +// ForntCell *cell = [tableView dequeueReusableCellWithIdentifier:cellString]; +// if (!cell) { +// cell = [[ForntCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellString]; +// } + ForntCell *cell = [[ForntCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellString]; [cell.cancelButton addTarget:self action:@selector(cancelButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [cell.payButton addTarget:self action:@selector(payAction:) forControlEvents:UIControlEventTouchUpInside]; + [cell.payLastMoneyButton addTarget:self action:@selector(payLastMoneyButton:) forControlEvents:UIControlEventTouchUpInside]; - cell.cancelButton.tag = indexPath.section + 1000; - cell.payButton.tag = indexPath.section + 1200; + + cell.cancelButton.tag = indexPath.section + 10000; + cell.payButton.tag = indexPath.section + 12000; + cell.payLastMoneyButton.tag = 14000; if (self.dataArray.count > 0) { cell.model = self.dataArray[indexPath.section]; @@ -394,10 +399,12 @@ } else if (_number == 1) { NSString *cellString = @"zhixingzhongCell"; - ExecuteCell *cell = [tableView dequeueReusableCellWithIdentifier:cellString]; - if (!cell) { - cell = [[ExecuteCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellString]; - } +// ExecuteCell *cell = [tableView dequeueReusableCellWithIdentifier:cellString]; +// if (!cell) { +// cell = [[ExecuteCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellString]; +// } + + ExecuteCell *cell = [[ExecuteCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellString]; if (self.dataArray.count > 0) { @@ -406,7 +413,13 @@ } [cell.cancelButton addTarget:self action:@selector(executeCellCancelButtonAction:) forControlEvents:UIControlEventTouchUpInside]; - cell.cancelButton.tag = indexPath.section + 1400; + cell.cancelButton.tag = indexPath.section + 20000; + + cell.topayButton.tag = indexPath.section + 22000; + [cell.topayButton addTarget:self action:@selector(executePayButton:) forControlEvents:UIControlEventTouchUpInside]; + + cell.payLastMoneyButton.tag = indexPath.section + 24000; + [cell.payLastMoneyButton addTarget:self action:@selector(executePaylastButton:) forControlEvents:UIControlEventTouchUpInside]; @@ -446,6 +459,16 @@ } + [cell.deleteButton addTarget:self action:@selector(deleteButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + cell.deleteButton.tag = 1800 + indexPath.section; + + [cell.checkButton addTarget:self action:@selector(OtherCellcheckButton:) forControlEvents:UIControlEventTouchUpInside]; + cell.checkButton.tag = 2000 + indexPath.section; + + + [cell.repostButton addTarget:self action:@selector(repostButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + cell.repostButton.tag = 2200 + indexPath.section; + return cell; @@ -511,7 +534,7 @@ { MineOrderModel *model = [[MineOrderModel alloc]init]; - model = self.dataArray[sender.tag - 1000]; + model = self.dataArray[sender.tag - 10000]; CancelViewController *cancel = [[CancelViewController alloc]init]; cancel.integer = [model.ID integerValue];; @@ -523,25 +546,56 @@ -(void)payAction:(UIButton *)sender { MineOrderModel *model = [[MineOrderModel alloc]init]; - model = self.dataArray[sender.tag - 1200]; + model = self.dataArray[sender.tag - 12000]; PayViewController *pay = [[PayViewController alloc]init]; pay.integer = [model.ID integerValue]; [self.navigationController pushViewController:pay animated:YES]; } +#pragma mark 待付款支付余额 + +-(void)payLastMoneyButton:(UIButton *)sender +{ + MineOrderModel *model = [[MineOrderModel alloc]init]; + model = self.dataArray[sender.tag - 14000]; + PayViewController *pay = [[PayViewController alloc]init]; + pay.integer = [model.ID integerValue]; + [self.navigationController pushViewController:pay animated:YES]; +} + + + #pragma mark 执行中取消订单 -(void)executeCellCancelButtonAction:(UIButton *)sender { MineOrderModel *model = [[MineOrderModel alloc]init]; - model = self.dataArray[sender.tag - 1400]; + model = self.dataArray[sender.tag - 20000]; CancelViewController *cancel = [[CancelViewController alloc]init]; cancel.integer = [model.ID integerValue];; [self.navigationController pushViewController:cancel animated:YES]; } +-(void)executePayButton:(UIButton *)sender +{ + MineOrderModel *model = [[MineOrderModel alloc]init]; + model = self.dataArray[sender.tag - 22000]; + PayViewController *pay = [[PayViewController alloc]init]; + pay.integer = [model.ID integerValue]; + [self.navigationController pushViewController:pay animated:YES]; +} + +-(void)executePaylastButton:(UIButton *)sender +{ + MineOrderModel *model = [[MineOrderModel alloc]init]; + model = self.dataArray[sender.tag - 24000]; + PayViewController *pay = [[PayViewController alloc]init]; + pay.integer = [model.ID integerValue]; + [self.navigationController pushViewController:pay animated:YES]; +} + #pragma mark 完成进入详情 -(void)detailButton:(UIButton *)sender { @@ -557,11 +611,28 @@ } +#pragma mark 其他-进入详情 +-(void)OtherCellcheckButton:(UIButton *)sender +{ + MineOrderModel *model = [[MineOrderModel alloc]init]; + model = self.dataArray[sender.tag - 2000]; + + ExecuteViewController *executeVC = [[ExecuteViewController alloc]init]; + + executeVC.orderId = model.ID; + + + [self.navigationController pushViewController:executeVC animated:YES]; + +} + +#pragma mark 其他-删除 + -(void)deleteButtonAction:(UIButton *)sender { MineOrderModel *model = [[MineOrderModel alloc]init]; - model = self.dataArray[sender.tag - 300]; + model = self.dataArray[sender.tag - 1800]; NSDictionary *dic = @{@"id":model.ID}; @@ -573,18 +644,17 @@ NSDictionary *dicionary = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableLeaves error:nil]; - if ([dicionary[@"success"] boolValue]) { // dicionary[@"message"] 提示删除是否成功 #warning 可以添加提示框 - [self.dataArray removeObjectAtIndex:sender.tag - 300]; + [self.dataArray removeObjectAtIndex:sender.tag - 1800]; [self.tableView beginUpdates]; //删除一个section - [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sender.tag - 300] withRowAnimation:UITableViewRowAnimationLeft]; + [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sender.tag - 1800] withRowAnimation:UITableViewRowAnimationLeft]; [self.tableView endUpdates]; //延迟执行 @@ -602,20 +672,16 @@ } -#pragma mark 重新发布 +#pragma mark 其他-重新发布 -(void)repostButtonAction:(UIButton *)sender { NSString *urlString = [NSString stringWithFormat:@"%@order/publish",Main_interface]; MineOrderModel *model = [[MineOrderModel alloc]init]; - model = self.dataArray[sender.tag - 1000]; + model = self.dataArray[sender.tag - 2200]; - NSDictionary *dic = @{@"id":model.ID, - @"status":@" ", - @"customprice":@"1000"}; - - NSLog(@"%@",dic); + NSDictionary *dic = @{@"id":model.ID}; Common *c = [[Common alloc]init]; @@ -623,8 +689,6 @@ NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableLeaves error:nil]; - NSLog(@"%@",dictionary); - if ([dictionary[@"success"] boolValue]) { diff --git a/zhiche--delivery/Delivery/Main/2/Controller/PayViewController.m b/zhiche--delivery/Delivery/Main/2/Controller/PayViewController.m index 7f89af04e106900038ea94c38d1a98b9c4db9951..b89255c6caaae8f7aadd6626db1d292c40309cd4 100644 --- a/zhiche--delivery/Delivery/Main/2/Controller/PayViewController.m +++ b/zhiche--delivery/Delivery/Main/2/Controller/PayViewController.m @@ -161,15 +161,22 @@ [self alertControllerWith:@"请选择支付方式" andInteger:0]; } else { + + NSString *urlString; + if (self.rowNumber == 0) { + + urlString = [NSString stringWithFormat:@"%@pay/alipay",Main_interface]; + + } else { + urlString = [NSString stringWithFormat:@"%@pay/wx",Main_interface]; + + } - NSString *urlString = [NSString stringWithFormat:@"%@pay/create",Main_interface]; #warning 暂时先写订金测试 - NSDictionary *diction = @{@"orderid":@(self.integer), - @"paytype":(self.rowNumber == 0) ? @"10" :@"20", - @"costtype":@"10"}; + NSDictionary *diction = @{@"orderid":@(self.integer)}; Common *c = [[Common alloc]init]; @@ -177,13 +184,11 @@ NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableLeaves error:nil]; - NSLog(@"%@",dic); if ([dic[@"success"] boolValue]) { [self alertControllerWith:dic[@"message"] andInteger:1]; - } diff --git "a/zhiche--delivery/Delivery/Main/2/Controller/\346\211\247\350\241\214\344\270\255\350\257\246\346\203\205/ExecuteViewController.m" "b/zhiche--delivery/Delivery/Main/2/Controller/\346\211\247\350\241\214\344\270\255\350\257\246\346\203\205/ExecuteViewController.m" index f1fe55d8e3f1cae7d88e3067cd647328e23bc644..8c02f7e132357255533820a002039c6758678730 100644 --- "a/zhiche--delivery/Delivery/Main/2/Controller/\346\211\247\350\241\214\344\270\255\350\257\246\346\203\205/ExecuteViewController.m" +++ "b/zhiche--delivery/Delivery/Main/2/Controller/\346\211\247\350\241\214\344\270\255\350\257\246\346\203\205/ExecuteViewController.m" @@ -37,11 +37,12 @@ -(void)initDataSource { - NSString *urlString = [NSString stringWithFormat:@"%@order/%@?id=%@",Main_interface,self.orderId,self.orderId]; + NSString *urlString = [NSString stringWithFormat:@"%@order/%ld?id=%ld",Main_interface,[self.orderId integerValue],[self.orderId integerValue]]; NSLog(@"%@",urlString); [Common requestWithUrlString:urlString contentType:application_json finished:^(id responseObj) { + NSLog(@"%@",responseObj); if ([responseObj[@"success"] boolValue]) { @@ -68,23 +69,23 @@ self.numberLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"orderCode"]]; //状态 - self.statusLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"status"]]; + self.statusLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"statusText"]]; //起始地 - self.startLabel.text = [NSString stringWithFormat:@"%@-%@",self.dataDictionary[@"departCityName"],self.dataDictionary[@"departCountyName"]]; + self.startLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"departCityName"]]; //起始详情地址 - self.startDetailLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"departAddr"]]; + self.startDetailLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"departUnit"]]; //起始日期 self.startDate.text = [NSString stringWithFormat:@"%@",[self backDateWithString:self.dataDictionary[@"deliveryDate"]] ]; //目的地 - self.endLabel.text = [NSString stringWithFormat:@"%@-%@",self.dataDictionary[@"receiptCityName"],self.dataDictionary[@"receiptCountyName"]]; + self.endLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"receiptCityName"]]; // - self.endDetailLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"receiptAddr"]]; + self.endDetailLabel.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"receiptUnit"]]; self.endDateLabel.text = [NSString stringWithFormat:@"%@",[self backDateWithString:self.dataDictionary[@"arriveDate"]]]; //车辆 diff --git a/zhiche--delivery/Delivery/Main/4/.DS_Store b/zhiche--delivery/Delivery/Main/4/.DS_Store index a6a6a583438201527fa740769ec7b5b89ced701b..245638bdf1c5582785bdcab6a01b89e3dc923634 100644 Binary files a/zhiche--delivery/Delivery/Main/4/.DS_Store and b/zhiche--delivery/Delivery/Main/4/.DS_Store differ diff --git a/zhiche--delivery/Delivery/Main/4/Cell/InvoiceCell.m b/zhiche--delivery/Delivery/Main/4/Cell/InvoiceCell.m index f8a838008b960646285654e7467ff2723176b7ac..91fe727b543420e133a0be3ead7a016a099e456d 100644 --- a/zhiche--delivery/Delivery/Main/4/Cell/InvoiceCell.m +++ b/zhiche--delivery/Delivery/Main/4/Cell/InvoiceCell.m @@ -368,20 +368,20 @@ //订单号 self.orderNumberL.text = [NSString stringWithFormat:@"%@",model.orderCode]; //起始地 - self.startAddress.text = [NSString stringWithFormat:@"%@-%@",model.departCityName,model.departCountyName]; + self.startAddress.text = [NSString stringWithFormat:@"%@",model.departCityName]; //起始地详细地址 - self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departAddr]; + self.startDetailAddress.text = [NSString stringWithFormat:@"%@",model.departUnit]; //起始时间 self.startTimeL.text = [NSString stringWithFormat:@"%@",model.deliveryDate]; //终止地 - self.endAddress.text = [NSString stringWithFormat:@"%@-%@",model.receiptCityName,model.receiptCountyName]; + self.endAddress.text = [NSString stringWithFormat:@"%@",model.receiptCityName]; //终止地详细地址 - self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptAddr]; + self.endDetailAddress.text = [NSString stringWithFormat:@"%@",model.receiptUnit]; //终止日期 self.endTimeL.text = [NSString stringWithFormat:@"%@",model.arriveDate]; diff --git a/zhiche--delivery/Delivery/Main/4/Controller/CallCenterViewController.m b/zhiche--delivery/Delivery/Main/4/Controller/CallCenterViewController.m index 6d07f80082a3573efe7635093cd4562336084aa7..d0f994bba017b79b81a2d500aca01a952c8a9667 100644 --- a/zhiche--delivery/Delivery/Main/4/Controller/CallCenterViewController.m +++ b/zhiche--delivery/Delivery/Main/4/Controller/CallCenterViewController.m @@ -9,6 +9,12 @@ #import "CallCenterViewController.h" #import "TopBackView.h" #import "RootViewController.h" +#import "NewViewController.h"//新手上路 +#import "RefundViewController.h"//退款规则 +#import "InstroctionViewController.h"//运输说明 +#import "AboutViewController.h"//关于页面 +#import "InvoiceShowViewController.h"//开取发票 +#import "ServeViewController.h"//服务 @interface CallCenterViewController () @@ -31,7 +37,7 @@ self.view.backgroundColor = WhiteColor; - self.dataArray = [NSMutableArray arrayWithObjects:@"车辆运输说明",@"车辆运输服务协议",@"退款规则",@"开票规则说明",@"新手上路", nil]; + self.dataArray = [NSMutableArray arrayWithObjects:@"车辆运输说明",@"车辆运输服务协议",@"退款规则",@"开票规则说明",@"新手上路",@"关于页面", nil]; [self initSubViews]; } @@ -56,6 +62,60 @@ cell.textLabel.font = Font(15); return cell; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + + if (indexPath.row == 0) { + //运输说明 + InstroctionViewController *instroctionVC = [[InstroctionViewController alloc]init]; + [self.navigationController pushViewController:instroctionVC animated:YES]; + } + + if (indexPath.row == 1) { + + //服务 + ServeViewController *serveVC = [[ServeViewController alloc]init]; + + [self.navigationController pushViewController:serveVC animated:YES]; + + } + + if (indexPath.row == 2) { + //退款规则 + RefundViewController *refundVC = [[RefundViewController alloc]init]; + [self.navigationController pushViewController:refundVC animated:YES]; + } + + + if (indexPath.row == 3) { + //开票规则 + InvoiceShowViewController *invoiceVC = [[InvoiceShowViewController alloc]init]; + + [self.navigationController pushViewController:invoiceVC animated:YES]; + + } + + + if (indexPath.row == 4) { + //新手上路 + NewViewController *newVC = [[NewViewController alloc]init]; + + [self.navigationController pushViewController:newVC animated:YES]; + } + + if (indexPath.row == 5) { + //关于页面 + AboutViewController *aboutVC = [[AboutViewController alloc]init]; + [self.navigationController pushViewController:aboutVC animated:YES]; + + } + + + + } -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section diff --git a/zhiche--delivery/Delivery/Main/4/Controller/DepartViewController.m b/zhiche--delivery/Delivery/Main/4/Controller/DepartViewController.m index 4a24dbd9052ff6fdfb30970110e8388a5ccb9703..49046bc4df643e2c59cae3c7fb65837ef79bd86d 100644 --- a/zhiche--delivery/Delivery/Main/4/Controller/DepartViewController.m +++ b/zhiche--delivery/Delivery/Main/4/Controller/DepartViewController.m @@ -93,24 +93,20 @@ -(void)initDataSource { //订单状态接口 - NSString *urlString = [NSString stringWithFormat:@"%@useraddress/list",Main_interface]; + NSString *urlString = [NSString stringWithFormat:@"%@useraddress/list?addresstype=%@",Main_interface,self.addressType]; - NSDictionary *diction = @{@"addresstype":self.addressType}; +// NSDictionary *diction = @{@"addresstype":self.addressType}; - Common *c = [[Common alloc]init]; - [c afPostRequestWithUrlString:urlString parms:diction - finishedBlock:^(id responseObj) { - - NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableLeaves error:nil]; + [Common requestWithUrlString:urlString contentType:application_json finished:^(id responseObj) { - if ([dic[@"success"] boolValue]) { + if ([responseObj[@"success"] boolValue]) { if (self.dataArray.count > 0) { [self.dataArray removeAllObjects]; } - - for (id object in dic[@"data"]) { + + for (id object in responseObj[@"data"]) { DepartModel *model = [[DepartModel alloc]init]; [model setValuesForKeysWithDictionary:object]; @@ -119,12 +115,42 @@ [self.tableView reloadData]; - + } + + + } failed:^(NSString *errorMsg) { - } failedBlock:^(NSString *errorMsg) { - NSLog(@"%@",errorMsg); }]; + +// Common *c = [[Common alloc]init]; +// [c afPostRequestWithUrlString:urlString parms:diction +// finishedBlock:^(id responseObj) { +// +// NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableLeaves error:nil]; +// +// +// if ([dic[@"success"] boolValue]) { +// +// if (self.dataArray.count > 0) { +// [self.dataArray removeAllObjects]; +// } +// +// for (id object in dic[@"data"]) { +// DepartModel *model = [[DepartModel alloc]init]; +// [model setValuesForKeysWithDictionary:object]; +// +// [self.dataArray addObject:model]; +// } +// +// [self.tableView reloadData]; +// +// +// } +// +// } failedBlock:^(NSString *errorMsg) { +// NSLog(@"%@",errorMsg); +// }]; } diff --git a/zhiche--delivery/Delivery/Main/4/Controller/InstallViewController.m b/zhiche--delivery/Delivery/Main/4/Controller/InstallViewController.m index bb711bb68e454df4d7b9428d1673b923321d68b0..45ef217a90483d224968df989619291c33ee806e 100644 --- a/zhiche--delivery/Delivery/Main/4/Controller/InstallViewController.m +++ b/zhiche--delivery/Delivery/Main/4/Controller/InstallViewController.m @@ -66,30 +66,6 @@ -(void)initDataSource { //用户信息接口 -//<<<<<<< HEAD -// -// NSString *urlString = [NSString stringWithFormat:@"%@user",Main_interface]; -// -// -// [Common requestWithUrlString:urlString contentType:@"application/json" finished:^(id responseObj) { -// -// if ([responseObj[@"success"] boolValue]) { -// -// self.dataDictionary = [NSMutableDictionary dictionaryWithDictionary:responseObj[@"data"]]; -// //赋值 -// [self getValueString]; -// } -// -// -// -// } failed:^(NSString *errorMsg) { -// -// NSLog(@"%@",errorMsg); -// }]; -// -// -// -//======= NSString *urlString = [NSString stringWithFormat:@"%@user",Main_interface]; [Common requestWithUrlString:urlString contentType:application_json finished:^(id responseObj) { @@ -97,6 +73,7 @@ if ([responseObj[@"success"] boolValue]) { + self.dataDictionary = [NSMutableDictionary dictionaryWithDictionary:responseObj[@"data"]]; //赋值 [self getValueString]; @@ -115,28 +92,26 @@ -(void)getValueString { //拼接图片url - NSString *urlString = [NSString stringWithFormat:@"%@qiniu/download/ticket",Main_interface]; + NSString *urlString = [NSString stringWithFormat:@"%@qiniu/download/ticket?key=%@",Main_interface,self.dataDictionary[@"pic"]]; - NSDictionary *diction = @{@"key":self.dataDictionary[@"pic"]}; +// NSDictionary *diction = @{@"key":self.dataDictionary[@"pic"]}; - Common *c = [[Common alloc]init]; - [c afPostRequestWithUrlString:urlString parms:diction finishedBlock:^(id responseObj) { - - NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableLeaves error:nil]; - + [Common requestWithUrlString:urlString contentType:application_json finished:^(id responseObj) { + + NSLog(@"%@",responseObj); - if ([dic[@"success"] boolValue]) { - - [self.imageV sd_setImageWithURL:[NSURL URLWithString:dic[@"data"]]]; + if ([responseObj[@"success"] boolValue]) { - } + [self.imageV sd_setImageWithURL:[NSURL URLWithString:responseObj[@"data"]]]; + } + } failed:^(NSString *errorMsg) { - } failedBlock:^(NSString *errorMsg) { NSLog(@"%@",errorMsg); }]; + NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; InstallCell *cell = [self.tableView cellForRowAtIndexPath:index]; @@ -415,24 +390,21 @@ #pragma mark 从七牛获取Token -(void)getTokenFromQN { - Common *c = [[Common alloc]init]; NSString *string = [NSString stringWithFormat:@"%@qiniu/upload/ticket",Main_interface]; - - [c afPostRequestWithUrlString:string parms:nil finishedBlock:^(id responseObj) { - - NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; - - self.token = dic[@"data"]; - + [Common requestWithUrlString:string contentType:application_json finished:^(id responseObj) { + NSLog(@"%@",responseObj); + if ([responseObj[@"success"] boolValue]) { + + self.token = responseObj[@"data"]; [self uploadImageToQNWithData:[self getImageWith:self.imageV.image]]; - - - } failedBlock:^(NSString *errorMsg) { - + } + } failed:^(NSString *errorMsg) { NSLog(@"%@",errorMsg); - }]; + + + } @@ -476,6 +448,9 @@ [c afPostRequestWithUrlString:urlString parms:dictionary finishedBlock:^(id responseObj) { NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; + + NSLog(@"%@",dic); + diff --git a/zhiche--delivery/Delivery/Main/4/Controller/InvoiceViewController.m b/zhiche--delivery/Delivery/Main/4/Controller/InvoiceViewController.m index 737eb764c67f66543acbeb01639c15def4732f2f..d771f8e20a1cd419fc20f45fd7730f87ce5111c8 100644 --- a/zhiche--delivery/Delivery/Main/4/Controller/InvoiceViewController.m +++ b/zhiche--delivery/Delivery/Main/4/Controller/InvoiceViewController.m @@ -57,11 +57,10 @@ [Common requestWithUrlString:urlString contentType:application_json finished:^(id responseObj) { - - + if ([responseObj[@"success"] boolValue]) { - NSArray *array = responseObj[@"data"][@"data"]; + NSArray *array = responseObj[@"data"][@"orders"]; for (id obj in array) { MineOrderModel *model = [[MineOrderModel alloc]init]; diff --git a/zhiche--delivery/Delivery/Main/4/Controller/ManagerController.m b/zhiche--delivery/Delivery/Main/4/Controller/ManagerController.m index fa624547a955ece63e20914401e2b12d280cccfb..d89f5736d34c6be828cd8e60319d0a94d8b767ca 100644 --- a/zhiche--delivery/Delivery/Main/4/Controller/ManagerController.m +++ b/zhiche--delivery/Delivery/Main/4/Controller/ManagerController.m @@ -90,27 +90,30 @@ -(void)getValueString { + //拼接图片url - NSString *urlString = [NSString stringWithFormat:@"%@qiniu/download/ticket",Main_interface]; + NSString *urlString = [NSString stringWithFormat:@"%@qiniu/download/ticket?key=%@",Main_interface,self.dataDictionary[@"pic"]]; - NSDictionary *diction = @{@"key":self.dataDictionary[@"pic"]}; + // NSDictionary *diction = @{@"key":self.dataDictionary[@"pic"]}; - Common *c = [[Common alloc]init]; - [c afPostRequestWithUrlString:urlString parms:diction finishedBlock:^(id responseObj) { + [Common requestWithUrlString:urlString contentType:application_json finished:^(id responseObj) { - NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableLeaves error:nil]; + NSLog(@"%@",responseObj); - if ([dic[@"success"] boolValue]) { - - [self.imagev sd_setImageWithURL:[NSURL URLWithString:dic[@"data"]]]; + if ([responseObj[@"success"] boolValue]) { + + [self.imagev sd_setImageWithURL:[NSURL URLWithString:responseObj[@"data"]]]; } + } failed:^(NSString *errorMsg) { - } failedBlock:^(NSString *errorMsg) { NSLog(@"%@",errorMsg); }]; + + + self.genderTextField.text = [NSString stringWithFormat:@"%@",self.dataDictionary[@"gender"]]; self.emailTextField.text = [NSString stringWithFormat:@"%@", self.dataDictionary[@"email"]]; @@ -521,24 +524,33 @@ #pragma mark 从七牛获取Token -(void)getTokenFromQN { - Common *c = [[Common alloc]init]; NSString *string = [NSString stringWithFormat:@"%@qiniu/upload/ticket",Main_interface]; - - [c afPostRequestWithUrlString:string parms:nil finishedBlock:^(id responseObj) { - - NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; - - self.token = dic[@"data"]; - - [self uploadImageToQNWithData:[self getImageWith:self.imagev.image]]; - - - } failedBlock:^(NSString *errorMsg) { - + [Common requestWithUrlString:string contentType:application_json finished:^(id responseObj) { + NSLog(@"%@",responseObj); + if ([responseObj[@"success"] boolValue]) { + + self.token = responseObj[@"data"]; + [self uploadImageToQNWithData:[self getImageWith:self.imagev.image]]; + } + } failed:^(NSString *errorMsg) { NSLog(@"%@",errorMsg); - }]; + +// [c afPostRequestWithUrlString:string parms:nil finishedBlock:^(id responseObj) { +// +// NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; +// +// self.token = dic[@"data"]; +// +// [self uploadImageToQNWithData:[self getImageWith:self.imagev.image]]; +// +// +// } failedBlock:^(NSString *errorMsg) { +// +// NSLog(@"%@",errorMsg); +// +// }]; } -(void)uploadImageToQNWithData:(NSData *)data diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/AboutViewController.h" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/AboutViewController.h" new file mode 100644 index 0000000000000000000000000000000000000000..95c9b7f164700da830748175b060a7699bcebaad --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/AboutViewController.h" @@ -0,0 +1,13 @@ +// +// AboutViewController.h +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import + +@interface AboutViewController : UIViewController + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/AboutViewController.m" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/AboutViewController.m" new file mode 100644 index 0000000000000000000000000000000000000000..9b126e4d3a495b0f9e68015da1c0dd71a3a2f297 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/AboutViewController.m" @@ -0,0 +1,90 @@ +// +// AboutViewController.m +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "AboutViewController.h" +#import "Common.h" +#import "TopBackView.h" + +@interface AboutViewController () + +@end + +@implementation AboutViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + TopBackView *topBackView= [[TopBackView alloc]initViewWithFrame:CGRectMake(0, 0, screenWidth, 64) andTitle:@"关于页面"]; + + topBackView.rightButton.hidden = YES; + [topBackView.leftButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; + + [self.view addSubview:topBackView]; + + self.view.backgroundColor = WhiteColor; + + [self initWebViews]; +} + +-(void)initWebViews +{ + + NSString *valueString = [NSString stringWithFormat:@"%@templates/cms/about.html",Main_interface]; + +// [Common requestWithUrlString:valueString contentType:application_json finished:^(id responseObj) { +// +// NSLog(@"%@",responseObj); +// +// if ([responseObj[@"success"] boolValue]) { + + NSURL *url = [NSURL URLWithString:valueString]; + + UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, screenWidth, screenHeight - 64)]; + + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + webView.delegate = self; + webView.backgroundColor = [UIColor whiteColor]; + + [webView loadRequest:request]; + + [self.view addSubview:webView]; +// } +// +// +// +// } failed:^(NSString *errorMsg) { +// NSLog(@"%@",errorMsg); +// }]; + + + + +} + +-(void)backAction +{ + [self.navigationController popViewControllerAnimated:YES]; +} + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InstroctionViewController.h" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InstroctionViewController.h" new file mode 100644 index 0000000000000000000000000000000000000000..0558f0d05ef8e890c3d8c14d6b8fa56e6622a3a1 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InstroctionViewController.h" @@ -0,0 +1,13 @@ +// +// InstroctionViewController.h +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import + +@interface InstroctionViewController : UIViewController + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InstroctionViewController.m" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InstroctionViewController.m" new file mode 100644 index 0000000000000000000000000000000000000000..a02f5604b074161a6d5ee74fc0f860875ff06bea --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InstroctionViewController.m" @@ -0,0 +1,91 @@ +// +// InstroctionViewController.m +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "InstroctionViewController.h" +#import "Common.h" +#import "TopBackView.h" + +@interface InstroctionViewController () + +@end + +@implementation InstroctionViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + TopBackView *topBackView= [[TopBackView alloc]initViewWithFrame:CGRectMake(0, 0, screenWidth, 64) andTitle:@"运输说明"]; + + topBackView.rightButton.hidden = YES; + [topBackView.leftButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; + + [self.view addSubview:topBackView]; + + self.view.backgroundColor = WhiteColor; + + [self initWebViews]; +} + +-(void)initWebViews +{ + + NSString *valueString = [NSString stringWithFormat:@"%@templates/cms/transport-explain.html",Main_interface]; + +// NSLog(@"%@",valueString); +// +// [Common requestWithUrlString:valueString contentType:@"text/html" finished:^(id responseObj) { +// +// NSLog(@"%@",responseObj); +// +// if ([responseObj[@"success"] boolValue]) { + + NSURL *url = [NSURL URLWithString:valueString]; + + UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, screenWidth, screenHeight - 64)]; + + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + webView.delegate = self; + webView.backgroundColor = [UIColor whiteColor]; + + [webView loadRequest:request]; + + [self.view addSubview:webView]; +// } + + +// +// } failed:^(NSString *errorMsg) { +// NSLog(@"%@",errorMsg); +// }]; + + + + +} + +-(void)backAction +{ + [self.navigationController popViewControllerAnimated:YES]; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InvoiceShowViewController.h" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InvoiceShowViewController.h" new file mode 100644 index 0000000000000000000000000000000000000000..b5929221690f9317566111753129e3054b7d77f7 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InvoiceShowViewController.h" @@ -0,0 +1,13 @@ +// +// InvoiceShowViewController.h +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import + +@interface InvoiceShowViewController : UIViewController + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InvoiceShowViewController.m" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InvoiceShowViewController.m" new file mode 100644 index 0000000000000000000000000000000000000000..38c6bfe6652cfe6da7288894b42b1a3da6d433b7 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/InvoiceShowViewController.m" @@ -0,0 +1,89 @@ +// +// InvoiceShowViewController.m +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "InvoiceShowViewController.h" +#import "Common.h" +#import "TopBackView.h" + +@interface InvoiceShowViewController () + + +@end + +@implementation InvoiceShowViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + TopBackView *topBackView= [[TopBackView alloc]initViewWithFrame:CGRectMake(0, 0, screenWidth, 64) andTitle:@"开票规则"]; + + topBackView.rightButton.hidden = YES; + [topBackView.leftButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; + + [self.view addSubview:topBackView]; + + self.view.backgroundColor = WhiteColor; + + [self initWebViews]; +} +-(void)initWebViews +{ + + NSString *valueString = [NSString stringWithFormat:@"%@templates/cms/invoice-explain.html",Main_interface]; + +// [Common requestWithUrlString:valueString contentType:application_json finished:^(id responseObj) { +// +// NSLog(@"%@",responseObj); +// +// if ([responseObj[@"success"] boolValue]) { + + NSURL *url = [NSURL URLWithString:valueString]; + + UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, screenWidth, screenHeight - 64)]; + + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + webView.delegate = self; + webView.backgroundColor = [UIColor whiteColor]; + + [webView loadRequest:request]; + + [self.view addSubview:webView]; +// } +// +// +// +// } failed:^(NSString *errorMsg) { +// NSLog(@"%@",errorMsg); +// }]; + + + + +} + +-(void)backAction +{ + [self.navigationController popViewControllerAnimated:YES]; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/NewViewController.h" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/NewViewController.h" new file mode 100644 index 0000000000000000000000000000000000000000..3516edd41d6e65040c51e2b3d5e7b4c096e49d41 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/NewViewController.h" @@ -0,0 +1,13 @@ +// +// NewViewController.h +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import + +@interface NewViewController : UIViewController + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/NewViewController.m" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/NewViewController.m" new file mode 100644 index 0000000000000000000000000000000000000000..cc801a9c41e4e039ffab7eaf13b476eae23df3fd --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/NewViewController.m" @@ -0,0 +1,94 @@ +// +// NewViewController.m +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "NewViewController.h" +#import "Common.h" +#import "TopBackView.h" + +@interface NewViewController () + + +@end + +@implementation NewViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + TopBackView *topBackView= [[TopBackView alloc]initViewWithFrame:CGRectMake(0, 0, screenWidth, 64) andTitle:@"新手上路"]; + + topBackView.rightButton.hidden = YES; + [topBackView.leftButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; + + [self.view addSubview:topBackView]; + + self.view.backgroundColor = WhiteColor; + + [self initWebViews]; +} + +-(void)initWebViews +{ + + NSString *valueString = [NSString stringWithFormat:@"%@cms/userstart",Main_interface]; + +// NSLog(@"%@",valueString); +// +// [Common requestWithUrlString:valueString contentType:application_json finished:^(id responseObj) { +// +// NSLog(@"%@",responseObj); +// +// if ([responseObj[@"success"] boolValue]) { + + NSURL *url = [NSURL URLWithString:valueString]; + + UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, screenWidth, screenHeight - 64)]; + + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + webView.delegate = self; + webView.backgroundColor = [UIColor whiteColor]; + + [webView loadRequest:request]; + + [self.view addSubview:webView]; +// } +// +// +// +// } failed:^(NSString *errorMsg) { +// NSLog(@"%@",errorMsg); +// }]; + + + + +} + + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)backAction +{ + [self.navigationController popViewControllerAnimated:YES]; +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/RefundViewController.h" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/RefundViewController.h" new file mode 100644 index 0000000000000000000000000000000000000000..2250d5a510186340befebb11324b86c09cfb0c67 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/RefundViewController.h" @@ -0,0 +1,13 @@ +// +// RefundViewController.h +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import + +@interface RefundViewController : UIViewController + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/RefundViewController.m" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/RefundViewController.m" new file mode 100644 index 0000000000000000000000000000000000000000..725b85fb748d010d58c0886b5b978b9f8fbd03c1 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/RefundViewController.m" @@ -0,0 +1,88 @@ +// +// RefundViewController.m +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "RefundViewController.h" +#import "TopBackView.h" +#import "Common.h" + +@interface RefundViewController () + +@end + +@implementation RefundViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + TopBackView *topBackView= [[TopBackView alloc]initViewWithFrame:CGRectMake(0, 0, screenWidth, 64) andTitle:@"退款规则"]; + + topBackView.rightButton.hidden = YES; + [topBackView.leftButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; + + [self.view addSubview:topBackView]; + + self.view.backgroundColor = WhiteColor; + + [self initWebViews]; +} + +-(void)initWebViews +{ + NSString *valueString = [NSString stringWithFormat:@"%@templates/cms/refund-explain.html",Main_interface]; + +// [Common requestWithUrlString:valueString contentType:application_json finished:^(id responseObj) { +// +// NSLog(@"%@",responseObj); +// +// if ([responseObj[@"success"] boolValue]) { + + NSURL *url = [NSURL URLWithString:valueString]; + + UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, screenWidth, screenHeight - 64)]; + + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + webView.delegate = self; + webView.backgroundColor = [UIColor whiteColor]; + + [webView loadRequest:request]; + + [self.view addSubview:webView]; +// } +// +// +// +// } failed:^(NSString *errorMsg) { +// NSLog(@"%@",errorMsg); +// }]; + + + + +} + +-(void)backAction +{ + [self.navigationController popViewControllerAnimated:YES]; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/ServeViewController.h" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/ServeViewController.h" new file mode 100644 index 0000000000000000000000000000000000000000..39c58760392dd399e1f33163d507a785f2c92118 --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/ServeViewController.h" @@ -0,0 +1,13 @@ +// +// ServeViewController.h +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import + +@interface ServeViewController : UIViewController + +@end diff --git "a/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/ServeViewController.m" "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/ServeViewController.m" new file mode 100644 index 0000000000000000000000000000000000000000..ed693141f53f397277a4ffc6ff9799b48cfb386f --- /dev/null +++ "b/zhiche--delivery/Delivery/Main/4/Controller/\345\256\242\346\234\215\344\270\255\345\277\203/ServeViewController.m" @@ -0,0 +1,90 @@ +// +// ServeViewController.m +// zhiche--delivery +// +// Created by LeeBruce on 16/6/3. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "ServeViewController.h" +#import "Common.h" +#import "TopBackView.h" + +@interface ServeViewController () + +@end + +@implementation ServeViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + TopBackView *topBackView= [[TopBackView alloc]initViewWithFrame:CGRectMake(0, 0, screenWidth, 64) andTitle:@"车辆运输服务协议"]; + + topBackView.rightButton.hidden = YES; + [topBackView.leftButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; + + [self.view addSubview:topBackView]; + + self.view.backgroundColor = WhiteColor; + + [self initWebViews]; +} + +-(void)initWebViews +{ +// + NSString *valueString = [NSString stringWithFormat:@"%@templates/cms/transport-agreement.html",Main_interface]; +// +// [Common requestWithUrlString:valueString contentType:application_json finished:^(id responseObj) { +// +// NSLog(@"%@",responseObj); +// +// if ([responseObj[@"success"] boolValue]) { + + NSURL *url = [NSURL URLWithString:valueString]; + + UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, screenWidth, screenHeight - 64)]; + + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + webView.delegate = self; + webView.backgroundColor = [UIColor whiteColor]; + + [webView loadRequest:request]; + + [self.view addSubview:webView]; +// } +// +// +// +// } failed:^(NSString *errorMsg) { +// NSLog(@"%@",errorMsg); +// }]; + + + + +} + +-(void)backAction +{ + [self.navigationController popViewControllerAnimated:YES]; +} + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/zhiche--delivery/Delivery/Singleton/Common.m b/zhiche--delivery/Delivery/Singleton/Common.m index b606cc42fac89ecbcaefe0ae2b465cf2659d46e0..a3c77dbc1921579f22bacecd2d813eeed9d9513a 100755 --- a/zhiche--delivery/Delivery/Singleton/Common.m +++ b/zhiche--delivery/Delivery/Singleton/Common.m @@ -302,6 +302,10 @@ AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:type,nil]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy defaultPolicy]; + securityPolicy.allowInvalidCertificates = YES; + + NSUserDefaults *user = [NSUserDefaults standardUserDefaults]; NSString *string = [user objectForKey:login_token]; @@ -347,7 +351,8 @@ //manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/html", nil]; //实现基本的post请求,函数的参数:为请求地址,和带有post请求参数的字典 - + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy defaultPolicy]; + securityPolicy.allowInvalidCertificates = YES; manager.responseSerializer = [AFHTTPResponseSerializer serializer]; diff --git a/zhiche--delivery/Delivery/Singleton/Header.h b/zhiche--delivery/Delivery/Singleton/Header.h index 666dc0ef7c7a7a5ad375afadec1a604f124f3157..be2f898c63f74cd77ea7b1a1e43339389c1db4c8 100644 --- a/zhiche--delivery/Delivery/Singleton/Header.h +++ b/zhiche--delivery/Delivery/Singleton/Header.h @@ -47,8 +47,8 @@ //#define Main_interface @"http://192.168.199.136:8080/kyleapp/" //接口 -//#define Main_interface @"http://220.249.50.163/kyle/" -#define Main_interface @"http://101.201.110.173:8080/kyle/" +#define Main_interface @"http://220.249.50.163/kyle/" +//#define Main_interface @"http://101.201.110.173:8080/kyle/" // //张强地址 diff --git a/zhiche--delivery/Info.plist b/zhiche--delivery/Info.plist index 6105445463d64b7741d7e3a729325fa9fa49e63b..f231e60c76ccadf2e3d87ec80905505d321f9426 100644 --- a/zhiche--delivery/Info.plist +++ b/zhiche--delivery/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + cn.huiyunche.kyle CFBundleInfoDictionaryVersion 6.0 CFBundleName