MainPage.js 22 KB

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