Commit 02d3eb1cf14ee63dccb136458272de27903a17c4

Authored by zhangxiaowen
1 parent 802f13cd

no message

CNLiveScioLive/Pages/Live/Controller/GraphicLiveViewController.m
@@ -193,16 +193,25 @@ @@ -193,16 +193,25 @@
193 - (void)shareButton:(UIButton *)btn{ 193 - (void)shareButton:(UIButton *)btn{
194 NSString *text = [NSString stringWithFormat:@"%@",_dictionary[@"Description"]]; 194 NSString *text = [NSString stringWithFormat:@"%@",_dictionary[@"Description"]];
195 NSString *shareUrl = [NSString stringWithFormat:@"%@",_dictionary[@"shareUrl"]]; 195 NSString *shareUrl = [NSString stringWithFormat:@"%@",_dictionary[@"shareUrl"]];
196 - 196 +
  197 + NSString *img = [NSString stringWithFormat:@"%@",_dictionary[@"poster"]];
  198 + NSArray* imageArray = nil;
  199 + if (0 == [img length]) {
  200 + imageArray = @[[UIImage imageNamed:@"cnlive_zhouxin_icon"]];
  201 + } else {
  202 + imageArray = @[img];
  203 + }
  204 +
197 if ([text isEqualToString:@"<null>"]) { 205 if ([text isEqualToString:@"<null>"]) {
198 text = _dictionary[@"title"]; 206 text = _dictionary[@"title"];
199 } 207 }
200 if ([shareUrl isEqualToString:@"<null>"]||[shareUrl isEqualToString:@"(null)"]) { 208 if ([shareUrl isEqualToString:@"<null>"]||[shareUrl isEqualToString:@"(null)"]) {
201 shareUrl = @"http://app.scio.gov.cn/gxbShare.html"; 209 shareUrl = @"http://app.scio.gov.cn/gxbShare.html";
202 } 210 }
  211 +
203 NSMutableDictionary *shareParams = [NSMutableDictionary dictionary]; 212 NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
204 [shareParams SSDKSetupShareParamsByText:text 213 [shareParams SSDKSetupShareParamsByText:text
205 - images:@[[UIImage imageNamed:@"cnlive_zhouxin_icon"]] 214 + images:imageArray
206 url:[NSURL URLWithString:shareUrl] 215 url:[NSURL URLWithString:shareUrl]
207 title:_dictionary[@"title"] 216 title:_dictionary[@"title"]
208 type:SSDKContentTypeAuto]; 217 type:SSDKContentTypeAuto];
CNLiveScioLive/Pages/Live/Controller/TopNoticeViewController.m
@@ -220,14 +220,14 @@ @@ -220,14 +220,14 @@
220 __weak typeof(self) weakSelf = self; 220 __weak typeof(self) weakSelf = self;
221 NSString *img = [NSString stringWithFormat:@"%@",_dictionary[@"programs"][0][@"img"]]; 221 NSString *img = [NSString stringWithFormat:@"%@",_dictionary[@"programs"][0][@"img"]];
222 NSArray* imageArray = nil; 222 NSArray* imageArray = nil;
223 - if (!_dictionary[@"programs"][0][@"img"]) { 223 + if (!_dictionary[@"programs"][0][@"img"]||[img isEqualToString:@""]) {
224 imageArray = @[[UIImage imageNamed:@"cnlive_zhouxin_icon"]]; 224 imageArray = @[[UIImage imageNamed:@"cnlive_zhouxin_icon"]];
225 } else { 225 } else {
226 imageArray = @[img]; 226 imageArray = @[img];
227 } 227 }
228 if (imageArray) { 228 if (imageArray) {
229 NSString *text = [NSString stringWithFormat:@"%@",_dictionary[@"programs"][0][@"subTitle"]]; 229 NSString *text = [NSString stringWithFormat:@"%@",_dictionary[@"programs"][0][@"subTitle"]];
230 - if (!_dictionary[@"programs"][0][@"subTitle"]) { 230 + if (!_dictionary[@"programs"][0][@"subTitle"]||[text isEqualToString:@""]) {
231 text = _dictionary[@"programs"][0][@"title"]; 231 text = _dictionary[@"programs"][0][@"title"];
232 } 232 }
233 NSMutableDictionary *shareParams = [NSMutableDictionary dictionary]; 233 NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];