Commit 5ab50a01 by FE

course popup

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