站内信相关代码提交 reveiw by 于良
Showing
6 changed files
with
14 additions
and
14 deletions
@@ -22,7 +22,6 @@ import MessageListTextCell from './MessageListTextCell'; | @@ -22,7 +22,6 @@ import MessageListTextCell from './MessageListTextCell'; | ||
22 | import MessageListOrderCell from './MessageListOrderCell'; | 22 | import MessageListOrderCell from './MessageListOrderCell'; |
23 | 23 | ||
24 | export default class MessageList extends Component { | 24 | export default class MessageList extends Component { |
25 | - | ||
26 | constructor(props) { | 25 | constructor(props) { |
27 | super(props); | 26 | super(props); |
28 | this.renderRow = this.renderRow.bind(this); | 27 | this.renderRow = this.renderRow.bind(this); |
@@ -47,7 +46,6 @@ export default class MessageList extends Component { | @@ -47,7 +46,6 @@ export default class MessageList extends Component { | ||
47 | case 205: | 46 | case 205: |
48 | case 206: | 47 | case 206: |
49 | case 207: | 48 | case 207: |
50 | - case 306: | ||
51 | { | 49 | { |
52 | return( | 50 | return( |
53 | <MessageListSmallIconCell | 51 | <MessageListSmallIconCell |
@@ -87,6 +85,7 @@ export default class MessageList extends Component { | @@ -87,6 +85,7 @@ export default class MessageList extends Component { | ||
87 | break; | 85 | break; |
88 | case 400: | 86 | case 400: |
89 | case 401: | 87 | case 401: |
88 | + case 306: | ||
90 | { | 89 | { |
91 | return( | 90 | return( |
92 | <MessageListTextCell | 91 | <MessageListTextCell |
@@ -20,8 +20,8 @@ export default class MessageListBigIconCell extends Component { | @@ -20,8 +20,8 @@ export default class MessageListBigIconCell extends Component { | ||
20 | render() { | 20 | render() { |
21 | let itemData = this.props.itemData; | 21 | let itemData = this.props.itemData; |
22 | let body = itemData.get('body'); | 22 | let body = itemData.get('body'); |
23 | - let imageUri = body ? body.get('img_url') : 'www.yohobuy.com'; | ||
24 | - let content = body ? body.get('content') : ''; | 23 | + let imageUri = body ? body.get('img_url', 'www.yohobuy.com') : 'www.yohobuy.com'; |
24 | + let content = body ? body.get('content','') : ''; | ||
25 | imageUri = imageUri.replace('{width}', width).replace('{height}', 117).replace('{mode}',2); | 25 | imageUri = imageUri.replace('{width}', width).replace('{height}', 117).replace('{mode}',2); |
26 | return( | 26 | return( |
27 | <View style={styles.container}> | 27 | <View style={styles.container}> |
@@ -16,13 +16,13 @@ export default class MessageListOrderCell extends Component { | @@ -16,13 +16,13 @@ export default class MessageListOrderCell extends Component { | ||
16 | constructor(props) { | 16 | constructor(props) { |
17 | super(props); | 17 | super(props); |
18 | } | 18 | } |
19 | - | ||
20 | render() { | 19 | render() { |
21 | let itemData = this.props.itemData; | 20 | let itemData = this.props.itemData; |
22 | let body = itemData.get('body'); | 21 | let body = itemData.get('body'); |
23 | - let imageUri = body ? body.get('img_url') : 'www.yohobuy.com'; | ||
24 | - let content = body ? body.get('content') : ''; | 22 | + let imageUri = body ? body.get('img_url','www.yohobuy.com') : 'www.yohobuy.com'; |
23 | + let content = body ? body.get('content','') : ''; | ||
25 | imageUri = imageUri.replace('{width}', 46).replace('{height}', 60).replace('{mode}',2); | 24 | imageUri = imageUri.replace('{width}', 46).replace('{height}', 60).replace('{mode}',2); |
25 | + | ||
26 | return( | 26 | return( |
27 | <View style={styles.container}> | 27 | <View style={styles.container}> |
28 | <View style={styles.contentContainer}> | 28 | <View style={styles.contentContainer}> |
@@ -47,7 +47,7 @@ export default class MessageListOrderCell extends Component { | @@ -47,7 +47,7 @@ export default class MessageListOrderCell extends Component { | ||
47 | </View> | 47 | </View> |
48 | <MessageListCellFooter | 48 | <MessageListCellFooter |
49 | onPressListItem={this.props.onPressListItem} | 49 | onPressListItem={this.props.onPressListItem} |
50 | - data={itemData} | 50 | + itemData={itemData} |
51 | /> | 51 | /> |
52 | </View> | 52 | </View> |
53 | ) | 53 | ) |
@@ -80,7 +80,7 @@ let styles = StyleSheet.create({ | @@ -80,7 +80,7 @@ let styles = StyleSheet.create({ | ||
80 | marginLeft: 15, | 80 | marginLeft: 15, |
81 | marginTop: 10, | 81 | marginTop: 10, |
82 | marginBottom: 10, | 82 | marginBottom: 10, |
83 | - backgroundColor: 'red', | 83 | + backgroundColor: 'transparent', |
84 | width: 46, | 84 | width: 46, |
85 | height: 60 | 85 | height: 60 |
86 | }, | 86 | }, |
@@ -19,9 +19,9 @@ export default class MessageListSmallIconCell extends Component { | @@ -19,9 +19,9 @@ export default class MessageListSmallIconCell extends Component { | ||
19 | render() { | 19 | render() { |
20 | let itemData = this.props.itemData; | 20 | let itemData = this.props.itemData; |
21 | let body = itemData.get('body'); | 21 | let body = itemData.get('body'); |
22 | - let imageUri = body ? body.get('img_url') : 'www.yohobuy.com'; | ||
23 | - let content = body ? body.get('content') : ''; | ||
24 | - // imageUri = imageUri.replace('{width}', 50).replace('{height}', 50).replace('{mode}',2); | 22 | + let imageUri = body ? body.get('img_url','www.yohobuy.com') : 'www.yohobuy.com'; |
23 | + let content = body ? body.get('content','') : ''; | ||
24 | + imageUri = imageUri.replace('{width}', 50).replace('{height}', 50).replace('{mode}',2); | ||
25 | return( | 25 | return( |
26 | <View style={styles.container}> | 26 | <View style={styles.container}> |
27 | <View style={styles.contentContainer}> | 27 | <View style={styles.contentContainer}> |
@@ -18,7 +18,7 @@ export default class MessageListTextCell extends Component { | @@ -18,7 +18,7 @@ export default class MessageListTextCell extends Component { | ||
18 | render() { | 18 | render() { |
19 | let itemData = this.props.itemData; | 19 | let itemData = this.props.itemData; |
20 | let body = itemData.get('body'); | 20 | let body = itemData.get('body'); |
21 | - let content = body ? body.get('content') : ''; | 21 | + let content = body ? body.get('content','') : ''; |
22 | return( | 22 | return( |
23 | <View style={styles.container}> | 23 | <View style={styles.container}> |
24 | <Text | 24 | <Text |
@@ -64,7 +64,8 @@ class MessageListContainer extends Component { | @@ -64,7 +64,8 @@ class MessageListContainer extends Component { | ||
64 | } | 64 | } |
65 | 65 | ||
66 | onPressListItem(item) { | 66 | onPressListItem(item) { |
67 | - NativeModules.YH_MessageHelper.messagePush(item); | 67 | + let url = item.get('appLink') ? item.get('appLink') : ''; |
68 | + NativeModules.YH_CommonHelper.jumpWithUrl(url); | ||
68 | } | 69 | } |
69 | 70 | ||
70 | onPressEmptyItem() { | 71 | onPressEmptyItem() { |
-
Please register or login to post a comment