From a32ee6c28143b76c14e32c91c63d0e21ce7c67fe Mon Sep 17 00:00:00 2001
From: al
Date: Wed, 9 Oct 2024 16:59:04 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95?=
=?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/login/page.js | 64 +++++++++++++++++++++++++++++++-----
components/OwnInput/index.js | 42 +++++++++++++++++++++++
2 files changed, 98 insertions(+), 8 deletions(-)
create mode 100644 components/OwnInput/index.js
diff --git a/app/login/page.js b/app/login/page.js
index 1509965..3efcd14 100644
--- a/app/login/page.js
+++ b/app/login/page.js
@@ -2,7 +2,7 @@
import React, { useState, useRef, useEffect } from "react";
import {
- Input,
+ // Input,
Button,
Swiper,
Tabs,
@@ -20,6 +20,7 @@ import { connect } from "react-redux";
import { cryptoPassword } from "@/utils/crypto";
import requireAPI from "@/utils/requireAPI";
import { signOut, signIn, checkAuth } from "@/utils/auth";
+import OwnInput from "@/components/OwnInput";
/*
params格式:
{
@@ -278,7 +279,7 @@ function Login({ handleLogin }) {
+{loginInfo.regionCode}
- */}
+ {
+ setLoginInfo({
+ ...loginInfo,
+ mobilePhone: value,
+ });
+ }}
+ value={loginInfo.mobilePhone}
/>
@@ -301,7 +317,7 @@ function Login({ handleLogin }) {
验证码
- setVeriCode(value)}
value={veriCode}
@@ -311,6 +327,14 @@ function Login({ handleLogin }) {
"--placeholder-color": "#FFFFFF80",
"--font-size": "16px",
}}
+ /> */}
+
- */}
+ {
+ setLoginInfo({
+ ...loginInfo,
+ mobilePhone: value,
+ });
+ }}
+ value={loginInfo.mobilePhone}
/>
@@ -361,7 +400,7 @@ function Login({ handleLogin }) {
密码
- */}
+ {
+ setLoginInfo({ ...loginInfo, password: value });
+ }}
+ value={loginInfo.password}
/>
@@ -405,9 +455,7 @@ function Login({ handleLogin }) {
const LoginBtn = ({ loginInfo, setLoginInfo, type, handleSubmit }) => {
const router = useRouter();
- useEffect(() => {
- // console.log("loginInfo", loginInfo);
- }, []);
+ useEffect(() => {}, []);
return (
diff --git a/components/OwnInput/index.js b/components/OwnInput/index.js
new file mode 100644
index 0000000..48c8045
--- /dev/null
+++ b/components/OwnInput/index.js
@@ -0,0 +1,42 @@
+"use client";
+
+import React from "react";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { faClose } from "@fortawesome/free-solid-svg-icons";
+// import styles from "./index.module.scss";
+export default function OwnInput({
+ value,
+ onChange,
+ type = "text",
+ name,
+ placeholder,
+ clearable,
+ disabled,
+}) {
+ return (
+
+
onChange(e.target?.value)}
+ value={value}
+ className="text-[#ffffff] w-full text-[16px] placeholder:text-[#FFFFFF80]"
+ />
+ {clearable && value != "" && (
+
+ {
+ onChange && onChange("");
+ }}
+ />
+
+ )}
+
+ );
+}
From f21d68a5bc0fdedd468beae8efbf32cacea22f62 Mon Sep 17 00:00:00 2001
From: al
Date: Wed, 9 Oct 2024 17:06:04 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=A8=E5=B1=80?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/globals.css | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/app/globals.css b/app/globals.css
index 4b04e80..00d77d5 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -38,6 +38,26 @@ footer{
img{
pointer-events: none;
}
+input {
+ /* 移除边框 */
+ border: none;
+ /* 移除背景颜色 */
+ background-color: transparent;
+ /* 移除内边距 */
+ padding: 0;
+ /* 移除外边距 */
+ margin: 0;
+ /* 移除默认焦点样式 */
+ outline: none;
+ /* 移除圆角 */
+ border-radius: 0;
+ /* 移除阴影 */
+ box-shadow: none;
+ /* 设置字体 */
+ font-family: inherit;
+ font-size: inherit;
+ color: inherit;
+}
@media only screen and (min-device-width: 320px) and (max-device-width: 1024px) {
select:focus, textarea:focus, input:focus {