优化提交

This commit is contained in:
启星
2025-09-19 11:38:43 +08:00
parent a3a7bfdf22
commit 231d3d8625
153 changed files with 20460 additions and 11929 deletions

View File

@@ -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{

View File

@@ -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{

View File

@@ -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) {

View File

@@ -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

View File

@@ -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];

View File

@@ -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(@"实名认证失败");
}
}

View File

@@ -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",

View File

@@ -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;
}