Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Jun 9, 2021
1 parent fab98bb commit ead72c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spug_web/src/pages/login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Released under the AGPL-3.0 License.
*/
import React, { useState, useEffect } from 'react';
import { Form, Input, Button, Tabs, Modal } from 'antd';
import { Form, Input, Button, Tabs, Modal, message } from 'antd';
import { UserOutlined, LockOutlined, CopyrightOutlined, GithubOutlined, MailOutlined } from '@ant-design/icons';
import styles from './login.module.css';
import history from 'libs/history';
Expand Down Expand Up @@ -42,8 +42,9 @@ export default function () {
}, [counter])

function handleSubmit() {
setLoading(true);
const formData = form.getFieldsValue();
if (codeVisible && !formData.captcha) return message.error('请输入验证码');
setLoading(true);
formData['type'] = loginType;
http.post('/api/account/login/', formData)
.then(data => {
Expand Down

0 comments on commit ead72c2

Please sign in to comment.