67 lines
1.5 KiB
Objective-C
Executable File
67 lines
1.5 KiB
Objective-C
Executable File
//
|
|
// YYJYChooseTeamAlert.m
|
|
// YaYin
|
|
//
|
|
// Created by bj_szd on 2023/7/12.
|
|
// Copyright © 2023 YaYin. All rights reserved.
|
|
//
|
|
|
|
#import "YYJYChooseTeamAlert.h"
|
|
#import "TFPopup.h"
|
|
|
|
@interface YYJYChooseTeamAlert ()
|
|
|
|
@property (nonatomic, assign) NSInteger type;
|
|
|
|
@end
|
|
|
|
@implementation YYJYChooseTeamAlert
|
|
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
|
|
[self createUI];
|
|
}
|
|
|
|
- (void)createUI {
|
|
[self.confirmBtn setJianBianWithCGSize:CGSizeMake(338-20*2, 44)];
|
|
}
|
|
|
|
- (void)onPopupWithSize:(CGSize)size parent:(UIView *)parent {
|
|
self.frame = CGRectMake(0, 0, size.width, size.height);
|
|
TFPopupParam *param = [[TFPopupParam alloc] init];
|
|
[self tf_showScale:parent offset:CGPointZero popupParam:param];
|
|
}
|
|
|
|
- (IBAction)onSelBlue:(id)sender {
|
|
self.type = 1;
|
|
self.blueSelBtn.selected = YES;
|
|
self.redSelBtn.selected = NO;
|
|
}
|
|
|
|
- (IBAction)onSelRed:(id)sender {
|
|
self.type = 2;
|
|
self.blueSelBtn.selected = NO;
|
|
self.redSelBtn.selected = YES;
|
|
}
|
|
|
|
- (IBAction)onCancel:(id)sender {
|
|
[self tf_hide];
|
|
}
|
|
|
|
- (IBAction)onConfirm:(id)sender {
|
|
if (self.type == 0) {
|
|
[HelpPageDefine showMessage:@"请选择队伍"];
|
|
return;
|
|
}
|
|
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:self.dict];
|
|
[params setObject:@(self.type) forKey:@"seat"];
|
|
[AFNetworkRequset.shared postRequestWithParams:params Path:@"/api/room_micro/operate_user_micro" Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
|
|
[self tf_hide];
|
|
} Failure:^(id _Nonnull errorData) {
|
|
|
|
}];
|
|
}
|
|
|
|
@end
|