Authored by 张文文

接口解析加类型判断

... ... @@ -17,9 +17,8 @@ export default class ContentMessageCell extends Component {
let {rowData} = this.props;
let status = rowData.businessType === 1003 ? true : false;
let resource = rowData.coverImg;
resource = resource ? JSON.parse(resource) : '';
let picItem = resource.data ? JSON.parse(resource.data) : '';
let resource = rowData.coverImg ? JSON.parse(rowData.coverImg) : '';
let picItem = typeof resource.data === 'string' ? JSON.parse(resource.data) : resource.data;
let imageUrl = YH_Image.getSlicedUrl(picItem.src, 50 * DEVICE_HEIGHT_RATIO, 50 * DEVICE_HEIGHT_RATIO, 2);
... ...
... ... @@ -38,6 +38,7 @@ export default class ContentMessageView extends Component {
_renderHeader() {
let showStatus = this.props.contentTipFlag==='0' ? true : false;
let tabStatus = this.props.tabButtons.length===0 ? false : true;
function onNotifyPress() {
NativeModules.YH_CommonHelper.jumpToUpdateNotificationStatus();
... ... @@ -65,7 +66,9 @@ export default class ContentMessageView extends Component {
</TouchableOpacity>
})}
</View>
<View style={styles.tabLine}/>
{ tabStatus ? <View style={styles.tabLine} /> : null }
</View>
)
}
... ...