Commit b611ce6c by 刘卓鑫

任务bug修改

parent cdbeba74
...@@ -123,6 +123,7 @@ ...@@ -123,6 +123,7 @@
1CB9AF72237102B500ED0434 /* DC_ZXWashOrderListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9AF50237102B400ED0434 /* DC_ZXWashOrderListModel.m */; }; 1CB9AF72237102B500ED0434 /* DC_ZXWashOrderListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9AF50237102B400ED0434 /* DC_ZXWashOrderListModel.m */; };
1CB9AF73237102B500ED0434 /* DC_ZXWashMerthinModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9AF51237102B400ED0434 /* DC_ZXWashMerthinModel.m */; }; 1CB9AF73237102B500ED0434 /* DC_ZXWashMerthinModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9AF51237102B400ED0434 /* DC_ZXWashMerthinModel.m */; };
1CB9AF74237102B500ED0434 /* DC_ZXWashLocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9AF56237102B400ED0434 /* DC_ZXWashLocationModel.m */; }; 1CB9AF74237102B500ED0434 /* DC_ZXWashLocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CB9AF56237102B400ED0434 /* DC_ZXWashLocationModel.m */; };
1CBB66172390C11D00351692 /* ad_close.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CBB66162390C11D00351692 /* ad_close.png */; };
1CBDE2C6238D0436006DA46E /* ZXTaskManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CBDE2C5238D0435006DA46E /* ZXTaskManager.m */; }; 1CBDE2C6238D0436006DA46E /* ZXTaskManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CBDE2C5238D0435006DA46E /* ZXTaskManager.m */; };
1CC15429230D5B7400582EC1 /* ZXAimiWalletAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CC15428230D5B7400582EC1 /* ZXAimiWalletAlertView.m */; }; 1CC15429230D5B7400582EC1 /* ZXAimiWalletAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CC15428230D5B7400582EC1 /* ZXAimiWalletAlertView.m */; };
1CC1542D230D6E3600582EC1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1CC1542C230D6E3600582EC1 /* LaunchScreen.storyboard */; }; 1CC1542D230D6E3600582EC1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1CC1542C230D6E3600582EC1 /* LaunchScreen.storyboard */; };
...@@ -956,6 +957,7 @@ ...@@ -956,6 +957,7 @@
1CB9AF55237102B400ED0434 /* DC_ZXWashOrderListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DC_ZXWashOrderListModel.h; sourceTree = "<group>"; }; 1CB9AF55237102B400ED0434 /* DC_ZXWashOrderListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DC_ZXWashOrderListModel.h; sourceTree = "<group>"; };
1CB9AF56237102B400ED0434 /* DC_ZXWashLocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DC_ZXWashLocationModel.m; sourceTree = "<group>"; }; 1CB9AF56237102B400ED0434 /* DC_ZXWashLocationModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DC_ZXWashLocationModel.m; sourceTree = "<group>"; };
1CB9AF57237102B400ED0434 /* DC_ZXWashMerthinModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DC_ZXWashMerthinModel.h; sourceTree = "<group>"; }; 1CB9AF57237102B400ED0434 /* DC_ZXWashMerthinModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DC_ZXWashMerthinModel.h; sourceTree = "<group>"; };
1CBB66162390C11D00351692 /* ad_close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ad_close.png; sourceTree = "<group>"; };
1CBDE2C4238D0435006DA46E /* ZXTaskManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZXTaskManager.h; sourceTree = "<group>"; }; 1CBDE2C4238D0435006DA46E /* ZXTaskManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZXTaskManager.h; sourceTree = "<group>"; };
1CBDE2C5238D0435006DA46E /* ZXTaskManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZXTaskManager.m; sourceTree = "<group>"; }; 1CBDE2C5238D0435006DA46E /* ZXTaskManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZXTaskManager.m; sourceTree = "<group>"; };
1CC15427230D5B7400582EC1 /* ZXAimiWalletAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZXAimiWalletAlertView.h; sourceTree = "<group>"; }; 1CC15427230D5B7400582EC1 /* ZXAimiWalletAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZXAimiWalletAlertView.h; sourceTree = "<group>"; };
...@@ -3627,6 +3629,7 @@ ...@@ -3627,6 +3629,7 @@
A7200868210EF6A600BE2DC6 /* ssssaaaaff.png */, A7200868210EF6A600BE2DC6 /* ssssaaaaff.png */,
A7DECC652079F0E20039EC22 /* ss.gif */, A7DECC652079F0E20039EC22 /* ss.gif */,
A7BFF1D620D115A300CE350A /* 查看全部@2x.png */, A7BFF1D620D115A300CE350A /* 查看全部@2x.png */,
1CBB66162390C11D00351692 /* ad_close.png */,
A7265BEC20CA3FAE0084B814 /* close-operation.png */, A7265BEC20CA3FAE0084B814 /* close-operation.png */,
A7265BE720CA3AEE0084B814 /* menu-holder@2x.png */, A7265BE720CA3AEE0084B814 /* menu-holder@2x.png */,
); );
...@@ -5161,6 +5164,7 @@ ...@@ -5161,6 +5164,7 @@
A72BE4B821D5CD030069C0E1 /* AlertStyleSimple.xib in Resources */, A72BE4B821D5CD030069C0E1 /* AlertStyleSimple.xib in Resources */,
A705C00221D4B067004F1628 /* ImageSelectedOn.png in Resources */, A705C00221D4B067004F1628 /* ImageSelectedOn.png in Resources */,
A7B058A5211AD1AF00304B38 /* README.txt in Resources */, A7B058A5211AD1AF00304B38 /* README.txt in Resources */,
1CBB66172390C11D00351692 /* ad_close.png in Resources */,
A705C01421D4B067004F1628 /* UIBarButtonItemGrid@2x.png in Resources */, A705C01421D4B067004F1628 /* UIBarButtonItemGrid@2x.png in Resources */,
A78A3F4021952EE7001558A5 /* orderSound.wav in Resources */, A78A3F4021952EE7001558A5 /* orderSound.wav in Resources */,
); );
......
...@@ -34,38 +34,6 @@ ...@@ -34,38 +34,6 @@
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent <BreakpointContent
uuid = "F38EFD70-E808-4913-87DE-8931053D77E1"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "93"
endingLineNumber = "93"
landmarkName = "-nativeExpressRewardedVideoAdDidLoad:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "7CDAC643-8501-4CA2-81EA-23162966F16C"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "97"
endingLineNumber = "97"
landmarkName = "-nativeExpressRewardedVideoAd:didFailWithError:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "6EDFFD59-E444-4924-805F-44A7B75E56A5" uuid = "6EDFFD59-E444-4924-805F-44A7B75E56A5"
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
...@@ -73,9 +41,9 @@ ...@@ -73,9 +41,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "101" startingLineNumber = "102"
endingLineNumber = "101" endingLineNumber = "102"
landmarkName = "-nativeExpressRewardedVideoAdDidDownLoadVideo:" landmarkName = "-createRewardedVideoAdWithController:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -89,9 +57,9 @@ ...@@ -89,9 +57,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "105" startingLineNumber = "106"
endingLineNumber = "105" endingLineNumber = "106"
landmarkName = "-nativeExpressRewardedVideoAdViewRenderSuccess:" landmarkName = "-createRewardedVideoAdWithController:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -105,9 +73,9 @@ ...@@ -105,9 +73,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "109" startingLineNumber = "110"
endingLineNumber = "109" endingLineNumber = "110"
landmarkName = "-nativeExpressRewardedVideoAdViewRenderFail:error:" landmarkName = "-nativeExpressRewardedVideoAdDidLoad:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -121,9 +89,9 @@ ...@@ -121,9 +89,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "113" startingLineNumber = "114"
endingLineNumber = "113" endingLineNumber = "114"
landmarkName = "-nativeExpressRewardedVideoAdWillVisible:" landmarkName = "-nativeExpressRewardedVideoAd:didFailWithError:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -137,9 +105,9 @@ ...@@ -137,9 +105,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "117" startingLineNumber = "118"
endingLineNumber = "117" endingLineNumber = "118"
landmarkName = "-nativeExpressRewardedVideoAdDidVisible:" landmarkName = "-nativeExpressRewardedVideoAdDidDownLoadVideo:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -153,9 +121,9 @@ ...@@ -153,9 +121,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "121" startingLineNumber = "122"
endingLineNumber = "121" endingLineNumber = "122"
landmarkName = "-nativeExpressRewardedVideoAdWillClose:" landmarkName = "-nativeExpressRewardedVideoAdViewRenderSuccess:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -169,9 +137,9 @@ ...@@ -169,9 +137,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "130" startingLineNumber = "131"
endingLineNumber = "130" endingLineNumber = "131"
landmarkName = "-nativeExpressRewardedVideoAdDidClick:" landmarkName = "-nativeExpressRewardedVideoAdWillVisible:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -185,9 +153,9 @@ ...@@ -185,9 +153,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "126" startingLineNumber = "127"
endingLineNumber = "126" endingLineNumber = "127"
landmarkName = "-nativeExpressRewardedVideoAdDidClose:" landmarkName = "-nativeExpressRewardedVideoAdViewRenderFail:error:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -201,9 +169,9 @@ ...@@ -201,9 +169,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "134" startingLineNumber = "135"
endingLineNumber = "134" endingLineNumber = "135"
landmarkName = "-nativeExpressRewardedVideoAdDidClickSkip:" landmarkName = "-nativeExpressRewardedVideoAdDidVisible:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -217,9 +185,9 @@ ...@@ -217,9 +185,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "142" startingLineNumber = "143"
endingLineNumber = "142" endingLineNumber = "143"
landmarkName = "-nativeExpressRewardedVideoAdServerRewardDidSucceed:verify:" landmarkName = "-nativeExpressRewardedVideoAdDidClose:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -233,9 +201,9 @@ ...@@ -233,9 +201,9 @@
filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m" filePath = "ColorfulSchool/Classes/AD(&#x5e7f;&#x544a;)/BUAD/BUADTool.m"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "146" startingLineNumber = "147"
endingLineNumber = "146" endingLineNumber = "147"
landmarkName = "-nativeExpressRewardedVideoAdServerRewardDidFail:" landmarkName = "-nativeExpressRewardedVideoAdDidClick:"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
_isPlaying = NO; _isPlaying = NO;
//启动环境 //启动环境
[APIManager sharedAPIManager].lauchEnvironment = ZXColorfulSchoolEnvironmentDevelop; [APIManager sharedAPIManager].lauchEnvironment = ZXColorfulSchoolEnvironmentTest;
//极光推送 //极光推送
[self initPushWithOptions:launchOptions isProduct:YES]; [self initPushWithOptions:launchOptions isProduct:YES];
......
// //
...@@ -16,9 +16,9 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -16,9 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
- (void) loadLauchAdByDelegate:(id) delagte; - (void) loadLauchAdByDelegate:(id) delagte;
- (void) loadBannerAdWithController:(UIViewController *) viewController superView:(UIView *) superView; - (void) loadBannerAdWithController:(UIViewController *) viewController superView:(UIView *) superView isFirstPage:(BOOL) isFirst;
- (void) loadBannerAdWithController:(UIViewController *) viewController superView:(UIView *) superView ;
//创建激励视频 //创建激励视频
- (void) createRewardedVideoAdWithController:(UIViewController *) viewController; - (void) createRewardedVideoAdWithController:(UIViewController *) viewController;
......
// //
...@@ -59,19 +59,37 @@ ...@@ -59,19 +59,37 @@
NSLog(@"穿山甲开屏广告加载失败"); NSLog(@"穿山甲开屏广告加载失败");
} }
- (void) loadBannerAdWithController:(UIViewController *) viewController superView:(UIView *) superView { - (void) loadBannerAdWithController:(UIViewController *) viewController superView:(UIView *) superView isFirstPage:(BOOL) isFirst {
// splash AD demo // splash AD demo
BUSize *imgSize = [BUSize sizeBy:BUProposalSize_Banner600_90]; BUSize *imgSize = [BUSize sizeBy:BUProposalSize_Banner600_90];
CGFloat bannerHeigh = kScreenWidth/600*90; CGFloat bannerHeigh = kScreenWidth/600*90;
if (self.bannerView == nil) { if (self.bannerView == nil) {
self.bannerView = [[BUNativeExpressBannerView alloc] initWithSlotID:@"933112579" rootViewController:viewController imgSize:imgSize adSize:CGSizeMake(kScreenWidth, bannerHeigh) IsSupportDeepLink:YES]; self.bannerView = [[BUNativeExpressBannerView alloc] initWithSlotID:@"933112579" rootViewController:viewController imgSize:imgSize adSize:CGSizeMake(kScreenWidth, bannerHeigh) IsSupportDeepLink:YES];
self.bannerView.frame = CGRectMake(0, kScreenWidth * 0.3 + 10 * k6Scale - bannerHeigh, kScreenWidth, bannerHeigh);
self.bannerView.delegate = self; self.bannerView.delegate = self;
[superView addSubview:self.bannerView]; [superView addSubview:self.bannerView];
[self.bannerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(superView.mas_bottom).offset(isFirst?-kTabBarHeight:0);
make.left.right.equalTo(superView);
make.height.mas_equalTo(bannerHeigh);
}];
}
[self.bannerView loadAdData];
}
- (void) loadBannerAdWithController:(UIViewController *) viewController superView:(UIView *) superView {
// splash AD demo
BUSize *imgSize = [BUSize sizeBy:BUProposalSize_Banner600_90];
CGFloat bannerHeigh = kScreenWidth/600*90;
if (self.bannerView == nil) {
self.bannerView = [[BUNativeExpressBannerView alloc] initWithSlotID:@"933112579" rootViewController:viewController imgSize:imgSize adSize:CGSizeMake(kScreenWidth, bannerHeigh) IsSupportDeepLink:YES];
self.bannerView.delegate = self;
[superView insertSubview:self.bannerView atIndex:0];
[self.bannerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.left.right.equalTo(superView);
make.height.mas_equalTo(bannerHeigh);
}];
} }
[self.bannerView loadAdData]; [self.bannerView loadAdData];
} }
- (void)createRewardedVideoAdWithController:(UIViewController *)viewController { - (void)createRewardedVideoAdWithController:(UIViewController *)viewController {
......
// //
...@@ -73,7 +73,8 @@ static NSString *kFailurMsg = @"数据加载失败,请检查一下当前网络 ...@@ -73,7 +73,8 @@ static NSString *kFailurMsg = @"数据加载失败,请检查一下当前网络
#define kAPP_SELP_ADVIEW_SHOW @"selfhelpQrcodeSwitch" #define kAPP_SELP_ADVIEW_SHOW @"selfhelpQrcodeSwitch"
//app我的页面刷新广告时间 //app我的页面刷新广告时间
#define kAPP_ME_REFRESHAD @"kAPP_ME_REFRESHAD" #define kAPP_ME_REFRESHAD @"kAPP_ME_REFRESHAD"
//app是否开启了任务
#define kAPP_IS_OPENB_TASK @"kAPP_IS_OPENB_TASK"
/*首页的key和value--对应rootUrl*/ /*首页的key和value--对应rootUrl*/
......
// //
...@@ -19,6 +19,19 @@ ...@@ -19,6 +19,19 @@
@implementation CustomerTabbar @implementation CustomerTabbar
- (void)setSwitchs:(NSArray *)switchs { - (void)setSwitchs:(NSArray *)switchs {
_switchs = switchs; _switchs = switchs;
NSDictionary *task;
for (NSDictionary *dic in _switchs) {
if ([dic[@"type"] isEqualToString:@"14"]) {
task = dic;
}
}
if (task) {
NSMutableArray *arrr = [[NSMutableArray alloc] initWithArray:_switchs];
[arrr removeObject:task];
[arrr addObject:task];
switchs = arrr.copy;
}
self.layer.shadowColor = RGB(210, 210, 210).CGColor; self.layer.shadowColor = RGB(210, 210, 210).CGColor;
self.layer.shadowOffset = CGSizeMake(0, -6); self.layer.shadowOffset = CGSizeMake(0, -6);
self.layer.shadowOpacity = 0.3; self.layer.shadowOpacity = 0.3;
...@@ -38,10 +51,12 @@ ...@@ -38,10 +51,12 @@
[titleArray addObject:@"多彩"]; [titleArray addObject:@"多彩"];
[imagesArray addObject:@"ic_duocai_nor"]; [imagesArray addObject:@"ic_duocai_nor"];
[selectImagesArray addObject:@"ic_duocai_sel"]; [selectImagesArray addObject:@"ic_duocai_sel"];
BOOL isHasSc = NO;
for (NSDictionary *dic in switchs) { for (NSDictionary *dic in switchs) {
if ([dic[@"type"] isEqualToString:@"2"]) { if ([dic[@"type"] isEqualToString:@"2"]) {
isHasSc = YES; [titleArray addObject:@"商城"];
[imagesArray addObject:@"ic_shequ_nor"];
[selectImagesArray addObject:@"ic_shequ_sel"];
} else if ([dic[@"type"] isEqualToString:@"1"]) { } else if ([dic[@"type"] isEqualToString:@"1"]) {
[titleArray addObject:@"发现"]; [titleArray addObject:@"发现"];
[imagesArray addObject:@"ic_faxian_nor"]; [imagesArray addObject:@"ic_faxian_nor"];
...@@ -54,21 +69,26 @@ ...@@ -54,21 +69,26 @@
[titleArray addObject:@"短视频"]; [titleArray addObject:@"短视频"];
[imagesArray addObject:@"nav_video_nor"]; [imagesArray addObject:@"nav_video_nor"];
[selectImagesArray addObject:@"nav_video_sel"]; [selectImagesArray addObject:@"nav_video_sel"];
} else if ([dic[@"type"] isEqualToString:@"14"]) { } if ([dic[@"type"] isEqualToString:@"14"]) {
[titleArray addObject:@"任务"]; [titleArray addObject:@"任务"];
[imagesArray addObject:@"nav_video_nor"]; [imagesArray addObject:@"nav_renwu_nor"];
[selectImagesArray addObject:@"nav_video_sel"]; [selectImagesArray addObject:@"nav_renwu_sel"];
} }
} }
if (isHasSc) { // if (isHasSc) {
[titleArray addObject:@"商城"]; // // [titleArray insertObject:@"商城" atIndex:titleArray.count-1];
[imagesArray addObject:@"ic_shequ_nor"]; // // [imagesArray insertObject:@"ic_shequ_nor" atIndex:titleArray.count-1];
[selectImagesArray addObject:@"ic_shequ_sel"]; // // [selectImagesArray insertObject:@"ic_shequ_sel" atIndex:titleArray.count-1];
} //
//
// }
//添加我的 //添加我的
[titleArray addObject:@"我的"]; [titleArray addObject:@"我的"];
[imagesArray addObject:@"ic_wode_nor"]; [imagesArray addObject:@"ic_wode_nor"];
[selectImagesArray addObject:@"ic_wode_sel"]; [selectImagesArray addObject:@"ic_wode_sel"];
CGFloat count = titleArray.count; CGFloat count = titleArray.count;
CGFloat W = kScreenWidth / count; CGFloat W = kScreenWidth / count;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
......
// //
...@@ -498,16 +498,16 @@ ...@@ -498,16 +498,16 @@
#pragma mark - 淘宝 #pragma mark - 淘宝
- (void) taobaoWithDic:(NSDictionary *) dic { - (void) taobaoWithDic:(NSDictionary *) dic {
NSString *item_id = dic[@"item_id"];
NSString *jumpUrl = dic[@"jump_url"];
if ([dic[@"type"] isEqualToString:@"taobao"]) { if ([dic[@"type"] isEqualToString:@"taobao"]) {
NSString *item_id = dic[@"item_id"];
NSString *jumpUrl = dic[@"jump_url"];
NSString *code = dic[@"pwd"]; NSString *code = dic[@"pwd"];
if (code) { if (code) {
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(), ^{
NSURL *URL = [NSURL URLWithString:@"taobao://"]; NSURL *URL = [NSURL URLWithString:@"taobao://"];
if ([[UIApplication sharedApplication] canOpenURL:URL]) { if ([[UIApplication sharedApplication] canOpenURL:URL]) {
[[UIApplication sharedApplication] openURL:URL]; [[UIApplication sharedApplication] openURL:URL];
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,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:@"活动已下架,请关注后续活动!"];
} }
} }
...@@ -564,6 +564,16 @@ ...@@ -564,6 +564,16 @@
} }
}); });
}]; }];
} else if ([dic[@"type"] isEqualToString:@"wxmini"]) {
//跳转微信小程序
NSString *appID = dic[@"appId"];
[WXApi registerApp:appID?appID:@"wx41cd01f1eb664e21"];
WXLaunchMiniProgramReq *req = [[WXLaunchMiniProgramReq alloc] init];
req.userName = dic[@"id"];
req.path = dic[@"url"];
req.miniProgramType = WXMiniProgramTypePreview;
[WXApi sendReq:req];
} }
} }
......
// //
...@@ -107,7 +107,20 @@ ...@@ -107,7 +107,20 @@
// }]; // }];
if ([[kUserDefaults objectForKey:@"kAPP_IS_OPENB_TASK"] isEqualToString:@"yes"]) {
//查看任务相关内容
@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];
...@@ -168,18 +181,7 @@ ...@@ -168,18 +181,7 @@
} }
//查看任务相关内容
@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];
});
}
}];
} }
#pragma mark - 显示领券弹窗 #pragma mark - 显示领券弹窗
...@@ -194,28 +196,30 @@ ...@@ -194,28 +196,30 @@
imageV.userInteractionEnabled = YES; imageV.userInteractionEnabled = YES;
[taskBgView addSubview:imageV]; [taskBgView addSubview:imageV];
[imageV mas_makeConstraints:^(MASConstraintMaker *make) { [imageV mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(taskBgView.mas_centerX); make.center.equalTo(taskBgView);
make.top.equalTo(taskBgView.mas_top).offset(kTopHeight + 70 * k6Scale); make.width.mas_equalTo(307 * k6Scale);
make.width.mas_equalTo(355 * k6Scale); make.height.mas_equalTo(307 * k6Scale * image.size.height / image.size.width);
make.height.mas_equalTo(355 * k6Scale * image.size.height / image.size.width);
}]; }];
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init]; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
[imageV addGestureRecognizer:tap]; [imageV addGestureRecognizer:tap];
@weakify(self); @weakify(self);
[[tap rac_gestureSignal] subscribeNext:^(id x) { [[tap rac_gestureSignal] subscribeNext:^(id x) {
@strongify(self); @strongify(self);
taskBgView.hidden = YES;
[taskBgView removeFromSuperview];
ZXTaskViewController *taskVc = [[ZXTaskViewController alloc] init]; ZXTaskViewController *taskVc = [[ZXTaskViewController alloc] init];
taskVc.jumpUrl = [NSString stringWithFormat:@"%@/taskApp/coupon.html?token=%@", [kUserDefaults objectForKey:@"TaskH5"], CacheToken]; taskVc.jumpUrl = [NSString stringWithFormat:@"%@/taskApp/coupon.html?token=%@", [kUserDefaults objectForKey:@"TaskH5"], CacheToken];
taskVc.hidesBottomBarWhenPushed = YES; taskVc.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:taskVc animated:YES]; [self.navigationController pushViewController:taskVc animated:YES];
}]; }];
enlargeClickRegionBtn *closeButton = [[enlargeClickRegionBtn alloc] init]; UIButton *closeButton = [[UIButton alloc] init];
[taskBgView addSubview:closeButton]; [taskBgView addSubview:closeButton];
[closeButton setBackgroundImage:[UIImage imageNamed:@"task_close"] forState:UIControlStateNormal];
[closeButton mas_makeConstraints:^(MASConstraintMaker *make) { [closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(31 * k6Scale); make.width.mas_equalTo(150 * k6Scale);
make.centerX.equalTo(taskBgView); make.height.mas_equalTo(200 * k6Scale);
make.top.equalTo(imageV.mas_bottom); make.right.equalTo(imageV);
make.top.equalTo(imageV);
}]; }];
[[closeButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) { [[closeButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
taskBgView.hidden = YES; taskBgView.hidden = YES;
......
// //
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/** 推送开关描述 */ /** 推送开关描述 */
@property (nonatomic, copy) NSString *des; @property (nonatomic, copy) NSString *des;
@property (nonatomic, strong) NSArray *consumeRefundOrders;
@end @end
// //
...@@ -84,27 +84,28 @@ ...@@ -84,27 +84,28 @@
if ([[kUserDefaults objectForKey:kAPP_SELP_ADVIEW_SHOW] isEqualToString:@"yes"]) { if ([[kUserDefaults objectForKey:kAPP_SELP_ADVIEW_SHOW] isEqualToString:@"yes"]) {
UIView *adSuperView = [[UIView alloc] init]; [[[BUADTool alloc] init] loadBannerAdWithController:self superView:self.view isFirstPage:NO];
[self.view addSubview:adSuperView]; // UIView *adSuperView = [[UIView alloc] init];
adSuperView.backgroundColor = UIColor.whiteColor; // [self.view addSubview:adSuperView];
[adSuperView mas_makeConstraints:^(MASConstraintMaker *make) { // adSuperView.backgroundColor = UIColor.whiteColor;
make.left.right.bottom.equalTo(self.view); // [adSuperView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(kScreenWidth * 0.3 + 10 * k6Scale); // make.left.right.bottom.equalTo(self.view);
}]; // make.height.mas_equalTo(kScreenWidth * 0.3 + 10 * k6Scale);
enlargeClickRegionBtn *closeButton = [[enlargeClickRegionBtn alloc] init]; // }];
[closeButton setBackgroundImage:[UIImage imageNamed:@"task_close"] forState:UIControlStateNormal]; // enlargeClickRegionBtn *closeButton = [[enlargeClickRegionBtn alloc] init];
[adSuperView addSubview:closeButton]; // [closeButton setBackgroundImage:[UIImage imageNamed:@"task_close"] forState:UIControlStateNormal];
[closeButton mas_makeConstraints:^(MASConstraintMaker *make) { // [adSuperView addSubview:closeButton];
make.right.top.equalTo(adSuperView); // [closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(20 * k6Scale); // make.right.top.equalTo(adSuperView);
}]; // make.width.height.mas_equalTo(20 * k6Scale);
[adSuperView bringSubviewToFront:closeButton]; // }];
[[closeButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) { // [adSuperView bringSubviewToFront:closeButton];
adSuperView.hidden = YES; // [[closeButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
[adSuperView removeFromSuperview]; // adSuperView.hidden = YES;
}]; // [adSuperView removeFromSuperview];
[[ZXBDTool new] createNativie20_3AdByView:adSuperView]; // }];
[[[BUADTool alloc] init] loadBannerAdWithController:self superView:adSuperView]; // [[ZXBDTool new] createNativie20_3AdByView:adSuperView];
// [[[BUADTool alloc] init] loadBannerAdWithController:self superView:adSuperView];
} }
......
// //
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
[ZXTool showErrorMsg:error]; [ZXTool showErrorMsg:error];
} else { } else {
ZXNewPayOrder *order = [ZXNewPayOrder mj_objectWithKeyValues:common.data]; ZXNewPayOrder *order = [ZXNewPayOrder mj_objectWithKeyValues:common.data];
order.tkData = common.consumeRefundOrders;
self.order = order; self.order = order;
[self.myTableView reloadData]; [self.myTableView reloadData];
} }
......
// //
...@@ -40,6 +40,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -40,6 +40,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *groupName; @property (nonatomic, copy) NSString *groupName;
@property (nonatomic, assign) NSInteger paymentConfId; @property (nonatomic, assign) NSInteger paymentConfId;
/** 自定义字段 退款数据 */
@property (nonatomic, strong) NSArray *tkData;
@property (nonatomic, assign) CGFloat actualAmount;//金额 @property (nonatomic, assign) CGFloat actualAmount;//金额
......
// //
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
@property (nonatomic, strong) UILabel *fifthLeftLabel; @property (nonatomic, strong) UILabel *fifthLeftLabel;
@property (nonatomic, strong) UILabel *sixthLeftLabel; @property (nonatomic, strong) UILabel *sixthLeftLabel;
@property (nonatomic, strong) UILabel *seventhLeftLabel; @property (nonatomic, strong) UILabel *seventhLeftLabel;
@property (nonatomic, strong) UILabel *eightLeftLabel;
@property (nonatomic, strong) UILabel *firstRightLabel; @property (nonatomic, strong) UILabel *firstRightLabel;
@property (nonatomic, strong) UILabel *secondRightabel; @property (nonatomic, strong) UILabel *secondRightabel;
@property (nonatomic, strong) UILabel *thirdRightLabel; @property (nonatomic, strong) UILabel *thirdRightLabel;
...@@ -31,6 +33,8 @@ ...@@ -31,6 +33,8 @@
@property (nonatomic, strong) UILabel *fifthRightLabel; @property (nonatomic, strong) UILabel *fifthRightLabel;
@property (nonatomic, strong) UILabel *sixthRightLabel; @property (nonatomic, strong) UILabel *sixthRightLabel;
@property (nonatomic, strong) UILabel *seventhRightLabel; @property (nonatomic, strong) UILabel *seventhRightLabel;
@property (nonatomic, strong) UILabel *eightRightLabel;
@end @end
...@@ -309,6 +313,22 @@ ...@@ -309,6 +313,22 @@
make.centerY.equalTo(self.seventhLeftLabel); make.centerY.equalTo(self.seventhLeftLabel);
}]; }];
self.eightLeftLabel = [[UILabel alloc] init];
[self.contentView addSubview:self.eightLeftLabel];
self.eightLeftLabel.textColor = kTitleBlackColor;
self.eightLeftLabel.font = kFontSize(14 * k6Scale);
[self.eightLeftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.contentView.mas_left).offset(16 * k6Scale);
make.top.mas_equalTo(self.seventhLeftLabel.mas_bottom).offset(10 * k6Scale);
}];
self.eightRightLabel = [[UILabel alloc] init];
[self.contentView addSubview:self.eightRightLabel];
self.eightRightLabel.textColor = kTitleBlackColor;
self.eightRightLabel.font = kFontSize(14 * k6Scale);
[self.eightRightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.contentView.mas_right).offset(-16 * k6Scale);
make.centerY.equalTo(self.eightLeftLabel);
}];
} }
return self; return self;
} }
...@@ -319,6 +339,10 @@ ...@@ -319,6 +339,10 @@
self.firstRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.actualMoney]; self.firstRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.actualMoney];
self.secondRightabel.textColor = kTitleBlackColor; self.secondRightabel.textColor = kTitleBlackColor;
self.thirdRightLabel.textColor = kTitleBlackColor; self.thirdRightLabel.textColor = kTitleBlackColor;
BOOL isHasTK = _order.tkData.count;//是否有退款
//同时抵扣豆和艾米 //同时抵扣豆和艾米
if (_order.deductionBean > 0 && _order.deductionMoney > 0) { if (_order.deductionBean > 0 && _order.deductionMoney > 0) {
self.secondRightabel.textColor = [UIColor redColor]; self.secondRightabel.textColor = [UIColor redColor];
...@@ -332,21 +356,54 @@ ...@@ -332,21 +356,54 @@
self.fourthLeftLabel.text = @"第三方优惠"; self.fourthLeftLabel.text = @"第三方优惠";
self.fourthRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney]; self.fourthRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney];
self.fifthLeftLabel.text = @"支付方式"; self.fifthLeftLabel.text = @"支付方式";
self.sixthLeftLabel.text = @"支付时间";
self.fifthRightLabel.text = [self payType:_order]; self.fifthRightLabel.text = [self payType:_order];
self.sixthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate]; if (isHasTK) {
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { NSDictionary *dic = _order.tkData.firstObject;
self.seventhLeftLabel.text = @"交易单号"; NSInteger tkType = [dic[@"refundState"] integerValue];
self.seventhRightLabel.text = _order.outTradeNo; NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.sixthLeftLabel.attributedText = tkType==1?[self toAtts:@"全部退款"]:[self toAtts:@"部分退款"];
self.sixthRightLabel.attributedText = [self toAtts:refundMoney];
self.seventhLeftLabel.text = @"支付时间";
self.seventhRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.eightLeftLabel.text = @"交易单号";
self.eightRightLabel.text = _order.outTradeNo;
}
} else {
self.sixthLeftLabel.text = @"支付时间";
self.sixthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.seventhLeftLabel.text = @"交易单号";
self.seventhRightLabel.text = _order.outTradeNo;
}
} }
} else { } else {
self.fourthLeftLabel.text = @"支付方式"; self.fourthLeftLabel.text = @"支付方式";
self.fifthLeftLabel.text = @"支付时间";
self.fourthRightLabel.text = [self payType:_order]; self.fourthRightLabel.text = [self payType:_order];
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate]; if (isHasTK) {
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { NSDictionary *dic = _order.tkData.firstObject;
self.sixthLeftLabel.text = @"交易单号"; NSInteger tkType = [dic[@"refundState"] integerValue];
self.sixthRightLabel.text = _order.outTradeNo; NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.fifthLeftLabel.attributedText = tkType==1?[self toAtts:@"全部退款"]:[self toAtts:@"部分退款"];
self.fifthRightLabel.attributedText = [self toAtts:refundMoney];
self.sixthLeftLabel.text = @"支付时间";
self.sixthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.seventhLeftLabel.text = @"交易单号";
self.seventhRightLabel.text = _order.outTradeNo;
}
} else {
self.fifthLeftLabel.text = @"支付时间";
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.sixthLeftLabel.text = @"交易单号";
self.sixthRightLabel.text = _order.outTradeNo;
}
} }
} }
} else { } else {
...@@ -360,21 +417,55 @@ ...@@ -360,21 +417,55 @@
self.thirdLeftLabel.text = @"第三方优惠"; self.thirdLeftLabel.text = @"第三方优惠";
self.thirdRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney]; self.thirdRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney];
self.fourthLeftLabel.text = @"支付方式"; self.fourthLeftLabel.text = @"支付方式";
self.fifthLeftLabel.text = @"支付时间";
self.fourthRightLabel.text = [self payType:_order]; self.fourthRightLabel.text = [self payType:_order];
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { if (isHasTK) {
self.sixthLeftLabel.text = @"交易单号"; NSDictionary *dic = _order.tkData.firstObject;
self.sixthRightLabel.text = _order.outTradeNo; NSInteger tkType = [dic[@"refundState"] integerValue];
NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.fifthLeftLabel.attributedText = tkType==1?[self toAtts:@"全部退款"]:[self toAtts:@"部分退款"];
self.fifthRightLabel.attributedText = [self toAtts:refundMoney];
self.sixthLeftLabel.text = @"支付时间";
self.sixthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.seventhLeftLabel.text = @"交易单号";
self.seventhRightLabel.text = _order.outTradeNo;
}
} else {
self.fifthLeftLabel.text = @"支付时间";
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.sixthLeftLabel.text = @"交易单号";
self.sixthRightLabel.text = _order.outTradeNo;
}
} }
} else { } else {
self.thirdLeftLabel.text = @"支付方式"; self.thirdLeftLabel.text = @"支付方式";
self.fourthLeftLabel.text = @"支付时间";
self.thirdRightLabel.text = [self payType:_order]; self.thirdRightLabel.text = [self payType:_order];
self.fourthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { if (isHasTK) {
self.fifthLeftLabel.text = @"交易单号"; NSDictionary *dic = _order.tkData.firstObject;
self.fifthRightLabel.text = _order.outTradeNo; NSInteger tkType = [dic[@"refundState"] integerValue];
NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.fourthLeftLabel.attributedText = tkType==1?[self toAtts:@"全部退款"]:[self toAtts:@"部分退款"];
self.fourthRightLabel.attributedText = [self toAtts:refundMoney];
self.fifthLeftLabel.text = @"支付时间";
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.sixthLeftLabel.text = @"交易单号";
self.sixthRightLabel.text = _order.outTradeNo;
}
} else {
self.fourthLeftLabel.text = @"支付时间";
self.fourthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.fifthLeftLabel.text = @"交易单号";
self.fifthRightLabel.text = _order.outTradeNo;
}
} }
} }
} else if (_order.deductionMoney > 0) { } else if (_order.deductionMoney > 0) {
...@@ -389,23 +480,56 @@ ...@@ -389,23 +480,56 @@
self.thirdRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney]; self.thirdRightLabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney];
self.fourthLeftLabel.text = @"支付方式"; self.fourthLeftLabel.text = @"支付方式";
self.fifthLeftLabel.text = @"支付时间";
self.fourthRightLabel.text = [self payType:_order]; self.fourthRightLabel.text = [self payType:_order];
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate]; if (isHasTK) {
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { NSDictionary *dic = _order.tkData.firstObject;
self.sixthLeftLabel.text = @"交易单号"; NSInteger tkType = [dic[@"refundState"] integerValue];
self.sixthRightLabel.text = _order.outTradeNo; NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.fifthLeftLabel.attributedText = tkType==1?[self toAtts:@"全部退款"]:[self toAtts:@"部分退款"];
self.fifthRightLabel.attributedText = [self toAtts:refundMoney];
self.sixthLeftLabel.text = @"支付时间";
self.sixthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.seventhLeftLabel.text = @"交易单号";
self.seventhRightLabel.text = _order.outTradeNo;
}
} else {
self.fifthLeftLabel.text = @"支付时间";
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.sixthLeftLabel.text = @"交易单号";
self.sixthRightLabel.text = _order.outTradeNo;
}
} }
} else { } else {
self.thirdLeftLabel.text = @"支付方式"; self.thirdLeftLabel.text = @"支付方式";
self.fourthLeftLabel.text = @"支付时间";
self.thirdRightLabel.text = [self payType:_order]; self.thirdRightLabel.text = [self payType:_order];
self.fourthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { if (isHasTK) {
self.fifthLeftLabel.text = @"交易单号"; NSDictionary *dic = _order.tkData.firstObject;
self.fifthRightLabel.text = _order.outTradeNo; NSInteger tkType = [dic[@"refundState"] integerValue];
NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.fourthLeftLabel.attributedText = tkType==1?[self toAtts:@"全部退款"]:[self toAtts:@"部分退款"];
self.fourthRightLabel.attributedText = [self toAtts:refundMoney];
self.fifthLeftLabel.text = @"支付时间";
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.sixthLeftLabel.text = @"交易单号";
self.sixthRightLabel.text = _order.outTradeNo;
}
} else {
self.fourthLeftLabel.text = @"支付时间";
self.fourthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.fifthLeftLabel.text = @"交易单号";
self.fifthRightLabel.text = _order.outTradeNo;
}
} }
} }
} else { } else {
...@@ -415,27 +539,58 @@ ...@@ -415,27 +539,58 @@
self.secondLeftLabel.text = @"第三方优惠"; self.secondLeftLabel.text = @"第三方优惠";
self.secondRightabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney]; self.secondRightabel.text = [NSString stringWithFormat:@"%.2f", _order.thirdDiscountMoney];
self.thirdLeftLabel.text = @"支付方式"; self.thirdLeftLabel.text = @"支付方式";
self.fourthLeftLabel.text = @"支付时间";
self.thirdRightLabel.text = [self payType:_order]; self.thirdRightLabel.text = [self payType:_order];
self.fourthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate]; if (isHasTK) {
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { NSDictionary *dic = _order.tkData.firstObject;
self.fifthLeftLabel.text = @"交易单号"; NSInteger tkType = [dic[@"refundState"] integerValue];
self.fifthRightLabel.text = _order.outTradeNo; NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.fourthLeftLabel.text = tkType==1?@"全部退款":@"部分退款";
self.fourthRightLabel.text = refundMoney;
self.fifthLeftLabel.text = @"支付时间";
self.fifthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.sixthLeftLabel.text = @"交易单号";
self.sixthRightLabel.text = _order.outTradeNo;
}
} else {
self.fourthLeftLabel.text = @"支付时间";
self.fourthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.fifthLeftLabel.text = @"交易单号";
self.fifthRightLabel.text = _order.outTradeNo;
}
} }
} else { } else {
self.secondLeftLabel.text = @"支付方式"; self.secondLeftLabel.text = @"支付方式";
self.thirdLeftLabel.text = @"支付时间";
self.secondRightabel.text = [self payType:_order]; self.secondRightabel.text = [self payType:_order];
self.thirdRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate]; if (isHasTK) {
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) { NSDictionary *dic = _order.tkData.firstObject;
self.fourthLeftLabel.text = @"交易单号"; NSInteger tkType = [dic[@"refundState"] integerValue];
self.fourthRightLabel.text = _order.outTradeNo; NSString *refundMoney = [@"-" stringByAppendingString:[dic[@"refundMoney"] stringValue]];
self.thirdLeftLabel.attributedText = tkType==1?[self toAtts:@"全部退款"]:[self toAtts:@"部分退款"];
self.thirdRightLabel.attributedText = [self toAtts:refundMoney];
self.fourthLeftLabel.text = @"支付时间";
self.fourthRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.fifthLeftLabel.text = @"交易单号";
self.fifthRightLabel.text = _order.outTradeNo;
}
} else {
self.thirdLeftLabel.text = @"支付时间";
self.thirdRightLabel.text = [ZXTool formatNewDBDate:_order.updateDate];
if (_order.outTradeNo && ![_order.outTradeNo isEqualToString:@""]) {
self.fourthLeftLabel.text = @"交易单号";
self.fourthRightLabel.text = _order.outTradeNo;
}
} }
} }
} }
} }
self.moneyLabel.text = [NSString stringWithFormat:@"-%.2f", _order.payableMoney]; self.moneyLabel.text = [NSString stringWithFormat:@"%.2f", _order.payableMoney];
self.freeDescLabel.text = _order.serviceName; self.freeDescLabel.text = _order.serviceName;
self.freeTimeLabel.text = [ZXTool formatNewDBDate:_order.createAt]; self.freeTimeLabel.text = [ZXTool formatNewDBDate:_order.createAt];
self.orderNumLabel.text = _order.orderNumber; self.orderNumLabel.text = _order.orderNumber;
...@@ -472,5 +627,7 @@ ...@@ -472,5 +627,7 @@
// Configure the view for the selected state // Configure the view for the selected state
} }
- (NSAttributedString *) toAtts:(NSString *) str {
return [[NSAttributedString alloc] initWithString:str attributes:@{NSForegroundColorAttributeName:UIColor.redColor}];
}
@end @end
// //
...@@ -38,18 +38,25 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -38,18 +38,25 @@ typedef void(^isCanChange)(BOOL iCan);
[self.view addSubview:self.myTableView]; [self.view addSubview:self.myTableView];
[ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/hardware/info/forcustomer/loginState?customerId=%@", [kUserDefaults objectForKey:@"NEW_PAY"], CacheUserId] para:nil completed:^(CommonModel *common, NSString *error) { if ([[UserManager sharedUserManager].user.version isEqualToString:@"1"] || [[UserManager sharedUserManager].user.version isEqualToString:@"1.0"]) {
dispatch_async(dispatch_get_main_queue(), ^{ [kUserDefaults setObject:@"notShow" forKey:@"devPassSwitch"];
[ZXTool hideLoadingAnimation]; [self operationSectionsIs2_0System:NO];
if (error) { } else {
[ZXTool showText:error];
[kUserDefaults setObject:@"notShow" forKey:@"devPassSwitch"]; [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/hardware/info/forcustomer/loginState?customerId=%@", [kUserDefaults objectForKey:@"NEW_PAY"], CacheUserId] para:nil completed:^(CommonModel *common, NSString *error) {
} else { dispatch_async(dispatch_get_main_queue(), ^{
[kUserDefaults setObject:common.data forKey:@"devPassSwitch"]; [ZXTool hideLoadingAnimation];
} if (error) {
[self operationSections]; [ZXTool showText:error];
}); [kUserDefaults setObject:@"notShow" forKey:@"devPassSwitch"];
}]; } else {
[kUserDefaults setObject:common.data forKey:@"devPassSwitch"];
}
[self operationSectionsIs2_0System:YES];
});
}];
}
} }
- (NSMutableArray *)sections1 { - (NSMutableArray *)sections1 {
...@@ -58,80 +65,147 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -58,80 +65,147 @@ typedef void(^isCanChange)(BOOL iCan);
} }
return _sections1; return _sections1;
} }
- (void) operationSections { - (void) operationSectionsIs2_0System:(BOOL) isVersion {
[self.sections1 removeAllObjects]; [self.sections1 removeAllObjects];
if ([[kUserDefaults valueForKey:kAPP_IS_OPEN_JK] isEqualToString:@"yes"]) { if (isVersion) {
NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码",@"开启系统自动扣费", @"推送接收开关"]; if ([[kUserDefaults valueForKey:kAPP_IS_OPEN_JK] isEqualToString:@"yes"]) {
NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon_mianmi",@"icon-push"]; NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码",@"开启系统自动扣费", @"推送接收开关"];
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init]; NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon_mianmi",@"icon-push"];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m5 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m6 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m5 = [[ZXUserSettingModel alloc] init];
m1.imageName = imagegroup1[0]; ZXUserSettingModel *m6 = [[ZXUserSettingModel alloc] init];
m1.name = group1[0]; m1.imageName = imagegroup1[0];
m2.imageName = imagegroup1[1]; m1.name = group1[0];
m2.name = group1[1]; m2.imageName = imagegroup1[1];
m3.imageName = imagegroup1[2]; m2.name = group1[1];
m3.name = group1[2]; m3.imageName = imagegroup1[2];
m4.imageName = imagegroup1[3]; m3.name = group1[2];
m4.name = group1[3]; m4.imageName = imagegroup1[3];
m4.isHasSwitch = YES; m4.name = group1[3];
m4.switchIsOn = [CacheDevPassSwitch integerValue]; m4.isHasSwitch = YES;
m5.imageName = imagegroup1[4]; m4.switchIsOn = [CacheDevPassSwitch integerValue];
m5.name = group1[4]; m5.imageName = imagegroup1[4];
m5.isHasSwitch = YES; m5.name = group1[4];
m5.switchIsOn = NO; m5.isHasSwitch = YES;
m6.imageName = imagegroup1[5]; m5.switchIsOn = NO;
m6.name = group1[5]; m6.imageName = imagegroup1[5];
m6.isHasSwitch = YES; m6.name = group1[5];
m6.switchIsOn = [[kUserDefaults valueForKey:@"currentUserIsOpenJPush"] isEqualToString:@"yes"];; m6.isHasSwitch = YES;
m4.switchType = 1; m6.switchIsOn = [[kUserDefaults valueForKey:@"currentUserIsOpenJPush"] isEqualToString:@"yes"];;
m5.switchType = 2; m4.switchType = 1;
m6.switchType = 3; m5.switchType = 2;
if ([CacheDevPassSwitch isEqualToString:@"notShow"]) { m6.switchType = 3;
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m5,m6]]; if ([CacheDevPassSwitch isEqualToString:@"notShow"]) {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m5,m6]];
} else {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m4,m5,m6]];
}
[self loadIsOpenFreePay];
} else { } else {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m4,m5,m6]]; NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码", @"推送接收开关"];
NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon-push"];
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m5 = [[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;
m5.imageName = imagegroup1[4];
m5.name = group1[4];
m5.isHasSwitch = YES;
m5.switchIsOn = [[kUserDefaults valueForKey:@"currentUserIsOpenJPush"] isEqualToString:@"yes"];;
m5.switchType = 3;
if ([CacheDevPassSwitch isEqualToString:@"notShow"]) {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m5]];
} else {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m4, m5]];
}
} }
[self loadIsOpenFreePay];
} else { } else {
NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码", @"推送接收开关"]; if ([[kUserDefaults valueForKey:kAPP_IS_OPEN_JK] isEqualToString:@"yes"]) {
NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon-push"]; NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码",@"开启系统自动扣费", @"推送接收开关"];
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init]; NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon_mianmi",@"icon-push"];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m5 = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m5 = [[ZXUserSettingModel alloc] init];
m1.imageName = imagegroup1[0]; ZXUserSettingModel *m6 = [[ZXUserSettingModel alloc] init];
m1.name = group1[0]; m1.imageName = imagegroup1[0];
m2.imageName = imagegroup1[1]; m1.name = group1[0];
m2.name = group1[1]; m2.imageName = imagegroup1[1];
m3.imageName = imagegroup1[2]; m2.name = group1[1];
m3.name = group1[2]; m3.imageName = imagegroup1[2];
m4.imageName = imagegroup1[3]; m3.name = group1[2];
m4.name = group1[3]; m4.imageName = imagegroup1[3];
m4.isHasSwitch = YES; m4.name = group1[3];
m4.switchIsOn = [CacheDevPassSwitch integerValue]; m4.isHasSwitch = YES;
m4.switchType = 1; m4.switchIsOn = [CacheDevPassSwitch integerValue];
m5.imageName = imagegroup1[4];
m5.imageName = imagegroup1[4]; m5.name = group1[4];
m5.name = group1[4]; m5.isHasSwitch = YES;
m5.isHasSwitch = YES; m5.switchIsOn = NO;
m5.switchIsOn = [[kUserDefaults valueForKey:@"currentUserIsOpenJPush"] isEqualToString:@"yes"];; m6.imageName = imagegroup1[5];
m5.switchType = 3; m6.name = group1[5];
m6.isHasSwitch = YES;
if ([CacheDevPassSwitch isEqualToString:@"notShow"]) { m6.switchIsOn = [[kUserDefaults valueForKey:@"currentUserIsOpenJPush"] isEqualToString:@"yes"];;
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m5]]; m4.switchType = 1;
m5.switchType = 2;
m6.switchType = 3;
[self.sections1 addObjectsFromArray:@[m1,m3,m5,m6]];
[self loadIsOpenFreePay];
} else { } else {
[self.sections1 addObjectsFromArray:@[m1,m2,m3,m4, m5]]; NSArray *group1=@[@"app登录密码",@"设备密码",@"更换手机账户",@"开启设备登录密码", @"推送接收开关"];
NSArray *imagegroup1=@[@"Passwordtwo.png",@"设备.png",@"app.png",@"set_bar_code",@"icon-push"];
ZXUserSettingModel *m1 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m2 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m3 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m4 = [[ZXUserSettingModel alloc] init];
ZXUserSettingModel *m5 = [[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;
m5.imageName = imagegroup1[4];
m5.name = group1[4];
m5.isHasSwitch = YES;
m5.switchIsOn = [[kUserDefaults valueForKey:@"currentUserIsOpenJPush"] isEqualToString:@"yes"];;
m5.switchType = 3;
[self.sections1 addObjectsFromArray:@[m1,m3,m5]];
} }
} }
if ([UserManager sharedUserManager].user.isWXAuthLogin) { if ([UserManager sharedUserManager].user.isWXAuthLogin) {
ZXUserSettingModel *mm = [[ZXUserSettingModel alloc] init]; ZXUserSettingModel *mm = [[ZXUserSettingModel alloc] init];
mm.name = @"微信解绑"; mm.name = @"微信解绑";
...@@ -311,12 +385,12 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -311,12 +385,12 @@ typedef void(^isCanChange)(BOOL iCan);
[self checkIsHasNotPayOrderIsCanChange:^(BOOL isCan) { [self checkIsHasNotPayOrderIsCanChange:^(BOOL isCan) {
kStrongSelf(self); kStrongSelf(self);
if (isCan) { if (isCan) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
//弹窗提示 //弹窗提示
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"关闭后,将切换至订单支付模式。" preferredStyle:UIAlertControllerStyleAlert]; UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"关闭后,将切换至订单支付模式。" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *ac1 = [UIAlertAction actionWithTitle:@"取消" style:0 handler:^(UIAlertAction * _Nonnull action) { UIAlertAction *ac1 = [UIAlertAction actionWithTitle:@"取消" style:0 handler:^(UIAlertAction * _Nonnull action) {
m.switchIsOn = !m.switchIsOn; m.switchIsOn = !m.switchIsOn;
[self.myTableView reloadData]; [self.myTableView reloadData];
}]; }];
UIAlertAction *ac2 = [UIAlertAction actionWithTitle:@"确定" style:0 handler:^(UIAlertAction * _Nonnull action) { UIAlertAction *ac2 = [UIAlertAction actionWithTitle:@"确定" style:0 handler:^(UIAlertAction * _Nonnull action) {
...@@ -335,7 +409,7 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -335,7 +409,7 @@ typedef void(^isCanChange)(BOOL iCan);
} else { } else {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
m.switchIsOn = !m.switchIsOn; m.switchIsOn = !m.switchIsOn;
}); });
} }
} }
...@@ -461,7 +535,7 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -461,7 +535,7 @@ typedef void(^isCanChange)(BOOL iCan);
break; break;
} }
case 1:{ case 1:{
[ZXTool showText:@"正在退出登录,请稍后"]; [ZXTool showText:@"正在退出登录,请稍后"];
[ZXTool backToLoginAndOperationInterface]; [ZXTool backToLoginAndOperationInterface];
break; break;
...@@ -487,7 +561,7 @@ typedef void(^isCanChange)(BOOL iCan); ...@@ -487,7 +561,7 @@ typedef void(^isCanChange)(BOOL iCan);
[self.navigationController pushViewController:VC animated:YES]; [self.navigationController pushViewController:VC animated:YES];
} }
} }
} }
} }
#pragma mark - 解绑微信 #pragma mark - 解绑微信
......
// //
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#import "enlargeClickRegionBtn.h" #import "enlargeClickRegionBtn.h"
#import "ZXBDTool.h" #import "ZXBDTool.h"
#import "ZXTaskManager.h" #import "ZXTaskManager.h"
#import <IQKeyboardManager/IQKeyboardManager.h>
@interface ZXTaskViewController ()<WKNavigationDelegate, WKUIDelegate, WKScriptMessageHandler, BUNativeExpressRewardedVideoAdDelegate, BaiduMobAdRewardVideoDelegate> @interface ZXTaskViewController ()<WKNavigationDelegate, WKUIDelegate, WKScriptMessageHandler, BUNativeExpressRewardedVideoAdDelegate, BaiduMobAdRewardVideoDelegate>
/** */ /** */
@property (nonatomic, strong) WKWebView *webView; @property (nonatomic, strong) WKWebView *webView;
...@@ -43,9 +44,18 @@ ...@@ -43,9 +44,18 @@
[self initWebView]; [self initWebView];
[self addBannerAd];//添加广告 [self addBannerAd];//添加广告
[self preloadCSJRewardAd]; [self preloadCSJRewardAd];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aouthSuccess:) name:kWX_AUTH_RESULT object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aouthSuccess:) name:kWX_AUTH_RESULT object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
}
#pragma mark - ========== 键盘收起 ==========
- (void) keyboardWillHide:(NSNotification *) nof {
self.webView.frame = CGRectMake(0, kStatusBarHeight, kScreenWidth, kScreenHeight - kStatusBarHeight);
[self.webView.scrollView setContentOffset:CGPointMake(0, 0) animated:YES];
} }
#pragma mark - ========== webView初始化逻辑 ========== #pragma mark - ========== webView初始化逻辑 ==========
- (void) initWebView { - (void) initWebView {
...@@ -73,25 +83,43 @@ ...@@ -73,25 +83,43 @@
} }
#pragma mark - 添加广告 #pragma mark - 添加广告
- (void) addBannerAd { - (void) addBannerAd {
[ZXTool requestDataHideLoadingToastWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/advert/get/initdata?pageNo=TASK_PAGE", [kUserDefaults objectForKey:@"Task"]] para:nil completed:^(CommonModel *common, NSString *error) {
if (common && common.data && common.data[@"adverts"]) {
NSArray *arr = common.data[@"adverts"];
for (NSDictionary *dic in arr) {
if ([dic[@"type"] integerValue] == 5) {
dispatch_async(dispatch_get_main_queue(), ^{
[self createBannerAd];
});
}
}
}
}];
}
#pragma mark - 创建广告
- (void) createBannerAd {
UIView *adSuperView = [[UIView alloc] init];
[self.view addSubview:adSuperView];
adSuperView.backgroundColor = UIColor.whiteColor;
[adSuperView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view);
make.height.mas_equalTo(kScreenWidth * 0.15);
make.bottom.equalTo(self.view.mas_bottom).offset(self.isTaskHomePage?-kTabBarHeight:0);
}];
CGFloat Y = kScreenHeight - (kScreenWidth * 0.3 + 10 * k6Scale); enlargeClickRegionBtn *closeButton = [[enlargeClickRegionBtn alloc] init];
if (self.isTaskHomePage) { [adSuperView addSubview:closeButton];
Y = Y - kTabBarHeight; [closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
} make.right.top.equalTo(adSuperView);
UIView *adSuperView = [[UIView alloc] initWithFrame:CGRectMake(0, Y, kScreenWidth, kScreenWidth * 0.3 + 10 * k6Scale)]; make.width.height.mas_equalTo(30 * k6Scale);
[self.view addSubview:adSuperView];
adSuperView.backgroundColor = UIColor.whiteColor;
enlargeClickRegionBtn *closeButton = [[enlargeClickRegionBtn alloc] initWithFrame:CGRectMake(kScreenWidth - 20 * k6Scale, 0, 20 * k6Scale, 20 * k6Scale)];
[closeButton setBackgroundImage:[UIImage imageNamed:@"task_close"] forState:UIControlStateNormal];
[adSuperView addSubview:closeButton];
[[closeButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
adSuperView.hidden = YES;
[adSuperView removeFromSuperview];
}]; }];
[[[ZXBDTool alloc] init] createNativie20_3AdByView:adSuperView];
[[[BUADTool alloc] init] loadBannerAdWithController:self superView:adSuperView];
[[closeButton rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
adSuperView.hidden = YES;
[adSuperView removeFromSuperview];
}];
[[[BUADTool alloc] init] loadBannerAdWithController:self superView:adSuperView];
} }
#pragma mark - ========== 加载失败的时候 创建holder ========== #pragma mark - ========== 加载失败的时候 创建holder ==========
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error { - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error {
...@@ -102,7 +130,7 @@ ...@@ -102,7 +130,7 @@
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
} }
#pragma mark - ========== 注册方法列表 ========== #pragma mark - ========== 注册方法列表 ==========
...@@ -114,6 +142,7 @@ ...@@ -114,6 +142,7 @@
@"missionCompletedHandle",//领券弹窗 @"missionCompletedHandle",//领券弹窗
@"wechatAuth",//微信绑定 @"wechatAuth",//微信绑定
@"drawCash", //提现 @"drawCash", //提现
@"refreshAd",//刷新广告
]; ];
} }
return _indentifierList; return _indentifierList;
...@@ -135,8 +164,13 @@ ...@@ -135,8 +164,13 @@
NSLog(@"%@", arr); NSLog(@"%@", arr);
NSString *pushPath = message.body[0];//push出的页面的路径 NSString *pushPath = message.body[0];//push出的页面的路径
NSString *statusColor = message.body[1];//跳转页面的状态蓝颜色 NSString *statusColor = message.body[1];//跳转页面的状态蓝颜色
NSString *suffix = arr.lastObject;
NSString *jumpUrl = [NSString stringWithFormat:@"%@%@?token=%@", [kUserDefaults objectForKey:@"TaskH5"], pushPath, CacheToken];
if (suffix && ![suffix isEqualToString:@""]) {
jumpUrl = [[NSString stringWithFormat:@"%@%@?token=%@&%@", [kUserDefaults objectForKey:@"TaskH5"], pushPath, CacheToken, suffix] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
}
ZXTaskViewController *task = [[ZXTaskViewController alloc] init]; ZXTaskViewController *task = [[ZXTaskViewController alloc] init];
task.jumpUrl = [NSString stringWithFormat:@"%@%@?token=%@", [kUserDefaults objectForKey:@"TaskH5"], pushPath, CacheToken]; task.jumpUrl = jumpUrl;
task.colorHex = statusColor; task.colorHex = statusColor;
[self.navigationController pushViewController:task animated:YES]; [self.navigationController pushViewController:task animated:YES];
} else if ([message.name isEqualToString:self.indentifierList[1]]) { } else if ([message.name isEqualToString:self.indentifierList[1]]) {
...@@ -188,7 +222,7 @@ ...@@ -188,7 +222,7 @@
break; break;
} }
default: default:
break; break;
} }
...@@ -204,9 +238,9 @@ ...@@ -204,9 +238,9 @@
req.scope = @"snsapi_message,snsapi_userinfo,snsapi_friend,snsapi_contact"; req.scope = @"snsapi_message,snsapi_userinfo,snsapi_friend,snsapi_contact";
req.openID = @"wx41cd01f1eb664e21"; req.openID = @"wx41cd01f1eb664e21";
req.state = @"1"; req.state = @"1";
[WXApi sendReq:req]; [WXApi sendReq:req];
} else if ([message.name isEqualToString:self.indentifierList[5]]) {//提现 } else if ([message.name isEqualToString:self.indentifierList[5]]) {//提现
NSArray *arr = message.body; NSArray *arr = message.body;
self.jsFuncName = arr[0]; self.jsFuncName = arr[0];
...@@ -219,7 +253,9 @@ ...@@ -219,7 +253,9 @@
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[ZXTool hideLoadingAnimation]; [ZXTool hideLoadingAnimation];
if (error) { if (error) {
[ZXTool showText:error]; [self.webView evaluateJavaScript:[NSString stringWithFormat:@"%@('%@')", self.jsFuncName, error] completionHandler:^(id _Nullable res, NSError * _Nullable error) {
}];
} else { } else {
[self.webView evaluateJavaScript:[NSString stringWithFormat:@"%@()", self.jsFuncName] completionHandler:^(id _Nullable res, NSError * _Nullable error) { [self.webView evaluateJavaScript:[NSString stringWithFormat:@"%@()", self.jsFuncName] completionHandler:^(id _Nullable res, NSError * _Nullable error) {
...@@ -227,6 +263,8 @@ ...@@ -227,6 +263,8 @@
} }
}); });
}]; }];
} else if ([message.name isEqualToString:self.indentifierList[6]]) {//刷新广告
[self addBannerAd];
} }
} }
...@@ -237,6 +275,7 @@ ...@@ -237,6 +275,7 @@
- (void)viewWillDisappear:(BOOL)animated { - (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated]; [super viewWillDisappear:animated];
self.navigationController.navigationBar.hidden = NO; self.navigationController.navigationBar.hidden = NO;
NSLog(@"已经清理所有的绑定"); NSLog(@"已经清理所有的绑定");
for (NSString *str in self.indentifierList) { for (NSString *str in self.indentifierList) {
[self.webView.configuration.userContentController removeScriptMessageHandlerForName:str]; [self.webView.configuration.userContentController removeScriptMessageHandlerForName:str];
...@@ -273,25 +312,22 @@ ...@@ -273,25 +312,22 @@
#pragma mark - 预加载穿山视频 #pragma mark - 预加载穿山视频
- (void) preloadCSJRewardAd { - (void) preloadCSJRewardAd {
dispatch_async(dispatch_get_global_queue(0, 0), ^{ dispatch_async(dispatch_get_global_queue(0, 0), ^{
BURewardedVideoModel *model = [[BURewardedVideoModel alloc] init]; BURewardedVideoModel *model = [[BURewardedVideoModel alloc] init];
model.userId = @"123"; model.userId = @"123";
self.rewardedAd = [[BUNativeExpressRewardedVideoAd alloc] initWithSlotID:@"933112439" rewardedVideoModel:model]; self.rewardedAd = [[BUNativeExpressRewardedVideoAd alloc] initWithSlotID:@"933112439" rewardedVideoModel:model];
self.rewardedAd.delegate = self; self.rewardedAd.delegate = self;
[self.rewardedAd loadAdData]; [self.rewardedAd loadAdData];
//为保证播放流畅和展示流畅建议可在收到渲染成功和视频下载完成回调后再展示视频。 //为保证播放流畅和展示流畅建议可在收到渲染成功和视频下载完成回调后再展示视频。
}); });
} }
#pragma mark - 显示穿山甲激励视频 #pragma mark - 显示穿山甲激励视频
-(void) showCSJRewardVideo { -(void) showCSJRewardVideo {
if (self.rewardedAd.isAdValid) { if (self.rewardedAd.isAdValid) {
[self.rewardedAd showAdFromRootViewController:self.navigationController]; [self.rewardedAd showAdFromRootViewController:self.navigationController];
[self.reward load]; [self.reward load];
} else {
//预加载
[self preloadCSJRewardAd];
} }
} }
...@@ -302,7 +338,8 @@ ...@@ -302,7 +338,8 @@
} }
- (void)nativeExpressRewardedVideoAd:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error { - (void)nativeExpressRewardedVideoAd:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error {
//预加载
[self preloadCSJRewardAd];
} }
- (void)nativeExpressRewardedVideoAdDidDownLoadVideo:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdDidDownLoadVideo:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
...@@ -314,7 +351,8 @@ ...@@ -314,7 +351,8 @@
} }
- (void)nativeExpressRewardedVideoAdViewRenderFail:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd error:(NSError *_Nullable)error { - (void)nativeExpressRewardedVideoAdViewRenderFail:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd error:(NSError *_Nullable)error {
//预加载
[self preloadCSJRewardAd];
} }
- (void)nativeExpressRewardedVideoAdWillVisible:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdWillVisible:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
...@@ -332,6 +370,8 @@ ...@@ -332,6 +370,8 @@
- (void)nativeExpressRewardedVideoAdDidClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdDidClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
//已经关闭 重新架子啊一个 //已经关闭 重新架子啊一个
//预加载
[self preloadCSJRewardAd];
} }
- (void)nativeExpressRewardedVideoAdDidClick:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdDidClick:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
...@@ -339,7 +379,7 @@ ...@@ -339,7 +379,7 @@
} }
- (void)nativeExpressRewardedVideoAdDidClickSkip:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd { - (void)nativeExpressRewardedVideoAdDidClickSkip:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd {
} }
- (void)nativeExpressRewardedVideoAdDidPlayFinish:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error { - (void)nativeExpressRewardedVideoAdDidPlayFinish:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error {
...@@ -358,47 +398,47 @@ ...@@ -358,47 +398,47 @@
#pragma mark - 任务--激励视频 #pragma mark - 任务--激励视频
- (void) taskRewardVideo { - (void) taskRewardVideo {
//请求接口 获取视频平台 //请求接口 获取视频平台
// [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/incentiveVideo/least", [kUserDefaults objectForKey:@"Task"]] para:nil completed:^(CommonModel *common, NSString *error) { // [ZXTool requestDataWithType:kXMHTTPMethodGET url:[NSString stringWithFormat:@"%@/dcxy/api/incentiveVideo/least", [kUserDefaults objectForKey:@"Task"]] para:nil completed:^(CommonModel *common, NSString *error) {
// //
// dispatch_async(dispatch_get_main_queue(), ^{ // dispatch_async(dispatch_get_main_queue(), ^{
// [ZXTool hideLoadingAnimation]; // [ZXTool hideLoadingAnimation];
// if (error) { // if (error) {
// return; // return;
// } // }
// //
// //1腾讯 2百度 3瑞狮 4友盟 5穿山甲 // //1腾讯 2百度 3瑞狮 4友盟 5穿山甲
// switch ([common.data integerValue]) { // switch ([common.data integerValue]) {
// case 1: { // case 1: {
// //
// break; // break;
// } // }
// case 2: { // case 2: {
// [self showCSJRewardVideo]; // [self showCSJRewardVideo];
// break; // break;
// } // }
// case 3: { // case 3: {
// //
// break; // break;
// } // }
// case 4: { // case 4: {
// //
// break; // break;
// case 5: { // case 5: {
// [self showCSJRewardVideo]; // [self showCSJRewardVideo];
// break; // break;
// } // }
// default: // default:
// break; // break;
// } // }
// } // }
// }); // });
// }]; // }];
[self showCSJRewardVideo]; [self showCSJRewardVideo];
} }
#pragma mark - 任务完成 #pragma mark - 任务完成
- (void) taskCompleted { - (void) taskCompleted {
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/dcxy/api/tasks/%@", [kUserDefaults objectForKey:@"Task"], [ZXTaskManager sharedZXTaskManager].taskCode] para:nil completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/dcxy/api/tasks/%@", [kUserDefaults objectForKey:@"Task"], [ZXTaskManager sharedZXTaskManager].taskCode] para:nil completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
...@@ -430,7 +470,7 @@ ...@@ -430,7 +470,7 @@
return; return;
} }
self.wxCode = nof.object; self.wxCode = nof.object;
NSLog(@"请求微信授权登录----%@", self.wxCode); NSLog(@"请求微信授权登录----%@", self.wxCode);
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/plain"]; manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/plain"];
...@@ -453,7 +493,7 @@ ...@@ -453,7 +493,7 @@
manager.responseSerializer = [AFHTTPResponseSerializer serializer]; manager.responseSerializer = [AFHTTPResponseSerializer serializer];
[manager GET:[NSString stringWithFormat:@"https://api.weixin.qq.com/sns/userinfo?access_token=%@&openid=%@",token,openID] parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { [manager GET:[NSString stringWithFormat:@"https://api.weixin.qq.com/sns/userinfo?access_token=%@&openid=%@",token,openID] parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
NSDictionary *dic = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil]; NSDictionary *dic = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
[ZXTool requestDataWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/wx/auth/submit/info", [kUserDefaults objectForKey:@"Task"]] para:@{@"wxInfo":[dic mj_JSONString]} completed:^(CommonModel *common, NSString *error) { [ZXTool requestDataWithType:kXMHTTPMethodPOST url:[NSString stringWithFormat:@"%@/wx/auth/submit/info", [kUserDefaults objectForKey:@"Task"]] para:@{@"wxInfo":[dic mj_JSONString]} completed:^(CommonModel *common, NSString *error) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
......
// //
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
[kUserDefaults setValue:@"no" forKey:kAPP_IS_OPEN_JK];//默认是no [kUserDefaults setValue:@"no" forKey:kAPP_IS_OPEN_JK];//默认是no
[kUserDefaults setValue:@"no" forKey:kAPP_QB_SHOW];//默认是no [kUserDefaults setValue:@"no" forKey:kAPP_QB_SHOW];//默认是no
[kUserDefaults setValue:@"no" forKey:kAPP_SELP_ADVIEW_SHOW];//默认是no [kUserDefaults setValue:@"no" forKey:kAPP_SELP_ADVIEW_SHOW];//默认是no
[kUserDefaults setValue:@"no" forKey:kAPP_IS_OPENB_TASK];//默认是no
if (CacheToken==nil || ![CacheToken isKindOfClass:[NSString class]]) { if (CacheToken==nil || ![CacheToken isKindOfClass:[NSString class]]) {
return; return;
} }
...@@ -91,11 +91,14 @@ ...@@ -91,11 +91,14 @@
if ([responseObject[@"code"] integerValue] == 1000) { if ([responseObject[@"code"] integerValue] == 1000) {
NSArray *arr = responseObject[@"areaSwitchs"]; NSArray *arr = responseObject[@"areaSwitchs"];
//type 1资讯 2商城 3支付配置 4免密开关 5小程序(app不需要) 10阿里妈妈 11百青藤 //type 1资讯 2商城 3支付配置 4免密开关 5小程序(app不需要) 10阿里妈妈 11百青藤 14任务
[self.switchs removeAllObjects]; [self.switchs removeAllObjects];
for (NSDictionary *dic in arr) { for (NSDictionary *dic in arr) {
if ([dic[@"type"] isEqualToString:@"1"] || [dic[@"type"] isEqualToString:@"2"] || [dic[@"type"] isEqualToString:@"10"] || [dic[@"type"] isEqualToString:@"11"] || [dic[@"type"] isEqualToString:@"14"]) { if ([dic[@"type"] isEqualToString:@"1"] || [dic[@"type"] isEqualToString:@"2"] || [dic[@"type"] isEqualToString:@"10"] || [dic[@"type"] isEqualToString:@"11"] || [dic[@"type"] isEqualToString:@"14"]) {
if ([dic[@"isEnabled"] integerValue] == 1) { if ([dic[@"isEnabled"] integerValue] == 1) {
if ([dic[@"type"] isEqualToString:@"14"]) {
[kUserDefaults setObject:@"yes" forKey:kAPP_IS_OPENB_TASK];
}
[self.switchs addObject:dic]; [self.switchs addObject:dic];
} }
} }
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "首次登录_获得奖券.png", "filename" : "弹窗.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "首次登录_获得奖券@2x.png", "filename" : "弹窗@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "首次登录_获得奖券@3x.png", "filename" : "弹窗@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "nav_renwu_nor.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "nav_renwu_nor@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "nav_renwu_nor@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "nav_renwu_sel.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "nav_renwu_sel@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "nav_renwu_sel@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
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