MainPage.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  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. Platform,
  11. StyleSheet,
  12. Text,
  13. View,
  14. Image,
  15. FlatList,
  16. TouchableOpacity,
  17. BackHandler,
  18. ImageBackground,
  19. TextInput,
  20. Animated,
  21. StatusBar,
  22. DeviceEventEmitter
  23. } from 'react-native';
  24. import BasePage from '../BasePage';
  25. import Header from './Header';
  26. import MySwiper from './Swiper';
  27. import Dimensions from '../utils/dimensions';
  28. import TopicTitle from './TopicTitle';
  29. import ScrollRow from './ScrollRow';
  30. import LibraryUrl from '../services/library';
  31. import { ScrollView } from 'react-native-gesture-handler';
  32. import commonutil from '../utils/commonutil';
  33. import http_user from '../services/user';
  34. import Toast from '../components/Toast';
  35. export default class MainPage extends BasePage {
  36. constructor(props) {
  37. super(props);
  38. }
  39. updateRender(index) {
  40. // LibraryUrl.getIndex(index).success(res => {
  41. // }).fail(() => {
  42. // alert(1111)
  43. // })
  44. // 触发更新
  45. LibraryUrl.getIndex(index).then((res) => {
  46. console.log(res);
  47. const monthTopicTitle = res.data.monthTopic.zone.title;
  48. const monthTopicScroll = res.data.monthTopic.zoneCourseVOList;
  49. const schedule = res.data.schedule;
  50. const hotCourse = res.data.hotCourse;
  51. const recommend = res.data.recommend; //全部课程
  52. const banner = res.data.banner; //轮播图
  53. const pageCode = res.data.pageCode;
  54. // const listData = [];
  55. // for(let item in res.data){
  56. // console.log(item)
  57. // listData.push(1)
  58. // }
  59. // console.log(typeof listData)
  60. // console.log(listData)
  61. // console.log(listData.length)
  62. let scheduleWeek = schedule[0].featureMap ? schedule[0].featureMap.weekSeq : '1';
  63. this.setState({
  64. // listData: listData.length? listData : [],
  65. hotCourse,
  66. monthTopicTitle,
  67. monthTopicScroll,
  68. schedule,
  69. recommend,
  70. banner,
  71. scheduleWeek,
  72. pageCode
  73. });
  74. console.log(this.state.banner);
  75. });
  76. }
  77. state = {
  78. grade: '大学',
  79. ifGradeMenuShow: false,
  80. fadeAnim: new Animated.Value(0),
  81. schedule: [],
  82. recommend: [],
  83. listData: [],
  84. banner: [],
  85. currentSwitch: { title: '小学', param: 'PRIMARY_SCHOOL' },
  86. switchList: [
  87. // { title: '幼儿园', param: 'KINDERGARTEN' },
  88. { title: '学前', param: 'PRESCHOOL' },
  89. { title: '小学', param: 'PRIMARY_SCHOOL' },
  90. { title: '中学', param: 'MIDDLE_SCHOOL' }
  91. ],
  92. scheduleWeek: '1',
  93. username: '游客',
  94. avatar: '',
  95. isVip: false,
  96. showLoading: true
  97. };
  98. renderBtn = (item, index) => {
  99. return (
  100. // this.state.currentSwitch.param === item.param
  101. // ?
  102. // null
  103. // :
  104. // <TouchableOpacity onPress={() => this.switchGrade(index)} key={index} style={index === 1 ? styles.gradeItemMid : styles.gradeItem}>
  105. // <Text style={styles.gradeText}>{item.title}</Text>
  106. // </TouchableOpacity>
  107. <TouchableOpacity
  108. onPress={() => this.switchGrade(index)}
  109. key={index}
  110. style={index === 1 ? styles.gradeItemMid : styles.gradeItem}
  111. >
  112. <Text style={styles.gradeText}>{item.title}</Text>
  113. </TouchableOpacity>
  114. );
  115. };
  116. componentWillMount() {
  117. BackHandler.addEventListener('hardwareBackPress', this.onBackAndroid);
  118. this.refreshSubScription = DeviceEventEmitter.addListener('indexInfo', () => {
  119. this.getUserInfo();
  120. });
  121. DeviceEventEmitter.emit('indexInfo');
  122. }
  123. componentWillUnmount() {
  124. BackHandler.removeEventListener('hardwareBackPress', this.onBackAndroid);
  125. this.refreshSubScription.remove();
  126. }
  127. onBackAndroid = () => {
  128. // global.storage.remove({ key: 'userInfo' });
  129. // BackHandler.exitApp();
  130. // return true;
  131. };
  132. switchGrade = (index) => {
  133. const obj = this.state.switchList[index];
  134. this.setState({
  135. currentSwitch: obj
  136. });
  137. this.hideGradeMenu();
  138. if (!global.userInfo.isVisitor) {
  139. //这里更新个人信息学龄选项
  140. this.updateUserInfo(obj.param);
  141. } else {
  142. global.userInfo.ageGroup = obj.param;
  143. commonutil.saveUserInfo();
  144. }
  145. this.updateRender(obj.param);
  146. };
  147. render() {
  148. // const abc =Object.keys(this.state.data).map((k)=>this.state.data[k])
  149. return (
  150. <View style={{ flex: 1 }} onPress={this.hideGradeMenu}>
  151. {/* <SectionList sectionList组件 性能好 但是针对当前布局是否有要用的必要,以后可能迭代
  152. sections={this.state.listData}
  153. renderItem={({ item }) => {
  154. return this.loadFlatItem(item);
  155. }}
  156. keyExtractor={(item, index) => item.key.toString()}
  157. ListHeaderComponent={() => this.headerorfooterComponent()}
  158. renderSectionHeader={this.sectionTitle}
  159. onScroll={this.hideGradeMenu}
  160. /> */}
  161. <StatusBar barStyle={'dark-content'} backgroundColor={'white'} translucent={false} />
  162. <ScrollView
  163. style={{ height: Dimensions.height }}
  164. showsVerticalScrollIndicator={false}
  165. onScroll={this.hideGradeMenu}
  166. >
  167. {this.headerorfooterComponent()}
  168. {this.getSwiperElement()}
  169. {this.getScheduleElement()}
  170. {this.getMonthTopic()}
  171. {this.getHotCourse()}
  172. {this.getAllCourses()}
  173. </ScrollView>
  174. {this.state.ifGradeMenuShow ? (
  175. <Animated.View
  176. style={{
  177. ...styles.callUpGrade,
  178. opacity: this.state.fadeAnim
  179. }}
  180. >
  181. {this.state.switchList.map((item, index) => this.renderBtn(item, index))}
  182. </Animated.View>
  183. ) : null}
  184. </View>
  185. );
  186. }
  187. // 头部组件
  188. headerorfooterComponent() {
  189. return (
  190. <View>
  191. <Header
  192. uri={this.state.avatar}
  193. width={400}
  194. height={150}
  195. username={this.state.username}
  196. isVip={this.state.isVip}
  197. onPress={() => this.toNextPage('userCenter')}
  198. />
  199. {/* 搜索区域 */}
  200. <View style={styles.searchSection}>
  201. <View style={styles.searchBox}>
  202. <TouchableOpacity
  203. onPress={() => this.search(this)}
  204. style={{ position: 'absolute', left: '45%', top: 10 }}
  205. >
  206. <Image style={styles.search} source={require('../images/common/search.png')} />
  207. </TouchableOpacity>
  208. </View>
  209. <TouchableOpacity onPress={this.tabCallOutHandler}>
  210. <View style={styles.rightBtn}>
  211. <Image source={require('../images/common/switch.png')} style={styles.rightBtnIcon} />
  212. <Text style={styles.rightBtnText}>{this.state.currentSwitch.title}</Text>
  213. </View>
  214. </TouchableOpacity>
  215. </View>
  216. </View>
  217. );
  218. }
  219. // 渲染轮播图
  220. getSwiperElement() {
  221. return (
  222. <View
  223. style={{
  224. height: Dimensions.getHeight(163),
  225. flex: 1,
  226. justifyContent: 'center',
  227. alignItems: 'center',
  228. flexDirection: 'row'
  229. }}
  230. >
  231. <View
  232. style={{
  233. width: Dimensions.getWidth(358),
  234. height: Dimensions.getHeight(153),
  235. justifyContent: 'center',
  236. overflow: 'hidden'
  237. }}
  238. >
  239. <MySwiper autoplay={true} loop={true} ifShowMiddle={true} data={this.state.banner} />
  240. </View>
  241. </View>
  242. );
  243. }
  244. // 渲染课程表
  245. getScheduleElement() {
  246. let renderScheduleItem = (item, index) => {
  247. const id = item.operationContent;
  248. return (
  249. <TouchableOpacity
  250. style={{
  251. width: Dimensions.getWidth(172),
  252. height: Dimensions.getHeight(86),
  253. marginRight: 12
  254. }}
  255. onPress={() => this.toNextPage('SchedulePage', { pagecode: id })}
  256. key={index}
  257. activeOpacity={1}
  258. >
  259. <ImageBackground
  260. source={{
  261. uri: item.boothContent
  262. }}
  263. key={index}
  264. style={{
  265. flex: 1,
  266. // justifyContent: "center",
  267. // alignItems: "center",
  268. borderRadius: 10
  269. }}
  270. >
  271. {item.operationContent === 'KINDERGARTE' ? null : (
  272. <View
  273. style={{
  274. width: Dimensions.getWidth(90),
  275. height: Dimensions.getHeight(45),
  276. marginLeft: Dimensions.getWidth(15),
  277. marginTop: Dimensions.getHeight(15),
  278. justifyContent: 'center',
  279. alignItems: 'center'
  280. }}
  281. >
  282. <Text
  283. style={{
  284. color: '#fff',
  285. fontSize: 18
  286. }}
  287. >
  288. {item.title}
  289. </Text>
  290. <Text
  291. style={{
  292. color: '#fff',
  293. fontSize: 18
  294. }}
  295. >
  296. {item.summary}
  297. </Text>
  298. </View>
  299. )}
  300. </ImageBackground>
  301. </TouchableOpacity>
  302. );
  303. };
  304. return (
  305. <View
  306. style={{
  307. flex: 1,
  308. flexDirection: 'column',
  309. height: Dimensions.getHeight(160)
  310. }}
  311. >
  312. <TopicTitle title={`课程表:第${this.state.scheduleWeek}周`} ifTubeShow={true} />
  313. {/* <View
  314. style={{
  315. flex: 2,
  316. flexDirection: "row",
  317. alignItems: 'center',
  318. paddingLeft: 10
  319. }}
  320. >
  321. {this.state.schedule.map((item, index) => renderScheduleItem(item, index))}
  322. </View> */}
  323. <FlatList
  324. data={this.state.schedule}
  325. horizontal={true}
  326. style={{ paddingLeft: '3.2%' }}
  327. renderItem={({ item, index }) => renderScheduleItem(item, index)}
  328. keyExtractor={(item, index) => index.toString()}
  329. showsHorizontalScrollIndicator={false}
  330. />
  331. </View>
  332. );
  333. }
  334. // 渲染月主题
  335. getMonthTopic() {
  336. return (
  337. <View
  338. style={{
  339. flex: 1,
  340. height: 225
  341. }}
  342. >
  343. <TopicTitle title={this.state.monthTopicTitle} summary={'每天30分钟'} ifTubeShow={true} />
  344. <ScrollRow
  345. itemWidth={352}
  346. itemHeight={153}
  347. nav={this.props.navigation.navigate}
  348. data={this.state.monthTopicScroll}
  349. />
  350. </View>
  351. );
  352. }
  353. // 渲染热门课程
  354. getHotCourse() {
  355. return (
  356. <View
  357. style={{
  358. flex: 1,
  359. height: 220
  360. }}
  361. >
  362. <TopicTitle title={'热门课程'} ifTubeShow={true} />
  363. <ScrollRow
  364. itemWidth={106}
  365. itemHeight={150}
  366. nav={this.props.navigation.navigate}
  367. data={this.state.hotCourse}
  368. />
  369. </View>
  370. );
  371. }
  372. // 渲染全部课程
  373. getAllCourses() {
  374. return (
  375. <View>
  376. {this.state.recommend.map((item, index) => {
  377. return (
  378. <View
  379. style={{
  380. flex: 1,
  381. height: 240
  382. }}
  383. key={index}
  384. >
  385. {index === 0 ? null : (
  386. <View style={{ width: Dimensions.width, height: 4, backgroundColor: '#f0f1f5' }} />
  387. )}
  388. <TopicTitle title={item.zone.title} />
  389. <ScrollRow
  390. itemWidth={106}
  391. itemHeight={150}
  392. nav={this.props.navigation.navigate}
  393. data={item.zoneCourseVOList}
  394. />
  395. </View>
  396. );
  397. })}
  398. </View>
  399. );
  400. }
  401. // 渲染每一个块儿 sectionList组件的data,没有用到,以后可能会用
  402. loadFlatItem(data) {
  403. switch (data.title) {
  404. // 轮播图
  405. case 'banner':
  406. return this.getSwiperElement();
  407. break;
  408. // 课程表
  409. case 'schedule':
  410. return this.getScheduleElement();
  411. break;
  412. // 大图主题
  413. case 'monthTopic':
  414. return this.getMonthTopic();
  415. break;
  416. // 热门课程
  417. case 'hotCourse':
  418. return this.getHotCourse();
  419. break;
  420. case 'recommend':
  421. return this.getAllCourses();
  422. break;
  423. default:
  424. break;
  425. }
  426. }
  427. // 渲染每一个section的title sectionList组件的data,没有用到,以后可能会用
  428. sectionTitle = (info) => {
  429. switch (info.section.title) {
  430. case 'operation':
  431. return (
  432. <View
  433. style={{
  434. width: Dimensions.width,
  435. height: 10,
  436. backgroundColor: '#f0f1f5'
  437. }}
  438. />
  439. );
  440. break;
  441. case 'courses':
  442. return <TopicTitle title={'全部课程'} tubeColor={'#7d9fff'} background={'#f0f1f5'} ifTubeShow={true} />;
  443. break;
  444. default:
  445. break;
  446. }
  447. };
  448. // 点击呼出学龄菜单
  449. tabCallOutHandler = () => {
  450. this.setState(
  451. {
  452. ifGradeMenuShow: !this.state.ifGradeMenuShow
  453. },
  454. () => {
  455. Animated.timing(this.state.fadeAnim, {
  456. toValue: this.state.ifGradeMenuShow ? 1 : 0,
  457. duration: 300
  458. }).start();
  459. }
  460. );
  461. };
  462. // 如果切换学龄在显示状态,那么在它失去焦点时将它隐藏
  463. hideGradeMenu = () => {
  464. if (this.state.ifGradeMenuShow) {
  465. this.setState({
  466. ifGradeMenuShow: false
  467. });
  468. }
  469. };
  470. // 获取用户信息
  471. async getUserInfo() {
  472. this.setState({
  473. username: global.userInfo.nickName,
  474. avatar: global.userInfo.avatar
  475. });
  476. let ageindex = 0;
  477. if (global.userInfo.ageGroup === 'PRESCHOOL') {
  478. ageindex = 0;
  479. } else if (global.userInfo.ageGroup === 'PRIMARY_SCHOOL') {
  480. ageindex = 1;
  481. } else if (global.userInfo.ageGroup === 'MIDDLE_SCHOOL') {
  482. ageindex = 2;
  483. }
  484. this.switchGrade(ageindex);
  485. }
  486. updateUserInfo(group) {
  487. let opts = {
  488. method: 'PUT', //请求方法
  489. body: { ageGroup: group } //请求体
  490. };
  491. http_user.update_UserInfo(opts).then((res) => {
  492. global.userInfo.ageGroup = group;
  493. commonutil.saveUserInfo();
  494. });
  495. }
  496. // 搜索
  497. search() {
  498. this.toNextPage('SearchResult');
  499. }
  500. toNextPage = (params, obj) => {
  501. if (!global.userInfo.isVisitor) {
  502. this.props.navigation.navigate(params, obj);
  503. } else {
  504. this.Toast('请先登录');
  505. }
  506. };
  507. }
  508. const styles = StyleSheet.create({
  509. title_text: {
  510. justifyContent: 'center',
  511. alignItems: 'center',
  512. color: 'red',
  513. fontSize: 30,
  514. textAlign: 'center',
  515. marginTop: 30,
  516. marginBottom: 50
  517. },
  518. /* 搜索区域 */
  519. searchSection: {
  520. flex: 1,
  521. width: Dimensions.width,
  522. height: Dimensions.getHeight(60),
  523. flexDirection: 'row',
  524. alignItems: 'center',
  525. backgroundColor: '#f0f1f5',
  526. justifyContent: 'space-around',
  527. position: 'relative'
  528. },
  529. searchBox: {
  530. position: 'relative',
  531. width: Dimensions.getWidth(232),
  532. height: Dimensions.getHeight(40),
  533. backgroundColor: '#fff',
  534. borderRadius: 20
  535. },
  536. search: {
  537. width: 30,
  538. height: 30
  539. },
  540. rightBtn: {
  541. width: Dimensions.getWidth(113),
  542. height: Dimensions.getHeight(40),
  543. backgroundColor: '#fff',
  544. borderRadius: 20,
  545. alignItems: 'center',
  546. justifyContent: 'center',
  547. justifyContent: 'space-around',
  548. flexDirection: 'row',
  549. paddingLeft: 20,
  550. paddingRight: 10
  551. },
  552. rightBtnIcon: {
  553. width: Dimensions.getWidth(23),
  554. height: Dimensions.getHeight(23)
  555. },
  556. rightBtnText: {
  557. color: '#151515',
  558. fontSize: 18
  559. },
  560. callUpGrade: {
  561. width: 113,
  562. height: 120,
  563. borderRadius: 20,
  564. position: 'absolute',
  565. right: 9,
  566. top: 125,
  567. zIndex: 999,
  568. elevation: 999,
  569. backgroundColor: '#fff',
  570. flexDirection: 'column'
  571. },
  572. gradeItem: {
  573. zIndex: 999,
  574. flex: 1,
  575. alignItems: 'center',
  576. justifyContent: 'center'
  577. },
  578. gradeItemMid: {
  579. zIndex: 999,
  580. flex: 1,
  581. alignItems: 'center',
  582. justifyContent: 'center',
  583. borderTopWidth: 1,
  584. borderBottomWidth: 1,
  585. borderColor: '#f0f1f5'
  586. },
  587. gradeText: {
  588. color: '#151515',
  589. fontSize: 18
  590. }
  591. });
  592. const sectionData = [
  593. {
  594. title: 'swiper',
  595. data: [
  596. {
  597. //轮播
  598. key: 111,
  599. typea: 1,
  600. text: '第一种类型'
  601. },
  602. {
  603. //只有一个标题下面两个图片
  604. key: 222,
  605. typea: 2,
  606. item: {
  607. item_type: 1,
  608. title: '课程表:第一周',
  609. icon_item: [
  610. {
  611. icon:
  612. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  613. name: '第一张图片文字'
  614. },
  615. {
  616. icon:
  617. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  618. name: '第二张图片文字'
  619. }
  620. ]
  621. }
  622. }
  623. ]
  624. },
  625. {
  626. title: 'operation',
  627. data: [
  628. {
  629. //一个标题,大长图
  630. key: 444,
  631. typea: 3,
  632. title: '五月主题:五一启程,去看看不同世界',
  633. text: '每天30分钟,玩学两不误',
  634. icon_item: [
  635. {
  636. icon:
  637. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  638. name: '第一张图片文字'
  639. },
  640. {
  641. icon:
  642. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  643. name: '第二张图片文字'
  644. },
  645. {
  646. icon:
  647. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  648. name: '第三张图片文字'
  649. },
  650. {
  651. icon:
  652. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  653. name: '第四张图片文字'
  654. },
  655. {
  656. icon:
  657. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  658. name: '第五张图片文字'
  659. }
  660. ]
  661. },
  662. {
  663. key: 555,
  664. typea: 4,
  665. title: '热门课程',
  666. text: 'text',
  667. mask: false,
  668. icon_item: [
  669. {
  670. icon:
  671. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  672. name: '第一张图片文字'
  673. },
  674. {
  675. icon:
  676. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  677. name: '第二张图片文字'
  678. },
  679. {
  680. icon:
  681. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  682. name: '第三张图片文字'
  683. },
  684. {
  685. icon:
  686. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  687. name: '第四张图片文字'
  688. },
  689. {
  690. icon:
  691. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  692. name: '第五张图片文字'
  693. }
  694. ]
  695. }
  696. ]
  697. },
  698. {
  699. title: 'courses',
  700. data: [
  701. {
  702. //一个标题,大长图
  703. key: 444,
  704. typea: 5,
  705. title: '五月主题:五一启程,去看看不同世界',
  706. text: '每天30分钟,玩学两不误',
  707. icon_item: [
  708. {
  709. icon:
  710. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  711. name: '第一张图片文字'
  712. },
  713. {
  714. icon:
  715. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  716. name: '第二张图片文字'
  717. },
  718. {
  719. icon:
  720. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  721. name: '第三张图片文字'
  722. },
  723. {
  724. icon:
  725. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  726. name: '第四张图片文字'
  727. },
  728. {
  729. icon:
  730. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  731. name: '第五张图片文字'
  732. }
  733. ]
  734. },
  735. {
  736. key: 555,
  737. typea: 5,
  738. title: '热门课程',
  739. text: 'text',
  740. mask: false,
  741. icon_item: [
  742. {
  743. icon:
  744. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  745. name: '第一张图片文字'
  746. },
  747. {
  748. icon:
  749. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  750. name: '第二张图片文字'
  751. },
  752. {
  753. icon:
  754. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  755. name: '第三张图片文字'
  756. },
  757. {
  758. icon:
  759. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  760. name: '第四张图片文字'
  761. },
  762. {
  763. icon:
  764. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg',
  765. name: '第五张图片文字'
  766. }
  767. ]
  768. }
  769. ]
  770. }
  771. ];