Commit 147f0ac2 authored by mei's avatar mei

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

parent 2e08cedf
......@@ -103,17 +103,11 @@
}
-(void)addShareView:(UIButton *)sender
{
[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;
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];
[self CreateMBProgressHUDLoding];
// 先截屏 并保存图片
[self savePhoto];
}
//添加自定义场景
......@@ -136,7 +130,7 @@
{
self.backGroundImageView.image=image;
}
//添加场景中产品图
//场景中添加产品图
- (void)resetSubProductImage:(UIImage*)image productModel:(TOGoodsEntity *)productModel
{
ImageCropperView *cropper=[[ImageCropperView alloc]initWithFrame:CGRectMake(400, 200, 300, 225)];
......@@ -162,12 +156,11 @@
{
[self.rightSubView addRightSubViewImage:image productModel:productModel];
}
//分享回调
- (void)ShareProductImage:(UIImage *)image
{
// 先截屏 并保存图片
[self savePhoto];
}
////分享回调
//- (void)ShareProductImage:(UIImage *)image
//{
//}
//全屏
-(void)setViewAnimations:(UIButton *)sender
{
......@@ -256,14 +249,7 @@
UIImage * image = [self captureImageFromView:self.view];
[self saveImageToPhotos:image];
//
// PhysicalAddress
//// * library = [ALAssetsLibrary new];
//
//// NSData * data = UIImageJPEGRepresentation(image, 1.0);
////
//// [library writeImageDataToSavedPhotosAlbum:data metadata:nil completionBlock:nil];
}
- (void)saveImageToPhotos:(UIImage*)savedImage
......@@ -276,20 +262,44 @@
- (void)image: (UIImage *) image didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo
{
NSString *msg = nil ;
if(error != NULL){
[self RemoveMBProgressHUDLoding];
msg = @"保存图片失败" ;
}else{
[self RemoveMBProgressHUDLoding];
msg = @"保存图片成功" ;
// 保存成功后添加到footview
[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 @@
/**
* 传入商品ID字符串(多个商品时用逗号隔开)
*/
......
......@@ -57,12 +57,11 @@
#pragma mark -分享
-(void)sharePicture:(UIButton*)sender
{
//<<<<<<< HEAD
// if ([self.delegate respondsToSelector:@selector(ShareProductImage:)]) {
//=======
[self dismissViewControllerAnimated:YES completion:nil];
NSData *imageData = UIImageJPEGRepresentation(TCImage(@"登录"), 1.0);
NSDictionary *parameterDict = [NSDictionary dictionaryWithObjectsAndKeys:@"0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028",@"goodsIds",@"",@"title",@"",@"remark",nil];
NSData *imageData = UIImageJPEGRepresentation(self.shareImage, 1.0);
// 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) {
......
......@@ -128,7 +128,7 @@
[self.shoppingTableView reloadData];
for (int i=0; i<self.productModelArray.count; 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.isAllSelected=YES;
......
......@@ -1344,6 +1344,7 @@
29706D9F1CD082980003C412 /* Resources */,
F01581ED83DE9D2797491517 /* 📦 Embed Pods Frameworks */,
7BC17D654525385DDB94F6E1 /* 📦 Copy Pods Resources */,
3F3971B12BEF8F66850D46F0 /* Embed Pods Frameworks */,
);
buildRules = (
);
......@@ -1423,6 +1424,21 @@
/* End PBXResourcesBuildPhase 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 */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......@@ -1626,7 +1642,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 超级 朱 (SXSQ6S5D55)";
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
......@@ -1648,7 +1664,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "d25ba75f-c4da-4bef-b966-3a998dcbffbe";
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
};
......@@ -1672,7 +1688,7 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 超级 朱 (SXSQ6S5D55)";
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
......@@ -1687,7 +1703,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = NO;
PROVISIONING_PROFILE = "d25ba75f-c4da-4bef-b966-3a998dcbffbe";
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
VALIDATE_PRODUCT = YES;
......@@ -1701,8 +1717,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMPRESS_PNG_FILES = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
......@@ -1744,7 +1760,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
PROVISIONING_PROFILE = "";
STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
......@@ -1757,8 +1773,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMPRESS_PNG_FILES = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
......@@ -1800,7 +1816,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
PROVISIONING_PROFILE = "";
STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
......
......@@ -41,115 +41,18 @@
</array>
</dict>
</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>
<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>
<true/>
<key>NSAllowsArbitraryLoads</key>
......
......@@ -64,6 +64,4 @@ SPEC CHECKSUMS:
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
UMengSocial: 48b67179c492a8cf7803fbb0438b8f55432e2fc1
PODFILE CHECKSUM: ce813becb6471581d2231aa1586a015081ae7114
COCOAPODS: 1.0.0
COCOAPODS: 0.39.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