Commit b67717a8a7d95e9637aa5793d210bdc700b33acf
1 parent
401b43bd
no message
Showing
5 changed files
with
15 additions
and
7 deletions
CNLiveQrCodeModule/Classes/Controller/CNLiveGenerateQrCodeController.h
CNLiveQrCodeModule/Classes/Controller/CNLiveGroupQrCodeController.h
CNLiveQrCodeModule/Classes/View/CNLiveGenerateCodeView.m
| ... | ... | @@ -94,7 +94,7 @@ static const NSInteger margin = 20; |
| 94 | 94 | - (void)generateQRCode:(NSString *)ID{ |
| 95 | 95 | // |
| 96 | 96 | // NSDictionary *dic = @{@"content":[EncryptAndDecrypt base64StringFromText:ID encryptKey:AppDESKey],@"type":@"user"}; |
| 97 | - NSDictionary *jsonDic = @{@"content":ID,@"type":@"orderCode"}; | |
| 97 | + NSDictionary *jsonDic = @{@"content":ID?ID:@"",@"type":@"orderCode"}; | |
| 98 | 98 | |
| 99 | 99 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonDic options:NSJSONWritingPrettyPrinted error:nil]; |
| 100 | 100 | ... | ... |
CNLiveQrCodeModule/Classes/View/CNLiveGroupQrCodeView.m
| ... | ... | @@ -14,9 +14,6 @@ |
| 14 | 14 | |
| 15 | 15 | #import "CNUserInfoManager.h" |
| 16 | 16 | |
| 17 | -//#import "SGQRCodeGenerateManager.h" | |
| 18 | -//#import "CNLiveGroupAvatorManager.h" | |
| 19 | - | |
| 20 | 17 | @interface CNLiveGroupQrCodeView() |
| 21 | 18 | @property (nonatomic, strong) UIImageView *groupHead; |
| 22 | 19 | @property (nonatomic, strong) UILabel *groupName; |
| ... | ... | @@ -89,8 +86,18 @@ static const NSInteger margin = 15; |
| 89 | 86 | // |
| 90 | 87 | // } |
| 91 | 88 | // _groupName.text = group.groupInfo.groupName; |
| 92 | -// _qrcode.image = [SGQRCodeObtain generateWithLogoQRCodeData:group.groupInfo.groupId logoImageName:nil logoScaleToSuperView:0.2]; | |
| 93 | 89 | // |
| 90 | +// [QMUITips showLoadingInView:self]; | |
| 91 | +// [[CNGroupActiveViewModel sharedCNGroupActiveViewModel] requestServerForDownloadAppActionUrlSourceCompleterBlock:^(NSString *shareUrl) { | |
| 92 | +// [QMUITips hideAllTipsInView:self]; | |
| 93 | +// NSString *wjjQr = [EncryptAndDecrypt base64StringFromText:[@{@"content":[@{@"groupId":CNLiveStringIsEmpty(group.groupInfo.groupId)?@"":group.groupInfo.groupId,@"groupName":group.groupInfo.groupName} mj_JSONString],@"type":@"groupQrType"} mj_JSONString] encryptKey:@"cnliveIm"]; | |
| 94 | +// NSString *qrCode = [NSString stringWithFormat:@"%@wjjQrSkipType=wjjQrPublicGroupType&isWjjQr=%@",shareUrl,wjjQr]; | |
| 95 | +// self.qrcode.image = [SGQRCodeGenerateManager generateWithLogoQRCodeData:qrCode logoImageName:nil logoScaleToSuperView:0.2]; | |
| 96 | +// | |
| 97 | +// UIImage *xw_image = [self xw_getImageName:@"qr_code_icon" bundleName:@"CNLiveQrCodeModule" targetClass:[self class]]; | |
| 98 | +// [strongSelf.qrCode sd_setImageWithURL:nil placeholderImage:[SGQRCodeObtain generateQRCodeWithData:jsonStr size:SCREEN_WIDTH-12*margin logoImage:xw_image ratio:0.2]]; | |
| 99 | +// | |
| 100 | +// }]; | |
| 94 | 101 | //} |
| 95 | 102 | |
| 96 | 103 | #pragma mark - Getter | ... | ... |
Example/CNLiveQrCodeModule/CNLIVEAppDelegate.m
| ... | ... | @@ -64,7 +64,7 @@ |
| 64 | 64 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; |
| 65 | 65 | |
| 66 | 66 | CNLiveGenerateQrCodeController *vc = [[CNLiveGenerateQrCodeController alloc] init]; |
| 67 | - vc.ID = @"http://www.baidu.com"; | |
| 67 | +// vc.ID = @"http://www.baidu.com"; | |
| 68 | 68 | UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc]; |
| 69 | 69 | |
| 70 | 70 | self.window.rootViewController = nav;//设置根视图控制器 | ... | ... |