MainPage.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  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. });
  490. }
  491. // 搜索
  492. search() {
  493. this.toNextPage('SearchResult');
  494. }
  495. toNextPage = (params, obj) => {
  496. if (!global.userInfo.isVisitor) {
  497. this.props.navigation.navigate(params, obj);
  498. } else {
  499. this.Toast('请先登录');
  500. }
  501. };
  502. }
  503. const styles = StyleSheet.create({
  504. title_text: {
  505. justifyContent: 'center',
  506. alignItems: 'center',
  507. color: 'red',
  508. fontSize: 30,
  509. textAlign: 'center',
  510. marginTop: 30,
  511. marginBottom: 50
  512. },
  513. /* 搜索区域 */
  514. searchSection: {
  515. flex: 1,
  516. width: Dimensions.width,
  517. height: Dimensions.getHeight(60),
  518. flexDirection: 'row',
  519. alignItems: 'center',
  520. backgroundColor: '#f0f1f5',
  521. justifyContent: 'space-around',
  522. position: 'relative'
  523. },
  524. searchBox: {
  525. position: 'relative',
  526. width: Dimensions.getWidth(232),
  527. height: Dimensions.getHeight(40),
  528. backgroundColor: '#fff',
  529. borderRadius: 20
  530. },
  531. search: {
  532. width: 30,
  533. height: 30
  534. },
  535. rightBtn: {
  536. width: Dimensions.getWidth(113),
  537. height: Dimensions.getHeight(40),
  538. backgroundColor: '#fff',
  539. borderRadius: 20,
  540. alignItems: 'center',
  541. justifyContent: 'center',
  542. justifyContent: 'space-around',
  543. flexDirection: 'row',
  544. paddingLeft: 20,
  545. paddingRight: 10
  546. },
  547. rightBtnIcon: {
  548. width: Dimensions.getWidth(23),
  549. height: Dimensions.getHeight(23)
  550. },
  551. rightBtnText: {
  552. color: '#151515',
  553. fontSize: 18
  554. },
  555. callUpGrade: {
  556. width: 113,
  557. height: 120,
  558. borderRadius: 20,
  559. position: 'absolute',
  560. right: 9,
  561. top: 125,
  562. zIndex: 999,
  563. elevation: 999,
  564. backgroundColor: '#fff',
  565. flexDirection: 'column'
  566. },
  567. gradeItem: {
  568. zIndex: 999,
  569. flex: 1,
  570. alignItems: 'center',
  571. justifyContent: 'center'
  572. },
  573. gradeItemMid: {
  574. zIndex: 999,
  575. flex: 1,
  576. alignItems: 'center',
  577. justifyContent: 'center',
  578. borderTopWidth: 1,
  579. borderBottomWidth: 1,
  580. borderColor: '#f0f1f5'
  581. },
  582. gradeText: {
  583. color: '#151515',
  584. fontSize: 18
  585. }
  586. });
  587. const sectionData = [
  588. {
  589. title: 'swiper',
  590. data: [
  591. {
  592. //轮播
  593. key: 111,
  594. typea: 1,
  595. text: '第一种类型'
  596. },
  597. {
  598. //只有一个标题下面两个图片
  599. key: 222,
  600. typea: 2,
  601. item: {
  602. item_type: 1,
  603. title: '课程表:第一周',
  604. icon_item: [
  605. {
  606. icon:
  607. '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',
  608. name: '第一张图片文字'
  609. },
  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. }
  617. }
  618. ]
  619. },
  620. {
  621. title: 'operation',
  622. data: [
  623. {
  624. //一个标题,大长图
  625. key: 444,
  626. typea: 3,
  627. title: '五月主题:五一启程,去看看不同世界',
  628. text: '每天30分钟,玩学两不误',
  629. icon_item: [
  630. {
  631. icon:
  632. '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',
  633. name: '第一张图片文字'
  634. },
  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. },
  657. {
  658. key: 555,
  659. typea: 4,
  660. title: '热门课程',
  661. text: 'text',
  662. mask: false,
  663. icon_item: [
  664. {
  665. icon:
  666. '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',
  667. name: '第一张图片文字'
  668. },
  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. }
  691. ]
  692. },
  693. {
  694. title: 'courses',
  695. data: [
  696. {
  697. //一个标题,大长图
  698. key: 444,
  699. typea: 5,
  700. title: '五月主题:五一启程,去看看不同世界',
  701. text: '每天30分钟,玩学两不误',
  702. icon_item: [
  703. {
  704. icon:
  705. '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',
  706. name: '第一张图片文字'
  707. },
  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. },
  730. {
  731. key: 555,
  732. typea: 5,
  733. title: '热门课程',
  734. text: 'text',
  735. mask: false,
  736. icon_item: [
  737. {
  738. icon:
  739. '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',
  740. name: '第一张图片文字'
  741. },
  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. }
  764. ]
  765. }
  766. ];