From 6151add53f11179a4e780738f12ee364d49d9efe Mon Sep 17 00:00:00 2001
From: Eamon <17516219072@163.com>
Date: Fri, 18 Sep 2026 13:17:23 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0http=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=8C=E7=BA=A7=E8=B7=AF=E7=94=B1=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/realNameCheck.tsx | 4 +--
src/home/_components/header/common.tsx | 40 ++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/src/components/realNameCheck.tsx b/src/components/realNameCheck.tsx
index b0a8a12..c4aef3f 100644
--- a/src/components/realNameCheck.tsx
+++ b/src/components/realNameCheck.tsx
@@ -4,9 +4,9 @@ import { toast } from "sonner"
import { useDashboardStore } from "@/components/stores/dashboard"
import { useProfileStore } from "@/components/stores/profile"
-// ==================== 前台购买/支付页面实名检查 ====================
+// ==================== 购买/支付页面实名检查 ====================
// 已登录但未实名的用户访问购买/支付页面时:提示并跳转个人中心完成实名认证。
-// 未登录用户不拦截(下单时走登录流程)。参考 juipnet 老项目做法。
+// 未登录用户不拦截(下单时走登录流程)。
export default function RealNameCheck() {
const navigate = useNavigate()
const token = useProfileStore(state => state.token)
diff --git a/src/home/_components/header/common.tsx b/src/home/_components/header/common.tsx
index 1196685..4bc9029 100644
--- a/src/home/_components/header/common.tsx
+++ b/src/home/_components/header/common.tsx
@@ -141,6 +141,14 @@ export default function Common() {
{/* 拖拽条*/}
setIsExpanded(!isExpanded)}
+ onKeyDown={(event) => {
+ if (event.key === "Enter" || event.key === " ") {
+ event.preventDefault();
+ setIsExpanded(!isExpanded);
+ }
+ }}
+ role="button"
+ tabIndex={0}
className="flex flex-col items-center justify-center py-2.5 cursor-pointer hover:bg-gray-50 transition-colors rounded-t-2xl"
>
@@ -167,6 +175,14 @@ export default function Common() {
{/* QQ */}
{
+ if (event.key === "Enter" || event.key === " ") {
+ event.preventDefault();
+ handleQQClick();
+ }
+ }}
+ role="button"
+ tabIndex={0}
className="flex items-center gap-4 p-3 bg-blue-50 rounded-xl hover:bg-blue-100 transition-colors cursor-pointer"
>
@@ -185,6 +201,14 @@ export default function Common() {
{/* 微信 */}
{
+ if (event.key === "Enter" || event.key === " ") {
+ event.preventDefault();
+ handleWxClick();
+ }
+ }}
+ role="button"
+ tabIndex={0}
className="flex items-center gap-4 p-3 bg-green-50 rounded-xl hover:bg-green-100 transition-colors cursor-pointer"
>
@@ -205,6 +229,14 @@ export default function Common() {
onClick={() =>
setActivePopup(activePopup === "gzh" ? null : "gzh")
}
+ onKeyDown={(event) => {
+ if (event.key === "Enter" || event.key === " ") {
+ event.preventDefault();
+ setActivePopup(activePopup === "gzh" ? null : "gzh");
+ }
+ }}
+ role="button"
+ tabIndex={0}
className="flex items-center gap-4 p-3 bg-purple-50 rounded-xl hover:bg-purple-100 transition-colors cursor-pointer"
>
@@ -248,6 +280,14 @@ export default function Common() {
onClick={() =>
setActivePopup(activePopup === "tel" ? null : "tel")
}
+ onKeyDown={(event) => {
+ if (event.key === "Enter" || event.key === " ") {
+ event.preventDefault();
+ setActivePopup(activePopup === "tel" ? null : "tel");
+ }
+ }}
+ role="button"
+ tabIndex={0}
className="flex items-center gap-4 p-3 bg-orange-50 rounded-xl hover:bg-orange-100 transition-colors cursor-pointer"
>