Commit b67717a8a7d95e9637aa5793d210bdc700b33acf

Authored by zhangxiaowen
1 parent 401b43bd

no message

CNLiveQrCodeModule/Classes/Controller/CNLiveGenerateQrCodeController.h
@@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
15 NS_ASSUME_NONNULL_BEGIN 15 NS_ASSUME_NONNULL_BEGIN
16 16
17 @interface CNLiveGenerateQrCodeController : UIViewController 17 @interface CNLiveGenerateQrCodeController : UIViewController
  18 +
  19 +// ID 生成二维码的信息
18 @property (nonatomic, copy) NSString *ID; 20 @property (nonatomic, copy) NSString *ID;
19 21
20 @end 22 @end
CNLiveQrCodeModule/Classes/Controller/CNLiveGroupQrCodeController.h
@@ -16,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN @@ -16,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
16 @class IMAGroup; 16 @class IMAGroup;
17 17
18 @interface CNLiveGroupQrCodeController : UIViewController 18 @interface CNLiveGroupQrCodeController : UIViewController
19 -@property (nonatomic, assign) BOOL isScanCode;  
20 @property (nonatomic, strong) IMAGroup *group; 19 @property (nonatomic, strong) IMAGroup *group;
21 20
22 @end 21 @end
CNLiveQrCodeModule/Classes/View/CNLiveGenerateCodeView.m
@@ -94,7 +94,7 @@ static const NSInteger margin = 20; @@ -94,7 +94,7 @@ static const NSInteger margin = 20;
94 - (void)generateQRCode:(NSString *)ID{ 94 - (void)generateQRCode:(NSString *)ID{
95 // 95 //
96 // NSDictionary *dic = @{@"content":[EncryptAndDecrypt base64StringFromText:ID encryptKey:AppDESKey],@"type":@"user"}; 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 NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonDic options:NSJSONWritingPrettyPrinted error:nil]; 99 NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonDic options:NSJSONWritingPrettyPrinted error:nil];
100 100
CNLiveQrCodeModule/Classes/View/CNLiveGroupQrCodeView.m
@@ -14,9 +14,6 @@ @@ -14,9 +14,6 @@
14 14
15 #import "CNUserInfoManager.h" 15 #import "CNUserInfoManager.h"
16 16
17 -//#import "SGQRCodeGenerateManager.h"  
18 -//#import "CNLiveGroupAvatorManager.h"  
19 -  
20 @interface CNLiveGroupQrCodeView() 17 @interface CNLiveGroupQrCodeView()
21 @property (nonatomic, strong) UIImageView *groupHead; 18 @property (nonatomic, strong) UIImageView *groupHead;
22 @property (nonatomic, strong) UILabel *groupName; 19 @property (nonatomic, strong) UILabel *groupName;
@@ -89,8 +86,18 @@ static const NSInteger margin = 15; @@ -89,8 +86,18 @@ static const NSInteger margin = 15;
89 // 86 //
90 // } 87 // }
91 // _groupName.text = group.groupInfo.groupName; 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 #pragma mark - Getter 103 #pragma mark - Getter
Example/CNLiveQrCodeModule/CNLIVEAppDelegate.m
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 64 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
65 65
66 CNLiveGenerateQrCodeController *vc = [[CNLiveGenerateQrCodeController alloc] init]; 66 CNLiveGenerateQrCodeController *vc = [[CNLiveGenerateQrCodeController alloc] init];
67 - vc.ID = @"http://www.baidu.com"; 67 +// vc.ID = @"http://www.baidu.com";
68 UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc]; 68 UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
69 69
70 self.window.rootViewController = nav;//设置根视图控制器 70 self.window.rootViewController = nav;//设置根视图控制器