Authored by 张文文

bug fix

@@ -16,9 +16,8 @@ export default class ContentLikedListCell extends Component { @@ -16,9 +16,8 @@ export default class ContentLikedListCell extends Component {
16 render() { 16 render() {
17 let rowData = this.props.data; 17 let rowData = this.props.data;
18 18
19 - let resource = rowData.coverImg;  
20 - resource = resource ? JSON.parse(resource) : '';  
21 - let picItem = resource.data ? JSON.parse(resource.data) : '';; 19 + let resource = rowData.coverImg ? typeof rowData.coverImg === 'string' ? JSON.parse(rowData.coverImg) : rowData.coverImg : '';
  20 + let picItem = resource ? typeof resource.data === 'string' ? JSON.parse(resource.data) : resource.data : '';
22 21
23 let imageUrl = YH_Image.getSlicedUrl(picItem.src, 50 * DEVICE_HEIGHT_RATIO, 50 * DEVICE_HEIGHT_RATIO, 2); 22 let imageUrl = YH_Image.getSlicedUrl(picItem.src, 50 * DEVICE_HEIGHT_RATIO, 50 * DEVICE_HEIGHT_RATIO, 2);
24 23
@@ -17,8 +17,8 @@ export default class ContentMessageCell extends Component { @@ -17,8 +17,8 @@ export default class ContentMessageCell extends Component {
17 let {rowData} = this.props; 17 let {rowData} = this.props;
18 let status = rowData.businessType === 1003 ? true : false; 18 let status = rowData.businessType === 1003 ? true : false;
19 19
20 - let resource = typeof rowData.coverImg === 'string' ? JSON.parse(rowData.coverImg) : rowData.coverImg;  
21 - let picItem = typeof resource.data === 'string' ? JSON.parse(resource.data) : resource.data; 20 + let resource = rowData.coverImg ? typeof rowData.coverImg === 'string' ? JSON.parse(rowData.coverImg) : rowData.coverImg : '';
  21 + let picItem = resource ? typeof resource.data === 'string' ? JSON.parse(resource.data) : resource.data : '';
22 22
23 let imageUrl = YH_Image.getSlicedUrl(picItem.src, 50 * DEVICE_HEIGHT_RATIO, 50 * DEVICE_HEIGHT_RATIO, 2); 23 let imageUrl = YH_Image.getSlicedUrl(picItem.src, 50 * DEVICE_HEIGHT_RATIO, 50 * DEVICE_HEIGHT_RATIO, 2);
24 24