mirror of https://github.com/openspug/spug
chore(spug_web): improve code
parent
1e4adb8ddf
commit
c0bf846f82
|
@ -41,10 +41,8 @@ class ComForm extends React.Component {
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res === 'auth fail') {
|
if (res === 'auth fail') {
|
||||||
if (formData.pkey) {
|
if (formData.pkey) {
|
||||||
this.setState({loading: false});
|
|
||||||
message.error('独立密钥认证失败')
|
message.error('独立密钥认证失败')
|
||||||
} else {
|
} else {
|
||||||
this.setState({loading: false});
|
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
icon: 'exclamation-circle',
|
icon: 'exclamation-circle',
|
||||||
title: '首次验证请输入密码',
|
title: '首次验证请输入密码',
|
||||||
|
@ -57,7 +55,10 @@ class ComForm extends React.Component {
|
||||||
store.formVisible = false;
|
store.formVisible = false;
|
||||||
store.fetchRecords()
|
store.fetchRecords()
|
||||||
}
|
}
|
||||||
}, () => this.setState({loading: false}))
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.setState({loading: false});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
handleConfirm = (formData) => {
|
handleConfirm = (formData) => {
|
||||||
|
|
Loading…
Reference in New Issue