This commit is contained in:
zhangkuo 2024-07-10 18:46:43 +08:00
parent 9f28a13e22
commit 1ce9258c70
2 changed files with 5 additions and 5 deletions

View File

@ -47,7 +47,7 @@ export function AuthPage() {
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
},
body: formData.toString(),
});
@ -62,7 +62,7 @@ export function AuthPage() {
goChat(); // 导航到聊天页面或其他逻辑
} else {
// 登录失败
showToast(Locale.Login.LoginFail);
showToast(data.status.msg);
}
} catch (error) {
console.error("API 请求失败", error);

View File

@ -18,11 +18,11 @@ export const BAIDU_BASE_URL = "https://aip.baidubce.com";
export const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;
export const BASE_URL = `http://127.0.0.1:8080`;
export const BASE_URL = `https://buoucoding.com/ai`;
export enum Login {
Register = "/login/register",
Login = "/login/username",
Register = "/register",
Login = "/login",
}
export enum Path {