CourseDetails.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. *
  5. * @format
  6. * @flow
  7. */
  8. import React, { Component } from "react";
  9. import {
  10. StyleSheet,
  11. Text,
  12. View,
  13. Image,
  14. ScrollView,
  15. FlatList
  16. } from "react-native";
  17. import VideoExplain from './components/VideoExplain';
  18. import ScrollRow from "./components/ScrollRow";
  19. class CourseList extends Component {
  20. render() {
  21. return (
  22. <View style={styles.courseList}>
  23. <View style={[styles.padding, styles.title]}>
  24. <Text style={styles.font}>课件</Text>
  25. <Text style={styles.color}>共28课</Text>
  26. </View>
  27. <View style={{
  28. flex: 1,
  29. height: 200,
  30. }}>
  31. <ScrollRow itemWidth={106} itemHeight={150} />
  32. </View>
  33. </View>
  34. );
  35. }
  36. }
  37. export default class CourseDetails extends Component {
  38. render() {
  39. return (
  40. <ScrollView style={{backgroundColor: '#F0F1F5'}}>
  41. <VideoExplain
  42. title={'同步辅导语文一年级下册'}
  43. details={'汉字,作为象形文字,是中华文化的载体,本课程从甲骨文开始,让孩子爱上识字爱上文字的美。了解文字…'}
  44. uri={'http://chimee.org/vod/1.mp4'}
  45. />
  46. <CourseList></CourseList>
  47. </ScrollView>
  48. );
  49. }
  50. }
  51. const styles = StyleSheet.create({
  52. courseList: {
  53. width: '100%',
  54. backgroundColor: '#fff',
  55. marginTop: 8,
  56. },
  57. padding: {
  58. paddingLeft: 20,
  59. paddingRight: 20,
  60. },
  61. title: {
  62. display: 'flex',
  63. flexDirection: 'row',
  64. justifyContent: 'space-between',
  65. alignItems: 'center',
  66. },
  67. font: {
  68. paddingTop: 10,
  69. paddingBottom: 10,
  70. fontSize: 18,
  71. color: 'black',
  72. fontWeight: 'bold',
  73. },
  74. clor: {
  75. fontSize: 14,
  76. color: 'black',
  77. },
  78. });