update code level
This commit is contained in:
@@ -235,7 +235,7 @@ async function loadAlbum(albumId) {
|
||||
// 显示骨架屏
|
||||
showImageSkeleton();
|
||||
|
||||
const response = await fetch(`/api/album/${albumId}`);
|
||||
const response = await fetch(`${API_BASE}/album/${albumId}`);
|
||||
if (!response.ok) {
|
||||
if (response.status === 404) {
|
||||
throw new Error('相册不存在');
|
||||
@@ -431,7 +431,7 @@ function displayImages() {
|
||||
let dataSrc = '';
|
||||
|
||||
if (image.id) {
|
||||
dataSrc = `/api/image/${image.id}`;
|
||||
dataSrc = `${API_BASE}/image/${image.id}`;
|
||||
imageUrl = '/assets/placeholder.svg'; // 初始使用占位图
|
||||
} else if (image.original_url) {
|
||||
dataSrc = image.original_url;
|
||||
@@ -545,7 +545,7 @@ function updateLightboxContent(newIndex) {
|
||||
// 在lightbox中优先使用原始图片以获得更好的显示效果
|
||||
let imageUrl = '/assets/placeholder.svg';
|
||||
if (image.id) {
|
||||
imageUrl = `/api/image/${image.id}`;
|
||||
imageUrl = `${API_BASE}/image/${image.id}`;
|
||||
} else if (image.original_url) {
|
||||
imageUrl = image.original_url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user