Commit 6ac718c861b55e345f74d534472b5d131c9d76d6

Authored by yinqiaojuan
1 parent bb516894

修改认证成功默认图片

CNLiveBPersonalVerificationModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveBPersonalVerificationModule' 10 s.name = 'CNLiveBPersonalVerificationModule'
11 - s.version = '0.1.9' 11 + s.version = '0.2.0'
12 s.summary = 'B端个人资料认证开发' 12 s.summary = 'B端个人资料认证开发'
13 13
14 14
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPersonalInfoCell.m
@@ -74,14 +74,23 @@ @@ -74,14 +74,23 @@
74 _infoModel = infoModel; 74 _infoModel = infoModel;
75 self.nameLabel.text = [self replaceWithOriginalStr:infoModel.realName startLocation:0 length:infoModel.realName.length - 1]; 75 self.nameLabel.text = [self replaceWithOriginalStr:infoModel.realName startLocation:0 length:infoModel.realName.length - 1];
76 self.cardLabel.text = [self replaceCardWithOriginalStr:infoModel.idCardNo]; 76 self.cardLabel.text = [self replaceCardWithOriginalStr:infoModel.idCardNo];
77 -// [_photoImageV sd_setImageWithURL:[NSURL URLWithString:infoModel.icon] placeholderImage:nil];  
78 __weak typeof(self) weakSelf = self; 77 __weak typeof(self) weakSelf = self;
79 - [_photoImageV sd_setImageWithURL:[NSURL URLWithString:infoModel.icon] placeholderImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:@"upload_photo" bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { 78 + UIImage *placeholder = [UIImage qmui_imageWithColor:[UIColor qmui_colorWithHexString:@"#F9F9F9"] size:CGSizeMake(101, 151) cornerRadius:0];
  79 + [_photoImageV sd_setImageWithURL:[NSURL URLWithString:infoModel.icon] placeholderImage:placeholder completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
80 weakSelf.photoImageV.image = image; 80 weakSelf.photoImageV.image = image;
81 }]; 81 }];
82 -// [_photoImageV sd_setImageWithURL:[NSURL URLWithString:infoModel.icon] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {  
83 -// weakSelf.photoImageV.image = image;  
84 -// }]; 82 +}
  83 +#pragma mark - 颜色转成image
  84 +- (UIImage *)creatImageWithColor:(UIColor *)color {
  85 +
  86 + CGRect rect = CGRectMake(0.0f, 0.0f, 101.f, 151.f);
  87 + UIGraphicsBeginImageContext(rect.size);
  88 + CGContextRef context = UIGraphicsGetCurrentContext();
  89 + CGContextSetFillColorWithColor(context,[color CGColor]);
  90 + CGContextFillRect(context, rect);
  91 + UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  92 + UIGraphicsEndImageContext();
  93 + return image;
85 } 94 }
86 #pragma mark -姓名替换字符串 95 #pragma mark -姓名替换字符串
87 - (NSString *)replaceWithOriginalStr:(NSString *)originalStr startLocation:(NSInteger)startLocation length:(NSInteger)length { 96 - (NSString *)replaceWithOriginalStr:(NSString *)originalStr startLocation:(NSInteger)startLocation length:(NSInteger)length {