From 313c437cd83a1e55a2b4b93609af079dd09a0bf0 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Wed, 15 Oct 2025 23:52:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E9=99=86?= =?UTF-8?q?=E5=92=8C=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/components/Auth/AuthFormContent.js | 6 ++---- src/components/Auth/WechatRegister.js | 21 ++++++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 2e09bc23..d7633a9d 100755 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "match-sorter": "6.3.0", "moment": "^2.29.1", "nouislider": "15.0.0", - "qrcode.react": "^4.2.0", "react": "18.3.1", "react-apexcharts": "^1.3.9", "react-big-calendar": "^0.33.2", diff --git a/src/components/Auth/AuthFormContent.js b/src/components/Auth/AuthFormContent.js index d6ebe7a6..54199558 100644 --- a/src/components/Auth/AuthFormContent.js +++ b/src/components/Auth/AuthFormContent.js @@ -239,12 +239,10 @@ export default function AuthFormContent() { credential: phone, verification_code: verificationCode, login_type: 'phone', - type: 'phone', - purpose: config.api.purpose, // 使用配置中的purpose }; - // 调用API(根据模式选择不同的endpoint) - const response = await fetch(`${API_BASE_URL}${config.api.endpoint}`, { + // 调用API(根据模式选择不同的endpoint + const response = await fetch(`${API_BASE_URL}/api/auth/login-with-code`, { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/src/components/Auth/WechatRegister.js b/src/components/Auth/WechatRegister.js index 95640da8..7028a21f 100644 --- a/src/components/Auth/WechatRegister.js +++ b/src/components/Auth/WechatRegister.js @@ -10,7 +10,6 @@ import { } from "@chakra-ui/react"; import { FaQrcode } from "react-icons/fa"; import { useNavigate } from "react-router-dom"; -import { QRCodeSVG } from "qrcode.react"; import { authService, WECHAT_STATUS, STATUS_MESSAGES } from "../../services/authService"; // 配置常量 @@ -195,8 +194,6 @@ export default function WechatRegister() { const response = await authService.getWechatQRCode(); - console.log(`zdl getWechatQRCode ${JSON.stringify(response)}`) - // 检查组件是否已卸载 if (!isMountedRef.current) return; @@ -268,16 +265,22 @@ export default function WechatRegister() { justifyContent="center" > {/* 灰色二维码底图 - 始终显示 */} - {/* 根据 wechatStatus 渲染不同的内容 */} {wechatStatus === WECHAT_STATUS.WAITING ? ( - + +