|
@@ -1023,8 +1023,8 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
|
|
|
//保存图片到相册
|
|
|
#pragma mark 保存图片
|
|
|
-(void)jsSavePic:(NSDictionary *)dict {
|
|
|
+
|
|
|
NSString *base64ImgData = [NSString stringWithFormat:@"%@",dict[@"imgbase64"]];
|
|
|
- base64ImgData = [base64ImgData stringByReplacingOccurrencesOfString:@"data:image/png;base64," withString:@""];
|
|
|
NSData *data = [[NSData alloc]initWithBase64EncodedString:base64ImgData options:NSDataBase64DecodingIgnoreUnknownCharacters];
|
|
|
UIImage *saveImg = [UIImage imageWithData:data];
|
|
|
UIImageWriteToSavedPhotosAlbum(saveImg, self, @selector(image:didFinishSavingWithError:contextInfo:), NULL);
|
|
@@ -1582,15 +1582,17 @@ NSString *const new_AesKey_4 = @"mGlAgnIBB8bx2nch";
|
|
|
NSLog(@"%@",progress);
|
|
|
} success:^(id responseObject) {
|
|
|
NSLog(@"responseObject=%@",responseObject);
|
|
|
- if ([responseObject objectForKey:@"data"]&&responseObject[@"data"]!=nil) {
|
|
|
+ if ([responseObject objectForKey:@"data"]) {
|
|
|
NSDictionary *dict = [[NSDictionary alloc]initWithDictionary:responseObject[@"data"]];
|
|
|
- self.clipboardView.title =dict[@"title"];
|
|
|
- self.clipboardView.subTitle =dict[@"subTitle"];
|
|
|
- self.clipboardView.imgUrl =dict[@"imgUrl"];
|
|
|
- self.clipboardView.appUrl =dict[@"appUrl"];
|
|
|
- self.clipboardView.butTxt =dict[@"butTxt"];
|
|
|
- self.clipboardView.bottomTxt =dict[@"bottomTxt"];
|
|
|
- [self.clipboardView show];
|
|
|
+ if ([dict objectForKey:@"title"]) {
|
|
|
+ self.clipboardView.title =dict[@"title"];
|
|
|
+ self.clipboardView.subTitle =dict[@"subTitle"];
|
|
|
+ self.clipboardView.imgUrl =dict[@"imgUrl"];
|
|
|
+ self.clipboardView.appUrl =dict[@"appUrl"];
|
|
|
+ self.clipboardView.butTxt =dict[@"butTxt"];
|
|
|
+ self.clipboardView.bottomTxt =dict[@"bottomTxt"];
|
|
|
+ [self.clipboardView show];
|
|
|
+ }
|
|
|
}
|
|
|
} failure:^(NSError *error) {
|
|
|
NSLog(@"error=%@",error);
|