Commit f4a1d98f by zhanghaozhe

限时免费分类页

parent 13150b30
......@@ -82,7 +82,7 @@ class Classify extends Component {
// 获取课程接口
getList = () => {
const _this = this
_this.setState((state, props)=>({
_this.setState((state, props) => ({
isLoading: true
}));
http.get(`${API.home}/m/course/list/${getParam('id')}`).then((res) => {
......@@ -180,9 +180,9 @@ class Classify extends Component {
renderTabBar={props => {
return (
<Sticky>
{({ style }) => {
{({style}) => {
return (
<div style={{ ...style, top: `${this.state.top}px`, zIndex: 1 }}>
<div style={{...style, top: `${this.state.top}px`, zIndex: 1}}>
<Tabs.DefaultTabBar {...props} />
</div>
)
......@@ -202,19 +202,18 @@ class Classify extends Component {
</p>
<p className='contact text-overflow-2'>{item.desc}</p>
<div className='des'>
{!item.is_buy && <p className="course-price">
<span className="new">¥{item.price1}</span>
<span className="old">¥{item.price0}</span>
</p>
}
{item.is_buy &&
<span className="isbuy">已购买</span>
}
{
false && <div className="limit-free">
!item.is_buy ?
item.is_restricted ?
<div className="limit-free">
<span>限时免费</span>
<span>¥{item.price0}</span>
</div>
: <p className="course-price">
<span className="new">¥{item.price1}</span>
<span className="old">¥{item.price0}</span>
</p>
: <span className="isbuy">已购买</span>
}
</div>
</div>
......
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