Commit 3f5950a3 by xuzhenghua

bug

parent e37d3402
......@@ -201,7 +201,13 @@ function TopSwiper({bannerList}) {
// 课程数量是奇数第一个课程需要横着展示沾满一行,课程数量是偶数一行显示两个
function CourseList({modules}) {
let isOdd = modules.list.length % 2 === 0
let filterList = isOdd ? modules.list : modules.list.slice(1)
// 数量为奇数时,第一个课程显示大图(如后台未上传,前台显示小图),课程数量为偶数时,均显示小图
let filterList = ''
if(isOdd){
filterList = modules.list
} else {
filterList = modules.list[0].course_img ==='' ? modules.list : modules.list.slice(1)
}
return (
<div className='category'>
<h2 className="title">{modules.name}</h2>
......@@ -216,7 +222,7 @@ function CourseList({modules}) {
<LazyLoad offset={50}>
<ul className='index-course-detail'>
{
!isOdd &&
!isOdd && modules.list[0].course_img!=='' &&
<div className="category-vip">
<Link to={`/detail?id=${modules.list[0].course_id}`}>
<img src={modules.list[0].course_img_small} alt=""/>
......@@ -290,11 +296,11 @@ function ScrollBox(props) {
}
{
!item.is_prepare && item.live_status === 0 &&
<p className='item-btn'>预约</p>
<button className='item-btn'>预约</button>
}
{
(item.live_status === 1 || item.live_status === 10) &&
<p className='item-btn'>正在直播</p>
<button className='item-btn'>正在直播</button>
}
</div>
</div>
......
......@@ -214,7 +214,7 @@
padding: 0 5px;
height: 20px;
text-align: center;
line-height: 18px;
border: none;
background: linear-gradient(60deg, $bg_active 0%, $bg_0080FF 100%);
border-radius: 10px;
font-size: 14px;
......
......@@ -200,7 +200,6 @@
button {
@include clean-button-style;
width: 62px;
height: 26px;
margin-left: 7px;
background: $bg_FADD29;
......
.share-ranking {
width: 100%;
height: 60px;
line-height: 25px;
padding: 15px 12px;
padding: 0 12px;
border-top: 8px solid $bg_f5f5f5;
display: flex;
position: relative;
font-size: 12px;
width: 100%;
.share-container {
width: 100%;
height: 24px;
.share-list {
flex: 1 1 auto;
}
.share-money {
flex: 1 1 auto;
max-width: 112px;;
}
}
.title {
font-size: 14px;
margin-right: 4px;
// flex-basis: 46px;
// flex: 1 1 auto;
display: inline-block;
width: 60px;
}
.ranking-box {
position: relative;
height: 22px;
line-height: 22px;
display: flex;
justify-content: space-between;
}
.ranking-mess {
float: left;
margin-right: 8px;
display: inline-block;
img {
width: 22px;
height: 22px;
......@@ -45,7 +40,6 @@
}
i {
display: inline-block;
margin-left: 5px;
color: $color_333;
font-style: normal;
......@@ -153,6 +147,7 @@
width: 100%;
height: 44px;
text-align: center;
button {
border: none;
padding: 0 10px;
......
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