From d9b0aa27e525c973225023390b08df80efbe34e3 Mon Sep 17 00:00:00 2001 From: Pine Date: Wed, 13 May 2026 01:19:41 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=9B=BE=E6=A0=87=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=81=E8=A7=86=E9=A2=91=E7=BC=A9=E7=95=A5=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/tauri.conf.json | 2 +- src/pages/Admin.jsx | 31 +++++++++++++++-------------- src/pages/Screen.jsx | 13 +++++++------ src/styles/admin.css | 41 +++++++++++++++++++++++++++++++++++++++ src/utils/api.js | 2 ++ 5 files changed, 67 insertions(+), 22 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 8e0ef97..c45bb9c 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "$schema": "https://schema.tauri.app/config/2", - "productName": "dpm", + "productName": "昆明大学生创业园展播系统", "version": "0.1.0", "identifier": "com.pine.dpm", "build": { diff --git a/src/pages/Admin.jsx b/src/pages/Admin.jsx index 2201e6c..e4e57c7 100644 --- a/src/pages/Admin.jsx +++ b/src/pages/Admin.jsx @@ -1,5 +1,6 @@ import { useState, useEffect, useCallback, useRef } from 'react'; import * as api from '../utils/api'; +import { API_BASE } from '../utils/api'; import '../styles/admin.css'; /* ============ SVG Icons ============ */ @@ -67,7 +68,7 @@ function PreviewModal({ item, onClose, onAddToPlaylist, onDelete }) { if (!item) return null; - const previewUrl = item.source === 'url' ? item.relative_path : `/file/${item.relative_path}`; + const previewUrl = item.source === 'url' ? item.relative_path : `${API_BASE}/file/${item.relative_path}`; const overlayClass = `modal-overlay${closing ? ' closing' : ''}`; return ( @@ -101,14 +102,17 @@ function PreviewModal({ item, onClose, onAddToPlaylist, onDelete }) { /* ============ Media Card ============ */ function MediaCard({ item, onPreview, onAddToPlaylist, onDelete, showRemove, onRemove }) { - const thumbUrl = item.source === 'url' ? item.relative_path : `/file/${item.relative_path}`; + const thumbUrl = item.source === 'url' ? item.relative_path : `${API_BASE}/file/${item.relative_path}`; return (
{item.type === 'image' ? ( {item.name} onPreview(item)} /> ) : ( -