Commit 2887d5b8 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

1.delete zhifuVC

parent 3dd5a120
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
686A7CA72487644800C7200C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686A7CA52487644800C7200C /* LaunchScreen.storyboard */; }; 686A7CA72487644800C7200C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 686A7CA52487644800C7200C /* LaunchScreen.storyboard */; };
686A7CAA2487644800C7200C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 686A7CA92487644800C7200C /* main.m */; }; 686A7CAA2487644800C7200C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 686A7CA92487644800C7200C /* main.m */; };
68F6DEB52499CA940034F8D5 /* ZTPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68F6DEB22499CA7E0034F8D5 /* ZTPurchaseManager.swift */; }; 68F6DEB52499CA940034F8D5 /* ZTPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68F6DEB22499CA7E0034F8D5 /* ZTPurchaseManager.swift */; };
68F6DEB62499CA940034F8D5 /* ZJZhiFuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 68F6DEB32499CA940034F8D5 /* ZJZhiFuViewController.m */; };
68F6DEB92499CAD30034F8D5 /* ZJIPAProductModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 68F6DEB72499CAD30034F8D5 /* ZJIPAProductModel.m */; }; 68F6DEB92499CAD30034F8D5 /* ZJIPAProductModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 68F6DEB72499CAD30034F8D5 /* ZJIPAProductModel.m */; };
A948C4742493287200C22D69 /* ZJUserInfoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A948C4732493287200C22D69 /* ZJUserInfoManager.m */; }; A948C4742493287200C22D69 /* ZJUserInfoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A948C4732493287200C22D69 /* ZJUserInfoManager.m */; };
A948C4782493578A00C22D69 /* ZJFriendModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A948C4772493578A00C22D69 /* ZJFriendModel.m */; }; A948C4782493578A00C22D69 /* ZJFriendModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A948C4772493578A00C22D69 /* ZJFriendModel.m */; };
...@@ -232,8 +231,6 @@ ...@@ -232,8 +231,6 @@
686A7CA62487644800C7200C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 686A7CA62487644800C7200C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
686A7CA92487644800C7200C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 686A7CA92487644800C7200C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
68F6DEB22499CA7E0034F8D5 /* ZTPurchaseManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZTPurchaseManager.swift; sourceTree = "<group>"; }; 68F6DEB22499CA7E0034F8D5 /* ZTPurchaseManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZTPurchaseManager.swift; sourceTree = "<group>"; };
68F6DEB32499CA940034F8D5 /* ZJZhiFuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJZhiFuViewController.m; sourceTree = "<group>"; };
68F6DEB42499CA940034F8D5 /* ZJZhiFuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJZhiFuViewController.h; sourceTree = "<group>"; };
68F6DEB72499CAD30034F8D5 /* ZJIPAProductModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJIPAProductModel.m; sourceTree = "<group>"; }; 68F6DEB72499CAD30034F8D5 /* ZJIPAProductModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJIPAProductModel.m; sourceTree = "<group>"; };
68F6DEB82499CAD30034F8D5 /* ZJIPAProductModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJIPAProductModel.h; sourceTree = "<group>"; }; 68F6DEB82499CAD30034F8D5 /* ZJIPAProductModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJIPAProductModel.h; sourceTree = "<group>"; };
A948C4722493287200C22D69 /* ZJUserInfoManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJUserInfoManager.h; sourceTree = "<group>"; }; A948C4722493287200C22D69 /* ZJUserInfoManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJUserInfoManager.h; sourceTree = "<group>"; };
...@@ -747,8 +744,6 @@ ...@@ -747,8 +744,6 @@
children = ( children = (
A9619E8F24AB3662009A2012 /* ZJMemberPayViewController.h */, A9619E8F24AB3662009A2012 /* ZJMemberPayViewController.h */,
A9619E9024AB3662009A2012 /* ZJMemberPayViewController.m */, A9619E9024AB3662009A2012 /* ZJMemberPayViewController.m */,
68F6DEB42499CA940034F8D5 /* ZJZhiFuViewController.h */,
68F6DEB32499CA940034F8D5 /* ZJZhiFuViewController.m */,
68F6DEB22499CA7E0034F8D5 /* ZTPurchaseManager.swift */, 68F6DEB22499CA7E0034F8D5 /* ZTPurchaseManager.swift */,
); );
path = Controller; path = Controller;
...@@ -1600,7 +1595,6 @@ ...@@ -1600,7 +1595,6 @@
A95F5C7F248DDE81001DB97E /* ZJMineCellModel.m in Sources */, A95F5C7F248DDE81001DB97E /* ZJMineCellModel.m in Sources */,
A95F5C9C248DE232001DB97E /* KeychainItemWrapper.m in Sources */, A95F5C9C248DE232001DB97E /* KeychainItemWrapper.m in Sources */,
642A43F424921CAD0064A98B /* ZJLocationRemindFriendSelectView.m in Sources */, 642A43F424921CAD0064A98B /* ZJLocationRemindFriendSelectView.m in Sources */,
68F6DEB62499CA940034F8D5 /* ZJZhiFuViewController.m in Sources */,
A95F5C96248DDE81001DB97E /* SDLayoutExtention.swift in Sources */, A95F5C96248DDE81001DB97E /* SDLayoutExtention.swift in Sources */,
A95BD5AE24AD8E8D00962B06 /* AESCipher.m in Sources */, A95BD5AE24AD8E8D00962B06 /* AESCipher.m in Sources */,
A948C504249B887B00C22D69 /* ZJGoodsModel.m in Sources */, A948C504249B887B00C22D69 /* ZJGoodsModel.m in Sources */,
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#import "ZJOauthLoginConfig.h" #import "ZJOauthLoginConfig.h"
#import "ZJUpgradeAlertView.h" #import "ZJUpgradeAlertView.h"
#import "ZJZhiFuViewController.h"
#import "JZLocationConverter.h" #import "JZLocationConverter.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
......
//
// ZJZhiFuViewController.h
// ZhiJi
//
// Created by Company on 2020/6/8.
// Copyright © 2020 Company. All rights reserved.
//
#import "BaseViewController.h"
#import <StoreKit/StoreKit.h>
//enum{
// IAP0p20=20,
// IAP1p100,
// IAP4p600,
// IAP9p1000,
// IAP24p6000,
//} buCoinsTag;
NS_ASSUME_NONNULL_BEGIN
//enum{
// IAP0p20=20,
// IAP1p100,
// IAP4p600,
// IAP9p1000,
// IAP24p6000,
//} buyCoinsTag;
@interface ZJZhiFuViewController : BaseViewController<SKPaymentTransactionObserver,SKProductsRequestDelegate >
@property (nonatomic, copy)void(^payFinish)(void);
@property (nonatomic, copy) void(^clickCallBack)(BOOL);
@end
NS_ASSUME_NONNULL_END
//
// ZJZhiFuViewController.m
// ZhiJi
//
// Created by Company on 2020/6/8.
// Copyright © 2020 Company. All rights reserved.
//
#import "ZJZhiFuViewController.h"
#import "Protocol.h"
#import <StoreKit/StoreKit.h>
#import "TQNetworkTools.h"
#import "ZJIPAProductModel.h"
#import "ZhiJi-Swift.h"
#import "BaseWebViewController.h"
@interface ZJZhiFuViewController ()
@property (nonatomic, strong)UILabel *fuKuanXinxiLabel;
@property (nonatomic, strong)UIButton *fanHuiButton;
@property (nonatomic, strong)UIView *kaiTongView;
@property (nonatomic, strong)UILabel *kaiTongLabel;
@property (nonatomic, strong)UILabel *dingWeiLabel;
@property (nonatomic, strong)UILabel *jiaGeLabel;
@property (nonatomic, strong)UILabel *miaoShuLabel;
@property (nonatomic, strong)UIView *zhiFuView;
@property (nonatomic, strong)UIImageView *zhiFuImageView;
@property (nonatomic, strong)UILabel *zhiFuLabel;
@property (nonatomic, strong)UIButton *zhiFuButton;
@property (nonatomic, strong)UIView *weiXinView;
@property (nonatomic, strong)UIImageView *weiXinImageView;
@property (nonatomic, strong)UILabel *weiXinLabel;
@property (nonatomic, strong)UIButton *weiXinButton;
@property (nonatomic, strong)UIButton *quZhiFuButton;
@property (nonatomic, strong)UIButton *xuanZe;
@property (nonatomic, strong)UIButton *tongYiButton;
@property (nonatomic, strong)UIView *beiJingView;
@property (nonatomic, strong)UIButton *xuanZheButoon;
@property (nonatomic, strong)UIButton *tongYButton;
@property (nonatomic, strong)Protocol *protocolView;
@property (nonatomic, strong)UIView *miaoShuView;
@property (nonatomic, strong)UILabel *miaoShuLabel2;
@property (nonatomic, strong)UIImageView *warningImg;
@property (nonatomic, copy)NSString *labelStyle;
//内购
@property (nonatomic, strong)UIButton *huiFuButton;
@property (nonatomic, strong) NSMutableArray *products;
@property (nonatomic, copy) NSString *productID;
@property (nonatomic, strong) ZJIPAProductModel *currentProduct;
@end
@implementation ZJZhiFuViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
[self getPayPageData];
[self setupUI];
[self getIpaList];
self.labelStyle = [NSString string];
self.products = [NSMutableArray array];
}
- (void)viewWillAppear:(BOOL)animated{
[self.navigationController setNavigationBarHidden:true animated:true];
}
- (void)setupUI{
//返回Button
self.fanHuiButton = [[UIButton alloc] init];
[self.fanHuiButton setImage:[UIImage imageNamed:@"支付返回"] forState:UIControlStateNormal];
[self.fanHuiButton setTitle:kLocalizedString(@"setting") forState:UIControlStateNormal];
[self.view addSubview:self.fanHuiButton];
[self.fanHuiButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.view).mas_offset(KScaleWidth(32) + StatusBarDif);
make.size.mas_offset(CGSizeMake(KScaleWidth(24), KScaleWidth(24)));
make.left.equalTo(self.view.mas_left).mas_offset(KScaleWidth(15));
}];
[self.fanHuiButton addTarget:self action:@selector(fanHuiButtonClick) forControlEvents:UIControlEventTouchUpInside];
//fuKuanXinxiLabel
self.fuKuanXinxiLabel = [UILabel labelWithtext:@"付款信息" font:[UIFont systemFontOfSize:KFont(18)] textColor:[UIColor colorWithHex:0x212121] alignment:NSTextAlignmentCenter];
self.fuKuanXinxiLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:18];
[self.view addSubview:self.fuKuanXinxiLabel];
[self.fuKuanXinxiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.fanHuiButton).mas_offset(KScaleWidth(0));
make.centerX.equalTo(self.view).mas_offset(0);
make.size.mas_offset(CGSizeMake(KScaleWidth(100), KScaleWidth(17)));
}];
//恢复Button
self.huiFuButton = [[UIButton alloc] init];
[self.huiFuButton setTitle:@"恢复购买" forState:UIControlStateNormal];
[self.huiFuButton setTitleColor:[UIColor colorWithHex:0x212121] forState:UIControlStateNormal];
[self.huiFuButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(14)]];
[self.view addSubview:self.huiFuButton];
[self.huiFuButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.fanHuiButton).mas_offset(KScaleWidth(0));
make.size.mas_offset(CGSizeMake(KScaleWidth(90), KScaleWidth(44)));
make.right.equalTo(self.view).mas_offset(KScaleWidth(-15));
}];
[self.huiFuButton addTarget:self action:@selector(huiFuButtonClick) forControlEvents:UIControlEventTouchUpInside];
//开通View
self.kaiTongView = [[UIView alloc] initWithFrame:CGRectMake(20, 100, 200, 200)];
// _bgView.backgroundColor = [UIColor whiteColor];
self.kaiTongView.layer.contents = (__bridge id _Nullable)([UIImage imageNamed:@"pay_infom_card_bg"].CGImage);
self.kaiTongView.contentMode = UIViewContentModeScaleAspectFit;
[self.view addSubview:self.kaiTongView];
[self.kaiTongView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.fuKuanXinxiLabel.mas_bottom).mas_offset(KScaleWidth(16));
make.centerX.equalTo(self.view);
make.size.mas_offset(CGSizeMake(KScaleWidth(340), KScaleWidth(170)));
}];
//kaiTongLabel
self.kaiTongLabel = [UILabel labelWithtext:@"一次开通终生使用" font:[UIFont systemFontOfSize:KFont(18)] textColor:[UIColor colorWithHex:0xFFFFFF] alignment:NSTextAlignmentCenter];
self.kaiTongLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:18];
[self.kaiTongView addSubview:self.kaiTongLabel];
[self.kaiTongLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.kaiTongView).mas_offset(KScaleWidth(74.5));
make.centerX.equalTo(self.view).mas_offset(0);
make.size.mas_offset(CGSizeMake(KScaleWidth(170), KScaleWidth(17)));
}];
//定位label
self.dingWeiLabel = [UILabel labelWithtext:@"手机定位VIP服务费" font:[UIFont systemFontOfSize:KFont(12)] textColor:[UIColor colorWithHex:0xFFFFFF] alignment:NSTextAlignmentCenter];
[self.kaiTongView addSubview:self.dingWeiLabel];
[self.dingWeiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.kaiTongLabel.mas_bottom).mas_offset(KScaleWidth(9.5));
make.centerX.equalTo(self.kaiTongView).mas_offset(0);
make.size.mas_offset(CGSizeMake(KScaleWidth(170), KScaleWidth(11.5)));
}];
//
//价格label
self.jiaGeLabel = [UILabel labelWithtext:@"98元" font:[UIFont systemFontOfSize:KFont(22)] textColor:[UIColor colorWithHex:0xFFF825] alignment:NSTextAlignmentCenter];
[self.kaiTongView addSubview:self.jiaGeLabel];
[self.jiaGeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.dingWeiLabel.mas_bottom).mas_offset(KScaleWidth(19));
make.centerX.equalTo(self.kaiTongView).mas_offset(0);
make.size.mas_offset(CGSizeMake(KScaleWidth(170), KScaleWidth(19)));
}];
//描述View
self.miaoShuView = [[UIView alloc] initWithFrame:CGRectMake(20, 100, 200, 200)];
self.miaoShuView.backgroundColor = [UIColor colorWithHex:0xEEEEEE];
[self.view addSubview:self.miaoShuView];
[self.miaoShuView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.kaiTongView.mas_bottom).mas_offset(KScaleWidth(12));
make.centerX.equalTo(self.view);
make.size.mas_offset(CGSizeMake(KScaleWidth(340), KScaleWidth(71.5)));
}];
self.miaoShuView.layer.cornerRadius = KScaleWidth(6);
self.miaoShuView.layer.masksToBounds = YES;
//warningImg
self.warningImg = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"warning_img"]];
self.warningImg.contentMode = UIViewContentModeScaleToFill;
self.warningImg.userInteractionEnabled = YES;
[self.miaoShuView addSubview:self.warningImg];
[self.warningImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.miaoShuView).mas_offset(KScaleWidth(20.5));
make.left.equalTo(self.miaoShuView).mas_offset(KScaleWidth(10));
make.size.mas_offset(CGSizeMake(16, 16));
}];
//描述Label2
NSString *str1 =@"开通会员后,您可以实时定位家人/朋友手机实时位置、查看TA的历史轨迹";
self.miaoShuLabel2 = [UILabel labelWithtext:str1 font:[UIFont systemFontOfSize:KFont(14)] textColor:[UIColor colorWithHex:0xFF1E1E] alignment:NSTextAlignmentCenter];
[UILabel changeLineSpaceForLabel:self.miaoShuLabel2 WithSpace:5];
self.miaoShuLabel2.textAlignment = NSTextAlignmentCenter;
self.miaoShuLabel2.numberOfLines = 0;
[self.miaoShuView addSubview:self.miaoShuLabel2];
[self.miaoShuLabel2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.miaoShuView).mas_offset(KScaleWidth(20.5));
make.left.equalTo(self.warningImg.mas_right).mas_offset(KScaleWidth(8.5));
make.right.equalTo(self.miaoShuView).mas_offset(KScaleWidth(-10));
}];
//描述Label
NSString *str =@"开通会员后,您可以实时定位家人/朋友手机实时位置、查看TA的历史轨迹";
self.miaoShuLabel = [UILabel labelWithtext:str font:[UIFont systemFontOfSize:KFont(12)] textColor:[UIColor colorWithHex:0x8B8B8B] alignment:NSTextAlignmentCenter];
[UILabel changeLineSpaceForLabel:self.miaoShuLabel WithSpace:10];
self.miaoShuLabel.textAlignment = NSTextAlignmentCenter;
self.miaoShuLabel.numberOfLines = 0;
[self.view addSubview:self.miaoShuLabel];
[self.miaoShuLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.kaiTongView.mas_bottom).mas_offset(KScaleWidth(34));
make.left.equalTo(self.view).mas_offset(KScaleWidth(76));
make.right.equalTo(self.view).mas_offset(KScaleWidth(-76));
}];
[self.miaoShuLabel setHidden:true];
[self.miaoShuView setHidden:true];
//beiJingView
self.beiJingView = [[UIView alloc] initWithFrame:CGRectMake(20, 100, 200, 200)];
self.beiJingView.backgroundColor = [UIColor colorWithHex:0xF3F3F3];
// self.beiJingView.backgroundColor = [UIColor blackColor];
[self.view addSubview:self.beiJingView];
[self.beiJingView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.miaoShuLabel.mas_bottom).mas_offset(KScaleWidth(35.5));
make.left.right.equalTo(self.view).mas_offset(0);
make.bottom.equalTo(self.view).mas_offset(0);
}];
//quZhiFuButton
self.quZhiFuButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.quZhiFuButton setTitle:@"去支付" forState:0];
[self.quZhiFuButton setTitleColor:[UIColor colorWithHex:0xFFFFFF] forState:UIControlStateNormal];
[self.quZhiFuButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(14)]];
[self.quZhiFuButton setBackgroundImage:[UIImage imageNamed:@"pay_button"] forState:UIControlStateNormal];
[self.beiJingView addSubview:self.quZhiFuButton];
[self.quZhiFuButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.beiJingView).mas_offset(KScaleWidth(80));
// make.centerY.equalTo(self.beiJingView);
make.centerX.equalTo(self.beiJingView).mas_offset(KScaleWidth(0));
make.size.mas_offset(CGSizeMake(KScaleWidth(334), KScaleWidth(50)));
}];
[self.quZhiFuButton addTarget:self action:@selector(quZhiFuButtonClick) forControlEvents:UIControlEventTouchUpInside];
//xuanZheButoon
self.xuanZheButoon = [[UIButton alloc] init];
[self.xuanZheButoon setImage:[UIImage imageNamed:@"agreement_selected"] forState:UIControlStateSelected];
[self.xuanZheButoon setImage:[UIImage imageNamed:@"agreement_unselected"] forState:UIControlStateNormal];
self.xuanZheButoon.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[self.beiJingView addSubview:self.xuanZheButoon];
[self.xuanZheButoon mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.quZhiFuButton.mas_bottom).mas_offset(21);
make.size.mas_offset(CGSizeMake(KScaleWidth(15), KScaleWidth(15)));
make.left.equalTo(self.quZhiFuButton).mas_offset(KScaleWidth(5));
}];
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
if (switchDic && [[NSString stringWithFormat:@"%@", [switchDic objectForKey:@"wd_agreement_selected"]] isEqualToString:@"1"]) {
self.xuanZheButoon.selected = YES;
}
[self.xuanZheButoon addTarget:self action:@selector(xuanZheButoonClick:) forControlEvents:UIControlEventTouchUpInside];
//同意Button
self.tongYButton = [UIButton buttonWithType:UIButtonTypeCustom];
// self.tongYButton.backgroundColor = [UIColor redColor];
self.tongYButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[self.tongYButton setTitle:@"购买前请先阅读并同意《Family Mapp付费会员服务协议》" forState:0];
[self.tongYButton setTitleColor:[UIColor colorWithHex:0x666666] forState:UIControlStateNormal];
[self.tongYButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(13)]];
[self.beiJingView addSubview:self.tongYButton];
[self.tongYButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.xuanZheButoon.mas_right).mas_offset(KScaleWidth(5));
make.centerY.equalTo(self.xuanZheButoon).mas_offset(KScaleWidth(0));
make.size.mas_offset(CGSizeMake(KScaleWidth(300), KScaleWidth(12.5)));
}];
// [self.tongYButton addTarget:self action:@selector(tongYButtonClick) forControlEvents:UIControlEventTouchUpInside];
}
- (void)fanHuiButtonClick{
[self.navigationController popViewControllerAnimated:YES];
}
//- (void) zhiFuButtonClick:(UIButton *)btn{
//
// self.zhiFuButton.selected = YES;
// self.weiXinButton.selected = NO;
//
// NSLog(@"暂不支持");
//}
//- (void)weiXinButtonClick:(UIButton *)btn{
//
// self.zhiFuButton.selected = NO;
// self.weiXinButton.selected = YES;
//}
- (void)quZhiFuButtonClick{
if (self.xuanZheButoon.selected) {
NSLog(@"跳转支付");
// NSString *product = self.productID;
// if (self.currentProduct == nil){
// [MBProgressHUD showError:kLocalizedString(@"pay_produce_info_fail")];
// return;
// }
// if([SKPaymentQueue canMakePayments]){
// [self requestProductData:product];
// }else{
// NSLog(@"不允许程序内付费");
// }
NSString *productId = self.currentProduct.productId;
if (productId.length <= 0) {
[MBProgressHUD showError:kLocalizedString(@"pay_produce_info_fail")];
return;
}
[ZTPurchaseManager purchaseWithProductIdWithProductId:productId inView:self.view success:^{
if (self.payFinish) {
self.payFinish();
}
[self.navigationController popViewControllerAnimated:YES];
} faliure:^{
[MBProgressHUD hideHUD];
}];
}
else{
self.protocolView = [[Protocol alloc] init];
[self.protocolView showToView:self.view];
__weak typeof(self) weakSelf = self;
self.protocolView.leftButtonClick = ^{
// 移除弹窗
[weakSelf.protocolView hide:^{
if (weakSelf.clickCallBack) {
weakSelf.clickCallBack(NO);
}
}];
};
self.protocolView.rightButtonClick = ^{
// 切换至tabVc
[weakSelf.protocolView hide:^{
if (weakSelf.clickCallBack) {
weakSelf.clickCallBack(YES);
}
weakSelf.xuanZheButoon.selected = YES;
}];
};
NSLog(@"跳转协议");
self.protocolView.buttonClick = ^(id num){
//后续优化
NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
NSString * path;
switch ([num integerValue]) {
case 1:
path = [dic objectForKey:@"privacy"];
break;
case 2:
path = [dic objectForKey:@"user"];
break;
default:
break;
}
BaseWebViewController * web = [[BaseWebViewController alloc] init];
web.url = path;
ZJNavViewController * nav = [[ZJNavViewController alloc] initWithRootViewController:web];
[weakSelf presentViewController:nav animated:YES completion:nil];
};
}
}
- (void)xuanZheButoonClick:(UIButton *)btn{
btn.selected = !btn.selected;
}
-(void)getIpaList {
__weak typeof(self) weakSelf = self;
[[TQNetworkTools shared]getWithAction:PaymentConfiguration parameters:@{} success:^(id _Nonnull response) {
NSLog(@"response----------------------%@",response);
NSLog(@"response:%@",response);
if ([[response objectForKey:@"status"] intValue] == 200)
{
NSArray *goodList = response[@"result"][@"data"][@"goodsList"];
for (NSDictionary *good in goodList) {
ZJIPAProductModel *model = [ZJIPAProductModel modelWithDic:good];
if (model != nil) {
[weakSelf.products addObject:model];
}
}
weakSelf.currentProduct = weakSelf.products.firstObject;
weakSelf.jiaGeLabel.text = [NSString stringWithFormat:@"%.0f元",weakSelf.currentProduct.cash];
// self.productID = weakSelf.currentProduct.productId;
}
} failure:^(NSError * _Nonnull error) {
NSLog(@"error");
}];
}
- (void)getPayPageData{
self.miaoShuView.hidden = YES;
self.miaoShuLabel.hidden = false;
[[TQNetworkTools shared]getWithAction:payPageData parameters:@{} success:^(id _Nonnull response) {
NSLog(@"response=========%@",response);
if ([[response objectForKey:@"status"] intValue] == 200) {
NSString *labelStyle = response[@"result"][@"data"][@"style"];
if ([labelStyle intValue] == 1) {
[self layOutLabel];
}else{
[self layOutingLabel];
}
NSString *labeltext = response[@"result"][@"data"][@"text"];
self.miaoShuLabel.text = labeltext;
self.miaoShuLabel2.text = labeltext;
} else {
self.miaoShuLabel.hidden = false;
}
} failure:^(NSError * _Nonnull error) {
NSLog(@"%@",error);
}];
}
//恢复按钮点击
- (void)huiFuButtonClick{
NSLog(@"恢复购买");
[ZTPurchaseManager restorePurchasesWithSuccess:^{
[self.navigationController popViewControllerAnimated:YES];
}];
}
- (void)layOutLabel{
self.miaoShuLabel.hidden = NO;
self.miaoShuView.hidden = YES;
}
- (void)layOutingLabel{
self.miaoShuLabel.hidden = YES;
self.miaoShuView.hidden = NO;
}
@end
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#import "ZJMapCardFriendSelectView.h" #import "ZJMapCardFriendSelectView.h"
#import "ZJOauthLoginConfig.h" #import "ZJOauthLoginConfig.h"
#import "ZJUpgradeAlertView.h" #import "ZJUpgradeAlertView.h"
#import "ZJZhiFuViewController.h"
#import "ZJMemberPayViewController.h" #import "ZJMemberPayViewController.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#import "ZJUpdateNickNameView.h" #import "ZJUpdateNickNameView.h"
#import "ZJMineUserInfoModel.h" #import "ZJMineUserInfoModel.h"
#import "ZJFriendTrackMapViewController.h" #import "ZJFriendTrackMapViewController.h"
#import "ZJZhiFuViewController.h"
#import "ZJUserInfoManager.h" #import "ZJUserInfoManager.h"
#import "ZJMemberPayViewController.h" #import "ZJMemberPayViewController.h"
......
...@@ -79,8 +79,8 @@ appName = "Family Mapp"; ...@@ -79,8 +79,8 @@ appName = "Family Mapp";
"care_add"="Add"; "care_add"="Add";
"care_invite_friends"="Invite friends"; "care_invite_friends"="Invite friends";
//"care_invite_facebook"="Invite with Facebook"; "care_invite_facebook"="Invite with Facebook";
"care_invite_facebook"="Invite"; //"care_invite_facebook"="Invite";
"care_no_user"="No user found"; "care_no_user"="No user found";
"care_footer_details_0"="Where is my friend?"; "care_footer_details_0"="Where is my friend?";
......
...@@ -77,8 +77,8 @@ appName = "Family Mapp"; ...@@ -77,8 +77,8 @@ appName = "Family Mapp";
"care_add_location_cincerns"="添加位置关心"; "care_add_location_cincerns"="添加位置关心";
"care_add"="添加"; "care_add"="添加";
"care_invite_friends"="邀请好友"; "care_invite_friends"="邀请好友";
//"care_invite_facebook"="facebook邀请"; "care_invite_facebook"="facebook邀请";
"care_invite_facebook"="邀请"; //"care_invite_facebook"="邀请";
"care_no_user"="未找到用户"; "care_no_user"="未找到用户";
"care_footer_details_0"="我的朋友在哪里?"; "care_footer_details_0"="我的朋友在哪里?";
......
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