From e26e530424f21ff6ba7a4c84e3a6b8aa89c44f4d Mon Sep 17 00:00:00 2001 From: zyk3451 Date: Tue, 12 Dec 2017 19:11:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=88=86=E4=BA=AB-?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenShareDemo/openshare/ViewController.m | 12 ++++++++++-- openshare/OpenShare+Weixin.m | 9 +++++++++ openshare/OpenShare.h | 4 ++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/OpenShareDemo/openshare/ViewController.m b/OpenShareDemo/openshare/ViewController.m index 59ee4aa..ab0da03 100644 --- a/OpenShareDemo/openshare/ViewController.m +++ b/OpenShareDemo/openshare/ViewController.m @@ -21,7 +21,7 @@ @interface ViewController () @implementation ViewController{ NSDictionary *icons; UIScrollView *panel; - UIImage *testImage,*testThumbImage; + UIImage *testImage,*testThumbImage,*hdImage; NSData *testGifImage,*testFile; } @@ -30,6 +30,7 @@ - (void)viewDidLoad { //初始化测试数据 testImage = [UIImage imageNamed:@"Default"];//[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Default@2x" ofType:@"png"]]; testThumbImage= [UIImage imageNamed:@"logo"];//[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"logo" ofType:@"png"]]; + hdImage = [UIImage imageNamed:@"Default"]; testGifImage= [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"logo" ofType:@"gif"]]; testFile= [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"test" ofType:@"pdf"]]; @@ -324,7 +325,7 @@ -(UIView*)weixinView:(CGRect)frame{ seg.center=CGPointMake(frame.size.width/2, 20); [ret addSubview:seg]; - NSArray *titles=@[@"发送Text消息",@"发送Photo消息",@"发送Link消息",@"发送Music消息",@"发送Video消息",@"发送App消息",@"发送非gif表情",@"发送gif表情",@"发送文件消息"]; + NSArray *titles=@[@"发送Text消息",@"发送Photo消息",@"发送Link消息",@"发送Music消息",@"发送Video消息",@"发送App消息",@"发送非gif表情",@"发送gif表情",@"发送文件消息",@"小程序分享"]; NSArray *fromX=@[@(frame.size.width/4),@(frame.size.width*3/4)]; int fromY=calcYFrom(seg)+ 40; for (int i=0; i Date: Fri, 15 Dec 2017 14:53:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=9B=BE=E7=89=87=E5=90=8D=E7=A7=B0=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openshare/OpenShare+Weixin.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openshare/OpenShare+Weixin.m b/openshare/OpenShare+Weixin.m index 6da6fc6..5c684bd 100644 --- a/openshare/OpenShare+Weixin.m +++ b/openshare/OpenShare+Weixin.m @@ -68,7 +68,7 @@ +(NSString*)genWeixinShareUrl:(OSMessage*)msg to:(int)shareTo{ dic[@"objectType"]=@"36"; dic[@"appBrandUserName"] =msg.userName; dic[@"appBrandPath"] =msg.path; - dic[@"hdImageData"]=msg.hdImageData? :[self dataWithImage:msg.thumbnail scale:CGSizeMake(260, 210)]; + dic[@"hdThumbData"]=msg.hdImageData? :[self dataWithImage:msg.image scale:CGSizeMake(260, 210)]; }else if([msg isEmpty:nil AndNotEmpty:@[@"link",@"title",@"image"]]){ //有链接。 dic[@"description"]=msg.desc?:msg.title;