Commit bc07080101d6ea6b39fece3bc215a3309fe226c1
1 parent
0587d475
no message
Showing
1 changed file
with
5 additions
and
3 deletions
CNLiveQrCodeModule/Classes/View/CNLiveMyQrCodeView.m
| ... | ... | @@ -110,11 +110,13 @@ static const CGFloat timeValue = 1.5; |
| 110 | 110 | [QMUITips hideAllToastInView:strongSelf animated:YES]; |
| 111 | 111 | if(!error){ |
| 112 | 112 | //对content 先加密 再转为 json 字符串 |
| 113 | + NSDictionary *dic = (NSDictionary *)responseObject; | |
| 113 | 114 | // NSDictionary *dic = @{@"content":[EncryptAndDecrypt base64StringFromText:data[@"qrcode"] encryptKey:AppDESKey],@"type":@"user"}; |
| 114 | -// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:nil]; | |
| 115 | -// NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; | |
| 115 | + NSDictionary *jsonDic = @{@"content":dic[@"data"][@"qrcode"],@"type":@"user"}; | |
| 116 | + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonDic options:NSJSONWritingPrettyPrinted error:nil]; | |
| 117 | + NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; | |
| 116 | 118 | |
| 117 | - strongSelf.qrCode.image = [SGQRCodeObtain generateQRCodeWithData:@"群组id" size:SCREEN_WIDTH-12*margin logoImage:nil ratio:0.2]; | |
| 119 | + strongSelf.qrCode.image = [SGQRCodeObtain generateQRCodeWithData:jsonStr size:SCREEN_WIDTH-12*margin logoImage:nil ratio:0.2]; | |
| 118 | 120 | if([type isEqualToString:@"reset"]){ |
| 119 | 121 | [QMUITips showSucceed:@"重置成功" inView:strongSelf hideAfterDelay:timeValue]; |
| 120 | 122 | } | ... | ... |