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