Browse Source

fix: remove debug logging (#11876)

pull/11879/head
afc163 3 months ago
committed by GitHub
parent
commit
18812397e5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/pages/form/advanced-form/index.tsx
  2. 9
      src/pages/list/search/applications/index.tsx
  3. 6
      src/pages/list/search/index.tsx
  4. 4
      src/pages/user/login/index.tsx

2
src/pages/form/advanced-form/index.tsx

@ -130,7 +130,7 @@ const AdvancedForm: FC<Record<string, any>> = () => {
await fakeSubmitForm(values); await fakeSubmitForm(values);
message.success('提交成功'); message.success('提交成功');
} catch { } catch {
// console.log message.error('提交失败,请重试!');
} }
}; };
const onFinishFailed = (errorInfo: any) => { const onFinishFailed = (errorInfo: any) => {

9
src/pages/list/search/applications/index.tsx

@ -88,19 +88,14 @@ const Applications: FC<Record<string, any>> = () => {
queryFn: () => queryFakeList({ count: 8 }).then((res) => res.data), queryFn: () => queryFakeList({ count: 8 }).then((res) => res.data),
}); });
const run = (values: any) => {
console.log('form data', values);
refetch();
};
const list = data?.list || []; const list = data?.list || [];
return ( return (
<div className={styles.filterCardList}> <div className={styles.filterCardList}>
<Card variant="borderless"> <Card variant="borderless">
<Form <Form
onValuesChange={(_, values) => { onValuesChange={() => {
run(values); refetch();
}} }}
> >
<StandardFormRow <StandardFormRow

6
src/pages/list/search/index.tsx

@ -45,11 +45,6 @@ const Search: FC<SearchProps> = () => {
} }
}; };
const handleFormSubmit = (value: string) => {
// eslint-disable-next-line no-console
console.log(value);
};
const getTabKey = () => { const getTabKey = () => {
const tabKey = location.pathname.substring( const tabKey = location.pathname.substring(
location.pathname.lastIndexOf('/') + 1, location.pathname.lastIndexOf('/') + 1,
@ -68,7 +63,6 @@ const Search: FC<SearchProps> = () => {
placeholder="请输入" placeholder="请输入"
enterButton="搜索" enterButton="搜索"
size="large" size="large"
onSearch={handleFormSubmit}
style={{ maxWidth: 522, width: '100%' }} style={{ maxWidth: 522, width: '100%' }}
/> />
</div> </div>

4
src/pages/user/login/index.tsx

@ -166,15 +166,13 @@ const Login: React.FC = () => {
window.location.href = redirectUrl; window.location.href = redirectUrl;
return; return;
} }
console.log(msg);
// 如果失败去设置用户错误信息 // 如果失败去设置用户错误信息
setUserLoginState(msg); setUserLoginState(msg);
} catch (error) { } catch {
const defaultLoginFailureMessage = intl.formatMessage({ const defaultLoginFailureMessage = intl.formatMessage({
id: 'pages.login.failure', id: 'pages.login.failure',
defaultMessage: '登录失败,请重试!', defaultMessage: '登录失败,请重试!',
}); });
console.log(error);
message.error(defaultLoginFailureMessage); message.error(defaultLoginFailureMessage);
} }
}; };

Loading…
Cancel
Save