// // JXFeedShowView.m // shiku_im // // Created by 123 on 2020/5/26. // Copyright © 2020 Reese. All rights reserved. // #import "JXShareShowView.h" @interface JXShareShowView() @property (weak, nonatomic) IBOutlet UIView *backView; @property (weak, nonatomic) IBOutlet UIView *whiteView; @end @implementation JXShareShowView +(instancetype)XIBJXShareShowView{ return [[NSBundle mainBundle]loadNibNamed:@"JXShareShowView" owner:self options:nil].firstObject; } -(void)awakeFromNib{ [super awakeFromNib]; self.konwBtn.layer.cornerRadius=12; self.konwBtn.layer.masksToBounds=YES; self.backView.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.6]; self.whiteView.layer.cornerRadius=12; self.whiteView.layer.masksToBounds=YES; self.yaoqinTF.layer.cornerRadius=15; self.yaoqinTF.layer.masksToBounds=YES; self.yaoqinTF.layer.borderColor=[UIColor grayColor].CGColor; self.yaoqinTF.layer.borderWidth=1; UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 12, 30)]; UIImageView *imageV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 22, 30)]; [leftView addSubview:imageV]; self.yaoqinTF.leftViewMode = UITextFieldViewModeAlways; self.yaoqinTF.leftView=leftView; [self.backView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(closeView)]]; long time = (long)[[NSDate date] timeIntervalSince1970]; time = (time *1000 + g_server.timeDifference); NSString *salt = [NSString stringWithFormat:@"%ld", time]; [g_server getact_getinviteget:salt andUserId:g_server.myself.userId andToView:self]; } #pragma mark --- 请求成功 -(void) didServerResultSucces:(JXConnection*)aDownload dict:(NSDictionary*)dict array:(NSArray*)array1{ [SVProgressHUD dismiss]; //N g(@"dict: %@ --- arry: %@",dict ,array1 ); if([aDownload.action isEqualToString:act_getinviteget]) { NSDictionary *dictM=dict; NSString *str=[NSString stringWithFormat:@"%@",dictM[@"invite"]]; self.yaoqinTF.text=str; } } -(int) didServerResultFailed:(JXConnection*)aDownload dict:(NSDictionary*)dict{ [SVProgressHUD dismiss]; NSString * errorCode = [NSString stringWithFormat:@"%@",[dict objectForKey:@"resultMsg"]]; if([errorCode isEqualToString:@"权限验证失败"]) { if ([aDownload.action isEqualToString:act_getinviteget]) { }else{ } } return [errorCode intValue]; } +(void)showView{ JXShareShowView *show=[JXShareShowView XIBJXShareShowView]; show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.6]; show.frame=[UIScreen mainScreen].bounds; [[UIApplication sharedApplication].keyWindow addSubview:show]; } - (void)closeView{ [self setHidden:YES]; } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [self endEditing:YES]; } @end