|
@@ -94,13 +94,13 @@ export default class MainPage extends BasePage {
|
|
|
?
|
|
|
null
|
|
|
:
|
|
|
- <TouchableOpacity onPress={()=>this.switchGrade(index)} key={index} style={index === 1 ? styles.gradeItemMid : styles.gradeItem}>
|
|
|
+ <TouchableOpacity onPress={() => this.switchGrade(index)} key={index} style={index === 1 ? styles.gradeItemMid : styles.gradeItem}>
|
|
|
<Text style={styles.gradeText}>{item.title}</Text>
|
|
|
</TouchableOpacity>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
- switchGrade=(index)=>{
|
|
|
+ switchGrade = (index) => {
|
|
|
const obj = this.state.switchList[index]
|
|
|
this.setState({
|
|
|
currentSwitch: obj
|
|
@@ -122,7 +122,7 @@ export default class MainPage extends BasePage {
|
|
|
renderSectionHeader={this.sectionTitle}
|
|
|
onScroll={this.hideGradeMenu}
|
|
|
/> */}
|
|
|
- <ScrollView style={{ height: Dimensions.height }} onScroll={this.hideGradeMenu} >
|
|
|
+ <ScrollView style={{ height: Dimensions.height }} showsVerticalScrollIndicator = {false} onScroll={this.hideGradeMenu} >
|
|
|
{this.headerorfooterComponent()}
|
|
|
{this.getSwiperElement()}
|
|
|
{this.getScheduleElement()}
|
|
@@ -203,7 +203,7 @@ export default class MainPage extends BasePage {
|
|
|
return (
|
|
|
<View
|
|
|
style={{
|
|
|
- height: Dimensions.getDp(163),
|
|
|
+ height: Dimensions.getHeight(163),
|
|
|
flex: 1,
|
|
|
justifyContent: "center",
|
|
|
alignItems: "center",
|
|
@@ -213,7 +213,7 @@ export default class MainPage extends BasePage {
|
|
|
<View
|
|
|
style={{
|
|
|
width: Dimensions.getWidth(358),
|
|
|
- height: Dimensions.getDp(153),
|
|
|
+ height: Dimensions.getHeight(153),
|
|
|
justifyContent: "center",
|
|
|
overflow: 'hidden'
|
|
|
}}
|
|
@@ -233,7 +233,11 @@ export default class MainPage extends BasePage {
|
|
|
let renderScheduleItem = (item, index) => {
|
|
|
return (
|
|
|
<TouchableOpacity
|
|
|
- style={{ width: 172, height: 86, marginRight: 12 }}
|
|
|
+ style={{
|
|
|
+ width: Dimensions.getWidth(172),
|
|
|
+ height: Dimensions.getHeight(86),
|
|
|
+ marginRight: 12
|
|
|
+ }}
|
|
|
onPress={() => this.toNextPage('SchedulePage')}
|
|
|
key={index}
|
|
|
activeOpacity={1}
|
|
@@ -259,7 +263,7 @@ export default class MainPage extends BasePage {
|
|
|
style={{
|
|
|
flex: 1,
|
|
|
flexDirection: "column",
|
|
|
- height: 160,
|
|
|
+ height: Dimensions.getHeight(160),
|
|
|
}}
|
|
|
>
|
|
|
<TopicTitle title={'课程表:第一周'} ifTubeShow={true} />
|
|
@@ -419,7 +423,7 @@ const styles = StyleSheet.create({
|
|
|
searchSection: {
|
|
|
flex: 1,
|
|
|
width: Dimensions.width,
|
|
|
- height: 60,
|
|
|
+ height: Dimensions.getHeight(60),
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
backgroundColor: '#f0f1f5',
|
|
@@ -427,14 +431,14 @@ const styles = StyleSheet.create({
|
|
|
position: 'relative',
|
|
|
},
|
|
|
searchBox: {
|
|
|
- width: 232,
|
|
|
- height: 40,
|
|
|
+ width: Dimensions.getWidth(232),
|
|
|
+ height: Dimensions.getHeight(40),
|
|
|
backgroundColor: '#fff',
|
|
|
borderRadius: 20
|
|
|
},
|
|
|
rightBtn: {
|
|
|
- width: 113,
|
|
|
- height: 40,
|
|
|
+ width: Dimensions.getWidth(113),
|
|
|
+ height: Dimensions.getHeight(40),
|
|
|
backgroundColor: '#fff',
|
|
|
borderRadius: 20,
|
|
|
alignItems: 'center',
|
|
@@ -445,8 +449,8 @@ const styles = StyleSheet.create({
|
|
|
paddingRight: 10,
|
|
|
},
|
|
|
rightBtnIcon: {
|
|
|
- width: 14,
|
|
|
- height: 14
|
|
|
+ width: Dimensions.getWidth(23),
|
|
|
+ height: Dimensions.getHeight(23),
|
|
|
},
|
|
|
rightBtnText: {
|
|
|
color: '#151515',
|