Merge branch 'zxx_dev' into dev

This commit is contained in:
非凡主儿 2025-10-20 19:59:58 +08:00
commit bb56a0bdaf
4 changed files with 8 additions and 12 deletions

View File

@ -10,7 +10,7 @@ import {
ExternalLink,
Loader2
} from 'lucide-react';
import { shareApiUrl } from '@/lib/env';
import { baseUrl } from '@/lib/env';
import TwitterCallbackModal from './TwitterCallbackModal';
interface ShareModalProps {
@ -140,7 +140,7 @@ export default function ShareModal({ visible, onClose, project }: ShareModalProp
localStorage.setItem('currentShareProject', JSON.stringify(project));
}
const response = await fetch(`${shareApiUrl}${apiPath}?user_id=${userId}`, {
const response = await fetch(`${baseUrl}${apiPath}?user_id=${userId}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',

View File

@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react';
import { Modal, Button, Spin, message } from 'antd';
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
import { Loader2 } from 'lucide-react';
import { shareApiUrl } from '@/lib/env';
import { baseUrl } from '@/lib/env';
interface TwitterCallbackModalProps {
/** 是否显示弹框 */
@ -56,7 +56,7 @@ export default function TwitterCallbackModal({
}
// 调用 Twitter 授权回调接口
const response = await fetch(`${shareApiUrl}/api/video-share/x/auth/callback`, {
const response = await fetch(`${baseUrl}/api/video-share/x/auth/callback`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',

View File

@ -15,7 +15,7 @@ import { Tooltip, Button } from 'antd';
import { downloadVideo, downloadAllVideos, getFirstFrame } from '@/utils/tools';
import { showDownloadOptionsModal } from '@/components/pages/work-flow/download-options-modal';
import { post, get } from '@/api/request';
import { shareApiUrl } from '@/lib/env';
import { baseUrl } from '@/lib/env';
import ShareModal from '@/components/common/ShareModal';
import Masonry from 'react-masonry-css';
import debounce from 'lodash/debounce';

View File

@ -17,8 +17,7 @@ export interface EnvConfig {
javaUrl: string;
cutUrl: string;
cutUrlTo: string;
shareApiUrl: string;
// Google OAuth 配置
googleClientId: string;
googleRedirectUri: string;
@ -53,7 +52,6 @@ export const getEnvConfig = (): EnvConfig => {
javaUrl: process.env.NEXT_PUBLIC_JAVA_URL || 'https://77.app.java.auth.qikongjian.com',
cutUrl: process.env.NEXT_PUBLIC_CUT_URL || 'https://smartcut.api.movieflow.ai',
cutUrlTo: process.env.NEXT_PUBLIC_CUT_URL_TO || 'https://smartcut.api.movieflow.ai',
shareApiUrl: process.env.NEXT_PUBLIC_SHARE_API_URL || 'http://39.97.48.225:8000',
// Google OAuth 配置
googleClientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID || '847079918888-o1nne8d3ij80dn20qurivo987pv07225.apps.googleusercontent.com',
@ -92,7 +90,6 @@ export const {
javaUrl,
cutUrl,
cutUrlTo,
shareApiUrl,
// Google OAuth 配置
googleClientId,
@ -158,7 +155,7 @@ export const validateEnvConfig = (): { isValid: boolean; errors: string[] } => {
errors.push('NEXT_PUBLIC_JAVA_URL is required');
}
if (!shareApiUrl) {
if (!baseUrl) {
errors.push('NEXT_PUBLIC_SHARE_API_URL is required');
}
@ -180,7 +177,7 @@ export const validateEnvConfig = (): { isValid: boolean; errors: string[] } => {
}
try {
new URL(shareApiUrl);
new URL(baseUrl);
} catch {
errors.push('NEXT_PUBLIC_SHARE_API_URL must be a valid URL');
}
@ -202,7 +199,6 @@ export const logEnvConfig = (): void => {
javaUrl,
cutUrl,
cutUrlTo,
shareApiUrl,
googleClientId,
googleRedirectUri: getGoogleRedirectUri(),
gaEnabled,