优化手机输入及钓鱼
This commit is contained in:
@@ -167,12 +167,15 @@ class ShopController extends Controller
|
||||
$fishDuration = $mins >= 60 ? floor($mins / 60).'小时' : $mins.'分钟';
|
||||
}
|
||||
|
||||
// 自动钓鱼卡购买通知要真正归属到“钓鱼播报”,这样前端屏蔽规则才能直接命中。
|
||||
$broadcastFromUser = $item->type === 'auto_fishing' ? '钓鱼播报' : '系统传音';
|
||||
|
||||
// 根据商品类型生成不同通知文案
|
||||
$sysContent = match ($item->type) {
|
||||
'duration' => "📅 【{$user->username}】购买了全屏特效周卡「{$item->name}」,登录时将自动触发!",
|
||||
'one_time' => "🎫 【{$user->username}】购买了「{$item->name}」道具!",
|
||||
'ring' => "💍 【{$user->username}】在商店购买了一枚「{$item->name}」,不知道打算送给谁呢?",
|
||||
'auto_fishing' => "🎣【钓鱼播报】:【{$user->username}】购买了「{$item->name}」,开启了 {$fishDuration} 的自动钓鱼模式!",
|
||||
'auto_fishing' => "🎣 【{$user->username}】购买了「{$item->name}」,开启了 {$fishDuration} 的自动钓鱼模式!",
|
||||
default => "🛒 【{$user->username}】购买了「{$item->name}」。",
|
||||
};
|
||||
|
||||
@@ -181,7 +184,7 @@ class ShopController extends Controller
|
||||
message: [
|
||||
'id' => 0,
|
||||
'room_id' => $roomId,
|
||||
'from_user' => '系统传音',
|
||||
'from_user' => $broadcastFromUser,
|
||||
'to_user' => '大家',
|
||||
'content' => $sysContent,
|
||||
'font_color' => '#7c3aed',
|
||||
|
||||
Reference in New Issue
Block a user