Commit 2ceb1e20 by 刘卓鑫

3.9.21

parent f2620095
...@@ -5940,7 +5940,7 @@ ...@@ -5940,7 +5940,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.0; CURRENT_PROJECT_VERSION = 1.2;
DEVELOPMENT_TEAM = L3ZJL84KK4; DEVELOPMENT_TEAM = L3ZJL84KK4;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -6184,7 +6184,7 @@ ...@@ -6184,7 +6184,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.0; CURRENT_PROJECT_VERSION = 1.2;
DEVELOPMENT_TEAM = L3ZJL84KK4; DEVELOPMENT_TEAM = L3ZJL84KK4;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
...@@ -6292,7 +6292,7 @@ ...@@ -6292,7 +6292,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.0; CURRENT_PROJECT_VERSION = 1.2;
DEVELOPMENT_TEAM = L3ZJL84KK4; DEVELOPMENT_TEAM = L3ZJL84KK4;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1030" LastUpgradeVersion = "1120"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
...@@ -27,15 +27,6 @@ ...@@ -27,15 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9142D2B61F35C84E004F90CF"
BuildableName = "&#x591a;&#x5f69;&#x6821;&#x56ed;.app"
BlueprintName = "ColorfulSchool"
ReferencedContainer = "container:ColorfulSchool.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables> <Testables>
<TestableReference <TestableReference
skipped = "NO"> skipped = "NO">
...@@ -79,16 +70,9 @@ ...@@ -79,16 +70,9 @@
ReferencedContainer = "container:ColorfulSchool.xcodeproj"> ReferencedContainer = "container:ColorfulSchool.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "DYLD_PRINT_STATISTICS"
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction> </LaunchAction>
<ProfileAction <ProfileAction
buildConfiguration = "Debug" buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES" shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = "" savedToolIdentifier = ""
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
...@@ -108,7 +92,7 @@ ...@@ -108,7 +92,7 @@
buildConfiguration = "Debug"> buildConfiguration = "Debug">
</AnalyzeAction> </AnalyzeAction>
<ArchiveAction <ArchiveAction
buildConfiguration = "Debug" buildConfiguration = "Release"
revealArchiveInOrganizer = "YES"> revealArchiveInOrganizer = "YES">
</ArchiveAction> </ArchiveAction>
</Scheme> </Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>ColorfulSchool.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>25</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>9142D2B61F35C84E004F90CF</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>9142D2D21F35C84E004F90CF</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>9142D2DD1F35C84E004F90CF</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
_isPlaying = NO; _isPlaying = NO;
//启动环境 //启动环境
[APIManager sharedAPIManager].lauchEnvironment = ZXColorfulSchoolEnvironmentTest; [APIManager sharedAPIManager].lauchEnvironment = ZXColorfulSchoolEnvironmentProduct;
//极光推送 //极光推送
[self initPushWithOptions:launchOptions isProduct:YES]; [self initPushWithOptions:launchOptions isProduct:YES];
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
// [kAppWindow addSubview:fps]; // [kAppWindow addSubview:fps];
//默认配置 //默认配置
[self defaultLauchConfigAndIsOpenPreventCrashManager:NO]; [self defaultLauchConfigAndIsOpenPreventCrashManager:YES];
//防止蓝牙洗浴后台运行被系统中断 //防止蓝牙洗浴后台运行被系统中断
......
// //
...@@ -147,8 +147,8 @@ kSINGLETON_FOR_CLASS(APIManager) ...@@ -147,8 +147,8 @@ kSINGLETON_FOR_CLASS(APIManager)
[userDefaults setObject:@"8005" forKey:@"DCWashSocketPort"]; [userDefaults setObject:@"8005" forKey:@"DCWashSocketPort"];
[userDefaults setObject:@"other-tcp-mobile.dcrym.com" forKey:@"DCWashSocketUrl"]; [userDefaults setObject:@"other-tcp-mobile.dcrym.com" forKey:@"DCWashSocketUrl"];
[userDefaults setObject:@"http://product-task-appserv.168cad.top" forKey:@"Task"]; [userDefaults setObject:@"http://task-appserv.dcrym.com" forKey:@"Task"];
[userDefaults setObject:@"http://ex-dev-dcxy-static.168cad.top" forKey:@"TaskH5"]; [userDefaults setObject:@"http://dcxy-static.dcrym.com" forKey:@"TaskH5"];
[userDefaults synchronize]; [userDefaults synchronize];
break; break;
} }
......
// //
...@@ -496,14 +496,18 @@ ...@@ -496,14 +496,18 @@
} }
} }
#pragma mark - 淘宝 #pragma mark - 淘宝/小程序等跳转 - - - - -
- (void) taobaoWithDic:(NSDictionary *) dic { - (void) taobaoWithDic:(NSDictionary *) dic {
if ([dic[@"type"] isEqualToString:@"taobao"]) { if ([dic[@"type"] isEqualToString:@"taobao"]) {
NSString *item_id = dic[@"item_id"]; NSString *item_id = dic[@"item_id"];
NSString *jumpUrl = dic[@"jump_url"]; NSString *jumpUrl = dic[@"jump_url"];
NSString *code = dic[@"pwd"]; NSString *code = dic[@"pwd"];
if (code) { NSInteger hasCoupon = 0;
if (dic[@"hasCoupon"] && ([dic[@"hasCoupon"] integerValue] == 1)) {
hasCoupon = 1;
}
if (code && ![code isKindOfClass:[NSNull class]] && ![code isEqualToString:@""]) {
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = code; pasteboard.string = code;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
...@@ -526,33 +530,52 @@ ...@@ -526,33 +530,52 @@
return; return;
} }
NSString *url = [NSString stringWithFormat:@"%@/alimama/tbk/dg/material/optional/forItemId?pageNo=1&q=%@&deviceType=IMEI&deviceValue=02399123192391293123&cat=hot&itemId=%@&hasCoupon=0", [kUserDefaults objectForKey:@"HomePage"], dic[@"title"], item_id]; NSString *url = [NSString stringWithFormat:@"%@/alimama/tbk/dg/material/optional/forItemId?pageNo=1&q=%@&deviceType=IMEI&deviceValue=02399123192391293123&cat=hot&itemId=%@&hasCoupon=%ld", [kUserDefaults objectForKey:@"HomePage"], dic[@"title"], item_id, hasCoupon];
[[ZXAdViewService sharedManager] GET:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { [[ZXAdViewService sharedManager] GET:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
id res = responseObject[@"data"]; id res = responseObject[@"data"];
if (res) { if (res) {
if (res[@"couponShareUrl"]) { if (res[@"couponShareUrl"] && ![res[@"couponShareUrl"] isKindOfClass:[NSNull class]] && ![res[@"couponShareUrl"] isEqualToString:@""]) {
[self jumpTaobaoWithItem:res[@"couponShareUrl"]]; [self jumpTaobaoWithItem:res[@"couponShareUrl"]];
} else { } else {
if (res[@"url"]) { if (res[@"url"] && ![res[@"url"] isKindOfClass:[NSNull class]] && ![res[@"url"] isEqualToString:@""]) {
[self jumpTaobaoWithItem:res[@"url"]]; [self jumpTaobaoWithItem:res[@"url"]];
} else { } else {
[ZXTool showText:@"活动已下架,请关注后续活动!"]; dispatch_async(dispatch_get_main_queue(), ^{
if (jumpUrl) {
ZXBannerJumpViewController *jumpVc = [[ZXBannerJumpViewController alloc] init];
jumpVc.jumpUrl = jumpUrl;
jumpVc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:jumpVc animated:YES];
} else {
[ZXTool showText:@"活动已下架,请关注后续活动!"];
}
});
} }
} }
} else { } else {
dispatch_async(dispatch_get_main_queue(), ^{ if ([responseObject[@"code"] integerValue] == -2) {
if (jumpUrl) { dispatch_async(dispatch_get_main_queue(), ^{
ZXBannerJumpViewController *jumpVc = [[ZXBannerJumpViewController alloc] init]; [ZXTool hideLoadingAnimation];
jumpVc.jumpUrl = jumpUrl; [ZXTool showText:responseObject[@"msg"]];
jumpVc.hidesBottomBarWhenPushed = YES; [ZXTool backToLogin];
[self.navigationController pushViewController:jumpVc animated:YES]; });
} else { } else {
[ZXTool showText:@"活动已下架,请关注后续活动!"]; dispatch_async(dispatch_get_main_queue(), ^{
} if (jumpUrl) {
}); ZXBannerJumpViewController *jumpVc = [[ZXBannerJumpViewController alloc] init];
jumpVc.jumpUrl = jumpUrl;
jumpVc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:jumpVc animated:YES];
} else {
[ZXTool showText:@"活动已下架,请关注后续活动!"];
}
});
}
} }
} 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(), ^{
if (jumpUrl) { if (jumpUrl) {
ZXBannerJumpViewController *jumpVc = [[ZXBannerJumpViewController alloc] init]; ZXBannerJumpViewController *jumpVc = [[ZXBannerJumpViewController alloc] init];
...@@ -560,7 +583,7 @@ ...@@ -560,7 +583,7 @@
jumpVc.hidesBottomBarWhenPushed = YES; jumpVc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:jumpVc animated:YES]; [self.navigationController pushViewController:jumpVc animated:YES];
} else { } else {
[ZXTool showText:@"活动已下架,请关注后续活动!"]; [ZXTool showText:error.description];
} }
}); });
}]; }];
......
// //
...@@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -15,6 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
/* */ /* */
@property (nonatomic, copy) dispatch_block_t jumpToMall; @property (nonatomic, copy) dispatch_block_t jumpToMall;
- (void) tashShow;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
// //
...@@ -62,6 +62,8 @@ ...@@ -62,6 +62,8 @@
/** */ /** */
@property (nonatomic, strong) UIImagePickerController *imagePickerController; @property (nonatomic, strong) UIImagePickerController *imagePickerController;
/** 是否已经显示过任务弹窗 */
@property (nonatomic, assign) BOOL isShowTaskDialog;
@end @end
...@@ -109,19 +111,22 @@ ...@@ -109,19 +111,22 @@
if ([[kUserDefaults objectForKey:@"kAPP_IS_OPENB_TASK"] isEqualToString:@"yes"]) { if ([[kUserDefaults objectForKey:@"kAPP_IS_OPENB_TASK"] isEqualToString:@"yes"]) {
//查看任务相关内容 //查看任务相关内容
@weakify(self); [self tashShow];
[ZXTool requestDataHideLoadingToastWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/dcxy/api/tasks/homePage", [kUserDefaults objectForKey:@"Task"]] para:nil completed:^(CommonModel *common, NSString *error) {
@strongify(self);
if ([common.data boolValue]) {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
[self showTaskDialog];
});
}
}];
} }
} }
- (void) tashShow {
@weakify(self);
[ZXTool requestDataHideLoadingToastWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/dcxy/api/tasks/homePage", [kUserDefaults objectForKey:@"Task"]] para:nil completed:^(CommonModel *common, NSString *error) {
@strongify(self);
if ([common.data boolValue]) {
dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation];
[self showTaskDialog];
});
}
}];
}
- (void)viewWillLayoutSubviews { - (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews]; [super viewWillLayoutSubviews];
self.tabBarController.tabBar.hidden = NO; self.tabBarController.tabBar.hidden = NO;
...@@ -186,6 +191,10 @@ ...@@ -186,6 +191,10 @@
} }
#pragma mark - 显示领券弹窗 #pragma mark - 显示领券弹窗
- (void) showTaskDialog { - (void) showTaskDialog {
if (self.isShowTaskDialog) {
return;
}
self.isShowTaskDialog = YES;
UIView *taskBgView = [[UIView alloc] initWithFrame:UIScreen.mainScreen.bounds]; UIView *taskBgView = [[UIView alloc] initWithFrame:UIScreen.mainScreen.bounds];
[kAppWindow addSubview:taskBgView]; [kAppWindow addSubview:taskBgView];
...@@ -549,7 +558,7 @@ ...@@ -549,7 +558,7 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
ZXHomePageUpdateAppView *v = [[ZXHomePageUpdateAppView alloc] initWithUpdateModel:version]; ZXHomePageUpdateAppView *v = [[ZXHomePageUpdateAppView alloc] initWithUpdateModel:version];
v.frame = [UIScreen mainScreen].bounds; v.frame = [UIScreen mainScreen].bounds;
[self.tabBarController.view addSubview:v]; [self.tabBarController.view addSubview:v];
}); });
}]; }];
} }
......
// //
...@@ -413,7 +413,7 @@ ...@@ -413,7 +413,7 @@
[UIScrollView appearance].contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; //iOS11 解决SafeArea的问题,同时能解决pop时上级页面scrollView抖动的问题 [UIScrollView appearance].contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; //iOS11 解决SafeArea的问题,同时能解决pop时上级页面scrollView抖动的问题
} }
} }
- (void)viewWillDisappear:(BOOL)animated { - (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated]; [super viewWillDisappear:animated];
......
// //
...@@ -219,9 +219,10 @@ ...@@ -219,9 +219,10 @@
[self.bluetoothManager cutBluetoothAndSocketConnect]; [self.bluetoothManager cutBluetoothAndSocketConnect];
} }
} else { } else {
//预约 单独加载预约订单信息
[[NSNotificationCenter defaultCenter] postNotificationName:@"DC_RefreshFirsrPage_Data" object:nil];
if (self.order.orderType == 2) { if (self.order.orderType == 2) {
//预约 单独加载预约订单信息
[[NSNotificationCenter defaultCenter] postNotificationName:@"DC_RefreshFirsrPage_Data" object:nil];
[ZXTool showText:@"订单预约成功"]; [ZXTool showText:@"订单预约成功"];
[self backToFirst]; [self backToFirst];
} else { } else {
......
// //
...@@ -131,9 +131,13 @@ ...@@ -131,9 +131,13 @@
self.isServiceCut = NO;//标记为开始 self.isServiceCut = NO;//标记为开始
//直接请求接口 //直接请求接口
if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) { if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) {
self.isOpenDevice = YES;
[self.centralManager stopScan]; [self.centralManager stopScan];
[self.delegate startFireInterfaceByStatus:0]; if (self.isOpenDevice == NO) {
[self.delegate startFireInterfaceByStatus:0];
self.isOpenDevice = YES;//标记位开始了 避免重复调用接口
}
} }
} }
}; };
...@@ -152,9 +156,15 @@ ...@@ -152,9 +156,15 @@
[SVProgressHUD showWithStatus:@"设备启动中..."]; [SVProgressHUD showWithStatus:@"设备启动中..."];
[self sendDeviceInfoToSocketByTimes:3]; [self sendDeviceInfoToSocketByTimes:3];
if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) { if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) {
self.isOpenDevice = YES;
[self.centralManager stopScan]; [self.centralManager stopScan];
[self.delegate startFireInterfaceByStatus:1]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.isOpenDevice == NO) {
[self.delegate startFireInterfaceByStatus:1];
self.isOpenDevice = YES;//标记位开始了 避免重复调用接口
}
});
} }
return; return;
} }
...@@ -207,11 +217,15 @@ ...@@ -207,11 +217,15 @@
} else { } else {
//蓝牙+NB //蓝牙+NB
if (self.isOpenDevice == NO && self.isFirstInConnect == NO) { if (self.isOpenDevice == NO && self.isFirstInConnect == NO) {
self.isOpenDevice = YES;
//直接调用接口 //直接调用接口
if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) { if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) {
[self.centralManager stopScan]; [self.centralManager stopScan];
[self.delegate startFireInterfaceByStatus:0]; if (self.isOpenDevice == NO) {
[self.delegate startFireInterfaceByStatus:0];
self.isOpenDevice = YES;//标记位开始了 避免重复调用接口
}
} }
} }
} }
...@@ -360,9 +374,15 @@ ...@@ -360,9 +374,15 @@
if (self.isOpenDevice == NO && self.isFirstInConnect == NO) { if (self.isOpenDevice == NO && self.isFirstInConnect == NO) {
//调用接口 //调用接口
if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) { if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) {
self.isOpenDevice = YES;//标记为已经开始了
[self.centralManager stopScan]; [self.centralManager stopScan];
[self.delegate startFireInterfaceByStatus:1]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.isOpenDevice == NO) {
[self.delegate startFireInterfaceByStatus:1];
self.isOpenDevice = YES;//标记位开始了 避免重复调用接口
}
});
} }
} }
for (CBCharacteristic *characteristic in service.characteristics) { for (CBCharacteristic *characteristic in service.characteristics) {
...@@ -543,7 +563,15 @@ ...@@ -543,7 +563,15 @@
if (self.currentPeripheralName && (self.selectedPeripheral && self.selectedPeripheral.state == CBPeripheralStateConnected) && self.isOpenDevice == NO && self.isFirstInConnect == NO) { if (self.currentPeripheralName && (self.selectedPeripheral && self.selectedPeripheral.state == CBPeripheralStateConnected) && self.isOpenDevice == NO && self.isFirstInConnect == NO) {
if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) { if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) {
[self.centralManager stopScan]; [self.centralManager stopScan];
[self.delegate startFireInterfaceByStatus:1];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.isOpenDevice == NO) {
[self.delegate startFireInterfaceByStatus:1];
self.isOpenDevice = YES;//标记位开始了 避免重复调用接口
}
});
} }
} }
[self.clientSocket readDataWithTimeout:- 1 tag:0]; [self.clientSocket readDataWithTimeout:- 1 tag:0];
...@@ -567,9 +595,13 @@ ...@@ -567,9 +595,13 @@
NSLog(@"=============收到服务器的开启设备指令"); NSLog(@"=============收到服务器的开启设备指令");
if (self.isOpenDevice == NO && self.isFirstInConnect == NO) { if (self.isOpenDevice == NO && self.isFirstInConnect == NO) {
if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) { if ([self.delegate respondsToSelector:@selector(startFireInterfaceByStatus:)]) {
self.isOpenDevice = YES;//标记位开始了 避免重复调用接口
[self.centralManager stopScan]; [self.centralManager stopScan];
[self.delegate startFireInterfaceByStatus:2]; if (self.isOpenDevice == NO) {
[self.delegate startFireInterfaceByStatus:2];
self.isOpenDevice = YES;//标记位开始了 避免重复调用接口
}
} }
} }
} else if ([text containsString:[NSString stringWithFormat:@"[<%@,60", self.currentPeripheralName]]) { } else if ([text containsString:[NSString stringWithFormat:@"[<%@,60", self.currentPeripheralName]]) {
......
// //
...@@ -287,12 +287,13 @@ static NSString * const ID = @"CollectionCell"; ...@@ -287,12 +287,13 @@ static NSString * const ID = @"CollectionCell";
if ([[kUserDefaults objectForKey:kAPP_IS_OPENB_TK] isEqualToString:@"yes"]) { if ([[kUserDefaults objectForKey:kAPP_IS_OPENB_TK] isEqualToString:@"yes"]) {
UIButton *button = [[UIButton alloc] init]; UIButton *button = [[UIButton alloc] init];
[self.view addSubview:button]; [self.view addSubview:button];
[button setTitle:@"退款" forState:UIControlStateNormal]; // [button setTitle:@"退款" forState:UIControlStateNormal];
button.backgroundColor = [UIColor whiteColor]; // button.backgroundColor = [UIColor whiteColor];
button.titleLabel.font = kFontSize(12); // button.titleLabel.font = kFontSize(12);
[button setTitleColor:[UIColor colorWithHexString:@"#333333"] forState:UIControlStateNormal]; // [button setTitleColor:[UIColor colorWithHexString:@"#333333"] forState:UIControlStateNormal];
[button setBackgroundImage:[UIImage imageNamed:@"ic_tuikuan"] forState:UIControlStateNormal];
[button mas_makeConstraints:^(MASConstraintMaker *make) { [button mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(45 * k6Scale); make.width.mas_equalTo(37.3 * k6Scale);
make.height.mas_equalTo(20 * k6Scale); make.height.mas_equalTo(20 * k6Scale);
make.left.equalTo(self.aimiLabel.mas_right).offset(10 * k6Scale); make.left.equalTo(self.aimiLabel.mas_right).offset(10 * k6Scale);
make.centerY.equalTo(self.aimiLabel); make.centerY.equalTo(self.aimiLabel);
......
// //
...@@ -499,16 +499,17 @@ ...@@ -499,16 +499,17 @@
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error == nil) { if (error == nil) {
//直接弹 //直接弹
[self callBackToH5WithSuccess:YES]; [self callBackToH5WithSuccess:YES promptMsg:common.data[@"promptMsg"]];
} }
}); });
}]; }];
} }
#pragma mark - 回调前端已经任务完成 #pragma mark - 回调前端已经任务完成
- (void) callBackToH5WithSuccess:(BOOL) isSuccess { - (void) callBackToH5WithSuccess:(BOOL) isSuccess promptMsg:(NSString *) promptMsg {
//异常情况处理 //异常情况处理
[self.webView evaluateJavaScript:[NSString stringWithFormat:@"%@('%d', '%@')", self.jsFuncName, isSuccess, [ZXTaskManager sharedZXTaskManager].taskCode] completionHandler:^(id _Nullable res, NSError * _Nullable error) { [self.webView evaluateJavaScript:[NSString stringWithFormat:@"%@('%d', '%@', '%@')", self.jsFuncName, isSuccess, [ZXTaskManager sharedZXTaskManager].taskCode, promptMsg] completionHandler:^(id _Nullable res, NSError * _Nullable error) {
//清空taskid //清空taskid
ZXTaskManager.sharedZXTaskManager.taskCode = @""; ZXTaskManager.sharedZXTaskManager.taskCode = @"";
}]; }];
...@@ -595,7 +596,7 @@ ...@@ -595,7 +596,7 @@
if (self.rewardedAd.isAdValid) { if (self.rewardedAd.isAdValid) {
[self.rewardedAd showAdFromRootViewController:self.navigationController]; [self.rewardedAd showAdFromRootViewController:self.navigationController];
[self.reward load]; [self.rewardedAd loadAdData];
} }
} }
...@@ -606,7 +607,7 @@ ...@@ -606,7 +607,7 @@
- (void)nativeExpressRewardedVideoAd:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error { - (void)nativeExpressRewardedVideoAd:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error {
//预加载 //预加载
[self preloadCSJRewardAd]; [self.rewardedAd loadAdData];
} }
- (void)nativeExpressRewardedVideoAdDidDownLoadVideo:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdDidDownLoadVideo:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
...@@ -619,7 +620,7 @@ ...@@ -619,7 +620,7 @@
- (void)nativeExpressRewardedVideoAdViewRenderFail:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd error:(NSError *_Nullable)error { - (void)nativeExpressRewardedVideoAdViewRenderFail:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd error:(NSError *_Nullable)error {
//预加载 //预加载
[self preloadCSJRewardAd]; [self.rewardedAd loadAdData];
} }
- (void)nativeExpressRewardedVideoAdWillVisible:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdWillVisible:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
...@@ -630,15 +631,14 @@ ...@@ -630,15 +631,14 @@
} }
- (void)nativeExpressRewardedVideoAdWillClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdWillClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
//关闭视频 //关闭视频
[ZXTaskManager sharedZXTaskManager].isTaskCompleted = 1; [ZXTaskManager sharedZXTaskManager].isTaskCompleted = 1;
} }
- (void)nativeExpressRewardedVideoAdDidClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdDidClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
//已经关闭 重新架子啊一个
//预加载
[self preloadCSJRewardAd];
} }
- (void)nativeExpressRewardedVideoAdDidClick:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdDidClick:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
...@@ -718,6 +718,7 @@ ...@@ -718,6 +718,7 @@
- (void) showFullScreenVideo { - (void) showFullScreenVideo {
if (self.fullscreenAd.isAdValid) { if (self.fullscreenAd.isAdValid) {
[self.fullscreenAd showAdFromRootViewController:self.navigationController]; [self.fullscreenAd showAdFromRootViewController:self.navigationController];
[self.fullscreenAd loadAdData];
} }
} }
#pragma mark - BUFullscreenVideoAdDelegate #pragma mark - BUFullscreenVideoAdDelegate
...@@ -728,7 +729,7 @@ ...@@ -728,7 +729,7 @@
- (void)nativeExpressFullscreenVideoAd:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error { - (void)nativeExpressFullscreenVideoAd:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error {
NSLog(@"%s",__func__); NSLog(@"%s",__func__);
[self.fullscreenAd loadAdData];
} }
- (void)nativeExpressFullscreenVideoAdViewRenderSuccess:(BUNativeExpressFullscreenVideoAd *)rewardedVideoAd { - (void)nativeExpressFullscreenVideoAdViewRenderSuccess:(BUNativeExpressFullscreenVideoAd *)rewardedVideoAd {
...@@ -769,7 +770,7 @@ ...@@ -769,7 +770,7 @@
- (void)nativeExpressFullscreenVideoAdDidClose:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd { - (void)nativeExpressFullscreenVideoAdDidClose:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd {
NSLog(@"%s",__func__); NSLog(@"%s",__func__);
[self.fullscreenAd loadAdData];
} }
...@@ -946,7 +947,7 @@ ...@@ -946,7 +947,7 @@
viewController:self]; viewController:self];
self.tx_bannerAd.accessibilityIdentifier = @"banner_ad"; self.tx_bannerAd.accessibilityIdentifier = @"banner_ad";
self.tx_bannerAd.animated = YES; self.tx_bannerAd.animated = YES;
self.tx_bannerAd.autoSwitchInterval = 4; self.tx_bannerAd.autoSwitchInterval = 0;
self.tx_bannerAd.delegate = self; self.tx_bannerAd.delegate = self;
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>app需要你开启定位权限</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>zh_CN</string> <string>zh_CN</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
...@@ -482,6 +480,8 @@ ...@@ -482,6 +480,8 @@
<string>应用在蓝牙洗浴时需要蓝牙权限</string> <string>应用在蓝牙洗浴时需要蓝牙权限</string>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>应用在紫宇洗衣、蓝牙洗浴等自助服务扫码时需要访问相机功能</string> <string>应用在紫宇洗衣、蓝牙洗浴等自助服务扫码时需要访问相机功能</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>app需要你开启定位权限</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>应用需要访问相册功能</string> <string>应用需要访问相册功能</string>
<key>UIAppFonts</key> <key>UIAppFonts</key>
......
// //
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
//设置默认tabBar选项; //设置默认tabBar选项;
} }
/** */
@property (nonatomic, strong) ZXHomePageViewController * homeView;
/** 开关集合 */ /** 开关集合 */
@property (nonatomic, strong) NSMutableArray *switchs; @property (nonatomic, strong) NSMutableArray *switchs;
/** */ /** */
...@@ -115,6 +116,9 @@ ...@@ -115,6 +116,9 @@
} }
if ([dic[@"type"] isEqualToString:@"15"] && [dic[@"isEnabled"] integerValue] == 1) { if ([dic[@"type"] isEqualToString:@"15"] && [dic[@"isEnabled"] integerValue] == 1) {
[kUserDefaults setValue:@"yes" forKey:kAPP_IS_OPENB_TK];//默认是no [kUserDefaults setValue:@"yes" forKey:kAPP_IS_OPENB_TK];//默认是no
dispatch_async(dispatch_get_main_queue(), ^{
[self.homeView tashShow];
});
} }
} }
...@@ -140,15 +144,15 @@ ...@@ -140,15 +144,15 @@
- (void)setupAllChildViewController - (void)setupAllChildViewController
{ {
//首页 //首页
ZXHomePageViewController * homeView = [[ZXHomePageViewController alloc]init]; self.homeView = [[ZXHomePageViewController alloc]init];
@weakify(self); @weakify(self);
homeView.jumpToMall = ^{ self.homeView.jumpToMall = ^{
@strongify(self); @strongify(self);
//MARK:跳转商城 //MARK:跳转商城
[self selectPageIndex:5 fromIndex:0]; [self selectPageIndex:5 fromIndex:0];
}; };
nav =[[XMGNavigationViewController alloc]initWithRootViewController:homeView]; nav =[[XMGNavigationViewController alloc]initWithRootViewController:self.homeView];
// //
ZXAliMaMaManagerViewController *aliMaVc = [[ZXAliMaMaManagerViewController alloc] init]; ZXAliMaMaManagerViewController *aliMaVc = [[ZXAliMaMaManagerViewController alloc] init];
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_tuikuan.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_tuikuan@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_tuikuan@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -8,126 +8,176 @@ ...@@ -8,126 +8,176 @@
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>0</integer>
</dict> </dict>
<key>Bugly.xcscheme</key> <key>Bugly.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>1</integer>
</dict> </dict>
<key>Bytedance-UnionAD.xcscheme</key> <key>Bytedance-UnionAD.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>2</integer>
</dict> </dict>
<key>DTCoreText-Resources.xcscheme</key> <key>DTCoreText-Resources.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>4</integer>
</dict> </dict>
<key>DTCoreText.xcscheme</key> <key>DTCoreText.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>3</integer>
</dict> </dict>
<key>DTFoundation.xcscheme</key> <key>DTFoundation.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>5</integer>
</dict> </dict>
<key>FMDB.xcscheme</key> <key>FMDB.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>6</integer>
</dict> </dict>
<key>HappyDNS.xcscheme</key> <key>HappyDNS.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>7</integer>
</dict> </dict>
<key>IQKeyboardManager.xcscheme</key> <key>IQKeyboardManager.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>8</integer>
</dict> </dict>
<key>JCore.xcscheme</key> <key>JCore.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>9</integer>
</dict> </dict>
<key>JJException.xcscheme</key> <key>JJException.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>10</integer>
</dict> </dict>
<key>JPush.xcscheme</key> <key>JPush.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>11</integer>
</dict> </dict>
<key>JXCategoryView.xcscheme</key> <key>JXCategoryView.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>12</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>14</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>15</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>13</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>16</integer>
</dict> </dict>
<key>Qiniu.xcscheme</key> <key>Qiniu.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>17</integer>
</dict> </dict>
<key>ReactiveCocoa.xcscheme</key> <key>ReactiveCocoa.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>18</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>19</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>20</integer>
</dict> </dict>
<key>UMCAnalytics.xcscheme</key> <key>UMCAnalytics.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>21</integer>
</dict> </dict>
<key>UMCCommon.xcscheme</key> <key>UMCCommon.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>22</integer>
</dict> </dict>
<key>UMCCommonLog.xcscheme</key> <key>UMCCommonLog.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
<false/> <false/>
<key>orderHint</key>
<integer>23</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>24</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