Commit 302cafb7 by chenshu

fix:修复列表

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