Commit 3f88493f by 姜雷

每次进入查询豆服务和公告

parent 1fd1cd75
......@@ -114,26 +114,12 @@ class Home extends Component {
}
componentDidShow() {
this.getBeanCountData();
this.getInitData();
}
getInitData() {
this.getBeanCountData();
this.getServiceList();
const { userinfo } = this.props;
fetchAnn({
campusId: userinfo.areaId,
customerId: userinfo.customerId,
})
.then(res => {
if (res) {
this.setState({
annItem: res,
});
}
})
.catch(err => {
console.error(err);
});
this.getAnn();
}
getServiceList() {
......@@ -176,10 +162,26 @@ class Home extends Component {
.catch(console.error);
}
getAnn() {
const { userinfo } = this.props;
fetchAnn({
campusId: userinfo.areaId,
customerId: userinfo.customerId,
})
.then(res => {
if (res) {
this.setState({
annItem: res,
});
}
})
.catch(err => {
console.error(err);
});
}
getFilterBeanList() {
const { beanAccount, serviceList } = this.state;
console.log(beanAccount, serviceList);
let beanMap = {
[BeanType.water]: 0,
[BeanType.shower]: 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