Commit 147f0ac2 authored by mei's avatar mei

全选BUG 修复 分享商品ID及图片赋值

parent 2e08cedf
...@@ -103,17 +103,11 @@ ...@@ -103,17 +103,11 @@
} }
-(void)addShareView:(UIButton *)sender -(void)addShareView:(UIButton *)sender
{ {
[self.leftSubView.shareBtn setBackgroundImage:[UIImage imageNamed:@"selectShare"] forState:UIControlStateNormal];
ShareViewController *shareVC = [[ShareViewController alloc]init]; [self CreateMBProgressHUDLoding];
shareVC.delegate = self; // 先截屏 并保存图片
shareVC.preferredContentSize = CGSizeMake(280, 130); [self savePhoto];
shareVC.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *pop = shareVC.popoverPresentationController;
// 箭头方向
pop.permittedArrowDirections = UIPopoverArrowDirectionLeft;
pop.sourceView = shareVC.view;
pop.sourceRect = CGRectMake(sender.mj_x, sender.mj_y-30, sender.mj_w, sender.mj_h);
[self presentViewController:shareVC animated:YES completion:nil];
} }
//添加自定义场景 //添加自定义场景
...@@ -136,7 +130,7 @@ ...@@ -136,7 +130,7 @@
{ {
self.backGroundImageView.image=image; self.backGroundImageView.image=image;
} }
//添加场景中产品图 //场景中添加产品图
- (void)resetSubProductImage:(UIImage*)image productModel:(TOGoodsEntity *)productModel - (void)resetSubProductImage:(UIImage*)image productModel:(TOGoodsEntity *)productModel
{ {
ImageCropperView *cropper=[[ImageCropperView alloc]initWithFrame:CGRectMake(400, 200, 300, 225)]; ImageCropperView *cropper=[[ImageCropperView alloc]initWithFrame:CGRectMake(400, 200, 300, 225)];
...@@ -162,12 +156,11 @@ ...@@ -162,12 +156,11 @@
{ {
[self.rightSubView addRightSubViewImage:image productModel:productModel]; [self.rightSubView addRightSubViewImage:image productModel:productModel];
} }
//分享回调 ////分享回调
- (void)ShareProductImage:(UIImage *)image //- (void)ShareProductImage:(UIImage *)image
{ //{
// 先截屏 并保存图片
[self savePhoto]; //}
}
//全屏 //全屏
-(void)setViewAnimations:(UIButton *)sender -(void)setViewAnimations:(UIButton *)sender
{ {
...@@ -256,14 +249,7 @@ ...@@ -256,14 +249,7 @@
UIImage * image = [self captureImageFromView:self.view]; UIImage * image = [self captureImageFromView:self.view];
[self saveImageToPhotos:image]; [self saveImageToPhotos:image];
//
// PhysicalAddress
//// * library = [ALAssetsLibrary new];
//
//// NSData * data = UIImageJPEGRepresentation(image, 1.0);
////
//// [library writeImageDataToSavedPhotosAlbum:data metadata:nil completionBlock:nil];
} }
- (void)saveImageToPhotos:(UIImage*)savedImage - (void)saveImageToPhotos:(UIImage*)savedImage
...@@ -276,20 +262,44 @@ ...@@ -276,20 +262,44 @@
- (void)image: (UIImage *) image didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo - (void)image: (UIImage *) image didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo
{ {
NSString *msg = nil ; NSString *msg = nil ;
if(error != NULL){ if(error != NULL){
[self RemoveMBProgressHUDLoding];
msg = @"保存图片失败" ; msg = @"保存图片失败" ;
}else{ }else{
[self RemoveMBProgressHUDLoding];
msg = @"保存图片成功" ; msg = @"保存图片成功" ;
// 保存成功后添加到footview // 保存成功后添加到footview
[self addSeceneImage:image]; [self addSeceneImage:image];
//再加载分享视图
} [self.leftSubView.shareBtn setBackgroundImage:[UIImage imageNamed:@"selectShare"] forState:UIControlStateNormal];
ShareViewController *shareVC = [[ShareViewController alloc]init];
shareVC.delegate = self;
shareVC.preferredContentSize = CGSizeMake(280, 130);
shareVC.modalPresentationStyle = UIModalPresentationPopover;
shareVC.shareImage=image;
NSString *str=@"";
if (self.productModelArray.count>0) {
for (int i=0; i<self.productModelArray.count; i++) {
ImageCropperView *cropper=[self.productModelArray objectAtIndex:i];
if ([str isEqualToString:@""]) {
str=[NSString stringWithFormat:@"%@",cropper.GoodsEntity.fid];
}else
{
str=[NSString stringWithFormat:@"%@,%@",str,cropper.GoodsEntity.fid];
}
}
}
shareVC.goodsIDs=str;
UIPopoverPresentationController *pop = shareVC.popoverPresentationController;
// 箭头方向
pop.permittedArrowDirections = UIPopoverArrowDirectionLeft;
pop.sourceView = shareVC.view;
pop.sourceRect = CGRectMake(self.leftSubView.shareBtn.mj_x, self.leftSubView.shareBtn.mj_y-30, self.leftSubView.shareBtn.mj_w, self.leftSubView.shareBtn.mj_h);
[self presentViewController:shareVC animated:YES completion:nil];
}
} }
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
/** /**
* 传入商品ID字符串(多个商品时用逗号隔开) * 传入商品ID字符串(多个商品时用逗号隔开)
*/ */
......
...@@ -57,12 +57,11 @@ ...@@ -57,12 +57,11 @@
#pragma mark -分享 #pragma mark -分享
-(void)sharePicture:(UIButton*)sender -(void)sharePicture:(UIButton*)sender
{ {
//<<<<<<< HEAD
// if ([self.delegate respondsToSelector:@selector(ShareProductImage:)]) {
//=======
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
NSData *imageData = UIImageJPEGRepresentation(TCImage(@"登录"), 1.0); NSData *imageData = UIImageJPEGRepresentation(self.shareImage, 1.0);
NSDictionary *parameterDict = [NSDictionary dictionaryWithObjectsAndKeys:@"0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028",@"goodsIds",@"",@"title",@"",@"remark",nil]; // 0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028
NSDictionary *parameterDict = [NSDictionary dictionaryWithObjectsAndKeys:@"这里是截图上所有商品的goodsId ,分割 后面不动",@"goodsIds",@"",@"title",@"",@"remark",nil];
//上传图片 //上传图片
[[NetworkRequestClassManager Manager] UploadImageWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/system/shareGoods"] WithRequestType:0 WithImageDatas:imageData WithParameter:parameterDict WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] UploadImageWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/system/shareGoods"] WithRequestType:0 WithImageDatas:imageData WithParameter:parameterDict WithReturnValueBlock:^(id returnValue) {
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
[self.shoppingTableView reloadData]; [self.shoppingTableView reloadData];
for (int i=0; i<self.productModelArray.count; i++) { for (int i=0; i<self.productModelArray.count; i++) {
[self.selectTagArray addObject:[NSString stringWithFormat:@"%d",i]]; [self.selectTagArray addObject:[NSString stringWithFormat:@"%d",i]];
[self.AddArray addObject:[self.productModelArray objectAtIndex:1]]; [self.AddArray addObject:[self.productModelArray objectAtIndex:i]];
} }
[self.confirmAddBtn setTitle:[NSString stringWithFormat:@"确认添加(%d)",self.selectTagArray.count] forState:UIControlStateNormal]; [self.confirmAddBtn setTitle:[NSString stringWithFormat:@"确认添加(%d)",self.selectTagArray.count] forState:UIControlStateNormal];
self.isAllSelected=YES; self.isAllSelected=YES;
......
...@@ -1344,6 +1344,7 @@ ...@@ -1344,6 +1344,7 @@
29706D9F1CD082980003C412 /* Resources */, 29706D9F1CD082980003C412 /* Resources */,
F01581ED83DE9D2797491517 /* 📦 Embed Pods Frameworks */, F01581ED83DE9D2797491517 /* 📦 Embed Pods Frameworks */,
7BC17D654525385DDB94F6E1 /* 📦 Copy Pods Resources */, 7BC17D654525385DDB94F6E1 /* 📦 Copy Pods Resources */,
3F3971B12BEF8F66850D46F0 /* Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
...@@ -1423,6 +1424,21 @@ ...@@ -1423,6 +1424,21 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
3F3971B12BEF8F66850D46F0 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Lighting/Pods-Lighting-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
48AA9F8E7B748F9C3254AA87 /* 📦 Check Pods Manifest.lock */ = { 48AA9F8E7B748F9C3254AA87 /* 📦 Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
...@@ -1626,7 +1642,7 @@ ...@@ -1626,7 +1642,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 超级 朱 (SXSQ6S5D55)"; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
...@@ -1648,7 +1664,7 @@ ...@@ -1648,7 +1664,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.3; IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "d25ba75f-c4da-4bef-b966-3a998dcbffbe"; PROVISIONING_PROFILE = "";
SDKROOT = iphoneos; SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2; TARGETED_DEVICE_FAMILY = 2;
}; };
...@@ -1672,7 +1688,7 @@ ...@@ -1672,7 +1688,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 超级 朱 (SXSQ6S5D55)"; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
...@@ -1687,7 +1703,7 @@ ...@@ -1687,7 +1703,7 @@
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3; IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
PROVISIONING_PROFILE = "d25ba75f-c4da-4bef-b966-3a998dcbffbe"; PROVISIONING_PROFILE = "";
SDKROOT = iphoneos; SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2; TARGETED_DEVICE_FAMILY = 2;
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
...@@ -1701,8 +1717,8 @@ ...@@ -1701,8 +1717,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)"; CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMPRESS_PNG_FILES = NO; COMPRESS_PNG_FILES = NO;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
...@@ -1744,7 +1760,7 @@ ...@@ -1744,7 +1760,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple; PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6"; PROVISIONING_PROFILE = "";
STRIP_PNG_TEXT = NO; STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
...@@ -1757,8 +1773,8 @@ ...@@ -1757,8 +1773,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)"; CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMPRESS_PNG_FILES = NO; COMPRESS_PNG_FILES = NO;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
...@@ -1800,7 +1816,7 @@ ...@@ -1800,7 +1816,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple; PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6"; PROVISIONING_PROFILE = "";
STRIP_PNG_TEXT = NO; STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
......
...@@ -41,115 +41,18 @@ ...@@ -41,115 +41,18 @@
</array> </array>
</dict> </dict>
</array> </array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>log.umsns.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
<key>sns.whalecloud.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
<!-- 集成新浪微博对应的HTTP白名单-->
<key>sina.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>weibo.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>weibo.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sinaimg.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sinajs.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>sina.com.cn</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- 新浪微博-->
<!-- 集成微信、QQ、Qzone、腾讯微博授权对应的HTTP白名单-->
<key>qq.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<!-- 腾讯授权-->
</dict>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<!-- 微信 URL Scheme 白名单-->
<string>wechat</string>
<string>weixin</string>
<!-- 新浪微博 URL Scheme 白名单-->
<string>sinaweibohd</string>
<string>sinaweibo</string>
<string>sinaweibosso</string>
<string>weibosdk</string>
<string>weibosdk2.5</string>
</array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>wechat</string>
<string>weixin</string>
<string>sinaweibohd</string>
<string>sinaweibo</string>
<string>sinaweibosso</string>
<string>weibosdk</string>
<string>weibosdk2.5</string>
</array>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
......
...@@ -64,6 +64,4 @@ SPEC CHECKSUMS: ...@@ -64,6 +64,4 @@ SPEC CHECKSUMS:
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4 SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1 UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
PODFILE CHECKSUM: ce813becb6471581d2231aa1586a015081ae7114 COCOAPODS: 0.39.0
COCOAPODS: 1.0.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment