MainPage.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  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. Button,
  20. ViewPagerAndroid,
  21. DeviceEventEmitter,
  22. SectionList,
  23. Animated,
  24. TouchableHighlight
  25. } from 'react-native';
  26. import BasePage from '../BasePage';
  27. import Header from './Header';
  28. import MySwiper from './Swiper';
  29. import Dimensions from '../utils/dimensions';
  30. import TopicTitle from './TopicTitle';
  31. import ScrollRow from './ScrollRow';
  32. import LibraryUrl from '../services/library';
  33. import { ScrollView } from 'react-native-gesture-handler';
  34. import commonutil from '../utils/commonutil';
  35. import http_user from '../services/user';
  36. export default class MainPage extends BasePage {
  37. constructor(props) {
  38. super(props);
  39. state: {
  40. file_user_data: new Map();
  41. }
  42. }
  43. updateRender(index) {
  44. // LibraryUrl.getIndex(index).success(res => {
  45. // }).fail(() => {
  46. // alert(1111)
  47. // })
  48. LibraryUrl.getIndex(index).then((res) => {
  49. console.log(res);
  50. const monthTopicTitle = res.data.monthTopic.zone.title;
  51. const monthTopicScroll = res.data.monthTopic.zoneCourseVOList;
  52. const schedule = res.data.schedule;
  53. const hotCourse = res.data.hotCourse;
  54. const recommend = res.data.recommend; //全部课程
  55. const banner = res.data.banner; //轮播图
  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. });
  75. console.log(this.state.banner);
  76. });
  77. }
  78. state = {
  79. grade: '大学',
  80. text: '小伙子',
  81. ifGradeMenuShow: false,
  82. fadeAnim: new Animated.Value(0),
  83. schedule: [],
  84. recommend: [],
  85. listData: [],
  86. banner: [],
  87. currentSwitch: { title: '小学', param: 'PRIMARY_SCHOOL' },
  88. switchList: [
  89. // { title: '幼儿园', param: 'KINDERGARTEN' },
  90. { title: '学前', param: 'PRESCHOOL' },
  91. { title: '小学', param: 'PRIMARY_SCHOOL' },
  92. { title: '中学', param: 'MIDDLE_SCHOOL' }
  93. ],
  94. scheduleWeek: '1',
  95. username: '游客',
  96. avatar: '',
  97. isVip: false
  98. };
  99. renderBtn = (item, index) => {
  100. return (
  101. // this.state.currentSwitch.param === item.param
  102. // ?
  103. // null
  104. // :
  105. // <TouchableOpacity onPress={() => this.switchGrade(index)} key={index} style={index === 1 ? styles.gradeItemMid : styles.gradeItem}>
  106. // <Text style={styles.gradeText}>{item.title}</Text>
  107. // </TouchableOpacity>
  108. <TouchableOpacity
  109. onPress={() => this.switchGrade(index)}
  110. key={index}
  111. style={index === 1 ? styles.gradeItemMid : styles.gradeItem}
  112. >
  113. <Text style={styles.gradeText}>{item.title}</Text>
  114. </TouchableOpacity>
  115. );
  116. };
  117. componentWillMount() {
  118. this.getUserInfo();
  119. }
  120. componentDidMount() {
  121. // this.updateRender('PRIMARY_SCHOOL');
  122. }
  123. switchGrade = (index) => {
  124. console.log('====================================');
  125. console.log('switchGrade:' + index);
  126. console.log('====================================');
  127. const obj = this.state.switchList[index];
  128. this.setState({
  129. currentSwitch: obj
  130. });
  131. this.hideGradeMenu();
  132. // if (obj.param === this.state.currentSwitch.param) return
  133. //这里更新个人信息学龄选项
  134. var bool = this.updateUserInfo(obj.param);
  135. this.updateRender(obj.param);
  136. };
  137. render() {
  138. // const abc =Object.keys(this.state.data).map((k)=>this.state.data[k])
  139. return (
  140. <View style={{ flex: 1 }} onPress={this.hideGradeMenu}>
  141. {/* <SectionList sectionList组件 性能好 但是针对当前布局是否有要用的必要,以后可能迭代
  142. sections={this.state.listData}
  143. renderItem={({ item }) => {
  144. return this.loadFlatItem(item);
  145. }}
  146. keyExtractor={(item, index) => item.key.toString()}
  147. ListHeaderComponent={() => this.headerorfooterComponent()}
  148. renderSectionHeader={this.sectionTitle}
  149. onScroll={this.hideGradeMenu}
  150. /> */}
  151. <ScrollView
  152. style={{ height: Dimensions.height }}
  153. showsVerticalScrollIndicator={false}
  154. onScroll={this.hideGradeMenu}
  155. >
  156. {this.headerorfooterComponent()}
  157. {this.getSwiperElement()}
  158. {this.getScheduleElement()}
  159. {this.getMonthTopic()}
  160. {this.getHotCourse()}
  161. {this.getAllCourses()}
  162. </ScrollView>
  163. {this.state.ifGradeMenuShow ? (
  164. <Animated.View
  165. style={{
  166. ...styles.callUpGrade,
  167. opacity: this.state.fadeAnim
  168. }}
  169. >
  170. {this.state.switchList.map((item, index) => this.renderBtn(item, index))}
  171. </Animated.View>
  172. ) : null}
  173. </View>
  174. );
  175. }
  176. // 头部组件
  177. headerorfooterComponent() {
  178. return (
  179. <View>
  180. <Header
  181. uri={this.state.avatar}
  182. width={400}
  183. height={150}
  184. username= {this.state.username}
  185. isVip={this.state.isVip}
  186. onPress={() => this.toNextPage('userCenter')}
  187. />
  188. {/* 搜索区域 */}
  189. <View style={styles.searchSection}>
  190. <TextInput
  191. style={styles.searchBox}
  192. onChangeText={(text) => this.setState({ text })}
  193. value={this.state.text}
  194. />
  195. <TouchableOpacity onPress={this.tabCallOutHandler}>
  196. <View style={styles.rightBtn}>
  197. <Image source={require('../images/common/switch.png')} style={styles.rightBtnIcon} />
  198. <Text style={styles.rightBtnText}>{this.state.currentSwitch.title}</Text>
  199. </View>
  200. </TouchableOpacity>
  201. </View>
  202. </View>
  203. );
  204. }
  205. // 渲染轮播图
  206. getSwiperElement() {
  207. return (
  208. <View
  209. style={{
  210. height: Dimensions.getHeight(163),
  211. flex: 1,
  212. justifyContent: 'center',
  213. alignItems: 'center',
  214. flexDirection: 'row'
  215. }}
  216. >
  217. <View
  218. style={{
  219. width: Dimensions.getWidth(358),
  220. height: Dimensions.getHeight(153),
  221. justifyContent: 'center',
  222. overflow: 'hidden'
  223. }}
  224. >
  225. <MySwiper autoplay={true} loop={true} ifShowMiddle={true} data={this.state.banner} />
  226. </View>
  227. </View>
  228. );
  229. }
  230. // 渲染课程表
  231. getScheduleElement() {
  232. let renderScheduleItem = (item, index) => {
  233. const id = item.boothId;
  234. return (
  235. <TouchableOpacity
  236. style={{
  237. width: Dimensions.getWidth(172),
  238. height: Dimensions.getHeight(86),
  239. marginRight: 12
  240. }}
  241. onPress={() => this.toNextPage('SchedulePage', { id })}
  242. key={index}
  243. activeOpacity={1}
  244. >
  245. <ImageBackground
  246. source={{
  247. uri: item.boothContent
  248. }}
  249. key={index}
  250. style={{
  251. flex: 1,
  252. // justifyContent: "center",
  253. // alignItems: "center",
  254. borderRadius: 10
  255. }}
  256. >
  257. {item.operationContent === 'KINDERGARTE' ? null : (
  258. <View
  259. style={{
  260. width: Dimensions.getWidth(90),
  261. height: Dimensions.getHeight(45),
  262. marginLeft: Dimensions.getWidth(15),
  263. marginTop: Dimensions.getHeight(15),
  264. justifyContent: 'center',
  265. alignItems: 'center'
  266. }}
  267. >
  268. <Text
  269. style={{
  270. color: '#fff',
  271. fontSize: 18
  272. }}
  273. >
  274. {item.title}
  275. </Text>
  276. <Text
  277. style={{
  278. color: '#fff',
  279. fontSize: 18
  280. }}
  281. >
  282. {item.summary}
  283. </Text>
  284. </View>
  285. )}
  286. </ImageBackground>
  287. </TouchableOpacity>
  288. );
  289. };
  290. return (
  291. <View
  292. style={{
  293. flex: 1,
  294. flexDirection: 'column',
  295. height: Dimensions.getHeight(160)
  296. }}
  297. >
  298. <TopicTitle title={`课程表:第${this.state.scheduleWeek}周`} ifTubeShow={true} />
  299. {/* <View
  300. style={{
  301. flex: 2,
  302. flexDirection: "row",
  303. alignItems: 'center',
  304. paddingLeft: 10
  305. }}
  306. >
  307. {this.state.schedule.map((item, index) => renderScheduleItem(item, index))}
  308. </View> */}
  309. <FlatList
  310. data={this.state.schedule}
  311. horizontal={true}
  312. style={{ paddingLeft: '3.2%' }}
  313. renderItem={({ item, index }) => renderScheduleItem(item, index)}
  314. keyExtractor={(item, index) => index.toString()}
  315. showsHorizontalScrollIndicator={false}
  316. />
  317. </View>
  318. );
  319. }
  320. // 渲染月主题
  321. getMonthTopic() {
  322. return (
  323. <View
  324. style={{
  325. flex: 1,
  326. height: 225
  327. }}
  328. >
  329. <TopicTitle title={this.state.monthTopicTitle} summary={'每天30分钟'} ifTubeShow={true} />
  330. <ScrollRow
  331. itemWidth={352}
  332. itemHeight={153}
  333. nav={this.props.navigation.navigate}
  334. data={this.state.monthTopicScroll}
  335. />
  336. </View>
  337. );
  338. }
  339. // 渲染热门课程
  340. getHotCourse() {
  341. return (
  342. <View
  343. style={{
  344. flex: 1,
  345. height: 220
  346. }}
  347. >
  348. <TopicTitle title={'热门课程'} ifTubeShow={true} />
  349. <ScrollRow
  350. itemWidth={106}
  351. itemHeight={150}
  352. nav={this.props.navigation.navigate}
  353. data={this.state.hotCourse}
  354. />
  355. </View>
  356. );
  357. }
  358. // 渲染全部课程
  359. getAllCourses() {
  360. return (
  361. <View>
  362. {this.state.recommend.map((item, index) => {
  363. return (
  364. <View
  365. style={{
  366. flex: 1,
  367. height: 240
  368. }}
  369. key={index}
  370. >
  371. {index === 0 ? null : (
  372. <View style={{ width: Dimensions.width, height: 4, backgroundColor: '#f0f1f5' }} />
  373. )}
  374. <TopicTitle title={item.zone.title} />
  375. <ScrollRow
  376. itemWidth={106}
  377. itemHeight={150}
  378. nav={this.props.navigation.navigate}
  379. data={item.zoneCourseVOList}
  380. />
  381. </View>
  382. );
  383. })}
  384. </View>
  385. );
  386. }
  387. // 渲染每一个块儿 sectionList组件的data,没有用到,以后可能会用
  388. loadFlatItem(data) {
  389. switch (data.title) {
  390. // 轮播图
  391. case 'banner':
  392. return this.getSwiperElement();
  393. break;
  394. // 课程表
  395. case 'schedule':
  396. return this.getScheduleElement();
  397. break;
  398. // 大图主题
  399. case 'monthTopic':
  400. return this.getMonthTopic();
  401. break;
  402. // 热门课程
  403. case 'hotCourse':
  404. return this.getHotCourse();
  405. break;
  406. case 'recommend':
  407. return this.getAllCourses();
  408. break;
  409. default:
  410. break;
  411. }
  412. }
  413. // 渲染每一个section的title sectionList组件的data,没有用到,以后可能会用
  414. sectionTitle = (info) => {
  415. switch (info.section.title) {
  416. case 'operation':
  417. return (
  418. <View
  419. style={{
  420. width: Dimensions.width,
  421. height: 10,
  422. backgroundColor: '#f0f1f5'
  423. }}
  424. />
  425. );
  426. break;
  427. case 'courses':
  428. return <TopicTitle title={'全部课程'} tubeColor={'#7d9fff'} background={'#f0f1f5'} ifTubeShow={true} />;
  429. break;
  430. default:
  431. break;
  432. }
  433. };
  434. // 点击呼出学龄菜单
  435. tabCallOutHandler = () => {
  436. this.setState(
  437. {
  438. ifGradeMenuShow: !this.state.ifGradeMenuShow
  439. },
  440. () => {
  441. Animated.timing(this.state.fadeAnim, {
  442. toValue: this.state.ifGradeMenuShow ? 1 : 0,
  443. duration: 300
  444. }).start();
  445. }
  446. );
  447. };
  448. // 如果切换学龄在显示状态,那么在它失去焦点时将它隐藏
  449. hideGradeMenu = () => {
  450. if (this.state.ifGradeMenuShow) {
  451. this.setState({
  452. ifGradeMenuShow: false
  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. 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. width: Dimensions.getWidth(232),
  536. height: Dimensions.getHeight(40),
  537. backgroundColor: '#fff',
  538. borderRadius: 20
  539. },
  540. rightBtn: {
  541. width: Dimensions.getWidth(113),
  542. height: Dimensions.getHeight(40),
  543. backgroundColor: '#fff',
  544. borderRadius: 20,
  545. alignItems: 'center',
  546. justifyContent: 'center',
  547. justifyContent: 'space-around',
  548. flexDirection: 'row',
  549. paddingLeft: 20,
  550. paddingRight: 10
  551. },
  552. rightBtnIcon: {
  553. width: Dimensions.getWidth(23),
  554. height: Dimensions.getHeight(23)
  555. },
  556. rightBtnText: {
  557. color: '#151515',
  558. fontSize: 18
  559. },
  560. callUpGrade: {
  561. width: 113,
  562. height: 120,
  563. borderRadius: 20,
  564. position: 'absolute',
  565. right: 9,
  566. top: 125,
  567. zIndex: 999,
  568. elevation: 999,
  569. backgroundColor: '#fff',
  570. flexDirection: 'column'
  571. },
  572. gradeItem: {
  573. zIndex: 999,
  574. flex: 1,
  575. alignItems: 'center',
  576. justifyContent: 'center'
  577. },
  578. gradeItemMid: {
  579. zIndex: 999,
  580. flex: 1,
  581. alignItems: 'center',
  582. justifyContent: 'center',
  583. borderTopWidth: 1,
  584. borderBottomWidth: 1,
  585. borderColor: '#f0f1f5'
  586. },
  587. gradeText: {
  588. color: '#151515',
  589. fontSize: 18
  590. }
  591. });
  592. const sectionData = [
  593. {
  594. title: 'swiper',
  595. data: [
  596. {
  597. //轮播
  598. key: 111,
  599. typea: 1,
  600. text: '第一种类型'
  601. },
  602. {
  603. //只有一个标题下面两个图片
  604. key: 222,
  605. typea: 2,
  606. item: {
  607. item_type: 1,
  608. title: '课程表:第一周',
  609. icon_item: [
  610. {
  611. icon:
  612. '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',
  613. name: '第一张图片文字'
  614. },
  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. }
  622. }
  623. ]
  624. },
  625. {
  626. title: 'operation',
  627. data: [
  628. {
  629. //一个标题,大长图
  630. key: 444,
  631. typea: 3,
  632. title: '五月主题:五一启程,去看看不同世界',
  633. text: '每天30分钟,玩学两不误',
  634. icon_item: [
  635. {
  636. icon:
  637. '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',
  638. name: '第一张图片文字'
  639. },
  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. },
  662. {
  663. key: 555,
  664. typea: 4,
  665. title: '热门课程',
  666. text: 'text',
  667. mask: false,
  668. icon_item: [
  669. {
  670. icon:
  671. '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',
  672. name: '第一张图片文字'
  673. },
  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. }
  696. ]
  697. },
  698. {
  699. title: 'courses',
  700. data: [
  701. {
  702. //一个标题,大长图
  703. key: 444,
  704. typea: 5,
  705. title: '五月主题:五一启程,去看看不同世界',
  706. text: '每天30分钟,玩学两不误',
  707. icon_item: [
  708. {
  709. icon:
  710. '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',
  711. name: '第一张图片文字'
  712. },
  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. },
  735. {
  736. key: 555,
  737. typea: 5,
  738. title: '热门课程',
  739. text: 'text',
  740. mask: false,
  741. icon_item: [
  742. {
  743. icon:
  744. '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',
  745. name: '第一张图片文字'
  746. },
  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. }
  769. ]
  770. }
  771. ];