diff --git a/backend/gateway/controller/gallery_controller.go b/backend/gateway/controller/gallery_controller.go
index 80e3a1b..1f35420 100644
--- a/backend/gateway/controller/gallery_controller.go
+++ b/backend/gateway/controller/gallery_controller.go
@@ -608,7 +608,7 @@ func (ctrl *GalleryController) GetMyExhibitedAssets(c *gin.Context) {
items := make([]*dto.ExhibitedAssetItemDTO, 0, len(resp.Data.Items))
for _, item := range resp.Data.Items {
items = append(items, &dto.ExhibitedAssetItemDTO{
- AssetID: item.AssetId,
+ AssetID: item.AssetId,
Name: item.Name,
CoverURL: item.CoverUrl,
LikeCount: item.LikeCount,
@@ -616,6 +616,7 @@ func (ctrl *GalleryController) GetMyExhibitedAssets(c *gin.Context) {
ExpireAt: item.ExpireAt,
Earnings: item.Earnings,
SlotIndex: item.SlotIndex,
+ IsLenticular: item.IsLenticular,
})
}
@@ -797,7 +798,7 @@ func (ctrl *GalleryController) GetUserExhibitedAssets(c *gin.Context) {
items := make([]*dto.ExhibitedAssetItemDTO, 0, len(resp.Data.Items))
for _, item := range resp.Data.Items {
items = append(items, &dto.ExhibitedAssetItemDTO{
- AssetID: item.AssetId,
+ AssetID: item.AssetId,
Name: item.Name,
CoverURL: item.CoverUrl,
LikeCount: item.LikeCount,
@@ -805,6 +806,7 @@ func (ctrl *GalleryController) GetUserExhibitedAssets(c *gin.Context) {
ExpireAt: item.ExpireAt,
Earnings: item.Earnings,
SlotIndex: item.SlotIndex,
+ IsLenticular: item.IsLenticular,
})
}
diff --git a/backend/gateway/dto/gallery_dto.go b/backend/gateway/dto/gallery_dto.go
index e66ac66..a7dfa55 100644
--- a/backend/gateway/dto/gallery_dto.go
+++ b/backend/gateway/dto/gallery_dto.go
@@ -73,14 +73,15 @@ type UnlockSlotResponseDTO struct {
// ExhibitedAssetItemDTO 展出的作品项
type ExhibitedAssetItemDTO struct {
- AssetID int64 `json:"asset_id"` // 资产ID
- Name string `json:"name"` // 藏品名称
- CoverURL string `json:"cover_url"` // 封面图URL
- LikeCount int32 `json:"like_count"` // 实时点赞数
- ExhibitedAt int64 `json:"exhibited_at"` // 展出开始时间(毫秒时间戳)
- ExpireAt int64 `json:"expire_at"` // 展出过期时间(毫秒时间戳)
- Earnings int64 `json:"earnings"` // 当前可领取收益
- SlotIndex int32 `json:"slot_index"` // 展位序号
+ AssetID int64 `json:"asset_id"` // 资产ID
+ Name string `json:"name"` // 藏品名称
+ CoverURL string `json:"cover_url"` // 封面图URL
+ LikeCount int32 `json:"like_count"` // 实时点赞数
+ ExhibitedAt int64 `json:"exhibited_at"` // 展出开始时间(毫秒时间戳)
+ ExpireAt int64 `json:"expire_at"` // 展出过期时间(毫秒时间戳)
+ Earnings int64 `json:"earnings"` // 当前可领取收益
+ SlotIndex int32 `json:"slot_index"` // 展位序号
+ IsLenticular bool `json:"is_lenticular"` // 是否为光栅卡
}
// GetMyExhibitedAssetsResponseDTO 获取我展出的作品列表响应
diff --git a/backend/pkg/proto/gallery/gallery.pb.go b/backend/pkg/proto/gallery/gallery.pb.go
index ce28950..687586d 100644
--- a/backend/pkg/proto/gallery/gallery.pb.go
+++ b/backend/pkg/proto/gallery/gallery.pb.go
@@ -1215,14 +1215,15 @@ func (x *ExhibitedAssetsData) GetHasMore() bool {
// 展出作品项
type ExhibitedAssetItem struct {
state protoimpl.MessageState `protogen:"open.v1"`
- AssetId int64 `protobuf:"varint,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` // 资产ID
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 藏品名称
- CoverUrl string `protobuf:"bytes,3,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url,omitempty"` // 封面图URL
- LikeCount int32 `protobuf:"varint,4,opt,name=like_count,json=likeCount,proto3" json:"like_count,omitempty"` // 实时点赞数
- ExhibitedAt int64 `protobuf:"varint,5,opt,name=exhibited_at,json=exhibitedAt,proto3" json:"exhibited_at,omitempty"` // 展出开始时间(毫秒时间戳)
- ExpireAt int64 `protobuf:"varint,6,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"` // 展出过期时间(毫秒时间戳)
- Earnings int64 `protobuf:"varint,7,opt,name=earnings,proto3" json:"earnings,omitempty"` // 当前可领取收益
- SlotIndex int32 `protobuf:"varint,8,opt,name=slot_index,json=slotIndex,proto3" json:"slot_index,omitempty"` // 展位序号
+ AssetId int64 `protobuf:"varint,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` // 资产ID
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 藏品名称
+ CoverUrl string `protobuf:"bytes,3,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url,omitempty"` // 封面图URL
+ LikeCount int32 `protobuf:"varint,4,opt,name=like_count,json=likeCount,proto3" json:"like_count,omitempty"` // 实时点赞数
+ ExhibitedAt int64 `protobuf:"varint,5,opt,name=exhibited_at,json=exhibitedAt,proto3" json:"exhibited_at,omitempty"` // 展出开始时间(毫秒时间戳)
+ ExpireAt int64 `protobuf:"varint,6,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"` // 展出过期时间(毫秒时间戳)
+ Earnings int64 `protobuf:"varint,7,opt,name=earnings,proto3" json:"earnings,omitempty"` // 当前可领取收益
+ SlotIndex int32 `protobuf:"varint,8,opt,name=slot_index,json=slotIndex,proto3" json:"slot_index,omitempty"` // 展位序号
+ IsLenticular bool `protobuf:"varint,9,opt,name=is_lenticular,json=isLenticular,proto3" json:"is_lenticular,omitempty"` // 是否为光栅卡(根据 tags 判断)
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1313,6 +1314,13 @@ func (x *ExhibitedAssetItem) GetSlotIndex() int32 {
return 0
}
+func (x *ExhibitedAssetItem) GetIsLenticular() bool {
+ if x != nil {
+ return x.IsLenticular
+ }
+ return false
+}
+
// 获取灵感瀑布藏品列表请求
type GetInspirationFlowRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -1809,7 +1817,7 @@ const file_gallery_proto_rawDesc = "" +
"\x04page\x18\x02 \x01(\x05R\x04page\x12\x1b\n" +
"\tpage_size\x18\x03 \x01(\x05R\bpageSize\x12\x14\n" +
"\x05total\x18\x04 \x01(\x03R\x05total\x12\x19\n" +
- "\bhas_more\x18\x05 \x01(\bR\ahasMore\"\xfa\x01\n" +
+ "\bhas_more\x18\x05 \x01(\bR\ahasMore\"\x9f\x02\n" +
"\x12ExhibitedAssetItem\x12\x19\n" +
"\basset_id\x18\x01 \x01(\x03R\aassetId\x12\x12\n" +
"\x04name\x18\x02 \x01(\tR\x04name\x12\x1b\n" +
@@ -1820,7 +1828,8 @@ const file_gallery_proto_rawDesc = "" +
"\texpire_at\x18\x06 \x01(\x03R\bexpireAt\x12\x1a\n" +
"\bearnings\x18\a \x01(\x03R\bearnings\x12\x1d\n" +
"\n" +
- "slot_index\x18\b \x01(\x05R\tslotIndex\"\x9a\x01\n" +
+ "slot_index\x18\b \x01(\x05R\tslotIndex\x12#\n" +
+ "\ris_lenticular\x18\t \x01(\bR\fisLenticular\"\x9a\x01\n" +
"\x19GetInspirationFlowRequest\x12\x16\n" +
"\x06cursor\x18\x01 \x01(\tR\x06cursor\x12\x1c\n" +
"\tdirection\x18\x02 \x01(\tR\tdirection\x12\x14\n" +
diff --git a/backend/proto/gallery.proto b/backend/proto/gallery.proto
index 80fcd7f..e1f5742 100644
--- a/backend/proto/gallery.proto
+++ b/backend/proto/gallery.proto
@@ -208,6 +208,7 @@ message ExhibitedAssetItem {
int64 expire_at = 6; // 展出过期时间(毫秒时间戳)
int64 earnings = 7; // 当前可领取收益
int32 slot_index = 8; // 展位序号
+ bool is_lenticular = 9; // 是否为光栅卡(根据 tags 判断)
}
// ==================== 灵感瀑布相关消息 ====================
diff --git a/backend/services/galleryService/repository/gallery_repository.go b/backend/services/galleryService/repository/gallery_repository.go
index 1e44def..10e1101 100644
--- a/backend/services/galleryService/repository/gallery_repository.go
+++ b/backend/services/galleryService/repository/gallery_repository.go
@@ -92,14 +92,15 @@ type InspirationFlowItem struct {
// ExhibitedAssetInfo 我展出的作品信息
type ExhibitedAssetInfo struct {
- AssetID int64
- Name string
- CoverURL string
- LikeCount int32
- ExhibitedAt int64
- ExpireAt int64
- Earnings int64
- SlotIndex int32
+ AssetID int64
+ Name string
+ CoverURL string
+ LikeCount int32
+ ExhibitedAt int64
+ ExpireAt int64
+ Earnings int64
+ SlotIndex int32
+ IsLenticular bool
}
// galleryRepository Repository实现
@@ -418,7 +419,8 @@ func (r *galleryRepository) GetMyExhibitedAssets(userID, starID int64, page, pag
err = r.db.Model(&models.Exhibition{}).
Raw(`
SELECT exhibitions.asset_id, a.name, a.cover_url, a.like_count,
- exhibitions.start_time as exhibited_at, exhibitions.expire_at, bs.slot_index
+ exhibitions.start_time as exhibited_at, exhibitions.expire_at, bs.slot_index,
+ (a.tags @> '["craft:lenticular"]') as is_lenticular
FROM exhibitions
JOIN assets a ON a.id = exhibitions.asset_id
JOIN booth_slots bs ON bs.slot_id = exhibitions.slot_id
@@ -462,7 +464,8 @@ func (r *galleryRepository) GetUserExhibitedAssets(userID, starID int64, page, p
err = r.db.Model(&models.Exhibition{}).
Raw(`
SELECT exhibitions.asset_id, a.name, a.cover_url, a.like_count,
- exhibitions.start_time as exhibited_at, exhibitions.expire_at, bs.slot_index
+ exhibitions.start_time as exhibited_at, exhibitions.expire_at, bs.slot_index,
+ (a.tags @> '["craft:lenticular"]') as is_lenticular
FROM exhibitions
JOIN assets a ON a.id = exhibitions.asset_id
JOIN booth_slots bs ON bs.slot_id = exhibitions.slot_id
diff --git a/backend/services/galleryService/service/exhibition_service.go b/backend/services/galleryService/service/exhibition_service.go
index e9fdab6..9f154a9 100644
--- a/backend/services/galleryService/service/exhibition_service.go
+++ b/backend/services/galleryService/service/exhibition_service.go
@@ -209,14 +209,15 @@ func (s *exhibitionService) GetMyExhibitedAssets(ctx context.Context, userID, st
pbItems := make([]*pb.ExhibitedAssetItem, 0, len(items))
for _, item := range items {
pbItems = append(pbItems, &pb.ExhibitedAssetItem{
- AssetId: item.AssetID,
- Name: item.Name,
- CoverUrl: item.CoverURL,
- LikeCount: item.LikeCount,
- ExhibitedAt: item.ExhibitedAt,
- ExpireAt: item.ExpireAt,
- Earnings: item.Earnings,
- SlotIndex: item.SlotIndex,
+ AssetId: item.AssetID,
+ Name: item.Name,
+ CoverUrl: item.CoverURL,
+ LikeCount: item.LikeCount,
+ ExhibitedAt: item.ExhibitedAt,
+ ExpireAt: item.ExpireAt,
+ Earnings: item.Earnings,
+ SlotIndex: item.SlotIndex,
+ IsLenticular: item.IsLenticular,
})
}
diff --git a/frontend/components/lenticular/LenticularCard.vue b/frontend/components/lenticular/LenticularCard.vue
index 3ee0251..06a69da 100644
--- a/frontend/components/lenticular/LenticularCard.vue
+++ b/frontend/components/lenticular/LenticularCard.vue
@@ -39,11 +39,11 @@
-
+
diff --git a/frontend/pages/profile/myWorks.vue b/frontend/pages/profile/myWorks.vue
index 00f5309..437dd4c 100644
--- a/frontend/pages/profile/myWorks.vue
+++ b/frontend/pages/profile/myWorks.vue
@@ -28,7 +28,17 @@
- onLenticularSimulate(item.id, x, y)"
+ />
+
@@ -167,12 +177,15 @@