@@ -208,6 +201,25 @@ function formatDate(dateString: string): string {
return `${year}-${month}-${day}`
}
+function getImageUrl(imageUrl: string): string {
+ if (!imageUrl) return ''
+ if (imageUrl.startsWith('http')) {
+ return imageUrl
+ }
+ // 使用云端URL拼接
+ const cloudUrl = 'https://cloud.jingrow.com'
+ return `${cloudUrl}${imageUrl.startsWith('/') ? '' : '/'}${imageUrl}`
+}
+
+function handleImageError(event: Event) {
+ const img = event.target as HTMLImageElement
+ img.style.display = 'none'
+ const placeholder = img.parentElement?.querySelector('.placeholder-image') as HTMLElement
+ if (placeholder) {
+ placeholder.style.display = 'flex'
+ }
+}
+
function goBack() {
// 从查询参数获取返回路径
const returnTo = route.query.returnTo as string
@@ -467,15 +479,19 @@ onMounted(() => {
display: flex;
align-items: center;
justify-content: center;
+ background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
+ position: relative;
}
-.tool-icon-container {
+.tool-image img {
width: 100%;
height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 20px;
+ min-height: 300px;
+ object-fit: cover;
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
}
.placeholder-image {
@@ -485,6 +501,7 @@ onMounted(() => {
align-items: center;
justify-content: center;
color: #9ca3af;
+ background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}
.tool-header {
diff --git a/apps/jingrow/frontend/src/views/dev/ToolMarketplace.vue b/apps/jingrow/frontend/src/views/dev/ToolMarketplace.vue
index 85cddea..9894d4f 100644
--- a/apps/jingrow/frontend/src/views/dev/ToolMarketplace.vue
+++ b/apps/jingrow/frontend/src/views/dev/ToolMarketplace.vue
@@ -57,16 +57,15 @@