Commit 6b68cf90 by zhanghaozhe

精品特惠页

parent 3d02edc5
...@@ -36,6 +36,11 @@ class Classify extends Component { ...@@ -36,6 +36,11 @@ class Classify extends Component {
this.getList() this.getList()
} }
componentWillUnmount() {
document.removeEventListener('touchmove', stopScroll)
}
// 获取tabs接口 // 获取tabs接口
getTabs = () => { getTabs = () => {
let data = 0 let data = 0
...@@ -122,7 +127,7 @@ class Classify extends Component { ...@@ -122,7 +127,7 @@ class Classify extends Component {
} }
toClassify = () => { toClassify = () => {
location.replace('/classify'); this.props.history.replace('/classify');
} }
render() { render() {
......
...@@ -4,11 +4,8 @@ import {Tabs, WhiteSpace, Toast} from 'antd-mobile' ...@@ -4,11 +4,8 @@ import {Tabs, WhiteSpace, Toast} from 'antd-mobile'
import './index.scss' import './index.scss'
import HeaderSearch from '../../common/HeaderSearch/index' import HeaderSearch from '../../common/HeaderSearch/index'
import {http} from "@/utils" import {http} from "@/utils"
import {Link} from 'react-router-dom'
import Loading from '@/common/Loading' import Loading from '@/common/Loading'
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {getCourses} from './../detail/actions';
@connect(({user}) => ({ @connect(({user}) => ({
user user
...@@ -106,6 +103,10 @@ class Preferential extends Component { ...@@ -106,6 +103,10 @@ class Preferential extends Component {
tabs={tabs} tabs={tabs}
animated={false} animated={false}
onChange={(tab, index) => this.ontabclick(tab, index)} onChange={(tab, index) => this.ontabclick(tab, index)}
swipeable={false}
renderTabBar={props => <div className={'custom-tab-bar'}>
<Tabs.DefaultTabBar {...props}/>
</div>}
> >
<div className='tabs'> <div className='tabs'>
<ul> <ul>
......
.preferential { .preferential {
padding-top: 88px;
.preferential{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 44px;
z-index: 10;
padding-top: 0;
}
.custom-tab-bar{
width: 100%;
position: fixed;
top: 43px;
left: 0;
padding: 15px 0 15px 11px;
z-index: 10;
background: #fff;
}
.class-content { .class-content {
padding: 0 12px; padding: 0 12px;
position: relative; position: relative;
......
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