功能更新与UI优化:游戏图标移除、用户名片修复、婚礼红包界面重设计
- 移除聊天室右下角浮动游戏图标(占卜、百家乐、赛马、老虎机) - 用户名片按钮区:修复已婚/已好友时按钮换行问题,统一单行显示 - 婚礼红包弹窗:重设计为喜庆鲜红背景,领取按钮改为圆形米黄样式 - 新增婚礼红包恢复接口(/wedding/pending-envelopes),刷新后自动恢复领取按钮 - 修复 Alpine :style 字符串覆盖静态 style 导致圆形按钮失效的问题 - 撤职后用户等级改为根据经验值重新计算,不再无条件重置为1 - 管理员修改用户经验值后自动重算等级,有职务用户等级锁定 - 娱乐大厅钓鱼游戏按钮直接调用 startFishing() 简化操作流程 - 新增赛马、占卜、百家乐游戏及相关后端逻辑
This commit is contained in:
@@ -213,7 +213,7 @@ class AppointmentService
|
||||
->whereNull('logout_at')
|
||||
->whereDate('login_at', today())
|
||||
->update([
|
||||
'logout_at' => now(),
|
||||
'logout_at' => now(),
|
||||
'duration_seconds' => DB::raw('TIMESTAMPDIFF(SECOND, login_at, NOW())'),
|
||||
]);
|
||||
|
||||
@@ -222,12 +222,17 @@ class AppointmentService
|
||||
->whereNull('logout_at')
|
||||
->whereDate('login_at', '<', today())
|
||||
->update([
|
||||
'logout_at' => DB::raw('login_at'),
|
||||
'logout_at' => DB::raw('login_at'),
|
||||
'duration_seconds' => 0,
|
||||
]);
|
||||
|
||||
// user_level 归 1(由系统经验值自然升级机制重新成长)
|
||||
$target->update(['user_level' => 1]);
|
||||
// 撤职后:按当前经验值重新计算等级(不再无条件归 1)
|
||||
// 这样用户撤职后能保留正常的经验升级成果
|
||||
$recalcLevel = \App\Models\Sysparam::calculateLevel($target->exp_num ?? 0);
|
||||
$superLevel = (int) \App\Models\Sysparam::getValue('superlevel', '100');
|
||||
// 不超过满级阈值
|
||||
$safeLevel = max(1, min($recalcLevel, $superLevel - 1));
|
||||
$target->update(['user_level' => $safeLevel]);
|
||||
|
||||
// 写入权限操作日志
|
||||
$this->logAuthority(
|
||||
|
||||
Reference in New Issue
Block a user