update 整改reducer

This commit is contained in:
2021-06-16 16:32:09 +08:00
parent 7d0000e602
commit cad86cf7a5
21 changed files with 96 additions and 97 deletions

View 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