Commit 3f5950a3 by xuzhenghua

bug

parent e37d3402
...@@ -201,7 +201,13 @@ function TopSwiper({bannerList}) { ...@@ -201,7 +201,13 @@ 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 = ''
if(isOdd){
filterList = modules.list
} else {
filterList = modules.list[0].course_img ==='' ? 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>
...@@ -216,7 +222,7 @@ function CourseList({modules}) { ...@@ -216,7 +222,7 @@ function CourseList({modules}) {
<LazyLoad offset={50}> <LazyLoad offset={50}>
<ul className='index-course-detail'> <ul className='index-course-detail'>
{ {
!isOdd && !isOdd && modules.list[0].course_img!=='' &&
<div className="category-vip"> <div className="category-vip">
<Link to={`/detail?id=${modules.list[0].course_id}`}> <Link to={`/detail?id=${modules.list[0].course_id}`}>
<img src={modules.list[0].course_img_small} alt=""/> <img src={modules.list[0].course_img_small} alt=""/>
...@@ -290,11 +296,11 @@ function ScrollBox(props) { ...@@ -290,11 +296,11 @@ function ScrollBox(props) {
} }
{ {
!item.is_prepare && item.live_status === 0 && !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) && (item.live_status === 1 || item.live_status === 10) &&
<p className='item-btn'>正在直播</p> <button className='item-btn'>正在直播</button>
} }
</div> </div>
</div> </div>
......
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
padding: 0 5px; padding: 0 5px;
height: 20px; height: 20px;
text-align: center; text-align: center;
line-height: 18px; border: none;
background: linear-gradient(60deg, $bg_active 0%, $bg_0080FF 100%); background: linear-gradient(60deg, $bg_active 0%, $bg_0080FF 100%);
border-radius: 10px; border-radius: 10px;
font-size: 14px; font-size: 14px;
......
...@@ -200,7 +200,6 @@ ...@@ -200,7 +200,6 @@
button { button {
@include clean-button-style; @include clean-button-style;
width: 62px;
height: 26px; height: 26px;
margin-left: 7px; margin-left: 7px;
background: $bg_FADD29; background: $bg_FADD29;
......
.share-ranking { .share-ranking {
width: 100%;
height: 60px; height: 60px;
line-height: 25px; padding: 0 12px;
padding: 15px 12px;
border-top: 8px solid $bg_f5f5f5; border-top: 8px solid $bg_f5f5f5;
display: flex; display: flex;
position: relative;
font-size: 12px; font-size: 12px;
width: 100%;
.share-container { .share-container {
width: 100%; width: 100%;
height: 24px;
.share-list { .share-list {
flex: 1 1 auto; flex: 1 1 auto;
} }
.share-money { .share-money {
flex: 1 1 auto; flex: 1 1 auto;
max-width: 112px;;
} }
} }
.title { .title {
font-size: 14px; font-size: 14px;
margin-right: 4px; margin-right: 4px;
// flex-basis: 46px; display: inline-block;
// flex: 1 1 auto; width: 60px;
} }
.ranking-box { .ranking-box {
position: relative; display: flex;
height: 22px; justify-content: space-between;
line-height: 22px;
} }
.ranking-mess { .ranking-mess {
float: left; display: inline-block;
margin-right: 8px;
img { img {
width: 22px; width: 22px;
height: 22px; height: 22px;
...@@ -45,7 +40,6 @@ ...@@ -45,7 +40,6 @@
} }
i { i {
display: inline-block;
margin-left: 5px; margin-left: 5px;
color: $color_333; color: $color_333;
font-style: normal; font-style: normal;
...@@ -153,6 +147,7 @@ ...@@ -153,6 +147,7 @@
width: 100%; width: 100%;
height: 44px; height: 44px;
text-align: center; text-align: center;
button { button {
border: none; border: none;
padding: 0 10px; 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