MainPage.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  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. text: '小伙子',
  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. };
  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. <TextInput
  187. style={styles.searchBox}
  188. onChangeText={(text) => this.setState({ text })}
  189. value={this.state.text}
  190. />
  191. <TouchableOpacity onPress={this.tabCallOutHandler}>
  192. <View style={styles.rightBtn}>
  193. <Image source={require('../images/common/switch.png')} style={styles.rightBtnIcon} />
  194. <Text style={styles.rightBtnText}>{this.state.currentSwitch.title}</Text>
  195. </View>
  196. </TouchableOpacity>
  197. </View>
  198. </View>
  199. );
  200. }
  201. // 渲染轮播图
  202. getSwiperElement() {
  203. return (
  204. <View
  205. style={{
  206. height: Dimensions.getHeight(163),
  207. flex: 1,
  208. justifyContent: 'center',
  209. alignItems: 'center',
  210. flexDirection: 'row'
  211. }}
  212. >
  213. <View
  214. style={{
  215. width: Dimensions.getWidth(358),
  216. height: Dimensions.getHeight(153),
  217. justifyContent: 'center',
  218. overflow: 'hidden'
  219. }}
  220. >
  221. <MySwiper autoplay={true} loop={true} ifShowMiddle={true} data={this.state.banner} />
  222. </View>
  223. </View>
  224. );
  225. }
  226. // 渲染课程表
  227. getScheduleElement() {
  228. let renderScheduleItem = (item, index) => {
  229. const id = item.operationContent;
  230. return (
  231. <TouchableOpacity
  232. style={{
  233. width: Dimensions.getWidth(172),
  234. height: Dimensions.getHeight(86),
  235. marginRight: 12
  236. }}
  237. onPress={() => this.toNextPage('SchedulePage', { pagecode: id })}
  238. key={index}
  239. activeOpacity={1}
  240. >
  241. <ImageBackground
  242. source={{
  243. uri: item.boothContent
  244. }}
  245. key={index}
  246. style={{
  247. flex: 1,
  248. // justifyContent: "center",
  249. // alignItems: "center",
  250. borderRadius: 10
  251. }}
  252. >
  253. {item.operationContent === 'KINDERGARTE' ? null : (
  254. <View
  255. style={{
  256. width: Dimensions.getWidth(90),
  257. height: Dimensions.getHeight(45),
  258. marginLeft: Dimensions.getWidth(15),
  259. marginTop: Dimensions.getHeight(15),
  260. justifyContent: 'center',
  261. alignItems: 'center'
  262. }}
  263. >
  264. <Text
  265. style={{
  266. color: '#fff',
  267. fontSize: 18
  268. }}
  269. >
  270. {item.title}
  271. </Text>
  272. <Text
  273. style={{
  274. color: '#fff',
  275. fontSize: 18
  276. }}
  277. >
  278. {item.summary}
  279. </Text>
  280. </View>
  281. )}
  282. </ImageBackground>
  283. </TouchableOpacity>
  284. );
  285. };
  286. return (
  287. <View
  288. style={{
  289. flex: 1,
  290. flexDirection: 'column',
  291. height: Dimensions.getHeight(160)
  292. }}
  293. >
  294. <TopicTitle title={`课程表:第${this.state.scheduleWeek}周`} ifTubeShow={true} />
  295. {/* <View
  296. style={{
  297. flex: 2,
  298. flexDirection: "row",
  299. alignItems: 'center',
  300. paddingLeft: 10
  301. }}
  302. >
  303. {this.state.schedule.map((item, index) => renderScheduleItem(item, index))}
  304. </View> */}
  305. <FlatList
  306. data={this.state.schedule}
  307. horizontal={true}
  308. style={{ paddingLeft: '3.2%' }}
  309. renderItem={({ item, index }) => renderScheduleItem(item, index)}
  310. keyExtractor={(item, index) => index.toString()}
  311. showsHorizontalScrollIndicator={false}
  312. />
  313. </View>
  314. );
  315. }
  316. // 渲染月主题
  317. getMonthTopic() {
  318. return (
  319. <View
  320. style={{
  321. flex: 1,
  322. height: 225
  323. }}
  324. >
  325. <TopicTitle title={this.state.monthTopicTitle} summary={'每天30分钟'} ifTubeShow={true} />
  326. <ScrollRow
  327. itemWidth={352}
  328. itemHeight={153}
  329. nav={this.props.navigation.navigate}
  330. data={this.state.monthTopicScroll}
  331. />
  332. </View>
  333. );
  334. }
  335. // 渲染热门课程
  336. getHotCourse() {
  337. return (
  338. <View
  339. style={{
  340. flex: 1,
  341. height: 220
  342. }}
  343. >
  344. <TopicTitle title={'热门课程'} ifTubeShow={true} />
  345. <ScrollRow
  346. itemWidth={106}
  347. itemHeight={150}
  348. nav={this.props.navigation.navigate}
  349. data={this.state.hotCourse}
  350. />
  351. </View>
  352. );
  353. }
  354. // 渲染全部课程
  355. getAllCourses() {
  356. return (
  357. <View>
  358. {this.state.recommend.map((item, index) => {
  359. return (
  360. <View
  361. style={{
  362. flex: 1,
  363. height: 240
  364. }}
  365. key={index}
  366. >
  367. {index === 0 ? null : (
  368. <View style={{ width: Dimensions.width, height: 4, backgroundColor: '#f0f1f5' }} />
  369. )}
  370. <TopicTitle title={item.zone.title} />
  371. <ScrollRow
  372. itemWidth={106}
  373. itemHeight={150}
  374. nav={this.props.navigation.navigate}
  375. data={item.zoneCourseVOList}
  376. />
  377. </View>
  378. );
  379. })}
  380. </View>
  381. );
  382. }
  383. // 渲染每一个块儿 sectionList组件的data,没有用到,以后可能会用
  384. loadFlatItem(data) {
  385. switch (data.title) {
  386. // 轮播图
  387. case 'banner':
  388. return this.getSwiperElement();
  389. break;
  390. // 课程表
  391. case 'schedule':
  392. return this.getScheduleElement();
  393. break;
  394. // 大图主题
  395. case 'monthTopic':
  396. return this.getMonthTopic();
  397. break;
  398. // 热门课程
  399. case 'hotCourse':
  400. return this.getHotCourse();
  401. break;
  402. case 'recommend':
  403. return this.getAllCourses();
  404. break;
  405. default:
  406. break;
  407. }
  408. }
  409. // 渲染每一个section的title sectionList组件的data,没有用到,以后可能会用
  410. sectionTitle = (info) => {
  411. switch (info.section.title) {
  412. case 'operation':
  413. return (
  414. <View
  415. style={{
  416. width: Dimensions.width,
  417. height: 10,
  418. backgroundColor: '#f0f1f5'
  419. }}
  420. />
  421. );
  422. break;
  423. case 'courses':
  424. return <TopicTitle title={'全部课程'} tubeColor={'#7d9fff'} background={'#f0f1f5'} ifTubeShow={true} />;
  425. break;
  426. default:
  427. break;
  428. }
  429. };
  430. // 点击呼出学龄菜单
  431. tabCallOutHandler = () => {
  432. this.setState(
  433. {
  434. ifGradeMenuShow: !this.state.ifGradeMenuShow
  435. },
  436. () => {
  437. Animated.timing(this.state.fadeAnim, {
  438. toValue: this.state.ifGradeMenuShow ? 1 : 0,
  439. duration: 300
  440. }).start();
  441. }
  442. );
  443. };
  444. // 如果切换学龄在显示状态,那么在它失去焦点时将它隐藏
  445. hideGradeMenu = () => {
  446. if (this.state.ifGradeMenuShow) {
  447. this.setState({
  448. ifGradeMenuShow: false
  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. const styles = StyleSheet.create({
  510. title_text: {
  511. justifyContent: 'center',
  512. alignItems: 'center',
  513. color: 'red',
  514. fontSize: 30,
  515. textAlign: 'center',
  516. marginTop: 30,
  517. marginBottom: 50
  518. },
  519. /* 搜索区域 */
  520. searchSection: {
  521. flex: 1,
  522. width: Dimensions.width,
  523. height: Dimensions.getHeight(60),
  524. flexDirection: 'row',
  525. alignItems: 'center',
  526. backgroundColor: '#f0f1f5',
  527. justifyContent: 'space-around',
  528. position: 'relative'
  529. },
  530. searchBox: {
  531. width: Dimensions.getWidth(232),
  532. height: Dimensions.getHeight(40),
  533. backgroundColor: '#fff',
  534. borderRadius: 20
  535. },
  536. rightBtn: {
  537. width: Dimensions.getWidth(113),
  538. height: Dimensions.getHeight(40),
  539. backgroundColor: '#fff',
  540. borderRadius: 20,
  541. alignItems: 'center',
  542. justifyContent: 'center',
  543. justifyContent: 'space-around',
  544. flexDirection: 'row',
  545. paddingLeft: 20,
  546. paddingRight: 10
  547. },
  548. rightBtnIcon: {
  549. width: Dimensions.getWidth(23),
  550. height: Dimensions.getHeight(23)
  551. },
  552. rightBtnText: {
  553. color: '#151515',
  554. fontSize: 18
  555. },
  556. callUpGrade: {
  557. width: 113,
  558. height: 120,
  559. borderRadius: 20,
  560. position: 'absolute',
  561. right: 9,
  562. top: 125,
  563. zIndex: 999,
  564. elevation: 999,
  565. backgroundColor: '#fff',
  566. flexDirection: 'column'
  567. },
  568. gradeItem: {
  569. zIndex: 999,
  570. flex: 1,
  571. alignItems: 'center',
  572. justifyContent: 'center'
  573. },
  574. gradeItemMid: {
  575. zIndex: 999,
  576. flex: 1,
  577. alignItems: 'center',
  578. justifyContent: 'center',
  579. borderTopWidth: 1,
  580. borderBottomWidth: 1,
  581. borderColor: '#f0f1f5'
  582. },
  583. gradeText: {
  584. color: '#151515',
  585. fontSize: 18
  586. }
  587. });
  588. const sectionData = [
  589. {
  590. title: 'swiper',
  591. data: [
  592. {
  593. //轮播
  594. key: 111,
  595. typea: 1,
  596. text: '第一种类型'
  597. },
  598. {
  599. //只有一个标题下面两个图片
  600. key: 222,
  601. typea: 2,
  602. item: {
  603. item_type: 1,
  604. title: '课程表:第一周',
  605. icon_item: [
  606. {
  607. icon:
  608. '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',
  609. name: '第一张图片文字'
  610. },
  611. {
  612. icon:
  613. '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',
  614. name: '第二张图片文字'
  615. }
  616. ]
  617. }
  618. }
  619. ]
  620. },
  621. {
  622. title: 'operation',
  623. data: [
  624. {
  625. //一个标题,大长图
  626. key: 444,
  627. typea: 3,
  628. title: '五月主题:五一启程,去看看不同世界',
  629. text: '每天30分钟,玩学两不误',
  630. icon_item: [
  631. {
  632. icon:
  633. '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',
  634. name: '第一张图片文字'
  635. },
  636. {
  637. icon:
  638. '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',
  639. name: '第二张图片文字'
  640. },
  641. {
  642. icon:
  643. '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',
  644. name: '第三张图片文字'
  645. },
  646. {
  647. icon:
  648. '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',
  649. name: '第四张图片文字'
  650. },
  651. {
  652. icon:
  653. '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',
  654. name: '第五张图片文字'
  655. }
  656. ]
  657. },
  658. {
  659. key: 555,
  660. typea: 4,
  661. title: '热门课程',
  662. text: 'text',
  663. mask: false,
  664. icon_item: [
  665. {
  666. icon:
  667. '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',
  668. name: '第一张图片文字'
  669. },
  670. {
  671. icon:
  672. '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',
  673. name: '第二张图片文字'
  674. },
  675. {
  676. icon:
  677. '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',
  678. name: '第三张图片文字'
  679. },
  680. {
  681. icon:
  682. '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',
  683. name: '第四张图片文字'
  684. },
  685. {
  686. icon:
  687. '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',
  688. name: '第五张图片文字'
  689. }
  690. ]
  691. }
  692. ]
  693. },
  694. {
  695. title: 'courses',
  696. data: [
  697. {
  698. //一个标题,大长图
  699. key: 444,
  700. typea: 5,
  701. title: '五月主题:五一启程,去看看不同世界',
  702. text: '每天30分钟,玩学两不误',
  703. icon_item: [
  704. {
  705. icon:
  706. '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',
  707. name: '第一张图片文字'
  708. },
  709. {
  710. icon:
  711. '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',
  712. name: '第二张图片文字'
  713. },
  714. {
  715. icon:
  716. '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',
  717. name: '第三张图片文字'
  718. },
  719. {
  720. icon:
  721. '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',
  722. name: '第四张图片文字'
  723. },
  724. {
  725. icon:
  726. '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',
  727. name: '第五张图片文字'
  728. }
  729. ]
  730. },
  731. {
  732. key: 555,
  733. typea: 5,
  734. title: '热门课程',
  735. text: 'text',
  736. mask: false,
  737. icon_item: [
  738. {
  739. icon:
  740. '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',
  741. name: '第一张图片文字'
  742. },
  743. {
  744. icon:
  745. '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',
  746. name: '第二张图片文字'
  747. },
  748. {
  749. icon:
  750. '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',
  751. name: '第三张图片文字'
  752. },
  753. {
  754. icon:
  755. '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',
  756. name: '第四张图片文字'
  757. },
  758. {
  759. icon:
  760. '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',
  761. name: '第五张图片文字'
  762. }
  763. ]
  764. }
  765. ]
  766. }
  767. ];