优化提交
This commit is contained in:
@@ -234,10 +234,11 @@
|
||||
|
||||
-(void)cancelAccount{
|
||||
[QXMineNetwork cancelAccountSuccessBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[[QXGlobal shareGlobal] logOut];
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
[[QXGlobal shareGlobal] logOut];
|
||||
}
|
||||
|
||||
-(QXMainHeaderView *)tableHeaderView{
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
-(UIView *)listView{
|
||||
return self.view;
|
||||
}
|
||||
-(void)listWillAppear{
|
||||
[self getData];
|
||||
}
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
@@ -42,7 +45,7 @@
|
||||
-(void)getData{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork userDressListWithType:self.model.id successBlock:^(NSArray<QXUserDressModel *> * _Nonnull list) {
|
||||
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
if (list.count > 0 ) {
|
||||
QXUserDressModel *model = [[QXUserDressModel alloc] init];
|
||||
@@ -70,7 +73,7 @@
|
||||
return cell;
|
||||
}
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
CGFloat width = (SCREEN_WIDTH-15*2-22*2)/3;
|
||||
int width = (SCREEN_WIDTH-15*2-22*2-1)/3;
|
||||
return CGSizeMake(width, width/100*120);
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
@@ -159,6 +159,18 @@
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if ([cell isKindOfClass:[QXHomeRoomCell class]]) {
|
||||
QXHomeRoomCell *rCell = (QXHomeRoomCell *)cell;
|
||||
[rCell startAnimating];
|
||||
}
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if ([cell isKindOfClass:[QXHomeRoomCell class]]) {
|
||||
QXHomeRoomCell *rCell = (QXHomeRoomCell *)cell;
|
||||
[rCell endAnimating];
|
||||
}
|
||||
}
|
||||
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (self.type == 0) {
|
||||
|
||||
@@ -10,7 +10,12 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXChirldModeViewController : QXBaseViewController
|
||||
/// 0 = 设置1 , 1 = 设置2 ,2 = 退出
|
||||
@property (nonatomic,assign)NSInteger type;
|
||||
/// 密码
|
||||
@property (nonatomic,strong)NSString *password;
|
||||
|
||||
@property (nonatomic,assign)BOOL isRoot;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#import "QXChirldModeViewController.h"
|
||||
#import "QXPasswordView.h"
|
||||
#import "QXChirldViewController.h"
|
||||
#import "AppDelegate.h"
|
||||
@interface QXChirldModeViewController ()<QXPasswordViewDelegate>
|
||||
@property (nonatomic,strong)QXPasswordView * passwordView;
|
||||
@end
|
||||
@@ -27,7 +29,12 @@
|
||||
}
|
||||
-(void)initSubViews{
|
||||
self.passwordView = [[QXPasswordView alloc] init];
|
||||
self.passwordView.type = QXPasswordViewTypeChirldMode;
|
||||
if (self.type == 1) {
|
||||
self.passwordView.type = QXPasswordViewTypeChirldModeTwice;
|
||||
}else{
|
||||
self.passwordView.type = QXPasswordViewTypeChirldMode;
|
||||
}
|
||||
|
||||
self.passwordView.delegate = self;
|
||||
[self.view addSubview:self.passwordView];
|
||||
[self.passwordView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -38,7 +45,35 @@
|
||||
}
|
||||
|
||||
-(void)inputFinished:(NSString *)password{
|
||||
|
||||
if (self.type == 0) {
|
||||
QXChirldModeViewController *vc = [[QXChirldModeViewController alloc] init];
|
||||
vc.type = 1;
|
||||
vc.password = password;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}else if (self.type == 1) {
|
||||
if ([self.password isEqualToString:password]) {
|
||||
QXChirldViewController *vc = [[QXChirldViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:password forKey:kChirldLocalPassword];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}else{
|
||||
showToast(@"两次密码输入不一致");
|
||||
}
|
||||
}else if (self.type == 2) {
|
||||
NSString *localPassword = [[NSUserDefaults standardUserDefaults] objectForKey:kChirldLocalPassword];
|
||||
if (![localPassword isEqualToString:password]) {
|
||||
showToast(@"密码错误");
|
||||
}else{
|
||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:kChirldLocalPassword];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
if (self.isRoot) {
|
||||
AppDelegate *appdelegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
|
||||
[appdelegate changeRootViewControllerIsTabbar];
|
||||
}else{
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
|
||||
[self.view endEditing:YES];
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#import <TencentCloudHuiyanSDKFace/WBFaceVerifyCustomerService.h>
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXRealNameFinishedViewController.h"
|
||||
#import "QXAlertView.h"
|
||||
|
||||
@interface QXRealNameViewController ()<WBFaceVerifyCustomerServiceDelegate>
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
@@ -259,6 +260,7 @@
|
||||
weakSelf.realNamedict = dict;
|
||||
[weakSelf startFace];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
hideLoadingInView(self.view);
|
||||
showToast(msg);
|
||||
}];
|
||||
|
||||
@@ -305,13 +307,26 @@
|
||||
-(void)wbfaceVerifyCustomerServiceDidFinishedWithFaceVerifyResult:(WBFaceVerifyResult *)faceVerifyResult{
|
||||
if (faceVerifyResult.isSuccess) {
|
||||
QXLOG(@"人脸核验通过");
|
||||
[self authSuccess];
|
||||
MJWeakSelf
|
||||
QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
|
||||
al.type = QXAlertViewTypeNoCancel;
|
||||
al.title = @"温馨提示";
|
||||
al.message = @"恭喜您获得内测资格,将获得10万金币";
|
||||
al.commitBlock = ^{
|
||||
[weakSelf authSuccess];
|
||||
};
|
||||
[[QXGlobal shareGlobal] showView:al popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
|
||||
/// 通知服务端实名验证结果
|
||||
[QXMineNetwork postRealNameResultWithOrderNo:faceVerifyResult.orderNo successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}else{
|
||||
showToast(@"实名认证失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ static NSInteger maxClickCount = 6;
|
||||
-(void)initSubViews{
|
||||
NSArray *section1 = @[
|
||||
// QXText(@"消息通知"),
|
||||
QXText(@"未成年人模式"),
|
||||
// QXText(@"未成年人模式"),
|
||||
QXText(@"黑名单"),
|
||||
QXText(@"设置密码"),
|
||||
QXText(@"手机绑定"),
|
||||
@@ -54,7 +54,7 @@ static NSInteger maxClickCount = 6;
|
||||
];
|
||||
self.cellTypeDict = @{
|
||||
// QXText(@"消息通知"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"未成年人模式"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
// QXText(@"未成年人模式"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"黑名单"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"设置密码"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"手机绑定"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
@@ -67,7 +67,7 @@ static NSInteger maxClickCount = 6;
|
||||
|
||||
self.controllerDict = @{
|
||||
QXText(@"消息通知"):@"QXNoticeSwitchViewController",
|
||||
QXText(@"未成年人模式"):@"QXChirldModeViewController",
|
||||
// QXText(@"未成年人模式"):@"QXChirldModeViewController",
|
||||
QXText(@"黑名单"):@"QXBlackListlViewController",
|
||||
QXText(@"设置密码"):@"QXSetPwdViewController",
|
||||
QXText(@"手机绑定"):@"QXBindMobileViewController",
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXCornRecordCell *cell = [QXCornRecordCell cellWithTableView:tableView];
|
||||
cell.isCoin = self.waterType==0;
|
||||
cell.model = self.dataArray[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
|
||||
@@ -1031,9 +1031,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+(void)roomBagGiftClearWithRoomId:(NSString*)roomId
|
||||
userId:(NSString*)userId
|
||||
heartId:(NSString*)heartId
|
||||
auction_id:(NSString*)auction_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
背包礼物价值
|
||||
*/
|
||||
+(void)roomGiftBagPricesuccessBlock:(void (^)(NSString* price))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -2019,11 +2019,12 @@
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)roomBagGiftClearWithRoomId:(NSString *)roomId userId:(NSString *)userId heartId:(NSString*)heartId successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
+(void)roomBagGiftClearWithRoomId:(NSString *)roomId userId:(NSString *)userId heartId:(NSString*)heartId auction_id:(NSString*)auction_id successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":roomId?roomId:@"",
|
||||
@"to_uid":userId?userId:@"",
|
||||
@"heart_id":heartId?heartId:@""
|
||||
@"heart_id":heartId?heartId:@"",
|
||||
@"auction_id":auction_id?auction_id:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomGiftBagClear parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
@@ -2033,4 +2034,15 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)roomGiftBagPricesuccessBlock:(void (^)(NSString * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXRoomGiftBagPrice parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSString *count = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"count"]];
|
||||
successBlock(count);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
}
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0 && !self.isOnlyDisplayPayType) {
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2)/3, 76);
|
||||
return CGSizeMake((SCREEN_WIDTH-16*2-12*2-1)/3, 76);
|
||||
}
|
||||
return CGSizeMake(SCREEN_WIDTH, 40);
|
||||
}
|
||||
@@ -272,7 +272,7 @@
|
||||
if (weakSelf.selectedPayTypeModel.type.intValue == 2) {
|
||||
NSDictionary *resultDict = dict[@"data"];
|
||||
NSString *order = [NSString stringWithFormat:@"%@",resultDict[@"ali"]];
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"qxlive" callback:^(NSDictionary *resultDic) {
|
||||
[[AlipaySDK defaultService] payOrder:order fromScheme:@"midilive" callback:^(NSDictionary *resultDic) {
|
||||
NSLog(@"支付宝H5支付回调 - %@", resultDic);
|
||||
|
||||
}];
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
//// }
|
||||
//}
|
||||
-(void)setModel:(QXRoomListModel *)model{
|
||||
|
||||
_model = model;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
self.nickNameLabel.text = model.room_name;
|
||||
@@ -84,11 +85,11 @@
|
||||
NSString *come = [NSString qx_showHotCountNum:model.visit_num.longLongValue];
|
||||
self.comeCountLabel.text = [NSString stringWithFormat:@"访问:%@",come];
|
||||
if (self.type == 0) {
|
||||
self.todayLabel.text = @"今日收益";
|
||||
self.todayLabel.text = @"今日流水";
|
||||
}else{
|
||||
self.todayLabel.text = [NSString stringWithFormat:@"收益分成比例:%@%%",model.ratio];
|
||||
}
|
||||
NSString *money = [NSString qx_showHotCountNum:model.today_profit.longLongValue];
|
||||
NSString *money = [NSString stringWithFormat:@"%.4f",model.today_profit.doubleValue];
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%@",money];
|
||||
[self.typeImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon] placeholderImage:nil];
|
||||
if (model.apply_status.intValue == 1) {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
QXPasswordViewTypeChirldMode = 0,
|
||||
QXPasswordViewTypeChirldModeTwice,
|
||||
QXPasswordViewTypeRoom
|
||||
}QXPasswordViewType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -102,17 +102,17 @@ CGFloat labelHeight = 63;
|
||||
make.centerX.centerY.equalTo(self.label1);
|
||||
make.width.height.mas_equalTo(1);
|
||||
}];
|
||||
self.forgotBtn = [[UIButton alloc] init];
|
||||
[self.forgotBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
self.forgotBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.forgotBtn setTitle:[NSString stringWithFormat:@"%@?%@",QXText(@"忘记密码"),QXText(@"请联系客服")] forState:(UIControlStateNormal)];
|
||||
[self.forgotBtn addTarget:self action:@selector(forgotAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.forgotBtn];
|
||||
[self.forgotBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.label1.mas_bottom).offset(10);
|
||||
make.height.mas_equalTo(38);
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
// self.forgotBtn = [[UIButton alloc] init];
|
||||
// [self.forgotBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
// self.forgotBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
// [self.forgotBtn setTitle:[NSString stringWithFormat:@"%@?%@",QXText(@"忘记密码"),QXText(@"请联系客服")] forState:(UIControlStateNormal)];
|
||||
// [self.forgotBtn addTarget:self action:@selector(forgotAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
// [self addSubview:self.forgotBtn];
|
||||
// [self.forgotBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.top.equalTo(self.label1.mas_bottom).offset(10);
|
||||
// make.height.mas_equalTo(38);
|
||||
// make.centerX.equalTo(self);
|
||||
// }];
|
||||
}
|
||||
-(void)forgotAction{
|
||||
|
||||
@@ -201,6 +201,10 @@ CGFloat labelHeight = 63;
|
||||
self.titleLabel.text = QXText(@"请输入监护密码");
|
||||
}
|
||||
break;
|
||||
case QXPasswordViewTypeChirldModeTwice:{
|
||||
self.titleLabel.text = QXText(@"请确认监护密码");
|
||||
}
|
||||
break;
|
||||
case QXPasswordViewTypeRoom:{
|
||||
self.titleLabel.text = QXText(@"请输入房间密码");
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
|
||||
@property (nonatomic,assign)BOOL isCoin;
|
||||
@property (nonatomic,strong) QXCoinDetailModel *model;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
-(void)setIsCoin:(BOOL)isCoin{
|
||||
_isCoin = isCoin;
|
||||
}
|
||||
-(void)setModel:(QXCoinDetailModel *)model{
|
||||
_model = model;
|
||||
self.reasonLabel.text = model.remarks;
|
||||
@@ -26,7 +29,12 @@
|
||||
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
|
||||
NSString*time = [formatter stringFromDate:date];
|
||||
self.timeLabel.text = time;
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.change_value.doubleValue];
|
||||
if (self.isCoin) {
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.2f",model.change_value.doubleValue];
|
||||
}else{
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.4f",model.change_value.doubleValue];
|
||||
}
|
||||
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
Reference in New Issue
Block a user