refactor(api): 对齐后端字段,移除前端臆造字段
This commit is contained in:
@@ -17,10 +17,8 @@ interface GalleryCloud {
|
||||
id: string
|
||||
user_id: string
|
||||
cloud_type_id: number | null
|
||||
custom_cloud_type: string | null
|
||||
image_url: string
|
||||
thumbnail_url: string | null
|
||||
location_name: string | null
|
||||
description: string | null
|
||||
latitude: number | null
|
||||
longitude: number | null
|
||||
@@ -88,10 +86,8 @@ function toGalleryCloud(row: ApiCloud) {
|
||||
id: row.id,
|
||||
user_id: row.user_id,
|
||||
cloud_type_id: row.cloud_type_id,
|
||||
custom_cloud_type: row.custom_cloud_type,
|
||||
image_url: row.image_url,
|
||||
thumbnail_url: row.thumbnail_url,
|
||||
location_name: row.location_name,
|
||||
description: row.description,
|
||||
latitude: row.latitude,
|
||||
longitude: row.longitude,
|
||||
@@ -99,7 +95,7 @@ function toGalleryCloud(row: ApiCloud) {
|
||||
created_at: row.created_at,
|
||||
status: row.status,
|
||||
is_hidden: row.is_hidden,
|
||||
cloudTypeName: row.cloud_type_name || row.custom_cloud_type || '未知',
|
||||
cloudTypeName: row.cloud_type_name || '未知',
|
||||
cloudTypeRarity: row.cloud_type_rarity_value ?? 0,
|
||||
username: row.username || '匿名',
|
||||
} satisfies GalleryCloud
|
||||
@@ -554,7 +550,6 @@ onUnmounted(() => {
|
||||
<MiniLocationMap
|
||||
:latitude="selectedCloud.latitude"
|
||||
:longitude="selectedCloud.longitude"
|
||||
:location-name="selectedCloud.location_name"
|
||||
/>
|
||||
|
||||
<template v-if="selectedCloudIsMine" #actions>
|
||||
|
||||
Reference in New Issue
Block a user