| | |
| | | import { useModel } from '@umijs/max'; |
| | | import Http from '@/utils/http'; |
| | | |
| | | const resetPwd = async (val) => { |
| | | const resetPwd = async (val, form) => { |
| | | const hide = message.loading('正在修改'); |
| | | try { |
| | | const resp = await Http.doPost('api/user/reset/pwd', val); |
| | | if (resp.code === 200) { |
| | | message.success('修改成功'); |
| | | form.resetFields(); |
| | | return true; |
| | | } else { |
| | | message.error(resp.msg); |
| | |
| | | const { currentUser } = initialState || {}; |
| | | |
| | | const handleFinish = (values) => { |
| | | resetPwd({...values, id: currentUser.id}); |
| | | resetPwd({...values, id: currentUser.id}, form); |
| | | } |
| | | |
| | | return ( |