mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 11:36:38 +08:00
login
This commit is contained in:
parent
9f28a13e22
commit
1ce9258c70
@ -47,7 +47,7 @@ export function AuthPage() {
|
|||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
},
|
},
|
||||||
body: formData.toString(),
|
body: formData.toString(),
|
||||||
});
|
});
|
||||||
@ -62,7 +62,7 @@ export function AuthPage() {
|
|||||||
goChat(); // 导航到聊天页面或其他逻辑
|
goChat(); // 导航到聊天页面或其他逻辑
|
||||||
} else {
|
} else {
|
||||||
// 登录失败
|
// 登录失败
|
||||||
showToast(Locale.Login.LoginFail);
|
showToast(data.status.msg);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("API 请求失败", error);
|
console.error("API 请求失败", error);
|
||||||
|
@ -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 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 {
|
export enum Login {
|
||||||
Register = "/login/register",
|
Register = "/register",
|
||||||
Login = "/login/username",
|
Login = "/login",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Path {
|
export enum Path {
|
||||||
|
Loading…
Reference in New Issue
Block a user