Commit 88ce3fd0 by 刘卓鑫

重构版本bug修改

parent 974f9197
......@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
......@@ -65,6 +66,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
......
......@@ -6,9 +6,16 @@
<dict>
<key>ColorfulSchool.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>ColorfulSchool.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
......
......@@ -68,13 +68,10 @@
//防止crash
[JJException configExceptionCategory:JJExceptionGuardAll];
[JJException startGuardException];
//极光推送
[self initPushWithOptions:launchOptions isProduct:kJPushIsProduct];
//网络监测
[self checkNetworkingStatus];
//获取外网ip
[self deviceWANIPAdress];
//异常捕获
......@@ -83,9 +80,8 @@
[self createWindow];
//token登录
[self tokenLogin];
//每次启动获取一次用户信息
[ZXTool fetchUserInfo];
//请求最新的是否需要曝光配置
[ZXTool requestIsNeedExposure];
//创建开屏广告
//[[ZXTXAdTool sharedZXTXAdTool] createLauchAdByPlacmentId:kTXAdLauchPLACEMENTID];
return YES;
......@@ -105,7 +101,6 @@
if ([jump isEqualToString:@"NONE"]) {
//先读取缓存
NSArray *list = [LoginJump findAll];
if (list.count == 0) {
jump = @"DC_01";
......@@ -144,10 +139,15 @@
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
@try {
UIViewController *vc = [ZXTool getCurrentVC];
if ([vc isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) {
[[NSNotificationCenter defaultCenter] postNotificationName:kSelf_help_destory_timer object:nil];
}
} @catch (NSException *exception) {
if ([[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) {
} @finally {
[[NSNotificationCenter defaultCenter] postNotificationName:kSelf_help_destory_timer object:nil];
}
}
......@@ -155,18 +155,21 @@
- (void)applicationWillEnterForeground:(UIApplication *)application {
[kUserDefaults setObject:[ZXTool getCurrentTimeStamp] forKey:@"uploadBatch"];
//请求最新的是否需要曝光配置
[ZXTool requestIsNeedExposure];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
if ([[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXSelfHelpViewController")] || [[ZXTool getCurrentVC] isKindOfClass:NSClassFromString(@"ZXDrinkViewController")]) {
@try {
UIViewController *vc = [ZXTool getCurrentVC];
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 @@
[ZXTool showText:@"请先阅读用户协议并同意"];
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,
@"customerPhone":self.phoneField.text,
@"customerSex":self.maleBtn.enabled?@"2":@"1",
......
//
//
......@@ -304,6 +304,9 @@ static NSString * const ID = @"CollectionCell";
confirmBtn.enabled = YES;
self.navigationController.navigationBar.hidden = YES;
[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 {
[super viewWillDisappear:animated];
......@@ -549,8 +552,13 @@ heightForFooterInSection:(NSInteger)section {
@weakify(self);
confirmVc.payCompletedAction = ^{
@strongify(self);
if ([self.comeFrom isEqualToString:@"firstTopUp"]) {
self.comeFrom=@"";
[self checkWalletData];
} else {
self.comeFrom=@"";
[self refreshUserInfo];
}
};
[self.navigationController pushViewController:confirmVc animated:YES];
}
......
//
//
......@@ -39,12 +39,27 @@ typedef void(^isCanChange)(BOOL iCan);
[self.view addSubview:self.myTableView];
[ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) {
[self operationSection1:isOld];
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"])) {
[self loadIsOpenFreePay];
[self checkCurrentUserIsOpenJPush];
}
} else {
[self operationSection1:isOld];
}
}];
......@@ -95,6 +110,7 @@ typedef void(^isCanChange)(BOOL iCan);
}
} else {
if ([CacheVersion isEqualToString:@"2.0"] || [CacheVersion isEqualToString:@"2"]) {
if ([[kUserDefaults valueForKey:kAPP_IS_OPEN_JK] isEqualToString:@"yes"]) {
NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码",@"开启系统自动扣费", @"开启订单推送"];
NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon_mianmi",@"icon-push"];
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
......@@ -124,7 +140,35 @@ typedef void(^isCanChange)(BOOL iCan);
m4.switchType = 1;
m5.switchType = 2;
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 {
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
......@@ -210,7 +254,21 @@ typedef void(^isCanChange)(BOOL iCan);
@strongify(self);
switch (switchType) {
case 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;
}
case 2: {
......
//
//
......@@ -118,7 +118,6 @@ static NSInteger seq = 0;
[ZXTool loadAdInfoByAdId:@"1" topView:nil superView:self.view fromVc:self];
});
//老版本部分内容
self.firstTopupModel=[JudgeFirstTopUpModel new];
self.updateModel=[CampasVersionUpdateModel new];
//注册观察者
......@@ -128,7 +127,6 @@ static NSInteger seq = 0;
//版本检测
[self.updateModel CampasVersionUpdateWithCurrentVersion:APPversion];
}
......
//
//
......@@ -171,7 +171,7 @@ typedef void(^checkIsOldCustomer)(BOOL isOld);
/*获取用户信息*/
+(void) fetchUserInfo;
//+(void) fetchUserInfo;
/*获取用户信息*/
+(void) fetchUserInfoCompleted:(checkIsOldCustomer) completed;
+ (void) saveUserInfo:(ZXUserModel *) user;
......
//
//
......@@ -1935,9 +1935,13 @@ void ProviderReleaseData (void *info, const void *data, size_t size){
[ZXTool checkCurrentUserModeCompleted:^(BOOL isOld) {
@strongify(self);
if (isOld) {
[self fetchUserCenterDataCompleted:nil];
[self fetchUserCenterDataCompleted:^(BOOL isOld) {
}];
} else {
[self refreshUserInfoCompleted:nil];
[self refreshUserInfoCompleted:^(BOOL isOld) {
}];
}
}];
});
......
//
//
......@@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) ZXNewPayOrder *order;
@property (nonatomic, strong) ZXNewPayTypeModel *payType;
@property (nonatomic, copy) dispatch_block_t paySuccess;
@property (nonatomic, copy) dispatch_block_t backAction;
@end
NS_ASSUME_NONNULL_END
//
//
......@@ -208,15 +208,9 @@
self.paySuccess();
}
[[NSNotificationCenter defaultCenter] postNotificationName:kOrder_Completed_Pay object:nil];
dispatch_async(dispatch_get_main_queue(), ^{
NSArray *controllers = self.navigationController.childViewControllers;
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];
}
if (self.backAction) {
self.backAction();
}
});
}
// 对JSON字符串进行urlEncode 处理
......
//
//
......@@ -193,16 +193,18 @@
[[back rac_signalForControlEvents:UIControlEventTouchDown] subscribeNext:^(id x) {
@strongify(self);
[[NSNotificationCenter defaultCenter] postNotificationName:kOrder_CheckNopPay_Pay object:nil];
NSArray *controllers = self.navigationController.childViewControllers;
NSArray *res = [[controllers reverseObjectEnumerator] allObjects];
BOOL isFound = NO;
for (UIViewController *vc in self.navigationController.childViewControllers) {
if ([vc isKindOfClass:NSClassFromString(@"ZTHomeViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXRSNewViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXSimpleHomeController")] || [vc isKindOfClass:NSClassFromString(@"ZXNewPayOrderListViewController")]) {
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")]|| [vc isKindOfClass:NSClassFromString(@"MineViewController")] || [vc isKindOfClass:NSClassFromString(@"ZXMallViewController")]) {
[self.navigationController popToViewController:vc animated:YES];
isFound = YES;
break;
}
}
if (isFound) {
[self.navigationController popViewControllerAnimated:YES];
if (isFound == NO) {
[self.navigationController popToRootViewControllerAnimated:YES];
}
}];
......@@ -284,6 +286,11 @@
vc.order = self.order;
vc.payType = self.currentPayType;
vc.paySuccess = self.paySuccess;
@weakify(self);
vc.backAction = ^{
@strongify(self);
[self.navigationController popToRootViewControllerAnimated:YES];
};
[self.navigationController pushViewController:vc animated:YES];
}
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......
//
//
......@@ -75,11 +75,17 @@
dispatch_async(dispatch_get_main_queue(), ^{
NSArray *controllers = self.navigationController.childViewControllers;
NSArray *res = [[controllers reverseObjectEnumerator] allObjects];
BOOL isFound = NO;
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];
isFound = YES;
break;
}
}
if (isFound == NO) {
[self.navigationController popToRootViewControllerAnimated:YES];
}
});
}
......
......@@ -8,41 +8,122 @@
<dict>
<key>isShown</key>
<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>
<key>MJExtension.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>MJRefresh.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>Masonry.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>Pods-ColorfulSchool.xcscheme</key>
<dict>
<key>isShown</key>
<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>
<key>SDWebImage.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>SVProgressHUD.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
</dict>
<key>XRCarouselView.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
</dict>
</dict>
<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