|
@@ -195,11 +195,16 @@ export default class MainPage extends BasePage {
|
|
|
/>
|
|
|
{}
|
|
|
<View style={styles.searchSection}>
|
|
|
- <TextInput
|
|
|
- style={styles.searchBox}
|
|
|
- onChangeText={(text) => this.setState({ text })}
|
|
|
- value={this.state.text}
|
|
|
- />
|
|
|
+ <View style={{position: 'relative'}}>
|
|
|
+ <TextInput
|
|
|
+ style={styles.searchBox}
|
|
|
+ onChangeText={(text) => this.setState({ text })}
|
|
|
+ value={this.state.text}
|
|
|
+ />
|
|
|
+ <TouchableOpacity onPress={() => this.search(this)} style={{position: 'absolute', right: 10, top: 10}}>
|
|
|
+ <Image style={styles.search} source={require('../images/common/search.png')}></Image>
|
|
|
+ </TouchableOpacity>
|
|
|
+ </View>
|
|
|
<TouchableOpacity onPress={this.tabCallOutHandler}>
|
|
|
<View style={styles.rightBtn}>
|
|
|
<Image source={require('../images/common/switch.png')} style={styles.rightBtnIcon} />
|
|
@@ -464,6 +469,7 @@ export default class MainPage extends BasePage {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
async getUserInfo() {
|
|
|
await global.storage
|
|
|
.load({
|
|
@@ -520,6 +526,11 @@ export default class MainPage extends BasePage {
|
|
|
return true;
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ search() {
|
|
|
+ const searchText = this.state.text;
|
|
|
+ this.toNextPage('SearchResult', {searchText})
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
@@ -549,6 +560,10 @@ const styles = StyleSheet.create({
|
|
|
backgroundColor: '#fff',
|
|
|
borderRadius: 20
|
|
|
},
|
|
|
+ search: {
|
|
|
+ width: 30,
|
|
|
+ height: 30,
|
|
|
+ },
|
|
|
rightBtn: {
|
|
|
width: Dimensions.getWidth(113),
|
|
|
height: Dimensions.getHeight(40),
|