Commit f4a1d98f by zhanghaozhe

限时免费分类页

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