Commit 302cafb7 by chenshu

fix:修复列表

parent 5ce49baf
import User from '@/common/js/user';
import React from 'react';
import Header from './Header'
import Service from "@/common/js/service";
import './ErrorCollege.less';
export default class ErrorCollege extends React.Component {
......@@ -10,6 +11,23 @@ export default class ErrorCollege extends React.Component {
menuType: true,
}
}
componentDidMount() {
this.getStorePermission();
}
getStorePermission() {
const params = {
storeId: User.getStoreId(),
};
Service.Hades('public/customerHades/whetherStopStore', params).then((res) => {
if (!res.result) {
window.RCHistory.replace({
pathname: '/home',
})
}
});
}
handleMenuType() {
this.setState({ menuType: !menuType });
......
......@@ -84,8 +84,9 @@ function Header(props) {
userId: User.getUserId(),
};
Service.Hades('public/customerHades/getStoreListUser', params).then((res) => {
setList(res.result);
listRef.current = res.result;
const newList = _.filter(res.result, item => item.state === 'VALID');
setList(newList);
listRef.current = newList;
});
}
......
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