SDwebimage和af的修改

This commit is contained in:
祝发冬
2023-08-28 19:34:55 +08:00
parent 033e23e13d
commit f38f9effaa
39 changed files with 99 additions and 47 deletions
@@ -48,6 +48,10 @@
}
-(void)morenButnClick{
AFHTTPRequestOperationManager*mannager=[AFHTTPRequestOperationManager manager];
AFSecurityPolicy*policy = [[AFSecurityPolicy alloc]init];
policy.validatesDomainName=NO;
policy.validatesCertificateChain=NO;
mannager.securityPolicy =policy;
mannager.responseSerializer=[AFHTTPResponseSerializer serializer];
UserModel*usermodel=[[DataCenter defaultDtacenter]valueForKey:@"UserLogIn"];
NSMutableDictionary * para = [NSMutableDictionary dictionary];
@@ -45,6 +45,10 @@
}
-(void)getbrandData{
AFHTTPRequestOperationManager*mannager=[AFHTTPRequestOperationManager manager];
AFSecurityPolicy*policy = [[AFSecurityPolicy alloc]init];
policy.validatesDomainName=NO;
policy.validatesCertificateChain=NO;
mannager.securityPolicy =policy;
mannager.responseSerializer=[AFHTTPResponseSerializer serializer];
NSMutableDictionary * para = [NSMutableDictionary dictionary];
[para setValue:@"0" forKey:@"firstResult"];
@@ -116,7 +120,7 @@
BrandModel*model=self.brandArr[indexPath.row];
cell.brandName.text=model.brandName;
[cell.brandLogo sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kGetLogUrl,model.logo]] placeholderImage:[UIImage imageNamed:@"brandLogo_hold"]];
[cell.brandLogo sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kGetLogUrl,model.logo]] placeholderImage:[UIImage imageNamed:@"brandLogo_hold"]options:SDWebImageAllowInvalidSSLCertificates];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
@@ -215,6 +219,10 @@
}
-(void)addTaskWithUrl:(NSString *)url isRefresh:(BOOL)isRefresh{
AFHTTPRequestOperationManager*mannager=[AFHTTPRequestOperationManager manager];
AFSecurityPolicy*policy = [[AFSecurityPolicy alloc]init];
policy.validatesDomainName=NO;
policy.validatesCertificateChain=NO;
mannager.securityPolicy =policy;
mannager.responseSerializer=[AFHTTPResponseSerializer serializer];
@@ -303,7 +303,7 @@
NSString* imageurl = [NSString stringWithFormat:@"%@%@",self.currentdevice.iconLink,alliconnames[firstindex]];
[_leftTop sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]];
[_leftTop sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
_leftlabel.text = allShowName[firstindex];
@@ -316,7 +316,7 @@
int secindex=[index2 intValue];
NSString* imageurl = [NSString stringWithFormat:@"%@%@",self.currentdevice.iconLink,alliconnames[secindex]];
[_leftTop2 sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]];
[_leftTop2 sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
_leftlabel2.text = allShowName[secindex];
@@ -329,7 +329,7 @@
int thredindex=[index3 intValue];
NSString* imageurl = [NSString stringWithFormat:@"%@%@",self.currentdevice.iconLink,alliconnames[thredindex]];
[_leftTop3 sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]];
[_leftTop3 sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
_leftlabel3.text = allShowName[thredindex];
[_headView3 addSubview:_leftTop3];
@@ -342,7 +342,7 @@
NSString* imageurl = [NSString stringWithFormat:@"%@%@",self.currentdevice.iconLink,alliconnames[forindex]];
[_leftTop4 sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]];
[_leftTop4 sd_setImageWithURL:[NSURL URLWithString:imageurl] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
_leftlabel4.text = allShowName[forindex];
[_headView4 addSubview:_leftTop4];
@@ -1397,7 +1397,7 @@
_picUrl = images[index];
[weaself.leftTop sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl] placeholderImage:[UIImage imageNamed:@"icon1"]];
[weaself.leftTop sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
weaself.leftlabel.text = nameArr[index];
_indexWithImage = index;
@@ -1582,7 +1582,7 @@
_picUrl2 = images[index];
[weaself.leftTop2 sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl2] placeholderImage:[UIImage imageNamed:@"icon1"]];
[weaself.leftTop2 sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl2] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
weaself.leftlabel2.text= nameArr[index];
@@ -1655,7 +1655,7 @@
_indexWithImage4 = index;
_picUrl4 = images[index];
[weaself.leftTop4 sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl4] placeholderImage:[UIImage imageNamed:@"icon1"]];
[weaself.leftTop4 sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl4] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
weaself.leftlabel4.text = nameArr[index];
@@ -1729,7 +1729,7 @@
_picUrl3 = images[index];
[weaself.leftTop3 sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl3] placeholderImage:[UIImage imageNamed:@"icon1"]];
[weaself.leftTop3 sd_setImageWithURL:[NSURL URLWithString:weaself.picUrl3] placeholderImage:[UIImage imageNamed:@"icon1"]options:SDWebImageAllowInvalidSSLCertificates];
weaself.leftlabel3.text = nameArr[index];