Commit 8ce7fcf3 authored by zhangshuai's avatar zhangshuai

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

parents 37c09aa4 f69a3c29
......@@ -1003,7 +1003,7 @@
CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 126;
CURRENT_PROJECT_VERSION = 127;
DEVELOPMENT_TEAM = XWMRLLSSFL;
ENABLE_BITCODE = NO;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
......@@ -1035,7 +1035,7 @@
CODE_SIGN_ENTITLEMENTS = GYDemo/GYDemo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 126;
CURRENT_PROJECT_VERSION = 127;
DEVELOPMENT_TEAM = XWMRLLSSFL;
ENABLE_BITCODE = NO;
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = NO;
......
......@@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, copy) NSString * amt;
- (void)show:(UIView * _Nullable)superView;
@property (nonatomic, copy) void(^dismissCallBcak)(void);
@end
NS_ASSUME_NONNULL_END
......@@ -12,7 +12,6 @@
@property (nonatomic, weak) IBOutlet UILabel * detailsLab;
@property (nonatomic, weak) IBOutlet UIView * bgView;
@end
@implementation GYWithDrawAlertView
......@@ -69,6 +68,10 @@
animation.fillMode = kCAFillModeForwards;
[_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(), ^{
self.hidden = YES;
[self removeFromSuperview];
......
......@@ -5,7 +5,6 @@
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<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"/>
</dependencies>
<objects>
......@@ -54,7 +53,6 @@
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<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"/>
......@@ -75,7 +73,7 @@
</view>
</subviews>
<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>
<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"/>
......@@ -92,8 +90,5 @@
<image name="withDraw_bg" width="347" height="242"/>
<image name="withDraw_cancel" width="32" height="32"/>
<image name="withDraw_confirm" width="247" height="52"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -13,6 +13,7 @@
#import "AppDelegate.h"
#define TIMEOUT (20)
#define cacheOut (900)
/// 广告工具类
......@@ -143,10 +144,13 @@ static IOSADManager * manager = nil;
GYAdsTrackModel * ADData = self.cachevideo.firstObject;
NSTimeInterval tiem = [ADData.cacheDate timeIntervalSinceNow];
if (fabs(tiem) > 900) {
if (fabs(tiem) > cacheOut) {
[self.videoModels removeAllObjects];
[self.cachevideo removeAllObjects];
[self showADType:AdType resultBlock:self.adShowBlock];
self.showNow = YES;
MBProgressHUD * hud = [MBProgressHUD showMessage:@"请稍等..."];
hud.minShowTime = 3;
}else{
[self showAdWithData:self.cachevideo.firstObject withADType:AdType];
self.showNow = NO;
......
......@@ -41,7 +41,6 @@
[self.countDownView destroyTimer];
[self.countDownView removeFromSuperview];
}
}
- (void)viewDidLoad {
......@@ -448,6 +447,17 @@
[_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
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
NSLog(@"%@",message.name);// 方法名
......@@ -483,6 +493,10 @@
withdraw.amt = message.body;
withdraw.frame = self.view.bounds;
[self.view addSubview:withdraw];
WEAKSELF
withdraw.dismissCallBcak = ^{
[weakSelf resumeWebView];
};
[withdraw show:nil];
}else if([message.name isEqualToString:@"showDialog"]){
......@@ -511,8 +525,10 @@
[self.view addSubview:gift];
[gift show:nil];
WEAKSELF
gift.closeCallBack = ^{
[self.webView reload];
// [self.webView reload];
[weakSelf resumeWebView];
};
} else if([message.name isEqualToString:@"jumpWebActivity"]){
......@@ -532,7 +548,8 @@
if ([[response objectForKey:@"status"] integerValue] == 200) {
//
NSLog(@"welfare_video_report success");
[weakSelf.webView reload];
// [weakSelf.webView reload];
[weakSelf resumeWebView];
}
} failure:^(NSError * _Nonnull error) {
......
......@@ -14,7 +14,7 @@
<key>BaiduMobAd_SDK.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>9</integer>
<integer>7</integer>
</dict>
<key>Bytedance-UnionAD.xcscheme_^#shared#^_</key>
<dict>
......@@ -24,7 +24,7 @@
<key>GDTMobSDK.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>13</integer>
</dict>
<key>KSAdSDK.xcscheme_^#shared#^_</key>
<dict>
......@@ -41,12 +41,12 @@
<key>MJExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>10</integer>
<integer>9</integer>
</dict>
<key>MJRefresh.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>12</integer>
<integer>10</integer>
</dict>
<key>Masonry.xcscheme</key>
<dict>
......@@ -65,12 +65,12 @@
<key>RSPodKSAdaper.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
<integer>12</integer>
</dict>
<key>SigmobAd-iOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>17</integer>
<integer>14</integer>
</dict>
<key>SwiftyStoreKit.xcscheme</key>
<dict>
......@@ -82,17 +82,17 @@
<key>UMCCommon.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>15</integer>
<integer>11</integer>
</dict>
<key>VLionAdSDKPoly.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>13</integer>
<integer>15</integer>
</dict>
<key>WechatOpenSDK.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>11</integer>
<integer>17</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
......
......@@ -12,7 +12,7 @@
<key>UnityFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>14</integer>
<integer>8</integer>
</dict>
</dict>
</dict>
......
......@@ -17,21 +17,5 @@
</Locations>
</BreakpointContent>
</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>
</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