首次提交
This commit is contained in:
81
SweetParty/主类/Mine/青少年模式/YXYoungShenSuViewController.m
Executable file
81
SweetParty/主类/Mine/青少年模式/YXYoungShenSuViewController.m
Executable file
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// YXYoungShenSuViewController.m
|
||||
// romantic
|
||||
//
|
||||
// Created by MAC on 2022/12/15.
|
||||
// Copyright © 2022 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YXYoungShenSuViewController.h"
|
||||
#import "YXYoungSetPwViewController.h"
|
||||
#import "YXYoungSetPwView.h"
|
||||
|
||||
@interface YXYoungShenSuViewController ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField *nameTextField;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *idTextField;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *submitButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXYoungShenSuViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
self.view.backgroundColor = HEXCOLOR(0xFAFAFA);
|
||||
UIImageView *bgImg = [ControlCreator createImageView:self.view rect:CGRectMake(0, 0, APPW, APPH) imageName:@"party_bg" backguoundColor:nil];
|
||||
bgImg.contentMode = UIViewContentModeScaleToFill;
|
||||
[self.view sendSubviewToBack:bgImg];
|
||||
|
||||
[self initNavBar];
|
||||
UIView *leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 48)];
|
||||
leftView.backgroundColor = HEXCOLOR(0xFAFAFA);
|
||||
|
||||
UIView *leftView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 48)];
|
||||
leftView1.backgroundColor = HEXCOLOR(0xFAFAFA);
|
||||
// self.nameTextField.leftView = leftView;
|
||||
// self.idTextField.leftView = leftView1;
|
||||
self.nameTextField.leftViewMode = UITextFieldViewModeAlways;
|
||||
self.idTextField.leftViewMode = UITextFieldViewModeAlways;
|
||||
[self.submitButton setJianBianWithCGSize:CGSizeMake(APPW - 30, 48)];
|
||||
}
|
||||
|
||||
- (void)initNavBar {
|
||||
self.navTitle = @"身份申诉";
|
||||
[self.customNavBar styleClear];
|
||||
[self.customNavBar.left0Btn setImage:ImageNamed(@"blackBack") forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (IBAction)submitButtonAction:(id)sender {
|
||||
if (self.nameTextField.text.length < 1) {
|
||||
[HelpPageDefine showMessage:@"请输入姓名"];
|
||||
return;
|
||||
}
|
||||
if (self.idTextField.text.length < 1) {
|
||||
[HelpPageDefine showMessage:@"请输入身份证号码"];
|
||||
return;
|
||||
}
|
||||
NSDictionary *parms = @{
|
||||
@"real_name":self.nameTextField.text,
|
||||
@"card_id":self.idTextField.text
|
||||
};
|
||||
[AFNetworkRequset.shared postRequestWithParams:parms Path:@"api/mode/edit_teen_mode" Loading:NO Hud:NO Success:^(id _Nonnull responseDic) {
|
||||
// [self.view makeToast:@"青少年模式已关闭" duration:0.5 position:CSToastPositionCenter];
|
||||
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
// [self.navigationController popToRootViewControllerAnimated:YES];
|
||||
// });
|
||||
|
||||
// YXYoungSetPwViewController *setpwvc = [[YXYoungSetPwViewController alloc] init];
|
||||
// setpwvc.type = 3;
|
||||
// [setpwvc pushSelf];
|
||||
|
||||
YXYoungSetPwView *view = [[YXYoungSetPwView alloc] initWithFrame:CGRectMake(0, 0, APPW, APPH)];
|
||||
view.type = 3;
|
||||
[MainWindow() addSubview:view];
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user