Files

56 lines
1.2 KiB
Mathematica
Raw Permalink Normal View History

2025-08-08 11:05:33 +08:00
//
// YYRoomNoticeAlert.m
// SweetParty
//
// Created by bj_szd on 2022/6/9.
//
#import "YYRoomNoticeAlert.h"
@interface YYRoomNoticeAlert ()
@end
@implementation YYRoomNoticeAlert
- (void)awakeFromNib {
[super awakeFromNib];
[self createUI];
}
- (void)createUI {
[self.confirmBtn setJianBianWithCGSize:CGSizeMake(ScreenWidth-32*2, 45)];
WEAK_SELF
[self.touchImgV dg_Tapped:^{
[weakSelf removeFromSuperview];
}];
}
- (void)setModel:(YYRoomSetModel *)model {
_model = model;
self.textView.text = model.room_intro;
}
- (IBAction)onConfirm:(id)sender {
if (self.textView.text.length <= 0) {
[HelpPageDefine showMessage:@"请输入房间公告"];
return;
}
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithDictionary:self.model.mj_JSONObject];
[params setObject:self.textView.text forKey:@"room_intro"];
[[AFNetworkRequset shared] postRequestWithParams:params Path:@"/api/room/modify_room_info" Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
if (self.onCompleteBlock) {
self.onCompleteBlock();
}
[self removeFromSuperview];
} Failure:^(id _Nonnull errorData) {
}];
}
@end