Commit 8ce7fcf3 authored by zhangshuai's avatar zhangshuai

Merge branch 'master' of gitlab.huolea.com:lmi/luckfarm

parents 37c09aa4 f69a3c29
...@@ -1003,7 +1003,7 @@ ...@@ -1003,7 +1003,7 @@
CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements; CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 126; CURRENT_PROJECT_VERSION = 127;
DEVELOPMENT_TEAM = XWMRLLSSFL; DEVELOPMENT_TEAM = XWMRLLSSFL;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO; GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
...@@ -1035,7 +1035,7 @@ ...@@ -1035,7 +1035,7 @@
CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements; CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 126; CURRENT_PROJECT_VERSION = 127;
DEVELOPMENT_TEAM = XWMRLLSSFL; DEVELOPMENT_TEAM = XWMRLLSSFL;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO; GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
......
...@@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, copy) NSString * amt; @property(nonatomic, copy) NSString * amt;
- (void)show:(UIView * _Nullable)superView; - (void)show:(UIView * _Nullable)superView;
@property (nonatomic, copy) void(^dismissCallBcak)(void);
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
@property (nonatomic, weak) IBOutlet UILabel * detailsLab; @property (nonatomic, weak) IBOutlet UILabel * detailsLab;
@property (nonatomic, weak) IBOutlet UIView * bgView; @property (nonatomic, weak) IBOutlet UIView * bgView;
@end @end
@implementation GYWithDrawAlertView @implementation GYWithDrawAlertView
...@@ -69,6 +68,10 @@ ...@@ -69,6 +68,10 @@
animation.fillMode = kCAFillModeForwards; animation.fillMode = kCAFillModeForwards;
[_bgView.layer addAnimation:animation forKey:nil]; [_bgView.layer addAnimation:animation forKey:nil];
if (self.dismissCallBcak) {
self.dismissCallBcak();
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.hidden = YES; self.hidden = YES;
[self removeFromSuperview]; [self removeFromSuperview];
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -54,7 +53,6 @@ ...@@ -54,7 +53,6 @@
</connections> </connections>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstItem="khV-lo-iWO" firstAttribute="centerX" secondItem="qxV-IK-EGI" secondAttribute="centerX" id="2Lp-Nv-21T"/> <constraint firstItem="khV-lo-iWO" firstAttribute="centerX" secondItem="qxV-IK-EGI" secondAttribute="centerX" id="2Lp-Nv-21T"/>
<constraint firstItem="khV-lo-iWO" firstAttribute="centerY" secondItem="qxV-IK-EGI" secondAttribute="centerY" id="Jmd-B1-gKJ"/> <constraint firstItem="khV-lo-iWO" firstAttribute="centerY" secondItem="qxV-IK-EGI" secondAttribute="centerY" id="Jmd-B1-gKJ"/>
...@@ -75,7 +73,7 @@ ...@@ -75,7 +73,7 @@
</view> </view>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="qxV-IK-EGI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="4np-S5-SLE"/> <constraint firstItem="qxV-IK-EGI" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="4np-S5-SLE"/>
<constraint firstItem="qxV-IK-EGI" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" multiplier="342:375" id="SOg-ru-9BO"/> <constraint firstItem="qxV-IK-EGI" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" multiplier="342:375" id="SOg-ru-9BO"/>
...@@ -92,8 +90,5 @@ ...@@ -92,8 +90,5 @@
<image name="withDraw_bg" width="347" height="242"/> <image name="withDraw_bg" width="347" height="242"/>
<image name="withDraw_cancel" width="32" height="32"/> <image name="withDraw_cancel" width="32" height="32"/>
<image name="withDraw_confirm" width="247" height="52"/> <image name="withDraw_confirm" width="247" height="52"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources> </resources>
</document> </document>
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#import "AppDelegate.h" #import "AppDelegate.h"
#define TIMEOUT (20) #define TIMEOUT (20)
#define cacheOut (900)
/// 广告工具类 /// 广告工具类
...@@ -143,10 +144,13 @@ static IOSADManager * manager = nil; ...@@ -143,10 +144,13 @@ static IOSADManager * manager = nil;
GYAdsTrackModel * ADData = self.cachevideo.firstObject; GYAdsTrackModel * ADData = self.cachevideo.firstObject;
NSTimeInterval tiem = [ADData.cacheDate timeIntervalSinceNow]; NSTimeInterval tiem = [ADData.cacheDate timeIntervalSinceNow];
if (fabs(tiem) > 900) { if (fabs(tiem) > cacheOut) {
[self.videoModels removeAllObjects]; [self.videoModels removeAllObjects];
[self.cachevideo removeAllObjects]; [self.cachevideo removeAllObjects];
[self showADType:AdType resultBlock:self.adShowBlock]; [self showADType:AdType resultBlock:self.adShowBlock];
self.showNow = YES;
MBProgressHUD * hud = [MBProgressHUD showMessage:@"请稍等..."];
hud.minShowTime = 3;
}else{ }else{
[self showAdWithData:self.cachevideo.firstObject withADType:AdType]; [self showAdWithData:self.cachevideo.firstObject withADType:AdType];
self.showNow = NO; self.showNow = NO;
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
[self.countDownView destroyTimer]; [self.countDownView destroyTimer];
[self.countDownView removeFromSuperview]; [self.countDownView removeFromSuperview];
} }
} }
- (void)viewDidLoad { - (void)viewDidLoad {
...@@ -448,6 +447,17 @@ ...@@ -448,6 +447,17 @@
[_webView.configuration.userContentController removeScriptMessageHandlerForName:@"settingCallBack"]; [_webView.configuration.userContentController removeScriptMessageHandlerForName:@"settingCallBack"];
} }
/// 刷新webView
- (void)resumeWebView {
[self.webView evaluateJavaScript:@"onResume()" completionHandler:^(id _Nullable obj, NSError * _Nullable error) {
if (error) {
NSLog(@"%@", error);
} else {
NSLog(@"onResume JS方法调用成功");
}
}];
}
// JS // JS
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message { - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
NSLog(@"%@",message.name);// 方法名 NSLog(@"%@",message.name);// 方法名
...@@ -483,6 +493,10 @@ ...@@ -483,6 +493,10 @@
withdraw.amt = message.body; withdraw.amt = message.body;
withdraw.frame = self.view.bounds; withdraw.frame = self.view.bounds;
[self.view addSubview:withdraw]; [self.view addSubview:withdraw];
WEAKSELF
withdraw.dismissCallBcak = ^{
[weakSelf resumeWebView];
};
[withdraw show:nil]; [withdraw show:nil];
}else if([message.name isEqualToString:@"showDialog"]){ }else if([message.name isEqualToString:@"showDialog"]){
...@@ -511,8 +525,10 @@ ...@@ -511,8 +525,10 @@
[self.view addSubview:gift]; [self.view addSubview:gift];
[gift show:nil]; [gift show:nil];
WEAKSELF
gift.closeCallBack = ^{ gift.closeCallBack = ^{
[self.webView reload]; // [self.webView reload];
[weakSelf resumeWebView];
}; };
} else if([message.name isEqualToString:@"jumpWebActivity"]){ } else if([message.name isEqualToString:@"jumpWebActivity"]){
...@@ -532,7 +548,8 @@ ...@@ -532,7 +548,8 @@
if ([[response objectForKey:@"status"] integerValue] == 200) { if ([[response objectForKey:@"status"] integerValue] == 200) {
// //
NSLog(@"welfare_video_report success"); NSLog(@"welfare_video_report success");
[weakSelf.webView reload]; // [weakSelf.webView reload];
[weakSelf resumeWebView];
} }
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<key>BaiduMobAd_SDK.xcscheme_^#shared#^_</key> <key>BaiduMobAd_SDK.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>9</integer> <integer>7</integer>
</dict> </dict>
<key>Bytedance-UnionAD.xcscheme_^#shared#^_</key> <key>Bytedance-UnionAD.xcscheme_^#shared#^_</key>
<dict> <dict>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<key>GDTMobSDK.xcscheme_^#shared#^_</key> <key>GDTMobSDK.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>7</integer> <integer>13</integer>
</dict> </dict>
<key>KSAdSDK.xcscheme_^#shared#^_</key> <key>KSAdSDK.xcscheme_^#shared#^_</key>
<dict> <dict>
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
<key>MJExtension.xcscheme_^#shared#^_</key> <key>MJExtension.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>10</integer> <integer>9</integer>
</dict> </dict>
<key>MJRefresh.xcscheme_^#shared#^_</key> <key>MJRefresh.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>12</integer> <integer>10</integer>
</dict> </dict>
<key>Masonry.xcscheme</key> <key>Masonry.xcscheme</key>
<dict> <dict>
...@@ -65,12 +65,12 @@ ...@@ -65,12 +65,12 @@
<key>RSPodKSAdaper.xcscheme_^#shared#^_</key> <key>RSPodKSAdaper.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>8</integer> <integer>12</integer>
</dict> </dict>
<key>SigmobAd-iOS.xcscheme_^#shared#^_</key> <key>SigmobAd-iOS.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>17</integer> <integer>14</integer>
</dict> </dict>
<key>SwiftyStoreKit.xcscheme</key> <key>SwiftyStoreKit.xcscheme</key>
<dict> <dict>
...@@ -82,17 +82,17 @@ ...@@ -82,17 +82,17 @@
<key>UMCCommon.xcscheme_^#shared#^_</key> <key>UMCCommon.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>15</integer> <integer>11</integer>
</dict> </dict>
<key>VLionAdSDKPoly.xcscheme_^#shared#^_</key> <key>VLionAdSDKPoly.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>13</integer> <integer>15</integer>
</dict> </dict>
<key>WechatOpenSDK.xcscheme_^#shared#^_</key> <key>WechatOpenSDK.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>11</integer> <integer>17</integer>
</dict> </dict>
</dict> </dict>
<key>SuppressBuildableAutocreation</key> <key>SuppressBuildableAutocreation</key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<key>UnityFramework.xcscheme_^#shared#^_</key> <key>UnityFramework.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>14</integer> <integer>8</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -17,21 +17,5 @@ ...@@ -17,21 +17,5 @@
</Locations> </Locations>
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "E76362C7-EE17-4C6B-8C8C-DD3C4E8BAEB3"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GYDemo/GYDemo/ViewController/GYWebViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "542"
endingLineNumber = "542"
landmarkName = "-userContentController:didReceiveScriptMessage:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints> </Breakpoints>
</Bucket> </Bucket>
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