MainPage.js 23 KB

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