Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
aerain committed Mar 19, 2019
1 parent 0bb4b9d commit c975809
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
3 changes: 2 additions & 1 deletion activity/JedaeroAPI/HaksaAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ export default function () {
schedule: []
};
eachMonth["month_title"] = $(this).find('caption').text();
$(this).find('tr > td').each(function() {
$(this).find('tr > td').each(function(index) {
let day = {};
let temp = $(this).text().replace(/(\s*~\s*)/gi, ' ~ ').replace(/(^\s*)|(\s*$)/g, '');
day["key"] = toString(index);
day["haksa"] = temp;
eachMonth.schedule.push(day);
});
Expand Down
7 changes: 7 additions & 0 deletions activity/css/busStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ const mainScreen = StyleSheet.create({
marginTop: -5

},
swiperStyle: {
flex: null
},
swiperContainerStyle: {
flex: null
},

foodBlockContainerTitle: {
fontWeight: 'bold',
fontSize: normalize(12)
Expand Down
10 changes: 5 additions & 5 deletions activity/drawer/bus/bus.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ export default class Bus extends Component {
return (
<ScrollView contentContainerStyle={mainScreen.busView} >
<Bustime name="버스 시간" />
{/* <Swiper style={{ width: Dimensions.get('window').width, height: 70 }} showsPagination={false}> */}
<FoodBlock name="오늘의 학식" food={this.state.haksik} onRefresh={() => this.getHaksik(true)}/>
<DormBlock name="오늘의 숙사밥" food={this.state.dormitory} onRefresh={() => this.getDormitory(true)}/>
{/* </Swiper> */}
<SmartBlock name="스마트 출첵1111" />
{/* <Swiper style={mainScreen.swiperStyle} containerStyle={mainScreen.swiperContainerStyle} showsPagination={false}> */}
<FoodBlock name="오늘의 학식" food={this.state.haksik} onRefresh={() => this.getHaksik(true)}/>
<DormBlock name="오늘의 숙사밥" food={this.state.dormitory} onRefresh={() => this.getDormitory(true)}/>
{/* </Swiper> */}
{/* <SmartBlock name="스마트 출첵" /> */}
</ScrollView>
)
}
Expand Down
2 changes: 1 addition & 1 deletion activity/drawer/schedule/Schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Schedule extends Component {
>
<Text style={haksaStyles.calendarMonth}>{month}</Text>
<Text></Text>
{(isNextYear) ? (<Text>{new Date().getFullYear() + 1}</Text>) : null}
{(isNextYear) ? (<Text>{new Date().getFullYear() + 1}</Text>) : null}
</TouchableOpacity>
// <ListItem
// key={item['month_title']}
Expand Down
4 changes: 3 additions & 1 deletion activity/drawer/schedule/ScheduleDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export default class ScheduleDetail extends Component {
};
}

_keyExtractor = (item, index) => item.key;
_renderItem = ({item, index}) => (
<View key={index} style={{paddingVertical: 16, paddingHorizontal: 8, borderBottomColor:'#d7d7d7', borderBottomWidth: 0.5}}>
<View style={{paddingVertical: 16, paddingHorizontal: 8, borderBottomColor:'#d7d7d7', borderBottomWidth: 0.5}}>
<Text style={{textAlign:'center', fontSize:(index % 2 == 0 ? normalize(18) : normalize(14))}}>{item.haksa}</Text>
</View>
)
Expand All @@ -28,6 +29,7 @@ export default class ScheduleDetail extends Component {
return (
<View style={{flex: 1, backgroundColor:'#ffffff'}}>
<FlatList
keyExtractor={this._keyExtractor}
data={schedule}
renderItem={this._renderItem}
/>
Expand Down

0 comments on commit c975809

Please sign in to comment.