塔罗牌充值无法开奖的问题
This commit is contained in:
@@ -729,6 +729,7 @@
|
||||
E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */; };
|
||||
E84843AF27F59E7E0050D365 /* XPRoomPKResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */; };
|
||||
E84843B227F5A0740050D365 /* XPRomPKResultTitleLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */; };
|
||||
E845D16F283354A300BE21F7 /* XPEnterpriseTarotPayView.m in Sources */ = {isa = PBXBuildFile; fileRef = E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */; };
|
||||
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */; };
|
||||
E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E412727EE0A008818C6 /* XPRoomMessageHeaderView.m */; };
|
||||
E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E452727EF9D008818C6 /* XPRoomMessageParser.m */; };
|
||||
@@ -2549,6 +2550,8 @@
|
||||
E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKResultView.m; sourceTree = "<group>"; };
|
||||
E84843B027F5A0740050D365 /* XPRomPKResultTitleLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRomPKResultTitleLabel.h; sourceTree = "<group>"; };
|
||||
E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRomPKResultTitleLabel.m; sourceTree = "<group>"; };
|
||||
E845D16D283354A300BE21F7 /* XPEnterpriseTarotPayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseTarotPayView.h; sourceTree = "<group>"; };
|
||||
E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseTarotPayView.m; sourceTree = "<group>"; };
|
||||
E84B0E3D2727EDF6008818C6 /* XPRoomMessageTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageTableViewCell.h; sourceTree = "<group>"; };
|
||||
E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageTableViewCell.m; sourceTree = "<group>"; };
|
||||
E84B0E402727EE0A008818C6 /* XPRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageHeaderView.h; sourceTree = "<group>"; };
|
||||
@@ -6506,6 +6509,8 @@
|
||||
E83A2A36282F4E85002AD58F /* XPMineRechargeViewController.m */,
|
||||
E8FDB61B28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.h */,
|
||||
E8FDB61C28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.m */,
|
||||
E845D16D283354A300BE21F7 /* XPEnterpriseTarotPayView.h */,
|
||||
E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -10430,6 +10435,7 @@
|
||||
E8C6FFEA2755040B004DC9F0 /* XPHomeSearchNavView.m in Sources */,
|
||||
E80EC80F28ACD84000D133C5 /* QEmotion.m in Sources */,
|
||||
E8E859C628264C2300EE4857 /* HTTPAsyncFileResponse.m in Sources */,
|
||||
E845D16F283354A300BE21F7 /* XPEnterpriseTarotPayView.m in Sources */,
|
||||
E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */,
|
||||
9BD2ECDA288F867000F5CD9A /* XPMineFootPrintTableViewCell.m in Sources */,
|
||||
E8001635280410BD00D6D17A /* XPGuildIncomeSectionView.m in Sources */,
|
||||
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPEnterpriseTarotPayView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPEnterpriseTarotPayView : UIView
|
||||
|
||||
@property (nonatomic,copy) NSString *url;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// XPEnterpriseTarotPayView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/17.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseTarotPayView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///View
|
||||
#import "XPWebViewController.h"
|
||||
@interface XPEnterpriseTarotPayView ()
|
||||
@property (nonatomic, strong) XPWebViewController *webVC;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseTarotPayView
|
||||
|
||||
- (void)dealloc {
|
||||
NSLog(@"aaaaaaa");
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.layer.masksToBounds = YES;
|
||||
self.layer.cornerRadius = 15;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.webVC.view];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.webVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self);;
|
||||
make.top.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(self);
|
||||
}];
|
||||
[self.webVC.webview mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.webVC.view);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setUrl:(NSString *)url {
|
||||
_url = url;
|
||||
self.webVC.url = url;
|
||||
}
|
||||
|
||||
- (XPWebViewController *)webVC {
|
||||
if (_webVC == nil) {
|
||||
_webVC = [[XPWebViewController alloc] init];
|
||||
_webVC.view.backgroundColor = [UIColor clearColor];
|
||||
_webVC.webview.backgroundColor = UIColor.clearColor;
|
||||
_webVC.webview.scrollView.backgroundColor = UIColor.clearColor;
|
||||
_webVC.webview.opaque = NO;
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_webVC.urlLoadCompleted = ^(BOOL result, NSError * _Nullable error) {
|
||||
UIColor *aimColor = result ? UIColor.clearColor : UIColor.whiteColor;
|
||||
if (weakSelf.webVC.webview.backgroundColor != aimColor) {
|
||||
weakSelf.webVC.webview.backgroundColor = aimColor;
|
||||
}
|
||||
};
|
||||
}
|
||||
return _webVC;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -29,6 +29,7 @@
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "XPMonentTopicContainerViewController.h"
|
||||
#import "XPRoomHalfWebView.h"
|
||||
#import "XPEnterpriseTarotPayView.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
static const NSString *CompanyFirstDomainByWeChatRegister = @"api.uat.lecheng163.com";
|
||||
@@ -127,6 +128,8 @@ NSString * const kCheckResultFinish = @"checkResultFinish";
|
||||
}
|
||||
|
||||
- (void)initView {
|
||||
///塔罗牌
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkResultFinish:) name:kCheckResultFinish object:nil];
|
||||
if (self.navigationController.viewControllers.count > 1){
|
||||
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"common_nav_back"] style:UIBarButtonItemStylePlain target:self action:@selector(backButtonClick)];
|
||||
|
||||
@@ -194,6 +197,11 @@ NSString * const kCheckResultFinish = @"checkResultFinish";
|
||||
}
|
||||
// Judge is whether to jump to other app.
|
||||
if (![scheme isEqualToString:@"https"] && ![scheme isEqualToString:@"http"]) {
|
||||
if ([scheme isEqualToString:@"weixin"]) {
|
||||
if (endPayRedirectURL) {
|
||||
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:endPayRedirectURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10]];
|
||||
}
|
||||
}
|
||||
BOOL canOpen = [[UIApplication sharedApplication] canOpenURL:request.URL];
|
||||
if (canOpen) {
|
||||
[[UIApplication sharedApplication] openURL:request.URL];
|
||||
@@ -384,20 +392,23 @@ NSString * const kCheckResultFinish = @"checkResultFinish";
|
||||
}
|
||||
} else if([message.name isEqualToString:kOpenDialogWebview]) {
|
||||
XPRoomHalfWebView *alert = [[XPRoomHalfWebView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 37 * 2, 200)];
|
||||
} else if([message.name isEqualToString:kOpenDialogWebview]) {
|
||||
XPEnterpriseTarotPayView *alert = [[XPEnterpriseTarotPayView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 37 * 2, 200)];
|
||||
alert.url = message.body;
|
||||
TTPopupService * service = [[TTPopupService alloc] init];
|
||||
service.shouldDismissOnBackgroundTouch = NO;
|
||||
service.contentView = alert;
|
||||
service.style = TTPopupStyleAlert;
|
||||
[TTPopup popupWithConfig:service];
|
||||
} else if([message.name isEqualToString:kCheckResultFinish]) {
|
||||
[TTPopup dismiss];
|
||||
NSString * body = message.body;
|
||||
///这个为什么不能直接调用下面的的方法?收到这个刷新的方法的是当前半屏的这个webview 但是刷新的话是刷新 打开塔罗牌的那个webView
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kCheckResultFinish object:body];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - private metho
|
||||
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{
|
||||
if (error == nil) {
|
||||
@@ -412,6 +423,7 @@ NSString * const kCheckResultFinish = @"checkResultFinish";
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleRouterType:(NSInteger)skyType message:(WKScriptMessage *)message {
|
||||
NSDictionary *bodyDict;
|
||||
if ([message.body isKindOfClass:[NSDictionary class]]) {
|
||||
@@ -457,6 +469,13 @@ NSString * const kCheckResultFinish = @"checkResultFinish";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)checkResultFinish:(NSNotification *)notification {
|
||||
NSString *js = [NSString stringWithFormat:@"taroPayResultCallback(\"%@\")",notification.object];
|
||||
[self.webview evaluateJavaScript:js completionHandler:^(id _Nullable other, NSError * _Nullable error) {
|
||||
NSLog(@"%@",error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setUrl:(NSString *)urlString{
|
||||
_url = urlString;
|
||||
|
Reference in New Issue
Block a user