update pay ui

This commit is contained in:
2025-12-13 16:30:50 +08:00
parent ed9d49da01
commit 4ccd43f025
17 changed files with 67 additions and 43 deletions

View File

@@ -37,6 +37,7 @@ import VerificationCodeInput from './VerificationCodeInput';
import WechatRegister from './WechatRegister';
import { setCurrentUser } from '../../mocks/data/users';
import { logger } from '../../utils/logger';
import { getApiBase } from '../../utils/apiConfig';
import { useAuthEvents } from '../../hooks/useAuthEvents';
// 统一配置对象
@@ -186,7 +187,7 @@ export default function AuthFormContent() {
purpose: config.api.purpose
};
const response = await fetch('/api/auth/send-verification-code', {
const response = await fetch(`${getApiBase()}/api/auth/send-verification-code`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -300,7 +301,7 @@ export default function AuthFormContent() {
};
// 调用API根据模式选择不同的endpoint
const response = await fetch('/api/auth/login-with-code', {
const response = await fetch(`${getApiBase()}/api/auth/login-with-code`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',