MainPage.js 22 KB

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