Commit 420a47da by xuzhenghua

index

parent 11cc2c08
...@@ -2,12 +2,13 @@ import React from 'react'; ...@@ -2,12 +2,13 @@ import React from 'react';
import './index.scss' import './index.scss'
const VList = (props) => { const VList = (props) => {
console.log(props)
return ( return (
<li className='v-list-item'> <li className='v-list-item' onClick={e=>props.handleClick(props.courseInfo.course_id)}>
<div className="content"> <div className="content">
<div className="cover" onClick={props.handleClick}> <div className="cover">
{props.status} {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> </div>
{props.info} {props.info}
</div> </div>
......
import React, {Component} from 'react'; import React, {Component} from 'react'
import {Course} from '../../common' import {Course} from '../../common'
import './index.scss'; import './index.scss'
import {WithTab} from '@/HOCs' import {WithTab} from '@/HOCs'
import Swiper from 'react-mobile-swiper' import Swiper from 'react-mobile-swiper'
import createStyle from './createStyle' import createStyle from './createStyle'
import LazyLoad from 'react-lazy-load'; import LazyLoad from 'react-lazy-load'
import {api} from '@/utils' import {api} from '@/utils'
import LiveRoom from './liveRoom' import LiveRoom from './liveRoom'
...@@ -13,7 +13,7 @@ const animateTypes = Swiper.animateTypes ...@@ -13,7 +13,7 @@ const animateTypes = Swiper.animateTypes
class Index extends Component { class Index extends Component {
constructor(props) { constructor(props) {
super(props); super(props)
this.state = { this.state = {
banner: [], banner: [],
lives: [], lives: [],
...@@ -71,11 +71,11 @@ class Index extends Component { ...@@ -71,11 +71,11 @@ class Index extends Component {
isShow: true, isShow: true,
islive: true, islive: true,
roomId roomId
})); }))
} }
// 自组件传给父组件的isshow // 自组件传给父组件的isshow
colseBox = (val) => { colseBox = (val) => {
this.setState({isShow: val}); this.setState({isShow: val})
} }
toSearch() { toSearch() {
...@@ -145,7 +145,7 @@ class Index extends Component { ...@@ -145,7 +145,7 @@ class Index extends Component {
} }
</div> </div>
); )
} }
} }
...@@ -166,8 +166,8 @@ function TopSwiper({bannerList}) { ...@@ -166,8 +166,8 @@ function TopSwiper({bannerList}) {
) )
} }
function CourseList({modules}) { function CourseList({modules}) {
let isOdd = modules.list.length % 2 === 0; let isOdd = modules.list.length % 2 === 0
let filterList = isOdd ? modules.list : modules.list.slice(1); let filterList = isOdd ? modules.list : modules.list.slice(1)
return ( return (
<div className='category'> <div className='category'>
<h2 className="title">{modules.name}</h2> <h2 className="title">{modules.name}</h2>
...@@ -247,4 +247,4 @@ function ScrollBox(props) { ...@@ -247,4 +247,4 @@ function ScrollBox(props) {
) )
} }
export default WithTab(Index); export default WithTab(Index)
...@@ -117,6 +117,9 @@ ...@@ -117,6 +117,9 @@
display: flex; display: flex;
margin-top: 5px; margin-top: 5px;
margin-bottom: 50px; margin-bottom: 50px;
ul {
width: 100%;
}
} }
.am-tabs-default-bar-tab { .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