|
|
|
@ -12,7 +12,9 @@ import { useStore } from "@/stores/StoreContext.js";
|
|
|
|
|
const { Header, Content, Footer } = Layout;
|
|
|
|
|
const { Title } = Typography;
|
|
|
|
|
|
|
|
|
|
const items = [
|
|
|
|
|
let items = [];
|
|
|
|
|
|
|
|
|
|
const items_default = [
|
|
|
|
|
{
|
|
|
|
|
label: <Link to="/account/change-password">Change password</Link>,
|
|
|
|
|
key: "0",
|
|
|
|
@ -30,6 +32,33 @@ const items = [
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const item_manager =
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
label: <Link to="/account/change-password">Change password</Link>,
|
|
|
|
|
key: "0",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: <Link to="/account/profile">Profile</Link>,
|
|
|
|
|
key: "1",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: "divider",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: <Link to="/login?out">Logout</Link>,
|
|
|
|
|
key: "3",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:<Link to="/account/change-vendor">Change Vendor</Link>,
|
|
|
|
|
key:"4",
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function App() {
|
|
|
|
|
const [password, setPassword] = useState('');
|
|
|
|
|
const { authStore, noticeStore } = useStore();
|
|
|
|
@ -41,6 +70,14 @@ function App() {
|
|
|
|
|
const navigate = useNavigate();
|
|
|
|
|
const location = useLocation();
|
|
|
|
|
|
|
|
|
|
const arrManager = ["testzp","testzac","testycc","testlyj","testqqs","testjjh","testhn"];//特定账号加修改所属供应商的菜单 zp
|
|
|
|
|
if (arrManager.includes(authStore.login.username)){
|
|
|
|
|
items = item_manager;
|
|
|
|
|
}else{
|
|
|
|
|
items = items_default;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (href !== '/login' && isEmpty(loginToken)) {
|
|
|
|
|
navigate('/login');
|
|
|
|
|