_7_List.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import React from 'react';
  2. import C from 'rn-class'
  3. C.addColor("#d7d7d7", "color-listbg");
  4. export default (props)=>{
  5. let onClickPlay = (p)=>{
  6. // props.navigation.push('Player');
  7. props.startPlay(props);
  8. }
  9. return (
  10. <C.View cls="flx1 bgc-color-white">
  11. <C.View cls="w100% ai-c flx1">
  12. <C.ScrollView cccls="ai-c">
  13. <C.View cls="w80 br50 flx-row" >
  14. <C.Image source={props.Pages.img} resizeMode="contain" cls="w14" />
  15. <C.View>
  16. <C.View cls="bgc-color-gray-light-v3 flx0.1 jc-c ph3">
  17. </C.View>
  18. <C.Text cls="mt2 mh2">
  19. {props.Pages.contens}
  20. </C.Text>
  21. </C.View>
  22. </C.View>
  23. <C.View cls="w100 flx-w jc-c flx-row">
  24. <Imgs onClickPlay={onClickPlay} ></Imgs>
  25. <Imgs onClickPlay={onClickPlay} ></Imgs>
  26. <Imgs onClickPlay={onClickPlay} ></Imgs>
  27. <Imgs onClickPlay={onClickPlay} ></Imgs>
  28. <Imgs onClickPlay={onClickPlay} ></Imgs>
  29. <Imgs onClickPlay={onClickPlay} ></Imgs>
  30. </C.View>
  31. </C.ScrollView>
  32. </C.View>
  33. </C.View>
  34. )
  35. }
  36. const Imgs = (props)=>{
  37. return (
  38. <C.View cls="w45">
  39. <C.ImageBackground
  40. source={{uri : `https://picsum.photos/630/300?r=${(new Date).getTime()+Math.random()}` }}
  41. cls="h20 mh2 mt2"
  42. // resizeMode="contain"
  43. >
  44. <C.View cls="flx1 bgc-rgba-black-0_3 jc-c">
  45. <C.View cls="ai-e po-full">
  46. <C.EL.Icon type="entypo" name="lock" ccls="ma2" {...C.n2cls("color-white")}/>
  47. </C.View>
  48. <C.View cls="ai-c">
  49. <C.EL.Icon type="entypo" name="controller-play" ccls="ma2" {...C.n2cls("color-white")} {...C.n2cls("size10")} onPress={props.onClickPlay}/>
  50. </C.View>
  51. </C.View>
  52. </C.ImageBackground>
  53. <C.View cls="flx1 ai-e mh2">
  54. <C.Text>
  55. 10:00
  56. </C.Text>
  57. </C.View>
  58. </C.View>
  59. )
  60. }