afc163
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
4 additions and
17 deletions
-
src/pages/form/advanced-form/index.tsx
-
src/pages/list/search/applications/index.tsx
-
src/pages/list/search/index.tsx
-
src/pages/user/login/index.tsx
|
|
|
@ -130,7 +130,7 @@ const AdvancedForm: FC<Record<string, any>> = () => { |
|
|
|
await fakeSubmitForm(values); |
|
|
|
message.success('提交成功'); |
|
|
|
} catch { |
|
|
|
// console.log
|
|
|
|
message.error('提交失败,请重试!'); |
|
|
|
} |
|
|
|
}; |
|
|
|
const onFinishFailed = (errorInfo: any) => { |
|
|
|
|
|
|
|
@ -88,19 +88,14 @@ const Applications: FC<Record<string, any>> = () => { |
|
|
|
queryFn: () => queryFakeList({ count: 8 }).then((res) => res.data), |
|
|
|
}); |
|
|
|
|
|
|
|
const run = (values: any) => { |
|
|
|
console.log('form data', values); |
|
|
|
refetch(); |
|
|
|
}; |
|
|
|
|
|
|
|
const list = data?.list || []; |
|
|
|
|
|
|
|
return ( |
|
|
|
<div className={styles.filterCardList}> |
|
|
|
<Card variant="borderless"> |
|
|
|
<Form |
|
|
|
onValuesChange={(_, values) => { |
|
|
|
run(values); |
|
|
|
onValuesChange={() => { |
|
|
|
refetch(); |
|
|
|
}} |
|
|
|
> |
|
|
|
<StandardFormRow |
|
|
|
|
|
|
|
@ -45,11 +45,6 @@ const Search: FC<SearchProps> = () => { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
const handleFormSubmit = (value: string) => { |
|
|
|
// eslint-disable-next-line no-console
|
|
|
|
console.log(value); |
|
|
|
}; |
|
|
|
|
|
|
|
const getTabKey = () => { |
|
|
|
const tabKey = location.pathname.substring( |
|
|
|
location.pathname.lastIndexOf('/') + 1, |
|
|
|
@ -68,7 +63,6 @@ const Search: FC<SearchProps> = () => { |
|
|
|
placeholder="请输入" |
|
|
|
enterButton="搜索" |
|
|
|
size="large" |
|
|
|
onSearch={handleFormSubmit} |
|
|
|
style={{ maxWidth: 522, width: '100%' }} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -166,15 +166,13 @@ const Login: React.FC = () => { |
|
|
|
window.location.href = redirectUrl; |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log(msg); |
|
|
|
// 如果失败去设置用户错误信息
|
|
|
|
setUserLoginState(msg); |
|
|
|
} catch (error) { |
|
|
|
} catch { |
|
|
|
const defaultLoginFailureMessage = intl.formatMessage({ |
|
|
|
id: 'pages.login.failure', |
|
|
|
defaultMessage: '登录失败,请重试!', |
|
|
|
}); |
|
|
|
console.log(error); |
|
|
|
message.error(defaultLoginFailureMessage); |
|
|
|
} |
|
|
|
}; |
|
|
|
|