MainPage.js 22 KB

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