Przeglądaj źródła

test: 调整测试用例

lanjianrong 4 lat temu
rodzic
commit
5dfe44bdb3
2 zmienionych plików z 3 dodań i 9 usunięć
  1. 2 5
      src/components/Menu/index.tsx
  2. 1 4
      src/store/modules/user/types.ts

+ 2 - 5
src/components/Menu/index.tsx

@@ -1,5 +1,5 @@
 import logo from '@/assets/img/logo.png'
-import { deleteUserInfo } from '@/store/modules/user'
+import { asyncLogout } from '@/store/modules/user'
 import { RootState } from '@/store/reducers'
 import { iMenuItem } from '@/types/router'
 import { Button, Dropdown, Menu } from "antd"
@@ -19,7 +19,6 @@ const NavSider:React.FC<iMenuProps> = (props)=> {
   const { list: MeunList, username } = props
 
 
-
   return (
     <div className="main-nav">
       <div className="logo"><img src={logo}></img></div>
@@ -51,7 +50,7 @@ const NavSider:React.FC<iMenuProps> = (props)=> {
 const DropMenu = () => {
 
   function deleteUser() {
-    store.dispatch(deleteUserInfo())
+    store.dispatch(asyncLogout())
   }
 
   return (
@@ -74,8 +73,6 @@ const DropMenu = () => {
 }
 
 
-
-
 const mapStateToProps = (state:RootState) => {
 
   return {

+ 1 - 4
src/store/modules/user/types.ts

@@ -1,6 +1,3 @@
-import { Action } from "redux"
-import { ThunkAction } from "redux-thunk"
-import { RootState } from './../../reducers'
 
 // state
 export interface iUserInfo {
@@ -38,4 +35,4 @@ interface CheckPermissionAction {
   payload: iUserInfoState
 }
 
-export type UserInfoActionTypes = SaveUserInfoAction | DelUserInfoAction | CheckPermissionAction 
+export type UserInfoActionTypes = SaveUserInfoAction | DelUserInfoAction | CheckPermissionAction