Commit 906f91c3 by 刘卓鑫

优化蓝牙连接提示 ,修复ios蓝牙连接失败问题。优化全局接口错误信息提示(改成确认弹窗)

parent 8d5a5d6d
...@@ -4850,6 +4850,9 @@ ...@@ -4850,6 +4850,9 @@
com.apple.Push = { com.apple.Push = {
enabled = 1; enabled = 1;
}; };
com.apple.SafariKeychain = {
enabled = 1;
};
}; };
}; };
9142D2D21F35C84E004F90CF = { 9142D2D21F35C84E004F90CF = {
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</AdditionalOptions> </AdditionalOptions>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Release" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
// [kAppWindow addSubview:fps]; // [kAppWindow addSubview:fps];
//默认配置 //默认配置
[self defaultLauchConfigAndIsOpenPreventCrashManager:YES]; [self defaultLauchConfigAndIsOpenPreventCrashManager:NO];
//防止蓝牙洗浴后台运行被系统中断 //防止蓝牙洗浴后台运行被系统中断
......
// //
...@@ -18,7 +18,6 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -18,7 +18,6 @@ NS_ASSUME_NONNULL_BEGIN
//单例化 //单例化
kSINGLETON_FOR_HEADER(APIManager) kSINGLETON_FOR_HEADER(APIManager)
@property (nonatomic, assign) ZXColorfulSchoolEnvironmentType lauchEnvironment; @property (nonatomic, assign) ZXColorfulSchoolEnvironmentType lauchEnvironment;
......
// //
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
if (error != nil) { if (error != nil) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[self.myTableView.mj_header endRefreshing]; [self.myTableView.mj_header endRefreshing];
}); });
} }
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
if (error != nil) { if (error != nil) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
}); });
} else { } else {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
......
// //
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXBathConfig clearTable]; [ZXBathConfig clearTable];
[ZXBlance clearTable]; [ZXBlance clearTable];
} else { } else {
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
@strongify(self); @strongify(self);
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} else { } else {
if ([common.data integerValue] == 0) { if ([common.data integerValue] == 0) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"您将授权使用第三方的精图教育服务,精图提供教资、考研、国考等精选课程;授权后精图将使用您的多彩相关信息!" preferredStyle:UIAlertControllerStyleAlert]; UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"您将授权使用第三方的精图教育服务,精图提供教资、考研、国考等精选课程;授权后精图将使用您的多彩相关信息!" preferredStyle:UIAlertControllerStyleAlert];
......
// //
...@@ -731,7 +731,7 @@ ...@@ -731,7 +731,7 @@
[[NSNotificationCenter defaultCenter] postNotificationName:@"changeIconNotification" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"changeIconNotification" object:nil];
} else { } else {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:responseObject[@"msg"]]; [ZXTool showErrorMsg:responseObject[@"msg"]];
}); });
} }
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
...@@ -739,7 +739,7 @@ ...@@ -739,7 +739,7 @@
}); });
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error.userInfo[@"NSLocalizedDescription"]]; [ZXTool showErrorMsg:error.userInfo[@"NSLocalizedDescription"]];
}); });
}]; }];
} }
......
// //
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
self.backgroundColor = [UIColor clearColor]; self.backgroundColor = [UIColor clearColor];
UIImage *img1 = [UIImage imageNamed:@"ic_qipaos_bg"]; UIImage *img1 = [UIImage imageNamed:@"ic_qipaos_bg"];
UIImageView *imageView1 = [[UIImageView alloc] init]; UIImageView *imageView1 = [[UIImageView alloc] init];
[self addSubview:imageView1]; [self addSubview:imageView1];
...@@ -62,15 +61,7 @@ ...@@ -62,15 +61,7 @@
make.centerY.equalTo(child); make.centerY.equalTo(child);
make.width.height.mas_equalTo(15 * k6Scale); make.width.height.mas_equalTo(15 * k6Scale);
}]; }];
@weakify(self); deleteBtn.userInteractionEnabled = NO;
[[deleteBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
@strongify(self);
self.hidden = YES;
//[self removeFromSuperview];
if (self.deleteAction) {
self.deleteAction();
}
}];
self.contentLabel = [[UILabel alloc] init]; self.contentLabel = [[UILabel alloc] init];
[self addSubview:self.contentLabel]; [self addSubview:self.contentLabel];
...@@ -81,18 +72,6 @@ ...@@ -81,18 +72,6 @@
make.right.equalTo(deleteBtn.mas_left).offset(-10 * k6Scale); make.right.equalTo(deleteBtn.mas_left).offset(-10 * k6Scale);
make.centerY.equalTo(child); make.centerY.equalTo(child);
}]; }];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
[self addGestureRecognizer:tap];
kWeakSelf(self);
[[tap rac_gestureSignal] subscribeNext:^(id x) {
kStrongSelf(self);
if (self.clickAction) {
self.clickAction();
}
}];
} }
return self; return self;
} }
...@@ -112,5 +91,19 @@ ...@@ -112,5 +91,19 @@
self.contentLabel.text = _order.orderTitle; self.contentLabel.text = _order.orderTitle;
} }
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
CGPoint clickPoint = [[touches anyObject] locationInView:self];
if (clickPoint.x < self.frame.size.width - 64 * k6Scale) {
if (self.clickAction) {
self.clickAction();
}
} else {
self.hidden = YES;
//[self removeFromSuperview];
if (self.deleteAction) {
self.deleteAction();
}
}
}
@end @end
// //
...@@ -250,6 +250,17 @@ ...@@ -250,6 +250,17 @@
_userName = userName; _userName = userName;
self.userNameLabel.text = _userName; self.userNameLabel.text = _userName;
} }
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *view = [super hitTest:point withEvent:event];
if (view == nil) {
for (UIView *subView in self.subviews) {
CGPoint tp = [subView convertPoint:point fromView:self];
if (CGRectContainsPoint(subView.bounds, tp)) {
view = subView;
}
}
}
return view;
}
@end @end
// //
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/rank?customerId=%@&publishClient=%@", [self url], CacheUserId?CacheUserId:@"", @"2"] para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/rank?customerId=%@&publishClient=%@", [self url], CacheUserId?CacheUserId:@"", @"2"] para:nil completed:^(CommonModel *common, NSString *error) {
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
completed(NO); completed(NO);
}); });
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/notice?customerId=%@&publishClient=%@", [self url], CacheUserId?CacheUserId:@"", @"2"] para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/notice?customerId=%@&publishClient=%@", [self url], CacheUserId?CacheUserId:@"", @"2"] para:nil completed:^(CommonModel *common, NSString *error) {
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
completed(NO); completed(NO);
}); });
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/item/detail?itemCode=%@", [kUserDefaults objectForKey:@"HomePage"], itemCode] para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/item/detail?itemCode=%@", [kUserDefaults objectForKey:@"HomePage"], itemCode] para:nil completed:^(CommonModel *common, NSString *error) {
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
}); });
} else { } else {
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/notice/detail?noticeCode=%@&customerId=%@", [kUserDefaults objectForKey:@"HomePage"], noticeCode, CacheUserId] para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/app/home/module/notice/detail?noticeCode=%@&customerId=%@", [kUserDefaults objectForKey:@"HomePage"], noticeCode, CacheUserId] para:nil completed:^(CommonModel *common, NSString *error) {
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
}); });
} else { } else {
......
// //
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
@strongify(self); @strongify(self);
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} else { } else {
[kUserDefaults setObject:common.data forKey:@"idBar"]; [kUserDefaults setObject:common.data forKey:@"idBar"];
self.barcodeView.image = [self createBarCode:CacheidBar width:self.barcodeView.frame.size.width height:self.barcodeView.frame.size.height]; self.barcodeView.image = [self createBarCode:CacheidBar width:self.barcodeView.frame.size.width height:self.barcodeView.frame.size.height];
......
// //
...@@ -52,7 +52,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -52,7 +52,7 @@ typedef void(^completedBlock)(id response, NSString *error);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
return; return;
} }
...@@ -102,7 +102,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -102,7 +102,7 @@ typedef void(^completedBlock)(id response, NSString *error);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
return; return;
} }
...@@ -134,7 +134,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -134,7 +134,7 @@ typedef void(^completedBlock)(id response, NSString *error);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
return; return;
} }
...@@ -187,7 +187,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -187,7 +187,7 @@ typedef void(^completedBlock)(id response, NSString *error);
[self requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(id response, NSString *error) { [self requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(id response, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
} else { } else {
@strongify(self); @strongify(self);
...@@ -229,7 +229,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -229,7 +229,7 @@ typedef void(^completedBlock)(id response, NSString *error);
[self requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"http://api.zhuishushenqi.com/book/fuzzy-search?query=%@", searchText] para:nil completed:^(id response, NSString *error) { [self requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"http://api.zhuishushenqi.com/book/fuzzy-search?query=%@", searchText] para:nil completed:^(id response, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
} else { } else {
@strongify(self); @strongify(self);
...@@ -309,7 +309,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -309,7 +309,7 @@ typedef void(^completedBlock)(id response, NSString *error);
[self requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(id response, NSString *error) { [self requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(id response, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(NO); completed(NO);
} else { } else {
@strongify(self); @strongify(self);
...@@ -437,7 +437,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -437,7 +437,7 @@ typedef void(^completedBlock)(id response, NSString *error);
[self requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"http://api.zhuishushenqi.com/ranking/%@", rankId] para:nil completed:^(id response, NSString *error) { [self requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"http://api.zhuishushenqi.com/ranking/%@", rankId] para:nil completed:^(id response, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
} else { } else {
@strongify(self); @strongify(self);
...@@ -480,7 +480,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -480,7 +480,7 @@ typedef void(^completedBlock)(id response, NSString *error);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
return; return;
} }
...@@ -499,7 +499,7 @@ typedef void(^completedBlock)(id response, NSString *error); ...@@ -499,7 +499,7 @@ typedef void(^completedBlock)(id response, NSString *error);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
completed(); completed();
return; return;
} }
......
// //
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
ZXDrinkMerthinModel *m = [ZXDrinkMerthinModel mj_objectWithKeyValues:common.data]; ZXDrinkMerthinModel *m = [ZXDrinkMerthinModel mj_objectWithKeyValues:common.data];
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"customerName":[kUserDefaults valueForKey:@"username"], @"customerPhone":[kUserDefaults valueForKey:@"account"],@"campusId":[kUserDefaults valueForKey:@"campusId"]} completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"customerName":[kUserDefaults valueForKey:@"username"], @"customerPhone":[kUserDefaults valueForKey:@"account"],@"campusId":[kUserDefaults valueForKey:@"campusId"]} completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"customerName":[kUserDefaults valueForKey:@"username"], @"customerPhone":[kUserDefaults valueForKey:@"account"]} completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"customerName":[kUserDefaults valueForKey:@"username"], @"customerPhone":[kUserDefaults valueForKey:@"account"]} completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[self.useDeviceList removeAllObjects]; [self.useDeviceList removeAllObjects];
completed(); completed();
......
// //
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} else { } else {
NSString *jtUrl = common.data[@"url"]; NSString *jtUrl = common.data[@"url"];
self.cookie = common.data[@"PHPSESSID"]; self.cookie = common.data[@"PHPSESSID"];
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
completed(NO); completed(NO);
}); });
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
completed(NO); completed(NO);
}); });
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
[ZXTool requestDataHideLoadingToastWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/shower/appointment/appointResult/%ld?userId=%@&recordId=%ld", [kUserDefaults valueForKey:@"AppointBATH"], (long)recordId,CacheUserId, (long)recordId] para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataHideLoadingToastWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/shower/appointment/appointResult/%ld?userId=%@&recordId=%ld", [kUserDefaults valueForKey:@"AppointBATH"], (long)recordId,CacheUserId, (long)recordId] para:nil completed:^(CommonModel *common, NSString *error) {
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
//[ZXTool hideLoadingAnimation]; //[ZXTool hideLoadingAnimation];
completed(NO); completed(NO);
}); });
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} else { } else {
if ([common.data integerValue] == 3) { if ([common.data integerValue] == 3) {
completed(YES); completed(YES);
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/shower/controllerConfigs?customerId=%@&campusId=%@", [kUserDefaults valueForKey:@"AppointBATH"], CacheUserId, CacheCampusId] para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/shower/controllerConfigs?customerId=%@&campusId=%@", [kUserDefaults valueForKey:@"AppointBATH"], CacheUserId, CacheCampusId] para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXBathConfig clearTable]; [ZXBathConfig clearTable];
[ZXBlance clearTable]; [ZXBlance clearTable];
} else { } else {
......
// //
...@@ -65,8 +65,6 @@ ...@@ -65,8 +65,6 @@
//是否收到socket服务器的回应(设备号)
@property (nonatomic, assign) BOOL isReciveDeviceInfo;
@end @end
...@@ -114,17 +112,7 @@ ...@@ -114,17 +112,7 @@
} }
}]; }];
//MARK:观察是否收到socket反馈设备信息
// [RACObserve(self, isReciveDeviceInfo) subscribeNext:^(id _Nullable x) {
// @strongify(self);
// if ([x integerValue]) {
// //开始洗浴
// if (self.isBegingBath == NO) {
// self.isBegingBath = YES;
// [self startBathByBluetooth];//调用接口
// }
// }
// }];
} }
#pragma mark - ==========读取本地缓存数据========== #pragma mark - ==========读取本地缓存数据==========
...@@ -216,7 +204,7 @@ ...@@ -216,7 +204,7 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
if (isShow) { if (isShow) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} }
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
...@@ -345,13 +333,12 @@ ...@@ -345,13 +333,12 @@
make.top.equalTo(header.mas_bottom); make.top.equalTo(header.mas_bottom);
}]; }];
} }
} }
#pragma mark - ==========开始洗浴按钮事件========== #pragma mark - ==========开始洗浴按钮事件==========
- (void) startBath { - (void) startBath {
self.isBegingBath = NO;//标记为no self.isBegingBath = NO;//标记为no
self.isReciveDeviceInfo = NO;//标记为未接收到消息
@weakify(self); @weakify(self);
[ZXAppointBathService dealAccountActionWithOperationMode:self.currentBluetooth.operationMode isBlueBath:YES completed:^{ [ZXAppointBathService dealAccountActionWithOperationMode:self.currentBluetooth.operationMode isBlueBath:YES completed:^{
@strongify(self); @strongify(self);
...@@ -392,13 +379,13 @@ ...@@ -392,13 +379,13 @@
[self.view addSubview:a]; [self.view addSubview:a];
return; return;
} }
[self sendMessage:[NSString stringWithFormat:@"{<%@>}", self.currentPeripheralName]];
self.isServiceCut = NO;//标记为开始 self.isServiceCut = NO;//标记为开始
self.startDrink.enabled = NO;//按钮不可点击 self.startDrink.enabled = NO;//按钮不可点击
[self reConnect];//重连操作 [self reConnect];//重连操作
//开始搜索设备的时候触发 //开始搜索设备的时候触发
[self checkBluetoothConectStatus]; [self checkBluetoothConectStatus];
//[SVProgressHUD showWithStatus:@"蓝牙连接中..."]; [SVProgressHUD showWithStatus:@"蓝牙连接中..."];
} }
#pragma mark - ==========点击了开始按钮 5s后检测蓝牙连接状态========== #pragma mark - ==========点击了开始按钮 5s后检测蓝牙连接状态==========
...@@ -433,13 +420,14 @@ ...@@ -433,13 +420,14 @@
#pragma mark - ==========开始洗浴接口调用========== #pragma mark - ==========开始洗浴接口调用==========
- (void) startBathByBluetooth { - (void) startBathByBluetooth {
//[SVProgressHUD showSuccessWithStatus:@"设备开启中..."]; [SVProgressHUD showSuccessWithStatus:@"设备开启中..."];
NSString *url = [NSString stringWithFormat:@"%@/dcxy/api/shower/devices/%@/beginning", [kUserDefaults valueForKey:@"BATH"], self.currentPeripheralName]; NSString *url = [NSString stringWithFormat:@"%@/dcxy/api/shower/devices/%@/beginning", [kUserDefaults valueForKey:@"BATH"], self.currentPeripheralName];
@weakify(self); @weakify(self);
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"customerName":[kUserDefaults valueForKey:@"username"], @"customerPhone":[kUserDefaults valueForKey:@"account"],@"campusId":[kUserDefaults valueForKey:@"campusId"]} completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:@{@"customerId":[kUserDefaults valueForKey:@"userId"], @"customerName":[kUserDefaults valueForKey:@"username"], @"customerPhone":[kUserDefaults valueForKey:@"account"],@"campusId":[kUserDefaults valueForKey:@"campusId"]} completed:^(CommonModel *common, NSString *error) {
@strongify(self); @strongify(self);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[SVProgressHUD dismiss];
if (error) { if (error) {
[SVProgressHUD showErrorWithStatus:error]; [SVProgressHUD showErrorWithStatus:error];
[self cutBluetoothAndSocketConnect]; [self cutBluetoothAndSocketConnect];
...@@ -663,10 +651,10 @@ ...@@ -663,10 +651,10 @@
#pragma mark - ==========蓝牙连接成功 发送设备号给socket========== #pragma mark - ==========蓝牙连接成功 发送设备号给socket==========
- (void) sendDeviceInfoToSocketByTimes:(int) times { - (void) sendDeviceInfoToSocketByTimes:(int) times {
//执行三次 //执行三次
if (times < 4 && self.isReciveDeviceInfo == NO) { if (times < 4) {
NSLog(@"//蓝牙连接成功---发送设备号给socket"); NSLog(@"//蓝牙连接成功---发送设备号给socket");
[self sendMessage:[NSString stringWithFormat:@"{<%@>}", self.currentPeripheralName]]; [self sendMessage:[NSString stringWithFormat:@"{<%@>}", self.currentPeripheralName]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self sendDeviceInfoToSocketByTimes:(times + 1)]; [self sendDeviceInfoToSocketByTimes:(times + 1)];
}); });
} }
...@@ -677,8 +665,8 @@ ...@@ -677,8 +665,8 @@
#pragma mark - ==========蓝牙连接成功========== #pragma mark - ==========蓝牙连接成功==========
- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error { - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error {
NSLog(@"=========================蓝牙连接成功========================="); NSLog(@"=========================蓝牙连接成功=========================");
//[SVProgressHUD showSuccessWithStatus:@"蓝牙连接成功"]; [SVProgressHUD showSuccessWithStatus:@"蓝牙连接成功"];
[self sendMessage:[NSString stringWithFormat:@"{<%@>}", self.currentPeripheralName]]; [self sendDeviceInfoToSocketByTimes:1];
//开始洗浴 //开始洗浴
if (self.isBegingBath == NO) { if (self.isBegingBath == NO) {
self.isBegingBath = YES; self.isBegingBath = YES;
...@@ -686,16 +674,6 @@ ...@@ -686,16 +674,6 @@
} }
// [self sendDeviceInfoToSocketByTimes:1];
// //三秒之后查看状态 如果还是没有收到 直接cancel掉所有连接 提示错误信息
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// if (self.isReciveDeviceInfo == NO) {
// [ZXTool hideLoadingAnimation];
// [SVProgressHUD showErrorWithStatus:@"未收到socket服务器响应的设备信息,请稍后再试!"];
// }
// });
for (CBCharacteristic *characteristic in service.characteristics) { for (CBCharacteristic *characteristic in service.characteristics) {
[peripheral setNotifyValue:YES forCharacteristic:characteristic]; [peripheral setNotifyValue:YES forCharacteristic:characteristic];
self.currentCharacteristic = characteristic; self.currentCharacteristic = characteristic;
...@@ -881,7 +859,7 @@ ...@@ -881,7 +859,7 @@
} else if ([text isEqualToString:@"[]"]) { } else if ([text isEqualToString:@"[]"]) {
} else if ([text isEqualToString:[NSString stringWithFormat:@"{<%@>}", self.currentPeripheralName]]) { } else if ([text isEqualToString:[NSString stringWithFormat:@"{<%@>}", self.currentPeripheralName]]) {
self.isReciveDeviceInfo = YES;
NSLog(@"=============收到服务器返回的设备号"); NSLog(@"=============收到服务器返回的设备号");
} else { } else {
//发送给蓝牙 //发送给蓝牙
......
// //
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
[self.offlineList removeAllObjects]; [self.offlineList removeAllObjects];
} }
completedBlock(YES); completedBlock(YES);
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
}); });
} else { } else {
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
@strongify(self); @strongify(self);
if (error) { if (error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[self.allMerthinList removeAllObjects]; [self.allMerthinList removeAllObjects];
[self.allMerthinList addObjectsFromArray:[ZXWashLocationModel findAll]]; [self.allMerthinList addObjectsFromArray:[ZXWashLocationModel findAll]];
completedBlock(YES); completedBlock(YES);
......
// //
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
//提示之后 重新回归扫码状态 //提示之后 重新回归扫码状态
[[NSNotificationCenter defaultCenter] postNotificationName:@"reStartScan_wash" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"reStartScan_wash" object:nil];
} else { } else {
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
//提示之后 重新回归扫码状态 //提示之后 重新回归扫码状态
[[NSNotificationCenter defaultCenter] postNotificationName:@"reStartScan_wash" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"reStartScan_wash" object:nil];
} else { } else {
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:dic completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:dic completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
completed(common.data); completed(common.data);
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodPOST url:url para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
//提示之后 重新回归扫码状态 //提示之后 重新回归扫码状态
[[NSNotificationCenter defaultCenter] postNotificationName:@"reStartScan_wash" object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:@"reStartScan_wash" object:nil];
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
[ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodGET url:url para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
completed(); completed();
} else { } else {
......
// //
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
@strongify(self); @strongify(self);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} else { } else {
ZXNewPayConfirmPayTypeModel *model = [ZXNewPayConfirmPayTypeModel mj_objectWithKeyValues:common.data]; ZXNewPayConfirmPayTypeModel *model = [ZXNewPayConfirmPayTypeModel mj_objectWithKeyValues:common.data];
...@@ -191,18 +191,18 @@ ...@@ -191,18 +191,18 @@
[ZXNotPay clearTable]; [ZXNotPay clearTable];
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[self paySuccessAndBackToRoot]; [self paySuccessAndBackToRoot];
[ZXTool showText:responseObject[@"msg"]]; [ZXTool showErrorMsg:responseObject[@"msg"]];
}); });
} else { } else {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[ZXTool showText:responseObject[@"msg"]]; [ZXTool showErrorMsg:responseObject[@"msg"]];
}); });
} }
} onFailure:^(NSError *error) { } onFailure:^(NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
[ZXTool showText:error.userInfo[@"NSLocalizedDescription"]]; [ZXTool showErrorMsg:error.userInfo[@"NSLocalizedDescription"]];
}); });
} onFinished:^(id responseObject, NSError *error) { } onFinished:^(id responseObject, NSError *error) {
}]; }];
......
// //
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} else { } else {
ZXNewPayOrder *order = [ZXNewPayOrder mj_objectWithKeyValues:common.data]; ZXNewPayOrder *order = [ZXNewPayOrder mj_objectWithKeyValues:common.data];
self.order = order; self.order = order;
......
// //
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
[self.myTableView.mj_header endRefreshing]; [self.myTableView.mj_header endRefreshing];
[self.myTableView.mj_footer endRefreshing]; [self.myTableView.mj_footer endRefreshing];
if (error) { if (error) {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} else { } else {
if ([self.lastOrderId isEqualToString:@""]) { if ([self.lastOrderId isEqualToString:@""]) {
[ZXNewPayOrder clearTable]; [ZXNewPayOrder clearTable];
......
// //
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
[self.myTableView reloadData]; [self.myTableView reloadData];
}); });
} else { } else {
[ZXTool showText:error]; [ZXTool showErrorMsg:error];
} }
}); });
}]; }];
......
// //
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
[wxLoginBtn mas_makeConstraints:^(MASConstraintMaker *make) { [wxLoginBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(36 * k6Scale); make.width.height.mas_equalTo(36 * k6Scale);
make.centerX.equalTo(self.view); make.centerX.equalTo(self.view);
make.bottom.equalTo(self.view.mas_bottom).offset(-30 * k6Scale); make.bottom.equalTo(self.view.mas_bottom).offset(-40 * k6Scale);
}]; }];
UILabel *label3 = [[UILabel alloc] init]; UILabel *label3 = [[UILabel alloc] init];
[self.view addSubview:label3]; [self.view addSubview:label3];
...@@ -103,6 +103,17 @@ ...@@ -103,6 +103,17 @@
make.centerY.equalTo(label3.mas_centerY); make.centerY.equalTo(label3.mas_centerY);
}]; }];
[wxLoginBtn addTarget:self action:@selector(wxLogin:) forControlEvents:UIControlEventTouchUpInside]; [wxLoginBtn addTarget:self action:@selector(wxLogin:) forControlEvents:UIControlEventTouchUpInside];
UILabel *versionLabel = [[UILabel alloc] init];
[self.view addSubview:versionLabel];
versionLabel.text = [NSString stringWithFormat:@"v %@", APPversion];
versionLabel.textColor = kTopicColor;
versionLabel.font = kFontSize(13 * k6Scale);
[versionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.view.mas_bottom).offset(-10 * k6Scale);
make.centerX.equalTo(self.view);
}];
} }
- (void) keyboardWillHide:(NSNotification *) nof { - (void) keyboardWillHide:(NSNotification *) nof {
......
// //
...@@ -21,7 +21,8 @@ typedef void(^checkIsOldCustomer)(BOOL isOld); ...@@ -21,7 +21,8 @@ typedef void(^checkIsOldCustomer)(BOOL isOld);
/*show alertText*/ /*show alertText*/
+(void) showText:(NSString *) text; +(void) showText:(NSString *) text;
//显示错误信息
+(void) showErrorMsg:(NSString *) msg;
+(void) showCustomMsg:(NSString *) msg; +(void) showCustomMsg:(NSString *) msg;
+(void) showCustomMsg:(NSAttributedString *) msg +(void) showCustomMsg:(NSAttributedString *) msg
......
// //
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#import "UserCenterModel.h" #import "UserCenterModel.h"
#import "MBProgressHUD+ShowTextMessage.h" #import "MBProgressHUD+ShowTextMessage.h"
#import "ZXMallViewController.h" #import "ZXMallViewController.h"
#import "ShowMsgView.h"
#import "ZXWebViewManager.h" #import "ZXWebViewManager.h"
#import <CommonCrypto/CommonDigest.h> #import <CommonCrypto/CommonDigest.h>
#import <Accelerate/Accelerate.h> #import <Accelerate/Accelerate.h>
...@@ -98,6 +98,16 @@ static ZXLoading *uploading = nil; ...@@ -98,6 +98,16 @@ static ZXLoading *uploading = nil;
}); });
} }
+(void) showErrorMsg:(NSString *) msg {
if ([msg isEqualToString:@"似乎已断开与互联网的连接。"]) {
msg = @"网络不可用,请检查网络设置重试~";
}
ShowMsgView *show = [[ShowMsgView alloc] initWithFrame:[UIScreen mainScreen].bounds msg:msg];
[show show];
}
+(void) showAlertText:(NSString *) text { +(void) showAlertText:(NSString *) text {
if (text == nil || [text isKindOfClass:[NSNull class]] || [text isEqualToString:@"<null>"]||[text isEqualToString:@""] ) { if (text == nil || [text isKindOfClass:[NSNull class]] || [text isEqualToString:@"<null>"]||[text isEqualToString:@""] ) {
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
<dict> <dict>
<key>aps-environment</key> <key>aps-environment</key>
<string>development</string> <string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:https://www.dcrym.com/checktomcatstatus/</string>
</array>
<key>keychain-access-groups</key> <key>keychain-access-groups</key>
<array> <array>
<string>$(AppIdentifierPrefix)com.pxkjformal.parallelcampus</string> <string>$(AppIdentifierPrefix)com.pxkjformal.parallelcampus</string>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.9.0</string> <string>3.9.1</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict> <dict>
......
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