|
@@ -26,11 +26,6 @@ function passwodForm(props) {
|
26
|
26
|
if (!err) {
|
27
|
27
|
request({ ...apis.user.changePassword, params: { ...values } }).then(() => {
|
28
|
28
|
openNotificationWithIcon('success', '操作成功!')
|
29
|
|
- window.localStorage.removeItem('test-foobar-center')
|
30
|
|
- router.push({
|
31
|
|
- pathname: '/user/login',
|
32
|
|
- });
|
33
|
|
- props.form.resetFields()
|
34
|
29
|
props.onSuccess()
|
35
|
30
|
}).catch(error => {
|
36
|
31
|
// openNotificationWithIcon('error', error.message)
|
|
@@ -41,7 +36,7 @@ function passwodForm(props) {
|
41
|
36
|
|
42
|
37
|
// 弹框取消按钮
|
43
|
38
|
function handlePopCancel(e) {
|
44
|
|
- props.onSuccess()
|
|
39
|
+ props.onCancel()
|
45
|
40
|
}
|
46
|
41
|
|
47
|
42
|
const { getFieldDecorator } = props.form
|
|
@@ -111,8 +106,8 @@ export default class ShowPassword extends Component {
|
111
|
106
|
}
|
112
|
107
|
|
113
|
108
|
handleOk = e => {
|
114
|
|
- console.log('关闭了')
|
115
|
|
- this.props.onCancel()
|
|
109
|
+ console.log('修改密码成功')
|
|
110
|
+ this.props.onReset()
|
116
|
111
|
};
|
117
|
112
|
|
118
|
113
|
handleCancel = e => {
|
|
@@ -128,7 +123,7 @@ export default class ShowPassword extends Component {
|
128
|
123
|
visible={this.state.visible}
|
129
|
124
|
onCancel={this.handleCancel}
|
130
|
125
|
footer={null}>
|
131
|
|
- <WrappedShowPasswordForm onSuccess={(e) => this.handleCancel(e)} />
|
|
126
|
+ <WrappedShowPasswordForm onSuccess={(e) => this.handleOk(e)} onCancel={(e) => this.handleCancel(e)}/>
|
132
|
127
|
</Modal>
|
133
|
128
|
</>
|
134
|
129
|
);
|