2025-12-2genxin
This commit is contained in:
@@ -639,7 +639,7 @@
|
||||
};
|
||||
|
||||
// 调用后端注册API
|
||||
fetch('http://localhost:8000/api/user/register', {
|
||||
fetch('http://localhost:8080/api/user/register', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -654,7 +654,7 @@
|
||||
})
|
||||
.then(data => {
|
||||
// 检查响应状态
|
||||
if (data.code === 200) {
|
||||
if (data.success || data.code === 200) {
|
||||
// 注册成功
|
||||
showSuccess('注册成功!正在跳转到登录页面...');
|
||||
|
||||
@@ -664,7 +664,7 @@
|
||||
}, 1500);
|
||||
} else {
|
||||
// 注册失败,显示错误信息
|
||||
showError(data.msg || '注册失败,请稍后重试');
|
||||
showError(data.message || '注册失败,请稍后重试');
|
||||
registerBtn.textContent = '注册账号';
|
||||
registerBtn.disabled = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user