Commit 5ab50a01 by FE

course popup

parent b4164e99
......@@ -33,10 +33,12 @@ class ReserveCourse extends Component {
http.get(`${API.home}/sys/pre_coursee`).then(res => {
const {code, data, msg} = res.data;
if (code === 200) {
if(JSON.stringify(data) !== '{}') {
this.setState({
courseData: data.filter((item, index) => index < 4),
courseDataAll: data
})
}
} else {
Toast.info(msg, 2);
}
......
import React, { Component } from 'react';
import classnames from 'classnames';
import { http, SendMessageToApp } from "@/utils";
import { Link } from 'react-router-dom';
import './index.scss';
import { getParam } from '../../../utils';
......@@ -74,7 +74,9 @@ class CoursePopup extends Component {
{
courseList.map(item => (
<span
className="course-popup__item"
className={classnames("course-popup__item", {
"course-popup__item--active": item.blessing
})}
key={item.course_id}
onClick={()=>{this.toCourseDetail(item)}}
>
......
......@@ -64,9 +64,17 @@
}
}
.course-popup__item--active {
.course-popup__name {
color:rgba(82,92,101,.6);
}
}
.course-popup__name {
width: 200px;
font-size: 12px;
color:rgba(82,92,101,1);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
......
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