Commit 34a373ae by wangshuo

分类列表优化

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