Authored by shangjf

站内信相关代码提交 reveiw by 于良

... ... @@ -22,7 +22,6 @@ import MessageListTextCell from './MessageListTextCell';
import MessageListOrderCell from './MessageListOrderCell';
export default class MessageList extends Component {
constructor(props) {
super(props);
this.renderRow = this.renderRow.bind(this);
... ... @@ -47,7 +46,6 @@ export default class MessageList extends Component {
case 205:
case 206:
case 207:
case 306:
{
return(
<MessageListSmallIconCell
... ... @@ -87,6 +85,7 @@ export default class MessageList extends Component {
break;
case 400:
case 401:
case 306:
{
return(
<MessageListTextCell
... ...
... ... @@ -20,8 +20,8 @@ export default class MessageListBigIconCell extends Component {
render() {
let itemData = this.props.itemData;
let body = itemData.get('body');
let imageUri = body ? body.get('img_url') : 'www.yohobuy.com';
let content = body ? body.get('content') : '';
let imageUri = body ? body.get('img_url', 'www.yohobuy.com') : 'www.yohobuy.com';
let content = body ? body.get('content','') : '';
imageUri = imageUri.replace('{width}', width).replace('{height}', 117).replace('{mode}',2);
return(
<View style={styles.container}>
... ...
... ... @@ -16,13 +16,13 @@ export default class MessageListOrderCell extends Component {
constructor(props) {
super(props);
}
render() {
let itemData = this.props.itemData;
let body = itemData.get('body');
let imageUri = body ? body.get('img_url') : 'www.yohobuy.com';
let content = body ? body.get('content') : '';
let imageUri = body ? body.get('img_url','www.yohobuy.com') : 'www.yohobuy.com';
let content = body ? body.get('content','') : '';
imageUri = imageUri.replace('{width}', 46).replace('{height}', 60).replace('{mode}',2);
return(
<View style={styles.container}>
<View style={styles.contentContainer}>
... ... @@ -47,7 +47,7 @@ export default class MessageListOrderCell extends Component {
</View>
<MessageListCellFooter
onPressListItem={this.props.onPressListItem}
data={itemData}
itemData={itemData}
/>
</View>
)
... ... @@ -80,7 +80,7 @@ let styles = StyleSheet.create({
marginLeft: 15,
marginTop: 10,
marginBottom: 10,
backgroundColor: 'red',
backgroundColor: 'transparent',
width: 46,
height: 60
},
... ...
... ... @@ -19,9 +19,9 @@ export default class MessageListSmallIconCell extends Component {
render() {
let itemData = this.props.itemData;
let body = itemData.get('body');
let imageUri = body ? body.get('img_url') : 'www.yohobuy.com';
let content = body ? body.get('content') : '';
// imageUri = imageUri.replace('{width}', 50).replace('{height}', 50).replace('{mode}',2);
let imageUri = body ? body.get('img_url','www.yohobuy.com') : 'www.yohobuy.com';
let content = body ? body.get('content','') : '';
imageUri = imageUri.replace('{width}', 50).replace('{height}', 50).replace('{mode}',2);
return(
<View style={styles.container}>
<View style={styles.contentContainer}>
... ...
... ... @@ -18,7 +18,7 @@ export default class MessageListTextCell extends Component {
render() {
let itemData = this.props.itemData;
let body = itemData.get('body');
let content = body ? body.get('content') : '';
let content = body ? body.get('content','') : '';
return(
<View style={styles.container}>
<Text
... ...
... ... @@ -64,7 +64,8 @@ class MessageListContainer extends Component {
}
onPressListItem(item) {
NativeModules.YH_MessageHelper.messagePush(item);
let url = item.get('appLink') ? item.get('appLink') : '';
NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
onPressEmptyItem() {
... ...