MainPage.js 22 KB

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