修改
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
- (void)configQIYUSDK {
|
||||
[[QYSDK sharedSDK] registerAppId:@"b6b7ca22f8ce319dea3a7456dc211fec" appName:@"音萌"];
|
||||
[[QYSDK sharedSDK] registerAppId:@"b6b7ca22f8ce319dea3a7456dc211fec" appName:@"mew"];
|
||||
[QYSDK sharedSDK].customUIConfig.showAudioEntry = NO;
|
||||
[QYSDK sharedSDK].customUIConfig.autoShowKeyboard = NO;
|
||||
[QYSDK sharedSDK].customUIConfig.serviceHeadImage = [UIImage imageNamed:@"ming_setting_about_us"];
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#else
|
||||
/// http://h5.ymlive.fun
|
||||
#define API_HOST_H5_URL @"FRuPSi1EatQns610kVGhvBTZFQy13wFqbpfw5SyhvAM="
|
||||
#define API_HOST_H5_URL @"+q1JXmshk337bVXcYPsrJRAilYbIsStE4fh5dRzDj2k="
|
||||
|
||||
/// https://api.ymlive.fun
|
||||
#define API_HOST_URL @"Lk4rBT4xOjIVF9nPfBvRvyW9xx/sjOb0YbkCThRndxU="
|
||||
|
@@ -57,6 +57,8 @@
|
||||
@property (nonatomic, strong) MewUserIntroductionView *userIntroductionView;
|
||||
/// 当前圆角的视图
|
||||
@property (nonatomic, strong) UIView *currentLayerView;
|
||||
/// 过滤view
|
||||
@property (nonatomic, strong) YMHomeFilterView *filterView;
|
||||
|
||||
/// 获取的用户数据数组
|
||||
@property (nonatomic, strong) NSArray<UserInfoModel *> *userInfoModels;
|
||||
@@ -208,7 +210,7 @@
|
||||
/// - Parameter target: 0 - 过滤 1-换一换 2-个人中心
|
||||
- (void)didSelectWithMewHeaderViewTarget:(NSInteger)target {
|
||||
if (target == 0) { //过滤
|
||||
YMHomeFilterView *filterView = [[YMHomeFilterView alloc] initWithPoint:CGPointMake(24, CGRectGetMaxY(self.headerView.frame) - 15.0) completed:^(NSInteger index) {
|
||||
self.filterView = [[YMHomeFilterView alloc] initWithPoint:CGPointMake(24, CGRectGetMaxY(self.headerView.frame) - 15.0) completed:^(NSInteger index) {
|
||||
if (index == 0) {
|
||||
//全部
|
||||
self.filterString = nil;
|
||||
@@ -216,7 +218,13 @@
|
||||
self.filterString = [NSString stringWithFormat:@"%ld",index];
|
||||
}
|
||||
}];
|
||||
[self.view addSubview:filterView];
|
||||
[self.view addSubview:self.filterView];
|
||||
} else if (target == 3) {
|
||||
if (self.filterView) {
|
||||
[self.filterView removeFromSuperview];
|
||||
self.filterView = nil;
|
||||
}
|
||||
|
||||
} else if (target == 1) { //换一换
|
||||
//重调接口
|
||||
[self.presenter getMewHomeFriendListWithGender:self.filterString];
|
||||
|
@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol MewHeaderViewDelegate <NSObject>
|
||||
|
||||
/// 选中的是哪个事件
|
||||
/// - Parameter target: 0 - 过滤 1-换一换 2-个人中心
|
||||
/// - Parameter target: 0 - 过滤 1-换一换 2-个人中心 3-移除过滤view
|
||||
- (void)didSelectWithMewHeaderViewTarget:(NSInteger)target;
|
||||
|
||||
@end
|
||||
|
@@ -53,9 +53,10 @@
|
||||
|
||||
#pragma mark - Action Event
|
||||
/// 过滤
|
||||
- (void)filterButtonAction {
|
||||
- (void)filterButtonAction:(UIButton *)sender {
|
||||
sender.selected = !sender.selected;
|
||||
if (self.delegate) {
|
||||
[self.delegate didSelectWithMewHeaderViewTarget:0];
|
||||
[self.delegate didSelectWithMewHeaderViewTarget:sender.selected ? 0 : 3];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +122,8 @@
|
||||
_filterButton.layer.cornerRadius = 14;
|
||||
_filterButton.layer.masksToBounds = YES;
|
||||
_filterButton.backgroundColor = [ThemeColor colorWithHexString:@"#1D1E1F"];
|
||||
[_filterButton addTarget:self action:@selector(filterButtonAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
_filterButton.selected = NO;
|
||||
[_filterButton addTarget:self action:@selector(filterButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _filterButton;
|
||||
}
|
||||
|
@@ -319,13 +319,13 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
|
||||
// }
|
||||
NSArray <ASAuthorizationRequest *> * requests = [array copy];
|
||||
// 由ASAuthorizationAppleIDProvider创建的授权请求 管理授权请求的控制器
|
||||
ASAuthorizationController * authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:requests];
|
||||
ASAuthorizationController * authorization = [[ASAuthorizationController alloc] initWithAuthorizationRequests:requests];
|
||||
// 设置授权控制器通知授权请求的成功与失败的代理
|
||||
authorizationController.delegate = self;
|
||||
authorization.delegate = self;
|
||||
// 设置提供 展示上下文的代理,在这个上下文中 系统可以展示授权界面给用户
|
||||
authorizationController.presentationContextProvider = self;
|
||||
authorization.presentationContextProvider = self;
|
||||
// 在控制器初始化期间启动授权流
|
||||
[authorizationController performRequests];
|
||||
[authorization performRequests];
|
||||
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MewRechargeSubViewDelegate <NSObject>
|
||||
|
||||
- (void)didSelectMewRechargeChargeProdId:(NSString *)chargeProdId;
|
||||
- (void)didSelectMewRechargeChargeProdId:(NSInteger)index;
|
||||
|
||||
- (void)didSelectMewRechargeProtocol;
|
||||
|
||||
|
@@ -34,6 +34,7 @@
|
||||
//@property (nonatomic, strong) UIStackView *rechargeStackView;
|
||||
@property (nonatomic, strong) UIButton *rechargeButton;
|
||||
@property (nonatomic, strong) RechargeListModel *selectModel;
|
||||
@property (nonatomic, assign) NSInteger index;
|
||||
|
||||
@end
|
||||
|
||||
@@ -57,8 +58,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (self.delegate) {
|
||||
[self.delegate didSelectMewRechargeChargeProdId:self.selectModel.chargeProdId];
|
||||
[self.delegate didSelectMewRechargeChargeProdId:self.index];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +74,8 @@
|
||||
currentRechargeView.layer.borderColor = [ThemeColor colorWithHexString:@"#9552FF"].CGColor;
|
||||
currentRechargeView.layer.borderWidth = 1.0;
|
||||
|
||||
NSInteger selectIndex = tap.view.tag;
|
||||
NSInteger selectIndex = tap.view.tag - 100;
|
||||
self.index = selectIndex;
|
||||
self.selectModel = self.rechargeModels[selectIndex];
|
||||
|
||||
|
||||
@@ -86,7 +89,7 @@
|
||||
|
||||
- (void)setRechargeModels:(NSArray<RechargeListModel *> *)rechargeModels {
|
||||
_rechargeModels = rechargeModels;
|
||||
[self initRechargeView];
|
||||
[self initRechargeViewWithModels:_rechargeModels];
|
||||
}
|
||||
|
||||
#pragma mark - Init
|
||||
@@ -102,21 +105,21 @@
|
||||
[self initLayout];
|
||||
}
|
||||
|
||||
- (void)initRechargeView {
|
||||
- (void)initRechargeViewWithModels:(NSArray<RechargeListModel *> *)rechargeModel {
|
||||
CGFloat viewWidth = 144.0;
|
||||
CGFloat viewHeight = 83;
|
||||
CGFloat marginX = 23.0;
|
||||
CGFloat marginLeft = (KScreenWidth - 2*viewWidth - marginX)/2.0;
|
||||
CGFloat marginTop = 20.0;
|
||||
for (int i = 0; i < self.rechargeModels.count; i++) {
|
||||
RechargeListModel *model = self.rechargeModels[i];
|
||||
for (int i = 0; i < rechargeModel.count; i++) {
|
||||
RechargeListModel *model = rechargeModel[i];
|
||||
|
||||
UIView *rechargeBgView = [[UIView alloc] init];
|
||||
rechargeBgView.frame = CGRectMake((i%2 * (viewWidth + marginX)) + marginLeft, i/2 * (viewHeight + marginTop), viewWidth, viewHeight);
|
||||
rechargeBgView.backgroundColor = UIColorRGBAlpha(0x525566, 0.8);
|
||||
rechargeBgView.layer.cornerRadius = 8.0;
|
||||
rechargeBgView.layer.masksToBounds = YES;
|
||||
rechargeBgView.tag = i;
|
||||
rechargeBgView.tag = i + 100;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didRechargeButtonAction:)];
|
||||
[rechargeBgView addGestureRecognizer:tap];
|
||||
[self.rechargeBgViewArrays addObject:rechargeBgView];
|
||||
@@ -154,7 +157,7 @@
|
||||
|
||||
double count = ceil(self.rechargeModels.count/2);
|
||||
[self.rechargeView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(viewHeight * count + (count - 1) * marginTop);
|
||||
make.height.mas_equalTo(400);
|
||||
}];
|
||||
|
||||
}
|
||||
@@ -182,11 +185,7 @@
|
||||
make.left.right.equalTo(self);
|
||||
make.top.equalTo(self.balanceBgImageView.mas_bottom).offset(19);
|
||||
}];
|
||||
|
||||
[self.rechargePrivacyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.rechargeView.mas_bottom).offset(40);
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
|
||||
|
||||
[self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(-60);
|
||||
@@ -194,6 +193,12 @@
|
||||
make.height.mas_equalTo(48);
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
|
||||
|
||||
[self.rechargePrivacyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.rechargeButton.mas_top).offset(-10);
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Get
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#import "YMMacro.h"
|
||||
#import "YMIAPHelper.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "RechargeListModel.h"
|
||||
/// P
|
||||
#import "MineRechargeProtocol.h"
|
||||
#import "MineRechargePresenter.h"
|
||||
@@ -58,7 +59,7 @@
|
||||
|
||||
#pragma mark - Load Data
|
||||
- (void)loadData {
|
||||
[self.presenter requestRechargeListWithChannel:@"1"];
|
||||
[self.presenter requestRechargeListWithChannel:@"8"];
|
||||
[self.presenter getUserWalletInfo];
|
||||
}
|
||||
|
||||
@@ -67,10 +68,11 @@
|
||||
self.rechageView.walletModel = balanceInfo;
|
||||
}
|
||||
|
||||
- (void)requestRechargeListSucccess:(NSArray *)list {
|
||||
- (void)requestRechargeListSucccess:(NSArray<RechargeListModel *> *)list {
|
||||
self.rechageView.rechargeModels = list;
|
||||
}
|
||||
|
||||
|
||||
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId uuid:(nonnull NSString *)uuid{
|
||||
if (orderId.length > 0) {
|
||||
|
||||
@@ -119,6 +121,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)requestIAPRechargeOrderFail {
|
||||
|
||||
}
|
||||
|
||||
///当前充值的状态
|
||||
- (void)rechargeNewProcessStatus:(MewStoreConditionResult)status {
|
||||
@@ -204,9 +209,10 @@
|
||||
}
|
||||
}
|
||||
#pragma mark - MewRechargeSubViewDelegate
|
||||
- (void)didSelectMewRechargeChargeProdId:(NSString *)chargeProdId {
|
||||
- (void)didSelectMewRechargeChargeProdId:(NSInteger )index {
|
||||
[YMHUDTool showLoadingInView:kWindow];
|
||||
[self.presenter requestIAPRechargeOrderWithChargeProdId:chargeProdId];
|
||||
NSString *prodId = self.rechageView.rechargeModels[index].chargeProdId;
|
||||
[self.presenter requestIAPRechargeOrderWithChargeProdId:[NSString stringWithFormat:@"%@",prodId]];
|
||||
}
|
||||
/// 选中用户协议
|
||||
- (void)didSelectMewRechargeProtocol {
|
||||
|
@@ -88,7 +88,7 @@
|
||||
/// @param deviceInfo uuid
|
||||
/// @param clientIp ip地址
|
||||
+ (void)requestIAPRecharge:(HttpRequestHelperCompletion)completion chargeProdId:(NSString *)chargeProdId uid:(NSString *)uid ticket:(NSString *)ticket deviceInfo:(NSString *)deviceInfo clientIp:(NSString *)clientIp {
|
||||
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"h38zFZd8K2D3KYstRcN3PH3b+txRVsiifBR3B6kGlU4="];//storeKitV/placeOrder
|
||||
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"bwrNIwSuCtX9ebT29xed93rJaaaSsuxrTFso6OAppms="];//storeKitV/placeOrder
|
||||
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,chargeProdId, uid, ticket, deviceInfo, clientIp, nil];
|
||||
}
|
||||
|
||||
|
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@class RechargeListModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -14,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
///请求钱包余额信息
|
||||
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo;
|
||||
///请求充值列表成功
|
||||
- (void)requestRechargeListSucccess:(NSArray *)list;
|
||||
- (void)requestRechargeListSucccess:(NSArray<RechargeListModel *> *)list;
|
||||
///请求充值id的状态成功
|
||||
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId uuid:(NSString *)uuid;
|
||||
///请求充值账单失败
|
||||
|
Reference in New Issue
Block a user