+
+
-
-
-
-
-
![logo]({logo})
-
Antd Front
-
-
-
-
Antd Front 遵循 Ant Design 设计规范
+
+
+
+ 其他登录方式
+
+
+
+
+
+
+
+
+
+
+
-
+ }
+ // activityConfig={{
+ // style: {
+ // boxShadow: "0px 0px 8px rgba(0, 0, 0, 0.2)",
+ // color: "#fff",
+ // borderRadius: 8,
+ // backgroundColor: "#1677FF",
+ // },
+ // title: "活动标题,可配置图片",
+ // subTitle: "活动介绍说明文字",
+ // action: (
+ //
+ // ),
+ // }}
+ >
-
-
+
);
};
diff --git a/src/pages/user/login/index.less b/src/pages/user/login/index.less
deleted file mode 100644
index 4e708a6..0000000
--- a/src/pages/user/login/index.less
+++ /dev/null
@@ -1,51 +0,0 @@
-@import '~antd/es/style/themes/default.less';
-
-.main {
- width: 328px;
- margin: 0 auto;
- @media screen and (max-width: @screen-sm) {
- width: 95%;
- max-width: 328px;
- }
-
- :global {
- .@{ant-prefix}-tabs-nav-list {
- margin: auto;
- font-size: 16px;
- }
- }
-
- .icon {
- margin-left: 16px;
- color: rgba(0, 0, 0, 0.2);
- font-size: 24px;
- vertical-align: middle;
- cursor: pointer;
- transition: color 0.3s;
- float: left;
-
- &:hover {
- color: @primary-color;
- }
- }
-
- .p {
- float: left;
- }
-
- .other {
- margin-top: 24px;
- line-height: 22px;
- text-align: left;
- display: block;
-
- .register {
- float: right;
- }
- }
-
- .prefixIcon {
- color: @primary-color;
- font-size: @font-size-base;
- }
-}
diff --git a/src/pages/user/login/index.tsx b/src/pages/user/login/index.tsx
index 7be3e43..40ab8b4 100644
--- a/src/pages/user/login/index.tsx
+++ b/src/pages/user/login/index.tsx
@@ -1,9 +1,10 @@
import {
- AlipayCircleOutlined,
- LockTwoTone,
+ AlipayOutlined,
+ WeiboOutlined,
+ LockOutlined,
MailTwoTone,
MobileTwoTone,
- TaobaoCircleOutlined,
+ TaobaoOutlined,
UserOutlined,
} from "@ant-design/icons";
import ProForm, {
@@ -16,12 +17,19 @@ import { t, Trans } from "@lingui/macro";
import { useSafeState } from "ahooks";
import { Alert, message, Space, Tabs } from "antd";
import React from "react";
+import type { CSSProperties } from "react";
import { Link, useNavigate } from "react-router-dom";
import { useRecoilState } from "recoil";
import { loginStateAtom } from "@/atoms/login";
-import styles from "./index.less";
+const iconStyles: CSSProperties = {
+ color: "rgba(0, 0, 0, 0.2)",
+ fontSize: "18px",
+ verticalAlign: "middle",
+ cursor: "pointer",
+};
+
export const LoginMessage: React.FC<{ content: string }> = ({ content }) => (
= (props) => {
navigate("/", { replace: true });
};
return (
-
+
= (props) => {
name="account"
fieldProps={{
size: "large",
- prefix: ,
+ prefix: ,
}}
placeholder={i18n._(t`用户名: admin or user`)}
rules={[
@@ -105,7 +113,7 @@ const Login: React.FC = (props) => {
name="password"
fieldProps={{
size: "large",
- prefix: ,
+ prefix: ,
}}
placeholder={i18n._(t`密码:any`)}
rules={[
@@ -126,7 +134,7 @@ const Login: React.FC = (props) => {
,
+ prefix: ,
}}
name="mobile"
placeholder={i18n._(t`手机号`)}
@@ -144,7 +152,7 @@ const Login: React.FC = (props) => {
,
+ prefix: ,
}}
captchaProps={{
size: "large",
@@ -189,13 +197,19 @@ const Login: React.FC = (props) => {
-
-
- 其他登陆方式
-
-
-
-
+
+
APP/账户注册
diff --git a/src/pages/user/register/index.less b/src/pages/user/register/index.less
deleted file mode 100644
index 675c712..0000000
--- a/src/pages/user/register/index.less
+++ /dev/null
@@ -1,73 +0,0 @@
-@import '~antd/lib/style/themes/default.less';
-
-.main {
- width: 328px;
- margin: 0 auto;
- @media screen and (max-width: @screen-sm) {
- width: 95%;
- max-width: 328px;
- }
-
- :global {
- .@{ant-prefix}-tabs-nav-list {
- margin: auto;
- font-size: 16px;
- }
- }
-
- h3 {
- font-size: 16px;
- margin-bottom: 20px;
- }
-
- .getCaptcha {
- display: block;
- width: 100%;
- }
-
- .submit {
- width: 50%;
- }
-
- .login {
- float: right;
- line-height: @btn-height-lg;
- }
-}
-
-.other {
- margin-top: 24px;
- line-height: 22px;
- text-align: left;
- display: block;
-
- .tologin {
- float: right;
- }
-}
-
-.success,
-.warning,
-.error {
- transition: color 0.3s;
-}
-
-.success {
- color: @success-color;
-}
-
-.warning {
- color: @warning-color;
-}
-
-.error {
- color: @error-color;
-}
-
-.progress-pass > .progress {
- :global {
- .ant-progress-bg {
- background-color: @warning-color;
- }
- }
-}
diff --git a/src/pages/user/register/index.tsx b/src/pages/user/register/index.tsx
index 568cdb9..a3ecd11 100644
--- a/src/pages/user/register/index.tsx
+++ b/src/pages/user/register/index.tsx
@@ -1,6 +1,6 @@
import {
LockTwoTone,
- MailTwoTone,
+ LockOutlined,
MobileTwoTone,
UserOutlined,
} from "@ant-design/icons";
@@ -20,12 +20,23 @@ import { Link } from "react-router-dom";
import { userRegister } from "@/services/register";
import { LoginMessage } from "../login/index";
-import styles from "./index.less";
const passwordStatusMap = {
- ok: 强度:强
,
- pass: 强度:中
,
- poor: 强度:太短
,
+ ok: 强度:强
,
+ pass: 强度:中
,
+ poor: 强度:太短
,
};
type PasswordProgressType = "success" | "normal" | "exception";
@@ -120,10 +131,9 @@ const Register: React.FC = (props) => {
const value = formRef.current?.getFieldValue("password");
const passwordStatus = getPasswordStatus();
return value && value.length ? (
-
+