Commit 34a373ae by wangshuo

分类列表优化

parent f4b81b21
......@@ -36,12 +36,18 @@ class Loading extends Component {
})
}, fake)
}else {
if(prevProps.isLoading != isLoading){
this.setState({
isLoading
})
if(prevProps.isLoading) {
this.setState(()=>({
isLoading: false
}))
}
}
}else{
if(prevProps.isLoading !== isLoading) {
this.setState(()=>({
isLoading: true
}))
}
}
}
......
......@@ -82,6 +82,9 @@ class Classify extends Component {
// 获取课程接口
getList = () => {
const _this = this
_this.setState((state, props)=>({
isLoading: true
}));
http.get(`${API.home}/m/course/list/${getParam('id')}`).then((res) => {
if (res.data.code === 200) {
_this.setState({
......
......@@ -29,6 +29,10 @@ html,body,#root {
background: #fff;
}
.am-tabs-top {
height: 93vh;
}
.v-list-item {
padding: 10px 0 0;
......
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