1
This commit is contained in:
@@ -364,12 +364,13 @@ const AdminSettings: React.FC = () => {
|
||||
</Typography.Text>
|
||||
);
|
||||
}
|
||||
const fullUrl = url.startsWith('http') ? url : `${import.meta.env.VITE_API_BASE || 'http://localhost:8000'}${url}`;
|
||||
const isGif = url.toLowerCase().endsWith('.gif');
|
||||
return isGif ? (
|
||||
<img src={url} alt="预览" style={{ width: '100%', maxHeight: 200, borderRadius: 8, background: '#f0f0f5', objectFit: 'contain' }} />
|
||||
<img src={fullUrl} alt="预览" style={{ width: '100%', maxHeight: 200, borderRadius: 8, background: '#f0f0f5', objectFit: 'contain' }} />
|
||||
) : (
|
||||
<video
|
||||
src={url}
|
||||
src={fullUrl}
|
||||
controls
|
||||
muted
|
||||
autoPlay
|
||||
|
||||
Reference in New Issue
Block a user