加入添加用户功能

This commit is contained in:
marvzhang
2019-12-20 13:10:46 +08:00
parent 6d45da4c6b
commit 272c53bef3
4 changed files with 53 additions and 19 deletions

View File

@@ -138,6 +138,11 @@ const user = {
// 编辑用户
editUser ({ state }) {
return request.post(`/users/${state.userForm._id}`, state.userForm)
},
// 添加用户
addUser ({ dispatch, commit, state }) {
return request.put('/users', state.userForm)
}
}
}