update 整改reducer
This commit is contained in:
12
web-react/src/store/reducer/user.js
Normal file
12
web-react/src/store/reducer/user.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const user = (state = {}, action) => {
|
||||
// 写入各种action对应的操作
|
||||
switch (action.type) {
|
||||
case 'SET_USER_ACCOUNT':
|
||||
const _state = { ...state, ...action.user }
|
||||
return _state
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
||||
|
||||
export default user
|
||||
Reference in New Issue
Block a user