Skip to content

Commit b7d5502

Browse files
committed
码币兑换需要选择所在地
1 parent 6b39d20 commit b7d5502

17 files changed

+529
-98
lines changed

Coding_iOS.xcodeproj/project.pbxproj

+26
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@
512512
4ED20A781AFC7C8B00C63498 /* EasePageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4ED20A771AFC7C8B00C63498 /* EasePageViewController.m */; };
513513
4ED20A7A1AFCC43600C63498 /* button_download_cancel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4ED20A791AFCC43600C63498 /* button_download_cancel@2x.png */; };
514514
4ED558321B4FA68400FC10CB /* dismissBtn_Nav@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4ED558311B4FA68400FC10CB /* dismissBtn_Nav@2x.png */; };
515+
4ED618151C3A6B4B0017946C /* LocationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4ED618141C3A6B4B0017946C /* LocationViewController.m */; };
516+
4ED618181C3A6CA50017946C /* LocationCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4ED618171C3A6CA50017946C /* LocationCell.m */; };
517+
4ED6181B1C3A72AE0017946C /* ShopAddressCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4ED6181A1C3A72AE0017946C /* ShopAddressCell.m */; };
518+
4ED6181D1C3A72CF0017946C /* ShopAddressCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4ED6181C1C3A72CF0017946C /* ShopAddressCell.xib */; };
519+
4ED6181F1C3A732F0017946C /* button_arrow_left@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4ED6181E1C3A732F0017946C /* button_arrow_left@2x.png */; };
515520
4ED6731E1A8DD38C00DF2D1A /* ReportIllegalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4ED6731D1A8DD38C00DF2D1A /* ReportIllegalViewController.m */; };
516521
4ED673221A8E0ECC00DF2D1A /* SVWebViewControllerActivityReport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4ED673211A8E0ECC00DF2D1A /* SVWebViewControllerActivityReport.m */; };
517522
4ED673261A8E127100DF2D1A /* SVWebViewControllerActivityReport@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4ED673251A8E127100DF2D1A /* SVWebViewControllerActivityReport@2x.png */; };
@@ -1819,6 +1824,14 @@
18191824
4ED20A771AFC7C8B00C63498 /* EasePageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EasePageViewController.m; sourceTree = "<group>"; };
18201825
4ED20A791AFCC43600C63498 /* button_download_cancel@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_download_cancel@2x.png"; sourceTree = "<group>"; };
18211826
4ED558311B4FA68400FC10CB /* dismissBtn_Nav@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "dismissBtn_Nav@2x.png"; sourceTree = "<group>"; };
1827+
4ED618131C3A6B4B0017946C /* LocationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationViewController.h; sourceTree = "<group>"; };
1828+
4ED618141C3A6B4B0017946C /* LocationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationViewController.m; sourceTree = "<group>"; };
1829+
4ED618161C3A6CA50017946C /* LocationCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationCell.h; sourceTree = "<group>"; };
1830+
4ED618171C3A6CA50017946C /* LocationCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationCell.m; sourceTree = "<group>"; };
1831+
4ED618191C3A72AE0017946C /* ShopAddressCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopAddressCell.h; sourceTree = "<group>"; };
1832+
4ED6181A1C3A72AE0017946C /* ShopAddressCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopAddressCell.m; sourceTree = "<group>"; };
1833+
4ED6181C1C3A72CF0017946C /* ShopAddressCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShopAddressCell.xib; sourceTree = "<group>"; };
1834+
4ED6181E1C3A732F0017946C /* button_arrow_left@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_arrow_left@2x.png"; sourceTree = "<group>"; };
18221835
4ED6731C1A8DD38C00DF2D1A /* ReportIllegalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportIllegalViewController.h; sourceTree = "<group>"; };
18231836
4ED6731D1A8DD38C00DF2D1A /* ReportIllegalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportIllegalViewController.m; sourceTree = "<group>"; };
18241837
4ED673201A8E0ECC00DF2D1A /* SVWebViewControllerActivityReport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVWebViewControllerActivityReport.h; sourceTree = "<group>"; };
@@ -4392,6 +4405,7 @@
43924405
4EC4800E1C2A909D005F1772 /* register_step_ed@3x.png */,
43934406
4EC4800F1C2A909D005F1772 /* register_step_un@2x.png */,
43944407
4EC480101C2A909D005F1772 /* register_step_un@3x.png */,
4408+
4ED6181E1C3A732F0017946C /* button_arrow_left@2x.png */,
43954409
);
43964410
path = Images;
43974411
sourceTree = "<group>";
@@ -5074,13 +5088,20 @@
50745088
D0C4481A1C034C3F00DC1C4B /* TopicSearchCell.m */,
50755089
D02BE0AD1C0434DB008374C0 /* PRMRSearchCell.h */,
50765090
D02BE0AE1C0434DB008374C0 /* PRMRSearchCell.m */,
5091+
4ED618161C3A6CA50017946C /* LocationCell.h */,
5092+
4ED618171C3A6CA50017946C /* LocationCell.m */,
5093+
4ED618191C3A72AE0017946C /* ShopAddressCell.h */,
5094+
4ED6181A1C3A72AE0017946C /* ShopAddressCell.m */,
5095+
4ED6181C1C3A72CF0017946C /* ShopAddressCell.xib */,
50775096
);
50785097
path = Cell;
50795098
sourceTree = "<group>";
50805099
};
50815100
927AFF351BFF1BD700AAE593 /* Shop */ = {
50825101
isa = PBXGroup;
50835102
children = (
5103+
4ED618131C3A6B4B0017946C /* LocationViewController.h */,
5104+
4ED618141C3A6B4B0017946C /* LocationViewController.m */,
50845105
927AFF361BFF1CC200AAE593 /* ShopViewController.h */,
50855106
927AFF371BFF1CC200AAE593 /* ShopViewController.m */,
50865107
927AFF561BFF755200AAE593 /* ExchangeGoodsViewController.h */,
@@ -5339,6 +5360,7 @@
53395360
4EF17EE11B3C3112003CDD2D /* intro_tip_2@3x.png in Resources */,
53405361
4E6383DC1B3266C200D98648 /* mrpr_icon_fileChange@2x.png in Resources */,
53415362
4E6383FB1B33C18700D98648 /* task_activity_icon_finish@2x.png in Resources */,
5363+
4ED6181F1C3A732F0017946C /* button_arrow_left@2x.png in Resources */,
53425364
4E6383E21B32676600D98648 /* taskProgress@2x.png in Resources */,
53435365
D0C447FD1C02DCA200DC1C4B /* tweetBtn_Nav@2x.png in Resources */,
53445366
7E8E59801B6F91C40083CA02 /* bubble_left_play_1@2x.png in Resources */,
@@ -5467,6 +5489,7 @@
54675489
4EA7F12D1A6D0C4D00A046BD /* icon_project_private_old@2x.png in Resources */,
54685490
D0C447FC1C02DCA200DC1C4B /* timeBtn_Nav@2x.png in Resources */,
54695491
7E8E59821B6F91C40083CA02 /* bubble_right_play_0@2x.png in Resources */,
5492+
4ED6181D1C3A72CF0017946C /* ShopAddressCell.xib in Resources */,
54705493
4E96E7DD1A1B537E0037C098 /* icon_file_movie@2x.png in Resources */,
54715494
4E93F23D1B84356500017916 /* file_menu_icon_open@2x.png in Resources */,
54725495
D0C447F41C02DCA200DC1C4B /* addBtn_Nav@2x.png in Resources */,
@@ -6053,6 +6076,7 @@
60536076
8EA6D13219E240C40076D59C /* RegisterViewController.m in Sources */,
60546077
923399661C00441700F29E04 /* ShopBanner.m in Sources */,
60556078
8EF643C519FF7E2900F7EEB0 /* TitleRImageMoreCell.m in Sources */,
6079+
4ED6181B1C3A72AE0017946C /* ShopAddressCell.m in Sources */,
60566080
4E217F151A70EDC700F6DF88 /* SVWebViewControllerActivitySafari.m in Sources */,
60576081
4E8D5D5A1B45295D00B70936 /* HOTPGenerator.m in Sources */,
60586082
8EA6D14519E240C40076D59C /* TweetDetailViewController.m in Sources */,
@@ -6092,6 +6116,7 @@
60926116
4E4D6A731B1C694100FD2E49 /* FileChangeDetailViewController.m in Sources */,
60936117
8EA6D1F819E240C40076D59C /* MJPhotoBrowser.m in Sources */,
60946118
4E0BD86C1B6C7E3D0061CAA6 /* CSMyTopicVC.m in Sources */,
6119+
4ED618151C3A6B4B0017946C /* LocationViewController.m in Sources */,
60956120
8ED4612019E4DC470059B3BE /* iCarousel.m in Sources */,
60966121
4E1A22881AB1731600CFC14F /* ProjectDescriptionCell.m in Sources */,
60976122
4ECE8AE11A3943E80021E29C /* UIButton+Common.m in Sources */,
@@ -6218,6 +6243,7 @@
62186243
8EF643BC19FF7E2900F7EEB0 /* ProjectActivityListCell.m in Sources */,
62196244
4E996BC91ABA754600C704F1 /* JDStatusBarStyle.m in Sources */,
62206245
8EF83F9419EB78CC00E86DE7 /* SettingTextViewController.m in Sources */,
6246+
4ED618181C3A6CA50017946C /* LocationCell.m in Sources */,
62216247
8EA6D1B019E240C40076D59C /* Comment.m in Sources */,
62226248
0A6E6BA71AAF4162004C0107 /* TweetSendLocationCell.m in Sources */,
62236249
4E0BD86E1B6C7E3D0061CAA6 /* CSTopicCreateVC.m in Sources */,

Coding_iOS/Controllers/Shop/ExchangeGoodsViewController.m

+97-92
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#import "ShopOrderTextFieldCell.h"
1313
#import "ShopGoodsInfoView.h"
1414
#import "UIView+Common.h"
15+
#import "LocationViewController.h"
16+
#import "ShopAddressCell.h"
1517

1618
#define kCellIdentifier_ShopOrderTextFieldCell @"ShopOrderTextFieldCell.h"
1719

@@ -22,6 +24,8 @@ @interface ExchangeGoodsViewController () <UITableViewDataSource, UITableViewDel
2224
@property (strong, nonatomic) TPKeyboardAvoidingTableView *myTableView;
2325
@property (strong, nonatomic) UIButton *shopOrderBtn;
2426

27+
@property (strong, nonatomic) NSString *receiverName, *receiverAddress, *receiverPhone, *remark;
28+
@property (strong, nonatomic) NSArray *locations;
2529
@end
2630

2731
@implementation ExchangeGoodsViewController
@@ -38,20 +42,19 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
3842

3943
- (void)orderCommitAction:(UIButton *)button
4044
{
41-
ShopOrderTextFieldCell *receiveName = [_myTableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]];
42-
if ([receiveName.textField.text isEmpty]) {
45+
if ([_receiverName isEmpty]) {
4346
[NSObject showHudTipStr:@"收货人名字很重要"];
4447
return;
4548
}
46-
47-
ShopOrderTextFieldCell *address = [_myTableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:1 inSection:0]];
48-
if ([address.textField.text isEmpty]) {
49+
if (_locations.count == 0) {
50+
[NSObject showHudTipStr:@"请选择所在地"];
51+
return;
52+
}
53+
if ([_receiverAddress isEmpty]) {
4954
[NSObject showHudTipStr:@"详细地址也很重要"];
5055
return;
5156
}
52-
53-
ShopOrderTextFieldCell *phone = [_myTableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:2 inSection:0]];
54-
if ([phone.textField.text isEmpty]) {
57+
if ([_receiverPhone isEmpty]) {
5558
[NSObject showHudTipStr:@"联系电话非常重要"];
5659
return;
5760
}
@@ -75,6 +78,7 @@ - (void)viewDidLoad {
7578
tableView.delegate = self;
7679
tableView.dataSource = self;
7780
[tableView registerClass:[ShopOrderTextFieldCell class] forCellReuseIdentifier:kCellIdentifier_ShopOrderTextFieldCell];
81+
[tableView registerNib:[UINib nibWithNibName:kCellIdentifier_ShopAddressCell bundle:nil] forCellReuseIdentifier:kCellIdentifier_ShopAddressCell];
7882
tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
7983
tableView.separatorColor = [UIColor colorWithHexString:@"0xFFDDDDDD"];
8084
tableView.separatorInset = UIEdgeInsetsMake(0, 12, 0, 12);
@@ -125,44 +129,57 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
125129

126130
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
127131
{
128-
NSInteger row = 4;
132+
NSInteger row = 5;
129133
return row;
130134
}
131135

132136
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
133137
{
134-
135-
ShopOrderTextFieldCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_ShopOrderTextFieldCell forIndexPath:indexPath];
136-
137-
switch (indexPath.row) {
138-
case 0:
139-
{
140-
cell.nameLabel.text = @"收货人 *";
141-
cell.textField.placeholder = @"小王";
142-
break;
143-
}
144-
case 1:
145-
{
146-
cell.nameLabel.text = @"详细地址 *";
147-
cell.textField.placeholder = @"省,市,县(镇),街道";
148-
break;
149-
}
150-
case 2:
151-
{
152-
cell.nameLabel.text = @"联系电话 *";
153-
cell.textField.placeholder = @"电话";
154-
break;
155-
}
156-
case 3:
157-
{
158-
cell.nameLabel.text = @"备注";
159-
cell.textField.placeholder = @"备注信息如:衣服码数XXL";
160-
break;
138+
if (indexPath.row == 1) {
139+
ShopAddressCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_ShopAddressCell forIndexPath:indexPath];
140+
cell.locationF.text = [[self.locations valueForKey:@"name"] componentsJoinedByString:@" - "];
141+
return cell;
142+
}else{
143+
ShopOrderTextFieldCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_ShopOrderTextFieldCell forIndexPath:indexPath];
144+
145+
switch (indexPath.row) {
146+
case 0:
147+
{
148+
cell.nameLabel.text = @"收货人 *";
149+
cell.textField.placeholder = @"小王";
150+
cell.textField.text = self.receiverName;
151+
RAC(self, receiverName) = [cell.textField.rac_textSignal takeUntil:cell.rac_prepareForReuseSignal];
152+
break;
153+
}
154+
case 2:
155+
{
156+
cell.nameLabel.text = @"详细地址 *";
157+
cell.textField.placeholder = @"省,市,县(镇),街道";
158+
cell.textField.text = self.receiverAddress;
159+
RAC(self, receiverAddress) = [cell.textField.rac_textSignal takeUntil:cell.rac_prepareForReuseSignal];
160+
break;
161+
}
162+
case 3:
163+
{
164+
cell.nameLabel.text = @"联系电话 *";
165+
cell.textField.placeholder = @"电话";
166+
cell.textField.text = self.receiverPhone;
167+
RAC(self, receiverPhone) = [cell.textField.rac_textSignal takeUntil:cell.rac_prepareForReuseSignal];
168+
break;
169+
}
170+
case 4:
171+
{
172+
cell.nameLabel.text = @"备注";
173+
cell.textField.placeholder = @"备注信息如:衣服码数XXL";
174+
cell.textField.text = self.remark;
175+
RAC(self, remark) = [cell.textField.rac_textSignal takeUntil:cell.rac_prepareForReuseSignal];
176+
break;
177+
}
178+
default:
179+
break;
161180
}
162-
default:
163-
break;
181+
return cell;
164182
}
165-
return cell;
166183
}
167184

168185
#pragma mark - UITableViewDelegate
@@ -174,15 +191,11 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInte
174191

175192
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
176193
{
177-
return [ShopOrderTextFieldCell cellHeight];
178-
}
179-
180-
- (BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath
181-
{
182-
if (indexPath.section > 0) {
183-
return YES;
194+
if (indexPath.row == 1) {
195+
return [ShopAddressCell cellHeight];
196+
}else{
197+
return [ShopOrderTextFieldCell cellHeight];
184198
}
185-
return NO;
186199
}
187200

188201
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
@@ -192,8 +205,10 @@ - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSIntege
192205

193206
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
194207
{
195-
[self.view endEditing:YES];
196208
[tableView deselectRowAtIndexPath:indexPath animated:YES];
209+
if (indexPath.row == 1) {
210+
[self goToLocationVC];
211+
}
197212
}
198213

199214
#pragma mark - UITextFieldDelegate
@@ -214,6 +229,19 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
214229
[self.view endEditing:YES];
215230
}
216231

232+
#pragma mark location
233+
234+
- (void)goToLocationVC{
235+
LocationViewController *vc = [LocationViewController new];
236+
vc.originalSelectedList = [_locations valueForKey:@"id"];
237+
238+
__weak typeof(self) weakSelf = self;
239+
vc.complateBlock = ^(NSArray *selectedList){
240+
weakSelf.locations = selectedList;
241+
[weakSelf.myTableView reloadData];
242+
};
243+
[self.navigationController pushViewController:vc animated:YES];
244+
}
217245

218246
#pragma mark-
219247
#pragma mark---------------------- AlertView ---------------------------
@@ -225,7 +253,7 @@ - (void)showPwdAlertView
225253
[_pwdAlertView show];
226254
}
227255

228-
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
256+
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex{
229257

230258
if (alertView.firstOtherButtonIndex == buttonIndex) {
231259
UITextField *field = [alertView textFieldAtIndex:0];
@@ -245,58 +273,35 @@ - (void)exchangeActionRquest:(NSString *)pwd
245273
[self.view beginLoading];
246274
[[Coding_NetAPIManager sharedManager] request_shop_check_passwordWithpwd:pwd andBlock:^(id data, NSError *error) {
247275
if (!error) {
248-
249-
ShopOrderTextFieldCell *nameCell = [weakSelf.myTableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]];
250-
ShopOrderTextFieldCell *addressCell = [weakSelf.myTableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:1 inSection:0]];
251-
ShopOrderTextFieldCell *phoneCell = [weakSelf.myTableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:2 inSection:0]];
252-
ShopOrderTextFieldCell *remarkCell = [weakSelf.myTableView cellForRowAtIndexPath:[NSIndexPath indexPathForItem:3 inSection:0]];
253-
254-
NSString *receiverName = nameCell.textField.text;
255-
NSString *receiverAddress = addressCell.textField.text;
256-
NSString *receiverPhone = phoneCell.textField.text;
257-
NSString *remark = remarkCell.textField.text;
258-
NSMutableDictionary *mparms = [NSMutableDictionary dictionary];
259-
if (![receiverName isEmpty]) {
260-
[mparms setObject:receiverName forKey:@"receiverName"];
261-
}
262-
if (![receiverAddress isEmpty]) {
263-
[mparms setObject:receiverAddress forKey:@"receiverAddress"];
264-
}
265-
if (![receiverPhone isEmpty]) {
266-
[mparms setObject:receiverPhone forKey:@"receiverPhone"];
267-
}
268-
if (![remark isEmpty]) {
269-
[mparms setObject:remark forKey:@"remark"];
270-
}else
271-
[mparms setObject:@"" forKey:@"remark"];
272-
273-
if (![_shopGoods.giftId isEmpty]) {
274-
[mparms setObject:_shopGoods.id forKey:@"giftId"];
275-
}
276-
if (![pwd isEmpty]) {
277-
[mparms setObject:[pwd sha1Str] forKey:@"password"];
276+
NSMutableDictionary *mparms = @{}.mutableCopy;
277+
mparms[@"receiverName"] = _receiverName;
278+
if (_locations.count >= 2) {
279+
mparms[@"province"] = _locations[0][@"id"];
280+
mparms[@"city"] = _locations[1][@"id"];
281+
mparms[@"district"] = _locations.count >= 3? _locations[2][@"id"]: nil;
282+
}else{
283+
mparms[@"province"] =
284+
mparms[@"city"] =
285+
mparms[@"district"] = nil;
278286
}
279287

288+
mparms[@"receiverAddress"] = _receiverAddress;
289+
mparms[@"receiverPhone"] = _receiverPhone;
290+
mparms[@"remark"] = _remark;
291+
mparms[@"giftId"] = _shopGoods.id;
292+
mparms[@"password"] = [pwd sha1Str];
293+
280294
[[Coding_NetAPIManager sharedManager] request_shop_exchangeWithParms:mparms andBlock:^(id data, NSError *error) {
281-
[self.view endLoading];
295+
[weakSelf.view endLoading];
282296
if (!error) {
283297
[NSObject showHudTipStr:@"恭喜你,提交订单成功!"];
284-
// [self.navigationController popViewControllerAnimated:YES];
285298
ShopOrderViewController *orderViewController = [[ShopOrderViewController alloc] init];
286-
[self.navigationController pushViewController:orderViewController animated:YES];
299+
[weakSelf.navigationController pushViewController:orderViewController animated:YES];
287300

288-
}else
289-
{
290-
[self.view endLoading];
291-
292-
[NSObject showError:error];
293301
}
294302
}];
295-
}else
296-
{
297-
[self.view endLoading];
298-
299-
[NSObject showHudTipStr:@"密码不正确"];
303+
}else{
304+
[weakSelf.view endLoading];
300305
}
301306
}];
302307
}

0 commit comments

Comments
 (0)