功能:送花/礼物系统完整开发
- 新增 Gift 模型和 gifts 数据表(7种默认花卉,各有图片/金币/魅力配置) - 7张花卉图片生成并存放于 public/images/gifts/ - 名片弹窗新增送礼物 UI:图片选择列表、金币/魅力标注、数量选择 - sendFlower 控制器方法:按 gift_id 查找礼物、扣金币、加魅力、广播消息 - 聊天消息渲染支持显示礼物图片(含弹跳动画效果) - 后台可在 gifts 表中管理花卉类型(名称、图标、图片、金币、魅力、排序、启禁用)
This commit is contained in:
@@ -628,4 +628,25 @@ a:hover {
|
||||
.avatar-option.selected {
|
||||
border-color: #336699;
|
||||
box-shadow: 0 0 6px rgba(51, 102, 153, 0.5);
|
||||
}
|
||||
|
||||
/* 送花礼物弹跳动画 */
|
||||
@keyframes giftBounce {
|
||||
0% {
|
||||
transform: scale(0.3) rotate(-15deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.3) rotate(5deg);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
70% {
|
||||
transform: scale(0.9) rotate(-3deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user