chore(api): change all production api endpoints to hoyidata.com

main
sp mac bookpro 2605 2026-05-24 20:58:13 +08:00
parent c03e54867f
commit d336ea50af
2 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ const AURA_API_BASE = 'https://api.redhare.cc/aura/v1';
const isMockAuth = () => typeof localStorage !== 'undefined' && localStorage.getItem('mock-auth') === '1';
export const api = axios.create({
baseURL: 'https://api.redhare.cc/aura/v1',
baseURL: 'https://api.hoyidata.com/aura/v1',
timeout: 90000,
withCredentials: true // 关键:跨域请求带 cookie
});
@ -369,7 +369,7 @@ export const AuthAPI = {
verify: async (email: string, password: string) => {
// 根据要求,这里直接请求真实地址,未启动时 mock 返回 true
try {
const res = await axios.post('https://api.redhare.cc/aura/v1/urser', { email, password }, { timeout: 3000 });
const res = await axios.post('https://api.hoyidata.com/aura/v1/urser', { email, password }, { timeout: 3000 });
return res.data;
} catch (e) {
console.warn('Backend /urser not available, fallback to mock true', e);
@ -540,7 +540,7 @@ export async function streamChat(
attachmentsText?: string,
imageUrls?: string[]
) {
const resp = await fetch(`https://api.redhare.cc/aura/v1/chat/${agentId}/messages/stream`, {
const resp = await fetch(`https://api.hoyidata.com/aura/v1/chat/${agentId}/messages/stream`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@ -565,7 +565,7 @@ export async function regenerateMessage(
overrides?: ModelOverrides,
attachmentsText?: string
) {
const resp = await fetch(`https://api.redhare.cc/aura/v1/chat/${agentId}/messages/${messageId}/regenerate`, {
const resp = await fetch(`https://api.hoyidata.com/aura/v1/chat/${agentId}/messages/${messageId}/regenerate`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ overrides, attachmentsText }),

View File

@ -4,7 +4,7 @@ import react from '@vitejs/plugin-react';
// 默认走 Go 后端 :4001要回退 Node 后端就 set VITE_API_TARGET=http://localhost:4000
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const target = env.VITE_API_TARGET || 'https://api.redhare.cc';
const target = env.VITE_API_TARGET || 'https://api.hoyidata.com';
return {
plugins: [react()],
server: {