|
@@ -93,101 +93,101 @@ const LoginPage: React.FC = () => {
|
|
|
<div className={styles.loginBox}>
|
|
<div className={styles.loginBox}>
|
|
|
<div className={styles.tabsContainer}>
|
|
<div className={styles.tabsContainer}>
|
|
|
<Tabs
|
|
<Tabs
|
|
|
- defaultActiveKey="phone"
|
|
|
|
|
|
|
+ defaultActiveKey="account"
|
|
|
|
|
|
|
|
items={[
|
|
items={[
|
|
|
- {
|
|
|
|
|
- key: "phone",
|
|
|
|
|
- label: "验证码登录",
|
|
|
|
|
- children: (
|
|
|
|
|
- <Form
|
|
|
|
|
- form={form}
|
|
|
|
|
- name="phone_login"
|
|
|
|
|
- onFinish={handlePhoneLogin}
|
|
|
|
|
- layout="vertical"
|
|
|
|
|
- size="large"
|
|
|
|
|
- >
|
|
|
|
|
- <Form.Item
|
|
|
|
|
- name="phone"
|
|
|
|
|
- rules={[
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "请输入手机号",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- pattern:
|
|
|
|
|
- /^1[3-9]\d{9}$/,
|
|
|
|
|
- message:
|
|
|
|
|
- "请输入正确的手机号",
|
|
|
|
|
- },
|
|
|
|
|
- ]}
|
|
|
|
|
- >
|
|
|
|
|
- <Input
|
|
|
|
|
- variant="borderless"
|
|
|
|
|
- addonBefore={
|
|
|
|
|
- <div
|
|
|
|
|
- className={
|
|
|
|
|
- styles.phonePrefix
|
|
|
|
|
- }
|
|
|
|
|
- >
|
|
|
|
|
- +86
|
|
|
|
|
- </div>
|
|
|
|
|
- }
|
|
|
|
|
- placeholder="手机号"
|
|
|
|
|
- className={
|
|
|
|
|
- styles.phoneInput +
|
|
|
|
|
- " border-b-[1px] border-b-gray-400"
|
|
|
|
|
- }
|
|
|
|
|
- />
|
|
|
|
|
- </Form.Item>
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // key: "phone",
|
|
|
|
|
+ // label: "验证码登录",
|
|
|
|
|
+ // children: (
|
|
|
|
|
+ // <Form
|
|
|
|
|
+ // form={form}
|
|
|
|
|
+ // name="phone_login"
|
|
|
|
|
+ // onFinish={handlePhoneLogin}
|
|
|
|
|
+ // layout="vertical"
|
|
|
|
|
+ // size="large"
|
|
|
|
|
+ // >
|
|
|
|
|
+ // <Form.Item
|
|
|
|
|
+ // name="phone"
|
|
|
|
|
+ // rules={[
|
|
|
|
|
+ // {
|
|
|
|
|
+ // required: true,
|
|
|
|
|
+ // message: "请输入手机号",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // pattern:
|
|
|
|
|
+ // /^1[3-9]\d{9}$/,
|
|
|
|
|
+ // message:
|
|
|
|
|
+ // "请输入正确的手机号",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // ]}
|
|
|
|
|
+ // >
|
|
|
|
|
+ // <Input
|
|
|
|
|
+ // variant="borderless"
|
|
|
|
|
+ // addonBefore={
|
|
|
|
|
+ // <div
|
|
|
|
|
+ // className={
|
|
|
|
|
+ // styles.phonePrefix
|
|
|
|
|
+ // }
|
|
|
|
|
+ // >
|
|
|
|
|
+ // +86
|
|
|
|
|
+ // </div>
|
|
|
|
|
+ // }
|
|
|
|
|
+ // placeholder="手机号"
|
|
|
|
|
+ // className={
|
|
|
|
|
+ // styles.phoneInput +
|
|
|
|
|
+ // " border-b-[1px] border-b-gray-400"
|
|
|
|
|
+ // }
|
|
|
|
|
+ // />
|
|
|
|
|
+ // </Form.Item>
|
|
|
|
|
|
|
|
- <Form.Item
|
|
|
|
|
- name="code"
|
|
|
|
|
- rules={[
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: "请输入验证码",
|
|
|
|
|
- },
|
|
|
|
|
- ]}
|
|
|
|
|
- >
|
|
|
|
|
- <div className={styles.codeRow}>
|
|
|
|
|
- <Input
|
|
|
|
|
- variant="borderless"
|
|
|
|
|
- placeholder="验证码"
|
|
|
|
|
- className={
|
|
|
|
|
- styles.codeInput + ' !rounded-none !border-b-[1px] !border-b-gray-400'
|
|
|
|
|
- }
|
|
|
|
|
- />
|
|
|
|
|
- <Button
|
|
|
|
|
- onClick={handleSendCode}
|
|
|
|
|
- disabled={countdown > 0}
|
|
|
|
|
- loading={sendingCode}
|
|
|
|
|
- type="text"
|
|
|
|
|
- className={
|
|
|
|
|
- styles.getCodeBtn
|
|
|
|
|
- }
|
|
|
|
|
- >
|
|
|
|
|
- {countdown > 0
|
|
|
|
|
- ? `${countdown}s`
|
|
|
|
|
- : "获取验证码"}
|
|
|
|
|
- </Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </Form.Item>
|
|
|
|
|
|
|
+ // <Form.Item
|
|
|
|
|
+ // name="code"
|
|
|
|
|
+ // rules={[
|
|
|
|
|
+ // {
|
|
|
|
|
+ // required: true,
|
|
|
|
|
+ // message: "请输入验证码",
|
|
|
|
|
+ // },
|
|
|
|
|
+ // ]}
|
|
|
|
|
+ // >
|
|
|
|
|
+ // <div className={styles.codeRow}>
|
|
|
|
|
+ // <Input
|
|
|
|
|
+ // variant="borderless"
|
|
|
|
|
+ // placeholder="验证码"
|
|
|
|
|
+ // className={
|
|
|
|
|
+ // styles.codeInput + ' !rounded-none !border-b-[1px] !border-b-gray-400'
|
|
|
|
|
+ // }
|
|
|
|
|
+ // />
|
|
|
|
|
+ // <Button
|
|
|
|
|
+ // onClick={handleSendCode}
|
|
|
|
|
+ // disabled={countdown > 0}
|
|
|
|
|
+ // loading={sendingCode}
|
|
|
|
|
+ // type="text"
|
|
|
|
|
+ // className={
|
|
|
|
|
+ // styles.getCodeBtn
|
|
|
|
|
+ // }
|
|
|
|
|
+ // >
|
|
|
|
|
+ // {countdown > 0
|
|
|
|
|
+ // ? `${countdown}s`
|
|
|
|
|
+ // : "获取验证码"}
|
|
|
|
|
+ // </Button>
|
|
|
|
|
+ // </div>
|
|
|
|
|
+ // </Form.Item>
|
|
|
|
|
|
|
|
- <Form.Item>
|
|
|
|
|
- <Button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- htmlType="submit"
|
|
|
|
|
- block
|
|
|
|
|
- loading={loading}
|
|
|
|
|
- className={styles.loginBtn}
|
|
|
|
|
- >
|
|
|
|
|
- 登录
|
|
|
|
|
- </Button>
|
|
|
|
|
- </Form.Item>
|
|
|
|
|
- </Form>
|
|
|
|
|
- ),
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // <Form.Item>
|
|
|
|
|
+ // <Button
|
|
|
|
|
+ // type="primary"
|
|
|
|
|
+ // htmlType="submit"
|
|
|
|
|
+ // block
|
|
|
|
|
+ // loading={loading}
|
|
|
|
|
+ // className={styles.loginBtn}
|
|
|
|
|
+ // >
|
|
|
|
|
+ // 登录
|
|
|
|
|
+ // </Button>
|
|
|
|
|
+ // </Form.Item>
|
|
|
|
|
+ // </Form>
|
|
|
|
|
+ // ),
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
key: "account",
|
|
key: "account",
|
|
|
label: "账号登录",
|
|
label: "账号登录",
|