功能:送花/礼物系统完整开发
- 新增 Gift 模型和 gifts 数据表(7种默认花卉,各有图片/金币/魅力配置) - 7张花卉图片生成并存放于 public/images/gifts/ - 名片弹窗新增送礼物 UI:图片选择列表、金币/魅力标注、数量选择 - sendFlower 控制器方法:按 gift_id 查找礼物、扣金币、加魅力、广播消息 - 聊天消息渲染支持显示礼物图片(含弹跳动画效果) - 后台可在 gifts 表中管理花卉类型(名称、图标、图片、金币、魅力、排序、启禁用)
This commit is contained in:
@@ -86,6 +86,9 @@ Route::middleware(['chat.auth'])->group(function () {
|
||||
Route::post('/chatbot/chat', [ChatBotController::class, 'chat'])->name('chatbot.chat');
|
||||
Route::post('/chatbot/clear', [ChatBotController::class, 'clearContext'])->name('chatbot.clear');
|
||||
|
||||
// ---- 送花/礼物互动 ----
|
||||
Route::post('/gift/flower', [ChatController::class, 'sendFlower'])->name('gift.flower');
|
||||
|
||||
// ---- 管理员命令(聊天室内实时操作)----
|
||||
Route::post('/command/warn', [AdminCommandController::class, 'warn'])->name('command.warn');
|
||||
Route::post('/command/kick', [AdminCommandController::class, 'kick'])->name('command.kick');
|
||||
|
||||
Reference in New Issue
Block a user