MainPage.js 23 KB

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