Commit 420a47da by xuzhenghua

index

parent 11cc2c08
......@@ -2,12 +2,13 @@ import React from 'react';
import './index.scss'
const VList = (props) => {
console.log(props)
return (
<li className='v-list-item'>
<li className='v-list-item' onClick={e=>props.handleClick(props.courseInfo.course_id)}>
<div className="content">
<div className="cover" onClick={props.handleClick}>
<div className="cover">
{props.status}
<img src='https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/4c5ccac604.jpg' alt=""/>
<img src={props.courseInfo.image_name} alt=""/>
</div>
{props.info}
</div>
......
import React, {Component} from 'react';
import React, {Component} from 'react'
import {Course} from '../../common'
import './index.scss';
import './index.scss'
import {WithTab} from '@/HOCs'
import Swiper from 'react-mobile-swiper'
import createStyle from './createStyle'
import LazyLoad from 'react-lazy-load';
import LazyLoad from 'react-lazy-load'
import {api} from '@/utils'
import LiveRoom from './liveRoom'
......@@ -13,7 +13,7 @@ const animateTypes = Swiper.animateTypes
class Index extends Component {
constructor(props) {
super(props);
super(props)
this.state = {
banner: [],
lives: [],
......@@ -71,11 +71,11 @@ class Index extends Component {
isShow: true,
islive: true,
roomId
}));
}))
}
// 自组件传给父组件的isshow
colseBox = (val) => {
this.setState({isShow: val});
this.setState({isShow: val})
}
toSearch() {
......@@ -145,7 +145,7 @@ class Index extends Component {
}
</div>
);
)
}
}
......@@ -166,8 +166,8 @@ function TopSwiper({bannerList}) {
)
}
function CourseList({modules}) {
let isOdd = modules.list.length % 2 === 0;
let filterList = isOdd ? modules.list : modules.list.slice(1);
let isOdd = modules.list.length % 2 === 0
let filterList = isOdd ? modules.list : modules.list.slice(1)
return (
<div className='category'>
<h2 className="title">{modules.name}</h2>
......@@ -247,4 +247,4 @@ function ScrollBox(props) {
)
}
export default WithTab(Index);
export default WithTab(Index)
......@@ -117,6 +117,9 @@
display: flex;
margin-top: 5px;
margin-bottom: 50px;
ul {
width: 100%;
}
}
.am-tabs-default-bar-tab {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment