Commit 88ce3fd0 by 刘卓鑫

重构版本bug修改

parent 974f9197
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables> <Testables>
<TestableReference <TestableReference
...@@ -65,6 +66,7 @@ ...@@ -65,6 +66,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"
......
...@@ -6,9 +6,16 @@ ...@@ -6,9 +6,16 @@
<dict> <dict>
<key>ColorfulSchool.xcscheme</key> <key>ColorfulSchool.xcscheme</key>
<dict> <dict>
<key>isShown</key>
<false/>
<key>orderHint</key> <key>orderHint</key>
<integer>0</integer> <integer>0</integer>
</dict> </dict>
<key>ColorfulSchool.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>
<dict> <dict>
......
...@@ -68,13 +68,10 @@ ...@@ -68,13 +68,10 @@
//防止crash //防止crash
[JJException configExceptionCategory:JJExceptionGuardAll]; [JJException configExceptionCategory:JJExceptionGuardAll];
[JJException startGuardException]; [JJException startGuardException];
//极光推送 //极光推送
[self initPushWithOptions:launchOptions isProduct:kJPushIsProduct]; [self initPushWithOptions:launchOptions isProduct:kJPushIsProduct];
//网络监测 //网络监测
[self checkNetworkingStatus]; [self checkNetworkingStatus];
//获取外网ip //获取外网ip
[self deviceWANIPAdress]; [self deviceWANIPAdress];
//异常捕获 //异常捕获
...@@ -83,9 +80,8 @@ ...@@ -83,9 +80,8 @@
[self createWindow]; [self createWindow];
//token登录 //token登录
[self tokenLogin]; [self tokenLogin];
//请求最新的是否需要曝光配置
//每次启动获取一次用户信息 [ZXTool requestIsNeedExposure];
[ZXTool fetchUserInfo];
//创建开屏广告 //创建开屏广告
//[[ZXTXAdTool sharedZXTXAdTool] createLauchAdByPlacmentId:kTXAdLauchPLACEMENTID]; //[[ZXTXAdTool sharedZXTXAdTool] createLauchAdByPlacmentId:kTXAdLauchPLACEMENTID];
return YES; return YES;
...@@ -105,7 +101,6 @@ ...@@ -105,7 +101,6 @@
if ([jump isEqualToString:@"NONE"]) { if ([jump isEqualToString:@"NONE"]) {
//先读取缓存 //先读取缓存
NSArray *list = [LoginJump findAll]; NSArray *list = [LoginJump findAll];
if (list.count == 0) { if (list.count == 0) {
jump = @"DC_01"; jump = @"DC_01";
...@@ -144,10 +139,15 @@ ...@@ -144,10 +139,15 @@
} }
- (void)applicationDidEnterBackground:(UIApplication *)application { - (void)applicationDidEnterBackground:(UIApplication *)application {
@try {
if ([[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) { UIViewController *vc = [ZXTool getCurrentVC];
if ([vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) {
[[NSNotificationCenter defaultCenter] postNotificationName:kSelf_help_destory_timer object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:kSelf_help_destory_timer object:nil];
}
} @catch (NSException *exception) {
} @finally {
} }
} }
...@@ -155,17 +155,20 @@ ...@@ -155,17 +155,20 @@
- (void)applicationWillEnterForeground:(UIApplication *)application { - (void)applicationWillEnterForeground:(UIApplication *)application {
[kUserDefaults setObject:[ZXTool getCurrentTimeStamp] forKey:@"uploadBatch"]; [kUserDefaults setObject:[ZXTool getCurrentTimeStamp] forKey:@"uploadBatch"];
//请求最新的是否需要曝光配置
[ZXTool requestIsNeedExposure];
} }
- (void)applicationDidBecomeActive:(UIApplication *)application { - (void)applicationDidBecomeActive:(UIApplication *)application {
@try {
if ([[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) { UIViewController *vc = [ZXTool getCurrentVC];
[[NSNotificationCenter defaultCenter] postNotificationName:kSelf_help_start_timer object:nil]; if ([vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) {
[[NSNotificationCenter defaultCenter] postNotificationName:kSelf_help_start_timer object:nil];
}
} @catch (NSException *exception) {
} @finally {
} }
} }
......
// //
...@@ -639,6 +639,10 @@ ...@@ -639,6 +639,10 @@
[ZXTool showText:@"请先阅读用户协议并同意"]; [ZXTool showText:@"请先阅读用户协议并同意"];
return; return;
} }
if (self.currentSelecCampus.id == 0 || self.currentSelecCampus.areaName == nil || [self.currentSelecCampus.areaName isEqualToString:@""]) {
[ZXTool showText:@"所选择区域id为0,请下拉刷新区域重新选择"];
return;
}
NSDictionary *dic = @{@"customerName":self.nameField.text, NSDictionary *dic = @{@"customerName":self.nameField.text,
@"customerPhone":self.phoneField.text, @"customerPhone":self.phoneField.text,
@"customerSex":self.maleBtn.enabled?@"2":@"1", @"customerSex":self.maleBtn.enabled?@"2":@"1",
......
// //
...@@ -304,6 +304,9 @@ static NSString * const ID = @"CollectionCell"; ...@@ -304,6 +304,9 @@ static NSString * const ID = @"CollectionCell";
confirmBtn.enabled = YES; confirmBtn.enabled = YES;
self.navigationController.navigationBar.hidden = YES; self.navigationController.navigationBar.hidden = YES;
[self registNotificationAndKVO]; [self registNotificationAndKVO];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
});
} }
- (void)viewWillDisappear:(BOOL)animated { - (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated]; [super viewWillDisappear:animated];
...@@ -549,8 +552,13 @@ heightForFooterInSection:(NSInteger)section { ...@@ -549,8 +552,13 @@ heightForFooterInSection:(NSInteger)section {
@weakify(self); @weakify(self);
confirmVc.payCompletedAction = ^{ confirmVc.payCompletedAction = ^{
@strongify(self); @strongify(self);
self.comeFrom=@""; if ([self.comeFrom isEqualToString:@"firstTopUp"]) {
[self refreshUserInfo]; self.comeFrom=@"";
[self checkWalletData];
} else {
self.comeFrom=@"";
[self refreshUserInfo];
}
}; };
[self.navigationController pushViewController:confirmVc animated:YES]; [self.navigationController pushViewController:confirmVc animated:YES];
} }
......
// //
...@@ -39,12 +39,27 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -39,12 +39,27 @@ typedef void(^isCanChange)(BOOL iCan);
[self.view addSubview:self.myTableView]; [self.view addSubview:self.myTableView];
[ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) { [ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) {
[self operationSection1:isOld];
if (isOld == NO) { if (isOld == NO) {
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/hardware/info/forcustomer/loginState?customerId=%@", [kUserDefaults objectForKey:@"NEW_PAY"], CacheUserId] para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
if (error) {
[ZXTool showText:error];
[kUserDefaults setObject:@"notShow" forKey:@"devPassSwitch"];
} else {
[kUserDefaults setObject:common.data forKey:@"devPassSwitch"];
}
[self operationSection1:isOld];
});
}];
if ([[kUserDefaults valueForKey:kAPP_IS_OPEN_JK] isEqualToString:@"yes"] && ([CacheVersion isEqualToString:@"2.0"] || [CacheVersion isEqualToString:@"2"])) { if ([[kUserDefaults valueForKey:kAPP_IS_OPEN_JK] isEqualToString:@"yes"] && ([CacheVersion isEqualToString:@"2.0"] || [CacheVersion isEqualToString:@"2"])) {
[self loadIsOpenFreePay]; [self loadIsOpenFreePay];
[self checkCurrentUserIsOpenJPush]; [self checkCurrentUserIsOpenJPush];
} }
} else {
[self operationSection1:isOld];
} }
}]; }];
...@@ -95,36 +110,65 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -95,36 +110,65 @@ typedef void(^isCanChange)(BOOL iCan);
} }
} else { } else {
if ([CacheVersion isEqualToString:@"2.0"] || [CacheVersion isEqualToString:@"2"]) { if ([CacheVersion isEqualToString:@"2.0"] || [CacheVersion isEqualToString:@"2"]) {
NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码",@"开启系统自动扣费", @"开启订单推送"]; if ([[kUserDefaults valueForKey:kAPP_IS_OPEN_JK] isEqualToString:@"yes"]) {
NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon_mianmi",@"icon-push"]; NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码",@"开启系统自动扣费", @"开启订单推送"];
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init]; NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon_mianmi",@"icon-push"];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m5 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m6 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m5 = [[ZXUserSettingModel alloc] init];
m1.imageName = imagegroup1[0]; ZXUserSettingModel *m6 = [[ZXUserSettingModel alloc] init];
m1.name = group1[0]; m1.imageName = imagegroup1[0];
m2.imageName = imagegroup1[1]; m1.name = group1[0];
m2.name = group1[1]; m2.imageName = imagegroup1[1];
m3.imageName = imagegroup1[2]; m2.name = group1[1];
m3.name = group1[2]; m3.imageName = imagegroup1[2];
m4.imageName = imagegroup1[3]; m3.name = group1[2];
m4.name = group1[3]; m4.imageName = imagegroup1[3];
m4.isHasSwitch = YES; m4.name = group1[3];
m4.switchIsOn = [CacheDevPassSwitch integerValue]; m4.isHasSwitch = YES;
m5.imageName = imagegroup1[4]; m4.switchIsOn = [CacheDevPassSwitch integerValue];
m5.name = group1[4]; m5.imageName = imagegroup1[4];
m5.isHasSwitch = YES; m5.name = group1[4];
m5.switchIsOn = NO; m5.isHasSwitch = YES;
m6.imageName = imagegroup1[5]; m5.switchIsOn = NO;
m6.name = group1[5]; m6.imageName = imagegroup1[5];
m6.isHasSwitch = YES; m6.name = group1[5];
m6.switchIsOn = NO; m6.isHasSwitch = YES;
m4.switchType = 1; m6.switchIsOn = NO;
m5.switchType = 2; m4.switchType = 1;
m6.switchType = 3; m5.switchType = 2;
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m4,m5,m6]]; m6.switchType = 3;
if ([CacheDevPassSwitch isEqualToString:@"notShow"]) {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m5,m6]];
} else {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m4,m5,m6]];
}
} else {
NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码"];
NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code"];
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init];
m1.imageName = imagegroup1[0];
m1.name = group1[0];
m2.imageName = imagegroup1[1];
m2.name = group1[1];
m3.imageName = imagegroup1[2];
m3.name = group1[2];
m4.imageName = imagegroup1[3];
m4.name = group1[3];
m4.isHasSwitch = YES;
m4.switchIsOn = [CacheDevPassSwitch integerValue];
m4.switchType = 1;
if ([CacheDevPassSwitch isEqualToString:@"notShow"]) {
[self.sections1 addObjectsFromArray:@[m1,m2,m3]];
} else {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m4]];
}
}
} else { } else {
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
...@@ -210,7 +254,21 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -210,7 +254,21 @@ typedef void(^isCanChange)(BOOL iCan);
@strongify(self); @strongify(self);
switch (switchType) { switch (switchType) {
case 1: { case 1: {
[[AllowEequipCountLoginModel new] AllowEquitLoginWithStatu:m.switchIsOn?@"0":@"1"]; [ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) {
if (isOld) {
[[AllowEequipCountLoginModel new] AllowEquitLoginWithStatu:m.switchIsOn?@"0":@"1"];
} else {
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/dcxy/hardware/change/state?customerId=%@&loginState=%d", [kUserDefaults objectForKey:@"NEW_PAY"], CacheUserId, m.switchIsOn] para:@{@"customerId":CacheUserId, @"loginState":m.switchIsOn?@"1":@"0"} completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
if (error) {
[ZXTool showText:error];
m.switchIsOn = !m.switchIsOn;
}
});
}];
}
}];
break; break;
} }
case 2: { case 2: {
......
// //
...@@ -118,7 +118,6 @@ static NSInteger seq = 0; ...@@ -118,7 +118,6 @@ static NSInteger seq = 0;
[ZXTool loadAdInfoByAdId:@"1" topView:nil superView:self.view fromVc:self]; [ZXTool loadAdInfoByAdId:@"1" topView:nil superView:self.view fromVc:self];
}); });
//老版本部分内容 //老版本部分内容
self.firstTopupModel=[JudgeFirstTopUpModel new]; self.firstTopupModel=[JudgeFirstTopUpModel new];
self.updateModel=[CampasVersionUpdateModel new]; self.updateModel=[CampasVersionUpdateModel new];
//注册观察者 //注册观察者
...@@ -127,8 +126,7 @@ static NSInteger seq = 0; ...@@ -127,8 +126,7 @@ static NSInteger seq = 0;
//版本检测 //版本检测
[self.updateModel CampasVersionUpdateWithCurrentVersion:APPversion]; [self.updateModel CampasVersionUpdateWithCurrentVersion:APPversion];
} }
......
// //
...@@ -1209,7 +1209,7 @@ static GetData *_instance; ...@@ -1209,7 +1209,7 @@ static GetData *_instance;
NSDictionary * dataDic = [[NSDictionary alloc]initWithObjectsAndKeys:userId,@"userId",statu,@"status",nil]; NSDictionary * dataDic = [[NSDictionary alloc]initWithObjectsAndKeys:userId,@"userId",statu,@"status",nil];
NSString * json=[self dictionaryToJson:dataDic]; NSString * json=[self dictionaryToJson:dataDic];
NSString * postStr = [NSString stringWithFormat:@"%@%@%@",@"dc2017",@"MT_MOB_00035",json]; NSString * postStr = [NSString stringWithFormat:@"%@%@%@",@"dc2017",@"MT_MOB_00035",json];
NSString * md5Str = [self md5:postStr]; NSString * md5Str = [self md5:postStr];
NSString * dicstr=[self dictionaryToJson:dataDic]; NSString * dicstr=[self dictionaryToJson:dataDic];
NSString * token=CacheToken; NSString * token=CacheToken;
if (token==nil) { if (token==nil) {
......
// //
...@@ -171,7 +171,7 @@ typedef void(^checkIsOldCustomer)(BOOL isOld); ...@@ -171,7 +171,7 @@ typedef void(^checkIsOldCustomer)(BOOL isOld);
/*获取用户信息*/ /*获取用户信息*/
+(void) fetchUserInfo; //+(void) fetchUserInfo;
/*获取用户信息*/ /*获取用户信息*/
+(void) fetchUserInfoCompleted:(checkIsOldCustomer) completed; +(void) fetchUserInfoCompleted:(checkIsOldCustomer) completed;
+ (void) saveUserInfo:(ZXUserModel *) user; + (void) saveUserInfo:(ZXUserModel *) user;
......
// //
...@@ -1935,9 +1935,13 @@ void ProviderReleaseData (void *info, const void *data, size_t size){ ...@@ -1935,9 +1935,13 @@ void ProviderReleaseData (void *info, const void *data, size_t size){
[ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) { [ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) {
@strongify(self); @strongify(self);
if (isOld) { if (isOld) {
[self fetchUserCenterDataCompleted:nil]; [self fetchUserCenterDataCompleted:^(BOOL isOld) {
}];
} else { } else {
[self refreshUserInfoCompleted:nil]; [self refreshUserInfoCompleted:^(BOOL isOld) {
}];
} }
}]; }];
}); });
......
// //
...@@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) ZXNewPayOrder *order; @property (nonatomic, strong) ZXNewPayOrder *order;
@property (nonatomic, strong) ZXNewPayTypeModel *payType; @property (nonatomic, strong) ZXNewPayTypeModel *payType;
@property (nonatomic, copy) dispatch_block_t paySuccess; @property (nonatomic, copy) dispatch_block_t paySuccess;
@property (nonatomic, copy) dispatch_block_t backAction;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
// //
...@@ -208,15 +208,9 @@ ...@@ -208,15 +208,9 @@
self.paySuccess(); self.paySuccess();
} }
[[NSNotificationCenter defaultCenter] postNotificationName:kOrder_Completed_Pay object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:kOrder_Completed_Pay object:nil];
dispatch_async(dispatch_get_main_queue(), ^{ if (self.backAction) {
NSArray *controllers = self.navigationController.childViewControllers; self.backAction();
NSArray *res = [[controllers reverseObjectEnumerator] allObjects]; }
for (UIViewController *vc in res) {
if ([vc isKindOfClass:NSClassFromString(@"ZTHomeViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXRSNewViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSimpleHomeController")] || [vc isKindOfClass:NSClassFromString(@"ZXNewPayOrderListViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]|| [vc isKindOfClass:NSClassFromString(@"UserSettingViewController")]) {
[self.navigationController popToViewController:vc animated:YES];
}
}
});
} }
// 对JSON字符串进行urlEncode 处理 // 对JSON字符串进行urlEncode 处理
......
// //
...@@ -193,16 +193,18 @@ ...@@ -193,16 +193,18 @@
[[back rac_signalForControlEvents:UIControlEventTouchDown] subscribeNext:^(id x) { [[back rac_signalForControlEvents:UIControlEventTouchDown] subscribeNext:^(id x) {
@strongify(self); @strongify(self);
[[NSNotificationCenter defaultCenter] postNotificationName:kOrder_CheckNopPay_Pay object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:kOrder_CheckNopPay_Pay object:nil];
NSArray *controllers = self.navigationController.childViewControllers;
NSArray *res = [[controllers reverseObjectEnumerator] allObjects];
BOOL isFound = NO; BOOL isFound = NO;
for (UIViewController *vc in self.navigationController.childViewControllers) { for (UIViewController *vc in res) {
if ([vc isKindOfClass:NSClassFromString(@"ZTHomeViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXRSNewViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSimpleHomeController")] || [vc isKindOfClass:NSClassFromString(@"ZXNewPayOrderListViewController")]) { if ([vc isKindOfClass:NSClassFromString(@"ZTHomeViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXRSNewViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSimpleHomeController")] || [vc isKindOfClass:NSClassFromString(@"ZXNewPayOrderListViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]|| [vc isKindOfClass:NSClassFromString(@"UserSettingViewController")]|| [vc isKindOfClass:NSClassFromString(@"MineViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXMallViewController")]) {
[self.navigationController popToViewController:vc animated:YES]; [self.navigationController popToViewController:vc animated:YES];
isFound = YES; isFound = YES;
break; break;
} }
} }
if (isFound) { if (isFound == NO) {
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popToRootViewControllerAnimated:YES];
} }
}]; }];
...@@ -284,6 +286,11 @@ ...@@ -284,6 +286,11 @@
vc.order = self.order; vc.order = self.order;
vc.payType = self.currentPayType; vc.payType = self.currentPayType;
vc.paySuccess = self.paySuccess; vc.paySuccess = self.paySuccess;
@weakify(self);
vc.backAction = ^{
@strongify(self);
[self.navigationController popToRootViewControllerAnimated:YES];
};
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......
// //
...@@ -75,11 +75,17 @@ ...@@ -75,11 +75,17 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
NSArray *controllers = self.navigationController.childViewControllers; NSArray *controllers = self.navigationController.childViewControllers;
NSArray *res = [[controllers reverseObjectEnumerator] allObjects]; NSArray *res = [[controllers reverseObjectEnumerator] allObjects];
BOOL isFound = NO;
for (UIViewController *vc in res) { for (UIViewController *vc in res) {
if ([vc isKindOfClass:NSClassFromString(@"ZTHomeViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXRSNewViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSimpleHomeController")] || [vc isKindOfClass:NSClassFromString(@"ZXNewPayOrderListViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) { if ([vc isKindOfClass:NSClassFromString(@"ZTHomeViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXRSNewViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSimpleHomeController")] || [vc isKindOfClass:NSClassFromString(@"ZXNewPayOrderListViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]|| [vc isKindOfClass:NSClassFromString(@"UserSettingViewController")]|| [vc isKindOfClass:NSClassFromString(@"MineViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXMallViewController")]) {
[self.navigationController popToViewController:vc animated:YES]; [self.navigationController popToViewController:vc animated:YES];
isFound = YES;
break;
} }
} }
if (isFound == NO) {
[self.navigationController popToRootViewControllerAnimated:YES];
}
}); });
} }
......
...@@ -8,41 +8,122 @@ ...@@ -8,41 +8,122 @@
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>Bugly.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>10</integer>
</dict>
<key>DTCoreText.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>11</integer>
</dict>
<key>DTFoundation.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>12</integer>
</dict>
<key>FMDB.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>13</integer>
</dict>
<key>GDTMobSDK.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>14</integer>
</dict>
<key>HappyDNS.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>15</integer>
</dict>
<key>IQKeyboardManager.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>16</integer>
</dict>
<key>JCore.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>17</integer>
</dict>
<key>JJException.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>18</integer>
</dict>
<key>JPush.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>19</integer>
</dict>
<key>JXCategoryView.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>20</integer>
</dict> </dict>
<key>MJExtension.xcscheme</key> <key>MJExtension.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>4</integer>
</dict> </dict>
<key>MJRefresh.xcscheme</key> <key>MJRefresh.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>5</integer>
</dict> </dict>
<key>Masonry.xcscheme</key> <key>Masonry.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>3</integer>
</dict> </dict>
<key>Pods-ColorfulSchool.xcscheme</key> <key>Pods-ColorfulSchool.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>Qiniu.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>21</integer>
</dict>
<key>ReactiveCocoa.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>22</integer>
</dict> </dict>
<key>SDWebImage.xcscheme</key> <key>SDWebImage.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>7</integer>
</dict> </dict>
<key>SVProgressHUD.xcscheme</key> <key>SVProgressHUD.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>8</integer>
</dict> </dict>
<key>XRCarouselView.xcscheme</key> <key>XRCarouselView.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>9</integer>
</dict> </dict>
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment