Browse Source

登录 修改 注册 人机接口加上 多语言加上

main
lk 2 months ago
parent
commit
fec0a87cee
  1. 7
      src/pages/use/login/index.tsx
  2. 13
      src/pages/use/register/index.tsx

7
src/pages/use/login/index.tsx

@ -1,13 +1,9 @@
import { Layout, Tabs, Input, Button, Typography, Row, Col, Form } from "antd"; import { Layout, Tabs, Input, Button, Typography, Row, Col, Form } from "antd";
import { QrcodeOutlined, UserOutlined, LockOutlined } from "@ant-design/icons"; import { QrcodeOutlined, UserOutlined, LockOutlined } from "@ant-design/icons";
import SelectLang from "@/components/select-lang";
import { createFileRoute, useNavigate } from "@tanstack/react-router"; import { createFileRoute, useNavigate } from "@tanstack/react-router";
import { useAtom, useAtomValue } from "jotai"; import { useAtom, useAtomValue } from "jotai";
import { useTranslation } from "@/i18n.ts";
import { import {
emailCodeAtom,
emailLoginAtom, emailLoginAtom,
telegramCodeAtom,
telegramLoginAtom, telegramLoginAtom,
upLoginAtom, upLoginAtom,
} from "@/store/system/user.ts"; } from "@/store/system/user.ts";
@ -15,6 +11,8 @@ import React, { memo, useEffect, useLayoutEffect, useRef, useState } from "react
import systemServ from "@/service/system.ts"; import systemServ from "@/service/system.ts";
import SlideCapt, { SlideCaptRef } from "@/components/captcha/SlideCapt.tsx"; import SlideCapt, { SlideCaptRef } from "@/components/captcha/SlideCapt.tsx";
import { t } from "i18next"; import { t } from "i18next";
import Verification from "@/components/captcha/Verification.tsx";
const { Title, Text, Link } = Typography; const { Title, Text, Link } = Typography;
const { TabPane } = Tabs; const { TabPane } = Tabs;
@ -259,6 +257,7 @@ const Login = memo(() => {
checkCaptcha: systemServ.captchaCheck, checkCaptcha: systemServ.captchaCheck,
}} }}
/> />
<Verification content={"调试用"}/>
</Form.Item> </Form.Item>
<Button type="primary" htmlType="submit" style={{ width: "100%" }}> <Button type="primary" htmlType="submit" style={{ width: "100%" }}>
{languageSet.} {languageSet.}

13
src/pages/use/register/index.tsx

@ -9,7 +9,13 @@ import systemServ from "@/service/system.ts";
import { t } from "i18next"; import { t } from "i18next";
import SlideCapt, { SlideCaptRef } from "@/components/captcha/SlideCapt.tsx"; import SlideCapt, { SlideCaptRef } from "@/components/captcha/SlideCapt.tsx";
const languageSet = {
const { Title, Text, Link } = Typography;
const Register = memo(() => {
const languageSet = {
向量检索服务免费试用: t("register.vectorRetrievalServiceFreeTrial", "向量检索服务免费试用"), 向量检索服务免费试用: t("register.vectorRetrievalServiceFreeTrial", "向量检索服务免费试用"),
免费试用向量检索服务玩转大模型生成式检索: t( 免费试用向量检索服务玩转大模型生成式检索: t(
"register.freeTrialVectorRetrievalService", "register.freeTrialVectorRetrievalService",
@ -27,11 +33,8 @@ const languageSet = {
注册: t("register.register", "注册"), 注册: t("register.register", "注册"),
登录: t("register.login", "登录"), 登录: t("register.login", "登录"),
返回登录: t("register.backToLogin", "返回登录"), 返回登录: t("register.backToLogin", "返回登录"),
};
const { Title, Text, Link } = Typography;
};
const Register = memo(() => {
const navigate = useNavigate(); const navigate = useNavigate();
const [registerForm] = Form.useForm(); const [registerForm] = Form.useForm();
const { mutate: emailRegisterMutate } = useAtomValue(emailRegisterAtom); const { mutate: emailRegisterMutate } = useAtomValue(emailRegisterAtom);

Loading…
Cancel
Save